 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Sat Aug 26, 2017 8:49 pm Post subject: |
|
|
You have to execute the script again in order for the changes to take effect.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Hayjamieoliver Newbie cheater
Reputation: 0
Joined: 29 Nov 2016 Posts: 16 Location: idk
|
Posted: Sat Aug 26, 2017 9:19 pm Post subject: |
|
|
I did that, it just does
Error:Failure determining what [[[337D5560+100]+B8]+658]+24 means
_________________
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Sat Aug 26, 2017 9:48 pm Post subject: |
|
|
It works perfectly fine for me. Are you using the latest version of Cheat Engine? Are you sure the pointer path is correct? Take note that in the "change address" window (found by double clicking on the "address" field of a pointer in the address list), the offsets are listed last-to-first from top-down (i.e. the first offset is at the bottom).
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Hayjamieoliver Newbie cheater
Reputation: 0
Joined: 29 Nov 2016 Posts: 16 Location: idk
|
Posted: Sat Aug 26, 2017 11:22 pm Post subject: |
|
|
Whilst my cheat engine was outdated, being at version 6.5, this was not the issue. I ended up changing it slightly, like so:
| Code: | if setAIHotkey then setAIHotkey.destroy(); setAIHotkey=nil end
if resetAIHotkey then resetAIHotkey.destroy(); resetAIHotkey=nil end
local changedAddresses = {}
setAIHotkey = createHotkey(function(hk)
-- look for stuff to change
-- local baseAddr = getAddress('[Insertgame.exe+02B47F58]') -- now unused
local playerVal = readInteger('[[[[[Insertgame.exe+02B5D718]+420]+450]+C0]+58]+24')
print (playerVal)
for offs2 = 0x100, 0x1B0, 8 do -- range is inclusive
print("getting ai addresses")
local baseAddr = getAddress('[Insertgame.exe+02B47F58]') --New declaring of base address, now with no offsets.
print("base address finished")
local aiAddr = getAddress(('[[[[%08X+%X]+%X]+%X]+%X]+%X'):format(baseAddr, 0x50, offs2, 0xB8, 0x658, 0x24))
local aiVal = readInteger(aiAddr)
print(aiVal)
if aiVal ~= playerVal then
writeInteger(aiAddr, playerVal)
changedAddresses[#changedAddresses+1] = {addr = aiAddr, val = aiVal}
end
end
end, VK_MENU, VK_F3) -- change hotkey key codes here
resetAIHotkey = createHotkey(function(hk)
for i = #changedAddresses, 1, -1 do
writeInteger(changedAddresses[i].addr, changedAddresses[i].val)
changedAddresses[i] = nil
end
end, VK_MENU, VK_F5) -- change hotkey key codes here |
Moving the declaration of the base address into the for loop seems to have fixed all the issues. I'm not really sure what caused it, and this might be somewhat inefficient coding, but I'm not really concerned with either of those things as long as it works
Thank you so, so much for all your help, I think this knowledge will be useful in many other ways as well
_________________
|
|
| 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
|
|