9
3

Krelal.lua 697 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/Krelal.lua
  3. Script Purpose : Krelal <Guard>
  4. Script Author : Cynnar
  5. Script Date : 2020.04.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  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. CheckFaction(NPC, Spawn, "Qeynos")
  17. if math.random(1, 100) <= 20 and GetFactionAmount(Spawn,11) >0 then
  18. GenericGuardHail(NPC, Spawn)
  19. end
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. GenericGuardHail(NPC, Spawn)
  24. end