Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Wed Feb 22, 2012 9:39 am Post subject: Run once code |
|
|
How do you make a run one code ?
I mean enable the AA code and after it was run once by the game auto disable it ? (the result would be: if player has no ammo ... a "give ammo" cheat, and this has to be run just once ... example: set ammo to 10 then stop setting ammo to 10 immediately after ammo was set to 10)
[EDIT] : how do i do that above ?
I also want to:
Set an address to 10 just once, then decrease the address till 5 and freeze it to 5 and then the address should never turn to 10 anymore.
[EDIT] Solved:
Code: | start:
pushfd
cmp [pointer],0A //(0A in hex = 10)
je decto5 //jump if pointer is equal to 10, if not write 10
mov dword ptr [pointer],A //we suppose the pointer is a 4 byte
popfd // and return
jmp reth
decto5:
cmp [pointer],5 // check if pointer = 5, if yes freeze it to 5
je freeze
popfd
dec [pointer] // of not decrease pointer
jmp reth // and return
freeze:
mov dword ptr [pointer],5 // write 5 to pointer, just to be sure
popfd
jmp reth // and return
"game.exe"+basepointer:
jmp start
reth: |
_________________
... Fresco |
|