DeputySplitshin.lua 696 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/DeputySplitshin.lua
  3. Script Purpose : Deputy Splitshin <Guard>
  4. Script Author : Scatman
  5. Script Date : 2009.09.25
  6. Script Notes :
  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. if math.random(0, 100) <= 25 then
  17. FaceTarget(NPC, Spawn)
  18. GenericGuardHail(NPC, Spawn)
  19. else
  20. CheckFaction(NPC, Spawn, "Qeynos")
  21. end
  22. end
  23. function LeaveRange(NPC, Spawn)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. GenericGuardHail(NPC, Spawn)
  28. end