| View previous topic :: View next topic |
| Author |
Message |
sgsgwv$6263 Advanced Cheater
Reputation: 0
Joined: 05 Aug 2020 Posts: 86
|
Posted: Sat Aug 08, 2020 2:06 am Post subject: Assembly to Lua |
|
|
Can someone convert this AA script to lua plz without using autoAssemble() function of lua??
It's a small code. I am a beginner to lua(not lua but the CE library functions in lua).It will be a great help to someone like me who is trying to learn how to create scripts in lua.
| Code: |
[ENABLE]
aobscanmodule(INJECT,gta_sa.exe,8B 08 8B 40 08 89 44 24 38 8D 85) // should be unique
alloc(newmem,$1000)
globalalloc(loc,4)
label(code)
label(return)
newmem:
mov [loc],eax
code:
mov ecx,[eax]
mov eax,[eax+08]
jmp return
INJECT:
jmp newmem
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 8B 08 8B 40 08
unregistersymbol(INJECT)
dealloc(loc)
dealloc(newmem)
|
If you have time try to explain the steps in comments plzzzzzzzz
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 98
Joined: 14 Jul 2007 Posts: 3356
|
Posted: Sat Aug 08, 2020 4:30 am Post subject: |
|
|
If you have no real reason to convert to LUA, then don't.
Assembly is much faster.
|
|
| Back to top |
|
 |
sgsgwv$6263 Advanced Cheater
Reputation: 0
Joined: 05 Aug 2020 Posts: 86
|
Posted: Sat Aug 08, 2020 5:07 am Post subject: |
|
|
| I just want to use some of its features like timers that assembly doesnot have.
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 98
Joined: 14 Jul 2007 Posts: 3356
|
Posted: Sat Aug 08, 2020 6:53 am Post subject: |
|
|
The code you posted is a hook - runs every time it's invoked inside the game and hence, you will always have current value.
No timer will do that.
Timers will get you momentary values.
Anyway, if it's timers you want, there are plenty of samples for that here, just search for OnTimer.
|
|
| Back to top |
|
 |
|