View previous topic :: View next topic |
Author |
Message |
The Dab Cheater Reputation: 0
Joined: 22 May 2017 Posts: 33
|
Posted: Sun Sep 10, 2017 2:59 pm Post subject: Offsets don't add up? |
|
|
So I found a pointer for my game, from there I found the playerbase, So then I take the value of the playerbase, and add both offsets, however it does not add up to the address of my original value, why is this?
Preffered Imagebase = 0x400000
Player Base Address = 0x4843f4
Player Base Value (in hex) = 0x690078
Offset 1 = 0x1F8
Offset 2 = 0x48
(example)Ammo Address = 0x695888
My thoughts
Code: | PlayerBaseValue + Offset1 + Offset2 = AmmoAddress |
However this is not the case, how do I add up the address's and offsets to equal the Ammo Address?
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
|
Back to top |
|
|
The Dab Cheater Reputation: 0
Joined: 22 May 2017 Posts: 33
|
Posted: Sun Sep 10, 2017 3:53 pm Post subject: |
|
|
ParkourPenguin wrote: | http://forum.cheatengine.org/viewtopic.php?t=422516 |
Unless, I am missing something this still leaves me with the same problem. Adding the offsets to the address will not give me my ammo address, I need this for a c++ trainer btw if that makes a difference.
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun Sep 10, 2017 5:44 pm Post subject: |
|
|
You don't just add the offsets together, for each offset you have to read from memory.
addr = base+baseoffset
addr = readPointer(addr)+offset1
addr = readPointer(addr)+offset2
...
value = readProperType(addr)
|
|
Back to top |
|
|
The Dab Cheater Reputation: 0
Joined: 22 May 2017 Posts: 33
|
Posted: Mon Sep 11, 2017 3:59 pm Post subject: |
|
|
FreeER wrote: | You don't just add the offsets together, for each offset you have to read from memory.
addr = base+baseoffset
addr = readPointer(addr)+offset1
addr = readPointer(addr)+offset2
...
value = readProperType(addr) |
So ReadProcessMemory for every single offset that is added?
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
|
Back to top |
|
|
|