JeffLead How do I cheat? Reputation: 0
Joined: 15 Nov 2011 Posts: 8 Location: Brazil
|
Posted: Wed Nov 23, 2011 12:51 pm Post subject: Simple Lua Script For Health Regen in Fighting Games |
|
|
Hi,
I will show here a very very simple Lua script for active automatic Health Regeneration in a Fighting Game.
HereŽs the code:
timer = createTimer(nil,true) -- Create a Timer, for loop the code
timer_setInterval(timer,100) -- Set the interval (in millisecs) between one loop and other
function HP_Regen() -- Create a function for the health regen code
FullHP = 100 -- A global variable with the full health value
local ActHP = readInteger("HP Adress Here") -- Read the Actual health value
if (ActHP < FullHP) then -- If the Actual HP is minor than the FullHP...
writeInteger("HP Adress Here, Again",FullHP) -- Set the hp value to max
end -- End of If struct
end -- End of HP_Regen function
timer_onTimer(timer,HP_Regen) -- What to do if the timer do a loop ?Run the HP_Regen function !
Finish. This is the code. It like a simple "set value to" code, but in most of fight games, if you change directly the health value to other value, it donŽt
change at same time. the helath will be increased slooowwly.
Press "Ctrl+Alt+L" in your cheat table, add this code (overwriting some values above with the Health adress value) and save it.
Enjoy!
__________________________________________________________________________________________
EDIT:
Some games (in first place, in Emulators) use DOUBLE values (numbers with floating point with double precision) as health values. In these cases, youŽll need to change the "readInteger" and "writeInteger" functions in the code above , to "readDouble" and "writeDouble", else the code will fuck the health bar with a wrong value and probably the game will crash.
When the fight (in the game) begin, pause the game, and look the health address in your cheat table (probably it will be FULL =D). So, copy the value of the health and put it in the "FullHP" variable in the code above.
_________________
Something In Somplace... |
|