Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. local HealthStoneList = {"Major HealthStone", "Greater Healthstone", "HealthStone", "Lesser HealthStone", "Minor HealthStone"} -- ordered from highest to lowest
  2. local HealthStoneSpells = {"Create Healthstone (Major)", "Create Healthstone (Greater)", "Create Healthstone", "Create Healthstone (Lesser)", "Create Healthstone (Minor)"} -- same order as the list before
  3.  
  4. local HasHealthstone
  5. for j=1, table.getn(HealthStoneList),1 do
  6. if HasItem(HealthStoneList[j]) == 1 then
  7. HasHealthstone = true
  8. break
  9. end
  10. end
  11.  
  12. if not HasHealthStone then
  13. for i=1, table.getn(HealthStoneList),1 do
  14. if HasItem(HealthStoneList[i]) == 0
  15. and IsInCombat() == 0
  16. and LocalMana > 25
  17. and HasSpell(HealtStoneSpells[i]) then
  18. CastSpellByName(HealthStoneSpells[i])
  19. return
  20. end
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement