9
3

acrazedratonga2.lua 880 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. SpawnSet(NPC, "model_type", 70)
  23. if HasQuest(Spawn, QUEST) and GetQuestStep(Spawn, QUEST) == 5 then
  24. AddSpawnAccess(NPC, Spawn)
  25. else
  26. RemoveSpawnAccess(NPC, Spawn)
  27. end
  28. end
  29. function group_dead(NPC, Spawn)
  30. SetStepComplete(Spawn, QUEST, 5)
  31. end
  32. function LeaveRange(NPC, Spawn)
  33. end