9
3

GuardBelaire.lua 842 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/Caves/GuardBelaire.lua
  3. Script Purpose : Guard Belaire <Guard>
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/AdvancementGaze.lua")
  9. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  10. require "SpawnScripts/Generic/NPCModule"
  11. function spawn(NPC, Spawn)
  12. NPCModule(NPC, Spawn)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function InRange(NPC, Spawn)
  16. if GetFactionAmount(Spawn,11)>=5000 then
  17. if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
  18. ClassCheck(NPC,Spawn)
  19. end
  20. end
  21. if GetFactionID(Spawn) ==1 then
  22. Attack(NPC,Spawn)
  23. end
  24. end
  25. function respawn(NPC)
  26. spawn(NPC)
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. GenericGuardHail(NPC, Spawn)
  31. end