Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Continuous Health Regeneration by H® Shaft 8/15/2013
- -- Edited by AelitePrime: compressed version 8/19/2013
- -- Updated 10/10/2013 by H® Shaft
- time = 10 -- time (in seconds) in between each incremental increase in health
- increment = 0.1116 -- amount of health regenerated. (1 is full health)
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- set_regen = registertimer(time * 1000, "regenerator")
- end
- function OnNewGame(map)
- set_regen = registertimer(time * 1000, "regenerator")
- end
- function OnGameEnd(stage)
- if stage == 1 then
- removetimer(set_regen)
- end
- end
- function regenerator(id, count)
- for i = 0,15 do
- if getplayer(i) then
- local m_playerObjId = getplayerobjectid(i)
- if m_playerObjId then
- local m_object = getobject(m_playerObjId)
- if readfloat(m_object + 0xE0) < 1 then
- writefloat(m_object + 0xE0, readfloat(m_object + 0xE0) + increment)
- end
- end
- end
- end
- return true
- end
- -- Created by H® Shaft thank you to Oxide, AelitePrime, Nugget & Wizard.
- -- Visit http://halorace.org/forum/index.php?topic=514.0 or
- -- Visit http://pastebin.com/u/HR_Shaft for more phasor scripts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement