 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Forumic How do I cheat?
Reputation: 0
Joined: 01 Sep 2017 Posts: 5 Location: Finland
|
Posted: Tue May 17, 2022 4:01 am Post subject: Any easy+quick way to add a specific sum to all table addr? |
|
|
Hi!
So, just asking, if there's an easy & quick way to add a specific sum to all addresses in the table?
I have all the header pointers of a file in the table, and I'd need to add an offset to all of them (an offset of dec 768 specifically).
I've got them all in the table as arrays of bytes, and to accomplish what I need, I'd basically just have to add "03" in hex to the 2nd byte in all addresses.
I probably explained that in a horrible and confusing way, but anyone who got what I meant, is it possible? If it requires the Lua functions, you'll have to guide me a bit, as I'm not at all familiar with them.
Thanks in advance.
-EDIT: Added image to clear any confusion.
| Description: |
| So what I'm looking for is to easily add the same amount to all of the address values; So to make the first one go from 10 99 02 00 to 10 9C 02 00 and so on. |
|
| Filesize: |
32.73 KB |
| Viewed: |
1660 Time(s) |

|
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4718
|
Posted: Tue May 17, 2022 10:35 am Post subject: |
|
|
Change them all to 4-byte values, select them all, and change the value (shortcut enter) to "value+0x300" no quotes
PS: that image makes me more confused. The first page of any process (addresses 0-0xFFF) should be unmapped- they can't have values. Are you offsetting the base of the address space somehow? (I forget the Lua function)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1533
|
Posted: Tue May 17, 2022 10:46 am Post subject: |
|
|
In my case this code works.
| Code: | function AddValue(byt,val)
local al=getAddressList()
cnt = addresslist_getCount(al)
if cnt > 0 then
for i=0, cnt-1 do
local mr = addresslist_getMemoryRecord(al,i).Address.."+"..byt
--print(i,mr)
val1=readByte(mr) + val
--print(val1)
writeBytes(mr,val1)
end
end
end
--Let's consider the byte calculation as follows;
-- 1 - 2 - 3 - 4 --> Bytes Value
-- 0 - 1 - 2 - 3 --> Address List
--10-99-02-00 --> Byte 2 = addList 1 = "99"
--AddValue( add byte, add value)
AddValue("01","03") --10 99 02 00 --> 10 9C 02 00 |
_________________
|
|
| Back to top |
|
 |
Forumic How do I cheat?
Reputation: 0
Joined: 01 Sep 2017 Posts: 5 Location: Finland
|
Posted: Tue May 17, 2022 7:14 pm Post subject: |
|
|
| ParkourPenguin wrote: | Change them all to 4-byte values, select them all, and change the value (shortcut enter) to "value+0x300" no quotes
PS: that image makes me more confused. The first page of any process (addresses 0-0xFFF) should be unmapped- they can't have values. Are you offsetting the base of the address space somehow? (I forget the Lua function) |
Ahh, huge thanks. That works. Cheers!
And yeah, I was opening a file in CE, basically using it as a hex editor (because CE supports wildcard AoB scanning.)
|
|
| Back to top |
|
 |
|
|
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
|
|