Page 1 of 1

HELP!!! I can't toggle script after restarting game

Posted: Wed Oct 17, 2018 3:21 pm
by Ejay1984
Hi.

I recently did a script for Salt and Sanctuary for infinite health and one hit kill using code injection and comparison. When I close the game and restart, the script doesn't work. I've done similar scripts using the Code Injection template and I've not had any issues with them. Any help will be greatly appreciated. Thanks

The script

Code: Select all

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
cmp [edx+68],0
jne originalcode
nop
nop
nop
jmp exit

originalcode:
fstp dword ptr [edx+60]
mov [edx+60],00
fldz 

exit:
jmp returnhere

ProjectTower.character.update.CharUpdate::ReduceHealth+17:
jmp newmem
returnhere:


 
 
[DISABLE]
dealloc(newmem)
ProjectTower.character.update.CharUpdate::ReduceHealth+17:
fstp dword ptr [edx+60]
fldz 
//Alt: db D9 5A 60 D9 EE

Re: HELP!!! I can't toggle script after restarting game

Posted: Wed Oct 17, 2018 4:05 pm
by Betcha
Ejay1984 wrote:
Wed Oct 17, 2018 3:21 pm
Hi.
Image

Re: HELP!!! I can't toggle script after restarting game

Posted: Wed Oct 17, 2018 4:13 pm
by TimFun13
You can also enable that in a script; thus have this in all your scripts, or just have a main script and all others nested under it.

Code: Select all

[ENABLE]
{$lua}
if syntaxcheck then return end
if process and readInteger(process) ~= 0 then
    mono_initialize()
    LaunchMonoDataCollector()
else
    local msg = 'No process detected.'
    print(msg)
    error(msg)
end
{$asm}
[DISABLE]
[Link]

Re: HELP!!! I can't toggle script after restarting game

Posted: Thu Oct 18, 2018 7:01 am
by Ejay1984
ShyTwig16 wrote:
Wed Oct 17, 2018 4:13 pm
You can also enable that in a script; thus have this in all your scripts, or just have a main script and all others nested under it.

Code: Select all

[ENABLE]
{$lua}
if syntaxcheck then return end
if process and readInteger(process) ~= 0 then
    mono_initialize()
    LaunchMonoDataCollector()
else
    local msg = 'No process detected.'
    print(msg)
    error(msg)
end
{$asm}
[DISABLE]
[Link]
Thanks a lot, I'll give it a go