9
3

abarbariancitizen.lua 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt2/abarbariancitizen.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.09.01 08:09:14
  5. Script Purpose :
  6. :
  7. --]]
  8. local QUEST = 579
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 25, "InRange", "OutRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. AddTimer(NPC, 5000, "callout", 1, Spawn)
  21. AddSpawnAccess(NPC, Spawn)
  22. if not HasQuest(Spawn, QUEST) or GetQuestStep(Spawn, QUEST) == 5 or GetQuestStep(Spawn, QUEST) == 6 then
  23. RemoveSpawnAccess(NPC, Spawn)
  24. end
  25. end
  26. function OutRange(NPC, Spawn)
  27. end
  28. function callout(NPC, Spawn)
  29. if GetQuestStep(Spawn, QUEST) == 1 then
  30. PlayFlavor(NPC, "", "You're new. You must be here for the meeting. It's in the northwestern common domicile.", "", 1689589577, 4560189, Spawn)
  31. end
  32. end