Advertisement
MrTrala

ManaRune v2.5 - Fixed.

Feb 16th, 2016
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. --[[
  2.     ManaRune for Archlight
  3.     Version 2.5.1
  4.     By Mr Trala
  5.    
  6. Instructions;
  7. Just put a "true" to your vocation
  8. Necromancer, Bard, Druid and Sorcerer use "MageR"
  9. Berserker and Guardian use "GuardianR"
  10. Archer and Monk use "ArcherR"
  11. That's it!
  12. Have Fun!
  13. ]]
  14.  
  15. config = {
  16.     Mana = 90, -- %X of mana to use mana rune
  17.     Health = 95, -- %X of health to use mana rune
  18.     MageR = true, -- Necromancer, Bard, Druid and Sorcerer
  19.     GuardianR = false, -- Berserker and Guardian
  20.     ArcherR = false, -- Archer and Monk
  21.    
  22.     --Don't touch this.
  23.     Mage = 11614,
  24.     Guardian = 11604,
  25.     Archer = 11632,
  26. }
  27.  
  28. Self.HP = function()
  29. return math.abs(Self.Health()/(Self.MaxHealth()*0.01))
  30. end
  31.  
  32. Self.MP = function()
  33. return math.abs(Self.Mana()/(Self.MaxMana()*0.01))
  34. end
  35.  
  36. function ManaRune()
  37.     if config.MageR then
  38.         if Self.HP() <= config.Health or Self.MP() <= config.Mana then
  39.             Self.UseItem(config.Mage)
  40.             wait(1000, 1100)
  41.         end
  42.        
  43.     elseif config.GuardianR then
  44.         if Self.HP() <= config.Health or Self.MP() <= config.Mana then
  45.             Self.UseItem(config.Guardian)
  46.             wait(1000, 1100)
  47.         end
  48.    
  49.     elseif config.ArcherR then
  50.         if Self.HP() <= config.Health or Self.MP() <= config.Mana then
  51.             Self.UseItem(config.Archer)
  52.             wait(1000, 1100)
  53.         end
  54.     end
  55. end
  56.  
  57. registerEventListener(TIMER_TICK, "ManaRune")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement