Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Suggestion to CE,Please add Copy&paste address in LUA fo

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
happyreadygo
Advanced Cheater
Reputation: 1

Joined: 14 Sep 2011
Posts: 87

PostPosted: Tue Jan 15, 2013 7:42 am    Post subject: Suggestion to CE,Please add Copy&paste address in LUA fo Reply with quote

most of the time , I always using function readInteger or readBytes
first , I find addresses and add it in CE gui.
next ,I making trainer by using Lua.
next ,I added the addresses into Lua.
the trainer is done..

However,It takes time to do an address specified in Lua. The more pointer level the more time to specified.

There should be a 1 click CE gui button to copy&paste those address in the format like this...
Code:
readInteger(readInteger(readInteger(0x12345678)+0x01)+0x24)+0x32)



the same with writeInteger....
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25778
Location: The netherlands

PostPosted: Tue Jan 15, 2013 7:59 am    Post subject: Reply with quote

It should be possible to write a lua script that convert the selected entry in the table to the proper format. (perhaps when I get time later today I can look into this)

Also, an alternate notation that ce supports is:
Code:

errorOnLookupFailure(false)
...
x=readInteger("[[[12345678]+1]+24]+32")

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25778
Location: The netherlands

PostPosted: Tue Jan 15, 2013 7:51 pm    Post subject: Reply with quote

Copy this .lua file your autorun folder in cheat engine and you will be able to press ctrl+alt+c to copy the address in an lua acceptable formatted string

edit: fixed



copy.lua
 Description:

Download
 Filename:  copy.lua
 Filesize:  1.18 KB
 Downloaded:  480 Time(s)


_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping


Last edited by Dark Byte on Wed Jan 16, 2013 4:06 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
happyreadygo
Advanced Cheater
Reputation: 1

Joined: 14 Sep 2011
Posts: 87

PostPosted: Tue Jan 15, 2013 10:32 pm    Post subject: Reply with quote

thank you ,darkbyte .I am going to try it now Very Happy

update..
It got some problem... the offset always in reverse order.
Code:
[[[[641d30]+b0]+a8]+14]+cc


the correct one should be

Code:
[[[[641d30]+cc]+14]+a8]+b0
Back to top
View user's profile Send private message
ablonevn
Advanced Cheater
Reputation: 1

Joined: 02 Oct 2011
Posts: 59

PostPosted: Wed Jan 16, 2013 12:48 am    Post subject: Reply with quote

happyreadygo wrote:
thank you ,darkbyte .I am going to try it now Very Happy

update..
It got some problem... the offset always in reverse order.
Code:
[[[[641d30]+b0]+a8]+14]+cc


the correct one should be

Code:
[[[[641d30]+cc]+14]+a8]+b0


Here is another simply read address, this function will read health value in tutorial step 2:
Code:

strings_add(getAutoAttachList(), "tutorial-i386.exe");
function readPointerAddr(s)
   local t,l,c1,c2,rs;
   c1=0;
   c2=0;
   l=string.len(s);
   s=string.gsub(s,".",function(w)
      if (w=="[") then
         w="readInteger(";
         c1=c1+1;
      else
         if w=="]" then
            w=")"
            c2=c2+1;
         end
      end
      return w;
   end);

   if (c1==c2) then
      s=string.format("return %s",s);
      t=loadstring(s);
      if t~=nil then
         rs=t();
      end
   else
      print("Error on expression");
      rs=0;
   end
   return rs;
end
s="[[["..getAddress("tutorial-i386.exe+18EED0").."]+0x38]+0x478]";
print(readPointerAddr(s));


--for your address
print(readPointerAddr("[[[[641d30]+cc]+14]+a8]+b0"));
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25778
Location: The netherlands

PostPosted: Wed Jan 16, 2013 4:14 am    Post subject: Reply with quote

I've uploaded a new version that should work better (just inverted the for loop)

ablove, I've rewritten your code a bit smaller:
Code:

function readPointerAddr(s)
  return readInteger(s)
end

s="[[[tutorial-i386.exe+18EED0]+0x38]+0x478]";
print(readPointerAddr(s));

Since it can just take such a string and read it as an integer

Also, your tutorial seems to be different from the 6.2 release

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
ablonevn
Advanced Cheater
Reputation: 1

Joined: 02 Oct 2011
Posts: 59

PostPosted: Wed Jan 16, 2013 8:49 am    Post subject: Reply with quote

Dark Byte wrote:
I've uploaded a new version that should work better (just inverted the for loop)

ablove, I've rewritten your code a bit smaller:
Code:

function readPointerAddr(s)
  return readInteger(s)
end

s="[[[tutorial-i386.exe+18EED0]+0x38]+0x478]";
print(readPointerAddr(s));

Since it can just take such a string and read it as an integer

Also, your tutorial seems to be different from the 6.2 release

woho, i have run that command once in past but it don't work, and now your version worked, perhaps i was input something wrong in past. what a funy Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites