9
3

MakeshiftBarricade.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : ItemScripts/MakeshiftBarricade.lua
  3. Script Purpose : Handles the item "makeshift barricade"
  4. Script Author : theFoof
  5. Script Date : 2013.5.7
  6. Script Notes :
  7. --]]
  8. local Barricade = 46842
  9. local BoatloadWork = 4
  10. function used(Item, Player)
  11. if GetQuestStep(Player, BoatloadWork) == 3 then
  12. local X = GetX(Player)
  13. local Z = GetZ(Player)
  14. if GetZoneID(GetZone(Player)) == 470 then
  15. if X > -326 and X < -306 then --setting radius to update the quest "Boatload of Work"
  16. if Z < -704 and Z > -724 then
  17. SetStepComplete(Player, BoatloadWork, 3)
  18. RemoveItem(Player, Barricade)
  19. local barrier_spawn = GetSpawn(Player, 4701732)
  20. AddSpawnAccess(barrier_spawn, Player)
  21. else
  22. SendMessage(Player, "You must be between the two torches along the barricade line on Pilgrims' Landing to use this.", "yellow")
  23. end
  24. else
  25. SendMessage(Player, "You must be between the two torches along the barricade line on Pilgrims' Landing to use this.", "yellow")
  26. end
  27. end
  28. end
  29. end