Posted: Thu May 30, 2013 3:17 pm Post subject: Increasing/decreasing an 8 byte integer value
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.
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 _________________
I'm rusty and getting older, help me re-learn lua.
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.
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