Advertisement
Cavitt

Recovery based on Health

Apr 27th, 2012
1,324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. --[[ CONFIG ]]--
  2. local t1 = os.time() -- Dont change.
  3. local healthToCast = 500
  4.  
  5. local spellInfo = {
  6.     ["words"] = "utura",
  7.     ["mana"] = 75,
  8.     ["cooldown"] = 60
  9. }
  10.  
  11. --[[ CODE ]]--
  12. while(true) do
  13.     if(os.difftime(os.time(), t1) > spellInfo.cooldown) then
  14.         if(Self.Health() < healthToCast and Self.Mana() > spellInfo.mana) then
  15.             Self.Say(spellInfo.words)
  16.             t1 = os.time()
  17.         end
  18.     end
  19.     wait(100, 300)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement