GerlasElementalLullaby.lua 728 B

123456789101112131415161718192021222324
  1. --[[
  2. Script Name : ItemScripts/GerlasElementalLullaby.lua
  3. Script Purpose : for the item "Gerla's Elemental Lullaby"
  4. Script Author : theFoof
  5. Script Date : 2013.6.13
  6. Script Notes :
  7. --]]
  8. local NapEvigis = 64
  9. function used(Item, Player)
  10. local target = GetTarget(Player)
  11. if GetQuestStep(Player, NapEvigis) == 1 then
  12. if GetName(target) == 'Evigis the Ancient' then
  13. if GetHP(target) < GetMaxHP(target) * .2 then
  14. CastEntityCommand(Player, target, 1291, "Gerla's Elemental Lullaby")
  15. else
  16. SendMessage(Player, "You must use this on Evigis when it is under 20 percent life.", "yellow")
  17. end
  18. else
  19. SendMessage(Player, "You must use this on Evigis when it is under 20 percent life.", "yellow")
  20. end
  21. end
  22. end