UrnFilledWithAshes.lua 1009 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : ItemScripts/UrnFilledWithAshes.lua
  3. Script Purpose : for the item "Urn Filled with Ashes"
  4. Script Author : theFoof
  5. Script Date : 2013.5.27
  6. Script Notes :
  7. --]]
  8. local ScatteringAshes = 33
  9. function used(Item, Player)
  10. local X = GetX(Player)
  11. local Y = GetY(Player)
  12. local Z = GetZ(Player)
  13. if GetZoneID(GetZone(Player)) == 470 then
  14. if not IsInCombat(Player) then
  15. if X >= 587 and X <= 627 then
  16. if Y >= 61.2 and Y <= 71.2 then
  17. if Z >= -526 and Z <= -486 then
  18. SetStepComplete(Player, ScatteringAshes, 1)
  19. else
  20. LocMessage(Item, Player)
  21. end
  22. else
  23. LocMessage(Item, Player)
  24. end
  25. else
  26. LocMessage(Item, Player)
  27. end
  28. else
  29. SendPopUpMessage(Player, "Non-Combat only", 0, 0, 255)
  30. end
  31. end
  32. end
  33. function LocMessage(Item, Player)
  34. SendMessage(Player, "The ashes must be released at the peak of the cliff to the east of Herga's Choke.", "yellow")
  35. end