callingthembackcube.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/callingthembackcube.lua
  3. Script Purpose : spawn access for the runes in the quest "Calling Them Back"
  4. Script Author : theFoof
  5. Script Date : 2013.5.28
  6. Script Notes :
  7. --]]
  8. local CallingBack = 35
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. end
  13. function SpawnAccess(NPC, Spawn)
  14. if HasQuest(Spawn, CallingBack) then
  15. local LocID = GetSpawnLocationID(NPC)
  16. if LocID == 572693 then
  17. if not QuestStepIsComplete(Spawn, CallingBack, 1) then
  18. AddSpawnAccess(NPC, Spawn)
  19. end
  20. elseif LocID == 572694 then
  21. if not QuestStepIsComplete(Spawn, CallingBack, 2) then
  22. AddSpawnAccess(NPC, Spawn)
  23. end
  24. elseif LocID == 572695 then
  25. if not QuestStepIsComplete(Spawn, CallingBack, 3) then
  26. AddSpawnAccess(NPC, Spawn)
  27. end
  28. elseif LocID == 572692 then
  29. if not QuestStepIsComplete(Spawn, CallingBack, 4) then
  30. AddSpawnAccess(NPC, Spawn)
  31. end
  32. elseif LocID == 572696 then
  33. if not QuestStepIsComplete(Spawn, CallingBack, 5) then
  34. AddSpawnAccess(NPC, Spawn)
  35. end
  36. end
  37. end
  38. end