Advertisement
Guest User

Untitled

a guest
May 30th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. attacks = {'exori max vis', 'exori max flam', 'exori gran flam', 'exori gran vis', 3155}
  2.  
  3. ErrorMessageProxy.OnReceive('Spells', function(_, key)
  4.     if key == "Sorry, not possible." then
  5.         mana, can, level = Self.Mana(), Self.GetSpellCooldown, Self.Level()
  6.         if Self.TargetID() ~= 0 then
  7.             c = Creature.GetByID(Self.TargetID())
  8.             if c:HealthPercent() > 0 then
  9.                 if c:DistanceFromSelf() <= 3 then
  10.                     if mana >= 100 and can(attacks[1]) == 0 and level >= 100 then
  11.                         Self.Say(attacks[1])
  12.                     elseif mana >= 100 and can(attacks[2]) == 0 and level >= 90 then
  13.                         Self.Say(attacks[2])
  14.                     elseif mana >= 80 and can(attacks[3]) == 0 and level >= 70 then
  15.                         Self.Say(attacks[3])
  16.                     elseif mana >= 80 and can(attacks[4]) == 0 and level >= 80 then
  17.                         Self.Say(attacks[4])
  18.                     end
  19.                 end
  20.                 if c:DistanceFromSelf() > 3 and can('exori frigo') == 0 and level >= 45 then
  21.                     Self.UseItemWithTarget(attacks[5])
  22.                 end
  23.             end
  24.         end
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement