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 


Increasing/decreasing an 8 byte integer value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
jamesrussel
How do I cheat?
Reputation: 0

Joined: 30 May 2013
Posts: 4

PostPosted: Thu May 30, 2013 3:17 pm    Post subject: Increasing/decreasing an 8 byte integer value Reply with quote

I'm making a script to find and change the X coordinates in a game. So far I'm able to pinpoint the the addresses in memory.

The addresses hold what looks like unsigned long ints (ex. from a scan:
    Value 0: 4625171475372883181
    Value 1: 4625206630044903024
    Value 2: 4625171475372883181
    Value 3: 4625171475372883181
    Value 4: 4625171475372883181
    Value 5: 4611417769331549024
    Value 6: 4625171475372883181
    Value 7: 4625171475372883181
    Value 8: 4625202493076300502
    Value 9: 4625202493076300502
    Value 10: 4625211700912384134
    Value 11: 4624890000396172525
    Value 12: 4625343230564655830
)

I'm just having a problem predictably changing the values. I can only write individual bytes with writeBytes and there isn't an option to write an unsigned long int. How can I do this in cheat engine?

Ideally I'd want to read a value from foundlist_getValue(), increase or decrease it by a certain amount, then write it to memory.

I'm using a 64 bit operating system, by the way.
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu May 30, 2013 3:26 pm    Post subject: Reply with quote

Code:
print(readQword("Value 0")) --edit this to your address for 8bytes

to increase it you can do (example ofcourse)
Code:
writeQword("04D9A3F0", readQword("04D9A3F0")+1)

Also your game holds the X cord in either float or double.
To verify it, change the type to double
and make sure the address ends with 0 or 8.
if theres not an easy to use value (like if it shows 1.003-e3), try float.
make sure address ends with 0 or 4 or 8 or c

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu May 30, 2013 4:25 pm    Post subject: Reply with quote

Those are doubles

Value 0: 4625171475372883181 = 15.95498...
Value 1: 4625206630044903024 = 16.03486...
Value 8: 4625202493076300502 = 16.02016...
Value 10: 4625211700912384134 = 16.05287...
Value 11: 4624890000396172525 = 15.45498...
Value 12: 4625343230564655830 = 16.52016...

_________________
Back to top
View user's profile Send private message MSN Messenger
jamesrussel
How do I cheat?
Reputation: 0

Joined: 30 May 2013
Posts: 4

PostPosted: Mon Jun 03, 2013 2:50 pm    Post subject: Reply with quote

Thank you, the value was a double after all. I found that searching for a vtQword in the scans and reading the values using readDouble was a lot faster than scanning for vtDouble. Maybe you guys could change the code to convert a vtDouble scan to a vtQword scan behind the scenes and output the results in Double format.
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