9
3

disturbedsoil.lua 683 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/disturbedsoil.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.10 07:05:23
  5. Script Purpose :
  6. :
  7. --]]
  8. local QUEST = 410 -- Gift from Earth
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "SpawnAccess", "SpawnAccess")
  11. AddSpawnAccess(NPC, NPC)
  12. end
  13. function SpawnAccess(NPC, Spawn)
  14. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 2 then
  15. AddSpawnAccess(NPC, Spawn)
  16. else
  17. RemoveSpawnAccess(NPC, Spawn)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end