Posted: Wed Feb 10, 2021 11:55 am Post subject: LUA explanation
Hi, I'm new to LUA. I'm getting back into coding, with my experience being in QBASIC in middle school. I started learning C++, and I'm combining that knowledge to reverse games. I started making my first trainer for HL2, and I made stuff like the health, shield, and reserve ammo pointers easily.
Where I ran into trouble was with the clip ammo pointer, that seemed to break every time I restarted the game. So to give myself a little help I looked online to see if any cheat tables had figured out my issue. In the first table I downloaded I saw they solved my exact problem with a script:
[ENABLE]
"server.dll"+F0954:
db 90 90
[DISABLE]
"server.dll"+F0954:
db 89 1E
So what I was hoping to understand is, how does the db (function?) work?
I understand they found the static address, but what does the db line actually do? Any help is appreciated.
db, "define bytes", is a pseudoinstruction that writes bytes to an address. 0x90 is a nop instruction and 0x89 0x1e is a mov instruction. I'd use the full injection template and write it like this:
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
Posted: Wed Feb 10, 2021 1:25 pm Post subject:
As a side note, what you posted is done using CEScript, not Lua.
CEScript is Cheat Engines custom script parser that interprets multiple things including:
- ASM
- Lua
- Custom CE-specific commands/features. _________________
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