View previous topic :: View next topic |
Author |
Message |
kryptek How do I cheat? Reputation: 0
Joined: 04 May 2013 Posts: 3
|
Posted: Sat May 04, 2013 6:17 pm Post subject: Advanced options and Lua |
|
|
I have some code that I've added to the 'Advanced Options' list, and setting the memory to nothing for the offsets performs the task I want perfectly.
Instead of having to toggle off 4 offsets each time, I'd like to attach the logic to a button I can toggle on and off via code. How can I do this in Lua?
|
|
Back to top |
|
|
kryptek How do I cheat? Reputation: 0
Joined: 04 May 2013 Posts: 3
|
Posted: Sun May 05, 2013 7:05 am Post subject: |
|
|
Okay, I think I'm on the right path:
Code: |
function WallHack(sender)
autoAssemble([[
[ENABLE]
alloc(wallhack,512)
label(returnhere)
label(originalcode)
label(exit)
wallhack:
nop
nop
originalcode:
mov [ebx],eax
mov eax,[ebp-40]
exit:
jmp returnhere
"wingame.exe"+1052FD:
jmp wallhack
returnhere:
[DISABLE]
dealloc(wallhack)
"wingame.exe"+1052FD:
mov [ebx],eax
mov eax,[ebp-40]
]])
end
|
Injects the code just fine; using an intermediate variable to distinguish whether or not it's enabled, how can I specifically call the DISABLE or ENABLE routines from the AutoAssemble script?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun May 05, 2013 9:26 am Post subject: |
|
|
Just use 2 seperate scripts
Enable script:
"wingame.exe"+1052FD:
Nop
Nop
.... till it makes up the number of bytes of the oneinstruc5ion
Disable script:
"wingame.exe"+1052FD:
mov [ebx],eax
_________________
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 |
|
|
kryptek How do I cheat? Reputation: 0
Joined: 04 May 2013 Posts: 3
|
Posted: Sun May 05, 2013 11:00 am Post subject: |
|
|
Dark Byte wrote: | Just use 2 seperate scripts
Enable script:
"wingame.exe"+1052FD:
Nop
Nop
.... till it makes up the number of bytes of the oneinstruc5ion
Disable script:
"wingame.exe"+1052FD:
mov [ebx],eax |
yeah; that's what I ended up doing. How does disabling without deallocating work if I exit cheatengine or my trainer without deallocating? I imagine this leads to memory leaks right?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun May 05, 2013 12:23 pm Post subject: |
|
|
The scripts doesn't alloc, so there's nothing to dealloc
_________________
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 |
|
|
|