9
3

acrazedratonga.lua 855 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/Freeport/acrazedratonga.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.23 09:08:28
  5. Script Purpose :
  6. :
  7. --]]
  8. QUEST = 576
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 20, "InRange", "LeaveRange")
  11. AddSpawnAccess(NPC, NPC)
  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. local PlayersLevel = GetLevel(Spawn)
  21. SpawnSet(NPC, "level", PlayersLevel)
  22. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 5 then
  23. AddSpawnAccess(NPC, Spawn)
  24. else
  25. RemoveSpawnAccess(NPC, Spawn)
  26. end
  27. end
  28. function group_dead(NPC, Spawn)
  29. SetStepComplete(Spawn, QUEST, 5)
  30. end
  31. function LeaveRange(NPC, Spawn)
  32. end