View previous topic :: View next topic |
Author |
Message |
Affly Cheater
Reputation: 1
Joined: 29 Sep 2013 Posts: 42
|
Posted: Tue Jan 05, 2016 6:24 am Post subject: Changing various values |
|
|
I want to cheat the inventory in a game. Each item is a individual entry in an array in the obtained order so 2 same items are in different spots.
An item is made of 4 bytes. First byte always follows the same rule and I want to change it so: 0X->0F, 4X->4F, 8X->8F, CX->CF. X in this case can be any value from 0 to F. The other 3 bytes can't be changed.
I added the adresses and tried to manually change them, however the sort by value function seems to breakdown after around 500 entries while I have ~2400 values to change.
I never touched Lua in depth so I don't know what I could use to achieve that result. Any help is apreciated.
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Jan 05, 2016 5:45 pm Post subject: |
|
|
If I understand you correctly:
Code: | local addrStart = 0x00000000
local addrEnd = 0x00000000
local addrSize = 4
for addr=addrStart,addrEnd,addrSize do
local value = readBytes(addr, 1)
value = bOr(value, 15)
writeBytes(addr, value)
end |
|
|
Back to top |
|
 |
Affly Cheater
Reputation: 1
Joined: 29 Sep 2013 Posts: 42
|
Posted: Wed Jan 06, 2016 8:52 am Post subject: |
|
|
It's exactly what I needed. Thanks!
|
|
Back to top |
|
 |
|