 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
MeBilly8440 How do I cheat?
Reputation: 0
Joined: 17 Jul 2013 Posts: 1
|
Posted: Wed Jul 17, 2013 4:02 pm Post subject: Keeping a Value the Same with Lua? |
|
|
While I am not new to programming or Lua, I have never used Lua in the cheat-engine environment before. I'm also very bad at using cheat engine, and can barely change my ammo in a game. However, I managed to find the address of health in the game. How would I make a Lua script that automatically sets that value to 100 every second?
Help would be greatly appreciated. Sorry if I'm posting this in the section.
_________________
I'm a noob c: |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Jul 17, 2013 5:03 pm Post subject: |
|
|
| Code: | function setValue()
writeFloat(address,100.0)
end
timer = createTimer(nil,false)
timer.Interval = 1000 -- milliseconds
timer.OnTimer = setValue
timer.Enabled = true |
Of course you must change above to your needs.
address parameter can be, e.g. :
"modulename+1145" (string, module name and offset, offset in hex)
"401145" (string, address in hex)
0x00401145 (numeric, address in hex)
4198725 (numeric, address )
instead of writeFloat you may use writeInteger, it depends on what value type you found.
Better start reading tutorials.
_________________
|
|
| 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
|
|