trappedspirits.lua 878 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : ItemScripts/trappedspirits.lua
  3. Script Purpose : trapped spirits used in quest "Condemned"
  4. Script Author : Cynnar
  5. Script Date : 1/6/2016
  6. Script Notes : trapped spirits (Item ID = 48976) Condemned (quest ID = 153)
  7. --]]
  8. local Condemned = 153
  9. function used(Item, Player)
  10. if HasQuest(Player, Condemned) then
  11. local playerX = GetX(Player)
  12. local playerZ = GetZ(Player)
  13. if GetQuestStep(Player, Condemned) == 1 then
  14. if playerX <= -540 and playerX >= -575 then
  15. if playerZ >= 137 and playerZ <= 166 then
  16. AddStepProgress(Player, Condemned, 1, 1)
  17. RemoveItem(Player, 48976)
  18. else
  19. SendMessage(Player, "You must be near the Wellspring of Nightmares to use this.", "yellow")
  20. end
  21. else
  22. SendMessage(Player, "You must be near the Wellspring of Nightmares to use this.", "yellow")
  23. end
  24. end
  25. end
  26. end