 |
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 2:06 pm Post subject: incorrect operation of the script |
|
|
Hello, I want to make the value from Edit.Text fall into the assembler code
Code: |
function CETrainer_rPlayerMobsAgroClick(sender)
if CETrainer.rPlayerMobsAgro.Checked then
CETrainer.AgroEf.Visible = true
end
local number = tonumber(CETrainer.AgroEf.Text)
local assemblyCode = string.format("mov eax, %d", number)
local Ascript = [[
define(address, Terraria.Player::ResetEffects+293)
define(bytes, 89 96 2C 03 00 00)
[ENABLE]
assert(address, bytes)
alloc(newmem, 1)
label(code)
label(return)
label(playerAggro)
registersymbol(playerAggro)
newmem:
code:
%s
mov [esi+32C], eax
jmp return
playerAggro:
dd (int)0
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
//mov [esi+328],edx
unregisterSymbol(*)
dealloc(*)
]]
if CETrainer.rPlayerInstResp.Checked then
local r
discript12345=nil --not local for a reason
r,discript12345=autoAssemble(Ascript)
if not r then
CETrainer.rPlayerInstResp.Checked=false
end
else
if discript12345 then
autoAssemble(Ascript,discript12345)
discript12345=nil
end
end
end
|
But, as always, I couldn't do anything, what was I wrong about?
assembly code
Code: |
define(address, Terraria.Player::ResetEffects+293)
define(bytes, 89 96 2C 03 00 00)
[ENABLE]
assert(address, bytes)
alloc(newmem, 1)
label(code)
label(return)
label(playerAggro)
registersymbol(playerAggro)
newmem:
code:
fild dword ptr [playerAggro]
fistp dword ptr [esi+32C]
jmp return
playerAggro:
dd (int)0
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
//mov [esi+328],edx
unregistersymbol(*)
dealloc(*)
|
|
|
Back to top |
|
 |
YoucefHam Cheater
Reputation: 5
Joined: 19 Mar 2015 Posts: 39 Location: Algeria
|
Posted: Sat Jul 01, 2023 4:02 pm Post subject: Re: incorrect operation of the script |
|
|
Starter_But wrote: | Hello, I want to make the value from Edit.Text fall into the assembler code
............... |
use ]]..var..[[ to put it in script
Code: | function CETrainer_rPlayerMobsAgroClick(sender)
if CETrainer.rPlayerMobsAgro.Checked then
CETrainer.AgroEf.Visible = true
end
local number = tonumber(CETrainer.AgroEf.Text)
local assemblyCode = string.format("mov eax, %d", number)
local Ascript = [[
define(address, Terraria.Player::ResetEffects+293)
define(bytes, 89 96 2C 03 00 00)
[ENABLE]
assert(address, bytes)
alloc(newmem, 1)
label(code)
label(return)
label(playerAggro)
registersymbol(playerAggro)
newmem:
code:
]]..assemblyCode..[[
mov [esi+32C], eax
jmp return
playerAggro:
dd (int)0
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
//mov [esi+328],edx
unregisterSymbol(*)
dealloc(*)
]]
if CETrainer.rPlayerInstResp.Checked then
local r
discript12345=nil --not local for a reason
r,discript12345=autoAssemble(Ascript)
if not r then
CETrainer.rPlayerInstResp.Checked=false
end
else
if discript12345 then
autoAssemble(Ascript,discript12345)
discript12345=nil
end
end
end |
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25704 Location: The netherlands
|
Posted: Sat Jul 01, 2023 11:45 pm Post subject: |
|
|
You never put assemblyCode in the script. You use %s but never use string.format with the Ascript text
Code: |
Ascript=string.format(Ascript, assemblyCode)
|
_________________
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: Sun Jul 02, 2023 9:27 am Post subject: |
|
|
nothing works(
|
|
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
|
|