qst_redblade_x3_revamp_barricade.lua 750 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/QstRedbladeX3RevampBarricade.lua
  3. Script Purpose : handles the barricade spawn on Pilgrims' Landing
  4. Script Author : theFoof
  5. Script Date : 2013.5.6
  6. Script Notes :
  7. --]]
  8. local BoatloadWork = 4
  9. function spawn(NPC, Player)
  10. SpawnSet(NPC, "activity_state", "0")
  11. AddSpawnAccess(NPC, NPC)
  12. SetPlayerProximityFunction(NPC, 50, "CheckQuest", "CheckQuest")
  13. if HasCompletedQuest(Player, BoatloadWork) or GetQuestStep(Player, BoatloadWork) == 4 then
  14. AddSpawnAccess(NPC, Player)
  15. end
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function CheckQuest(NPC, Player)
  21. if HasCompletedQuest(Player, BoatloadWork) or GetQuestStep(Player, BoatloadWork) == 4 then
  22. AddSpawnAccess(NPC, Player)
  23. end
  24. end