Guest User

Untitled

a guest
Aug 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local config = {
  2.     healRules = {
  3.         {action="exura ico", mana=40, health=500},
  4.         {action="health potion", health=400}
  5.     }
  6. }
  7.  
  8. Self.Heal = function ()
  9.     for _, rules in ipairs(config.healRules) do
  10.         if rules.health > Self.Health() then
  11.             local item = Item.GetID(rules.action)
  12.             if item ~= 0 then
  13.                 Self.UseItem(item)
  14.             else
  15.                 Self.Cast(rules.action, rules.mana)
  16.             end
  17.             wait(400, 600)
  18.         end
  19.     end
  20. end
  21.  
  22. while true do
  23.     Self.Heal()
  24.     wait(50)
  25. end
Add Comment
Please, Sign In to add comment