Posted: Sun Sep 17, 2023 5:52 pm Post subject: Add value of an address as offset for another address
Hi,
Quite new to this and have googled this and can't find a solution. (could be using the wrong search terms and I could just be totally stupid with the answer in my face..)
what I am trying to do is
(address 1) + (value of address 2) = address 3
address 1 being my base address
address 2's value being an offset that changes.
both address 1 and address 2 are static and known.
local addr1 = getAddress'game.exe+1234'
local val = readInteger'game.exe+5678'
local addr3 = addr1 + val
If you're talking about the address list, CE accepts Lua code in the provided fields. What's accepted is oddly lenient, so play around with it a little.
e.g. could use `game.exe+1234+readInteger'game.exe+5678'` in the "address" field, or use `readInteger'game.exe+5678'` as an offset.
There might be a better way of doing this. _________________
I don't know where I'm going, but I'll figure it out when I get there.
Joined: 09 May 2003 Posts: 25008 Location: The netherlands
Posted: Mon Sep 18, 2023 2:01 am Post subject:
you can use the [ ] with the ( ) notation for that
e.g memoryrecord with description "address 2" has an address with the value 1000
memoryrecord with description "address 1" has address 00400000
you can then give as address for address 3:
Code:
(address 1)+[(address 2)]
and the address will be 00401000, and updates every 10 seconds when address 2's value changes. _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
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