hook code accessing the value and use inc or add if an integer or fadd dword ptr/addss for a float or fadd qword ptr/addsd for a double.
use instructions from above but allocate memory and use createThread to write through a pointer you've found (or a copied address)
use lua
use autoAssemble to do 1 or 2 lol
use a timer
to read and write through a memory record, this code is the same for pretty much anything you do
Code:
{$lua}
local desc = 'name/description of memory record to change'
local regenRate = 1000 -- milliseconds
local regenAmnt = 1 -- amount to regen (could be negative lol)
[ENABLE]
-- the rest will not change
local uniqueName = desc .. 'timer'
_G[uniqueName] = createTimer()
local t =_G[uniqueName]
local mr = getAddressList().getMemoryRecordByDescription(desc)
t.Interval = regenRate
t.OnTimer = function(t)
-- stop timer if mr does not exist
if not mr then
print('memory record', desc, 'does not exists!')
t.destroy()
return
end
-- avoid issue with writing to floating point when shown as hex
local hex = mr.ShowAsHex
mr.ShowAsHex = false
local value = tonumber(mr.Value)
value = value + regenAmnt
mr.Value = value
mr.ShowAsHex = hex
end
[DISABLE]
local uniqueName = desc .. 'timer'
_G[uniqueName].destroy() -- stop timer
use readInteger/writeInteger (or float/double etc. variants) to write to a static address or pointer path eg.
Code:
local address = '[[game.exe+DEAF]+480]+4'
writeInteger(address, readInteger(address) + 1)
use lua's create thread to run a lua function in a new thread, essentially creating your own timer mechanism with sleep
There's probably a few other methods as well just with CE (obviously you could make a trainer in C++ etc. that uses Read/Write ProcessMemory).
Personally I recommend 1 if it's simple and you understand how or 3.2.1 (because it covers everything with the same code)
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