Advertisement
MrTrala

Potting and Spell X Secs

Feb 2nd, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. --[[
  2.     Potting for Archlight
  3.     Version 1.0
  4.     By Mr Trala
  5. ]]
  6.  
  7. config = {
  8.     Mana = 90, -- Mana % to use your "MANAID"
  9.     Health = 90, -- Health % to use your "HPID"
  10.     HPID = 266, -- Id of your health potion
  11.     MPID = 238, -- Id of your mana potion
  12.     SpellN = "utamo vita", -- Words for your spell
  13.     SpellM = 80, -- How many mana to use spell (so you don't keep spaming if 0 mana)
  14.     SpellE = 10 -- Spell Exhausted (in secs)
  15.  
  16. }
  17.  
  18. Self.HealthPercent = function()
  19. return math.abs(Self.Health()/(Self.MaxHealth()*0.01))
  20. end
  21.  
  22. Self.ManaPercent = function()
  23. return math.abs(Self.Mana()/(Self.MaxMana()*0.01))
  24. end
  25.  
  26. Module.New('Potting', function(mod)
  27.     if Self.HealthPercent() <= config.Health then
  28.         Self.UseItemWithMe(config.HPID)
  29.         wait(400, 500)
  30.     end
  31.    
  32.     if Self.ManaPercent() <= config.Mana then
  33.         Self.UseItemWithMe(config.MPID)
  34.         wait(400, 500)
  35.     end
  36. end)
  37.  
  38. Module.New('Spell', function(Mod)
  39.   if(Self.Mana() >= config.Mana) then
  40.         Self.Cast(config.SpellN)
  41.     end
  42.     Mod:Delay((config.SpellE * 1000), (config.SpellE * 1000) + 500)
  43. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement