Meyer.lua 555 B

123456789101112131415161718192021222324252627282930
  1. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  2. function spawn(NPC)
  3. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  4. end
  5. function respawn(NPC)
  6. spawn(NPC)
  7. end
  8. function InRange(NPC, Spawn)
  9. if math.random(0, 100) <= 25 then
  10. FaceTarget(NPC, Spawn)
  11. GenericGuardHail(NPC, Spawn)
  12. CheckFaction(NPC, Spawn, "Qeynos")
  13. else
  14. CheckFaction(NPC, Spawn, "Qeynos")
  15. end
  16. end
  17. function LeaveRange(NPC, Spawn)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. GenericGuardHail(NPC, Spawn)
  22. end