afalseroekillik.lua 804 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/Freeport/afalseroekillik.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.21 06:08:35
  5. Script Purpose :
  6. :
  7. --]]
  8. QUEST = 575
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 20, "InRange", "LeaveRange")
  11. AddSpawnAccess(NPC, NPC)
  12. end
  13. function group_dead(NPC, Spawn)
  14. AddStepProgress(Spawn, QUEST, 7, 1)
  15. end
  16. function InRange(NPC, Spawn)
  17. local PlayersLevel = GetLevel(Spawn)
  18. SpawnSet(NPC, "level", PlayersLevel)
  19. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 7 then
  20. AddSpawnAccess(NPC, Spawn)
  21. else
  22. RemoveSpawnAccess(NPC, Spawn)
  23. end
  24. end
  25. function LeaveRange(NPC, Spawn)
  26. end
  27. function respawn(NPC)
  28. spawn(NPC)
  29. end