Hubbard.lua 692 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Hubbard.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.13 06:07:34
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. CheckFaction(NPC, Spawn, "Qeynos")
  17. if math.random(0, 100) <= 25 then
  18. FaceTarget(NPC, Spawn)
  19. GenericGuardHail(NPC, Spawn)
  20. end
  21. end
  22. function LeaveRange(NPC, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. GenericGuardHail(NPC, Spawn)
  27. end