9
3

GeldranisVial.lua 1000 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : ItemScripts/GeldranisVial.lua
  3. Script Purpose : Handles the item "Geldrani's Vial"
  4. Script Author : jakejp
  5. Script Date : 2018.6.14
  6. Script Notes :
  7. --]]
  8. local EmptyVial = 46457
  9. local FilledVial = 7641
  10. local AStrangeMix = 314
  11. function used(Item, Player)
  12. if GetQuestStep(Player, AStrangeMix) == 1 then
  13. local X = GetX(Player)
  14. local Z = GetZ(Player)
  15. if GetZoneID(GetZone(Player)) == 108 then
  16. if X < 15 and X > -17 then --setting radius to update the quest "Boatload of Work"
  17. if Z > 558 and Z < 581 then
  18. SetStepComplete(Player, AStrangeMix, 1)
  19. RemoveItem(Player, EmptyVial)
  20. if HasItem(Player, FilledVial) == false then
  21. SummonItem(Player, FilledVial, 1)
  22. end
  23. else
  24. SendMessage(Player, "You are not in the proper spot to use this.", "yellow")
  25. end
  26. else
  27. SendMessage(Player, "You are not in the proper spot to use this.", "yellow")
  28. end
  29. end
  30. end
  31. end