abarbariancitizen3.lua 774 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt2/abarbariancitizen3.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.09.04 04:09:14
  5. Script Purpose :
  6. :
  7. --]]
  8. local QUEST = 579
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "OutRange")
  12. SpawnSet(NPC, "hair_type", 1133)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. AddSpawnAccess(NPC, Spawn)
  22. if not HasQuest(Spawn, QUEST) or GetQuestStep(Spawn, QUEST) == 5 or GetQuestStep(Spawn, QUEST) == 6 or GetQuestStep(Spawn, QUEST) == 1 then
  23. RemoveSpawnAccess(NPC, Spawn)
  24. end
  25. end
  26. function OutRange(NPC, Spawn)
  27. end