Frerin.lua 858 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : SpawnScripts/Graystone/Frerin.lua
  3. Script Purpose : Frerin <Guard>
  4. Script Author : John Adams/Scatman
  5. Script Date : 2008.09.21
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/AdvancementGaze.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11)>=5000 then
  15. if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
  16. ClassCheck(NPC,Spawn)
  17. end
  18. end
  19. if GetFactionID(Spawn) ==1 then
  20. Attack(NPC,Spawn)
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. GenericEcologyHail(NPC, Spawn, faction)
  29. end