DeputySplitshin.lua 907 B

123456789101112131415161718192021222324252627282930313233343536373839
  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/AdvancementGaze.lua")
  9. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.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. if GetFactionAmount(Spawn,11)>=5000 then
  18. if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
  19. ClassCheck(NPC,Spawn)
  20. end
  21. end
  22. if math.random(0, 100) <= 20 then
  23. FaceTarget(NPC, Spawn)
  24. GenericGuardHail(NPC, Spawn)
  25. else
  26. CheckFaction(NPC, Spawn, "Qeynos")
  27. end
  28. end
  29. function LeaveRange(NPC, Spawn)
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. GenericGuardHail(NPC, Spawn)
  34. end