 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Starter_But Advanced Cheater
Reputation: 0
Joined: 26 Oct 2021 Posts: 53
|
Posted: Sat Jul 01, 2023 4:08 am Post subject: incorrect operation of the script |
|
|
work code
Code: |
define(address, Terraria.NPC::StrikeNPC+724)
define(bytes, 29 86 0C 01 00 00)
[ENABLE]
assert(address, bytes)
alloc(newmem, 1)
label(code)
label(return)
newmem:
code:
sub [esi+10C],#999999
jmp return
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
//sub [esi+10C],eax
dealloc(*)
|
code on lua
Code: |
local origBytes
local sOnEnable = [[
globalalloc(rPlayerOneHit, 40)
rPlayerOneHit:
sub [esi+10C], #999999
jmp return
"Terraria.NPC::StrikeNPC"+724:
jmp rPlayerOneHit
nop
return:
]]
local sOnDisable = [[
dealloc(rPlayerOneHit)
unregisterSymbol(rPlayerOneHit)
]]
if CETrainer.rPlayerOneHit.Checked then
origBytes = readBytes("Terraria.NPC::StrikeNPC+724", 6)
autoAssemble(sOnEnable)
else
autoAssemble(sOnDisable)
writeBytes("Terraria.NPC::StrikeNPC+724", origBytes)
end
|
when turned off, the code does not work correctly
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25704 Location: The netherlands
|
Posted: Sat Jul 01, 2023 4:38 am Post subject: |
|
|
try
Code: |
local script=[[define(address, Terraria.NPC::StrikeNPC+724)
define(bytes, 29 86 0C 01 00 00)
[ENABLE]
assert(address, bytes)
alloc(newmem, 1)
label(code)
label(return)
newmem:
code:
sub [esi+10C],#999999
jmp return
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
//sub [esi+10C],eax
dealloc(*)]]
if CETrainer.rPlayerOneHit.Checked then
local r
discript12345=nil --not local for a reason
r,discript12345=autoAssemble(script)
if not r then
CETrainer.rPlayerOneHit.Checked=false
end
else
if discript12345 then
autoAssemble(script,discript12345)
discript12345=nil
end
end
|
_________________
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 |
|
Back to top |
|
 |
Starter_But Advanced Cheater
Reputation: 0
Joined: 26 Oct 2021 Posts: 53
|
Posted: Sat Jul 01, 2023 9:13 am Post subject: |
|
|
thank you very much, everything is working now
|
|
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
|
|