Thorson.lua 865 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/Thorson.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.04 03:11:19
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/ExpelNonCitizen.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. NonCitizen(NPC,Spawn)
  18. if math.random(0, 100) <= 25 and GetFactionAmount(Spawn,11) > 20000 then
  19. FaceTarget(NPC, Spawn)
  20. GenericGuardHail(NPC, Spawn)
  21. CheckFaction(NPC, Spawn, "Qeynos")
  22. else
  23. CheckFaction(NPC, Spawn, "Qeynos")
  24. end
  25. end
  26. function LeaveRange(NPC, Spawn)
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. GenericGuardHail(NPC, Spawn)
  31. end