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 


is "readInteger" the button reading the 4 bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Mon Feb 22, 2016 3:56 am    Post subject: is "readInteger" the button reading the 4 bytes Reply with quote

so I am making a set custom respawn time for a trainer and I made this script which is simple but I get something weird

Code:
function CEButtonReadClick(sender)
   setProperty(Asphalt8Time.CEEditRT,"Text", readInteger("Asphalt8_w8.exe+______"))
 end
function CEButtonWriteClick(sender)
   writeInteger("Asphalt8_w8.exe+______", getProperty(Asphalt8Time.CEEditRT,"Text"))
 end


when I press read I get a value of 9738379 but I know that the 4 bytes value is actually 1500. how do I make it so it reads 1500 and not 9738379 and also is "readInteger" the button reading the 4 byte value because if it is then... I don't know what to do.



12765534_910372485698205_523107905_o - Copy (3) - Copy.jpg
 Description:
This is after I pressed "Read Nitro Respawn Time"
 Filesize:  17.71 KB
 Viewed:  4012 Time(s)

12765534_910372485698205_523107905_o - Copy (3) - Copy.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Mon Feb 22, 2016 11:34 am    Post subject: Reply with quote

readInteger(address) reads 4 bytes starting at the specified address and translates that into a little-endian 4 byte integer. I've had no problems with it in the past, so I don't think it's a problem on CE's side.

Are you absolutely certain that address ("Asphalt8_w8.exe+______") is 1500? Add an address manually to your cheat table and copy/paste that address into it. Make sure the type is 4-bytes.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
rog9001
Expert Cheater
Reputation: 2

Joined: 22 Dec 2015
Posts: 214
Location: Jupiter

PostPosted: Mon Feb 22, 2016 11:47 am    Post subject: Reply with quote

ParkourPenguin wrote:
readInteger(address) reads 4 bytes starting at the specified address and translates that into a little-endian 4 byte integer. I've had no problems with it in the past, so I don't think it's a problem on CE's side.

Are you absolutely certain that address ("Asphalt8_w8.exe+______") is 1500? Add an address manually to your cheat table and copy/paste that address into it. Make sure the type is 4-bytes.


I actually have a new question. Is there a way to make that script read a pointer and then write to the pointer or is that not possible?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Mon Feb 22, 2016 11:50 am    Post subject: Reply with quote

Code:
writeInteger('["Tutorial-i386.exe"+2345D0]+480',100)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Lua Scripting 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