Lowden.lua 632 B

123456789101112131415161718192021222324252627
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/Lowden.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 10:06:42
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. CheckFaction(NPC, Spawn, "Qeynos")
  14. if GetFactionAmount(Spawn,11)>0 then
  15. if math.random(1,100)<25 then
  16. GenericGuardHail(NPC, Spawn)
  17. end
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. GenericGuardHail(NPC, Spawn)
  23. end