9
3

SplorpyQuagmarr_(camp).lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/SplorpyQuagmarr_(camp).lua
  3. Script Purpose : Splorpy Quagmarr spawn at the pilgrim camp
  4. Script Author : theFoof
  5. Script Date : 2013.05.21
  6. Script Notes :
  7. --]]
  8. local UnbearableProblem = 25
  9. local LostFroglok = 26
  10. local GreatShelf = 30
  11. function spawn(NPC)
  12. AddSpawnAccess(NPC, NPC)
  13. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. if HasCompletedQuest(Spawn, LostFroglok) == false then
  21. PlayFlavor(NPC, "", "Dad says I'm not to talk to strangers.", "sad", 1689589577, 4560189, Spawn)
  22. else
  23. PlayFlavor(NPC, "", "Hello again!", "wave", 1689589577, 4560189, Spawn)
  24. end
  25. end
  26. function SpawnAccess(NPC, Spawn)
  27. if HasQuest(Spawn, UnbearableProblem) then
  28. if GetQuestStep(Spawn, UnbearableProblem) == 2 then
  29. else
  30. AddSpawnAccess(NPC, Spawn)
  31. end
  32. elseif HasCompletedQuest(Spawn, UnbearableProblem) and HasCompletedQuest(Spawn, LostFroglok) == false then
  33. elseif GetQuestStep(Spawn, GreatShelf) > 1 or HasCompletedQuest(Spawn, GreatShelf) then
  34. else
  35. AddSpawnAccess(NPC, Spawn)
  36. end
  37. end