Rothun.lua 848 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/Rothun.lua
  3. Script Purpose : Rothun <Guard>
  4. Script Author : Cynnar
  5. Script Date : 2020.04.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/ExpelNonCitizen.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. NonCitizen(NPC,Spawn)
  18. CheckFaction(NPC, Spawn, "Qeynos")
  19. if math.random(0, 100) <= 25 and GetFactionAmount(Spawn,11)>20000 then
  20. FaceTarget(NPC, Spawn)
  21. GenericGuardHail(NPC, Spawn)
  22. end
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. GenericGuardHail(NPC, Spawn)
  29. end