ChrykoriGuardsBackFence.lua 565 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : <script-name>
  3. Script Purpose : <purpose>
  4. Script Author : <author-name>
  5. Script Date : <date>
  6. Script Notes : <special-instructions>
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 500, "CheckForBirds")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function CheckForBirds(NPC)
  18. Bird = GetSpawn(NPC, 2630105)
  19. if Bird ~= nil then
  20. if GetDistance(NPC, Bird) <= 15 and IsAlive(Bird) then
  21. KillSpawn(Bird, NPC, 1)
  22. end
  23. end
  24. AddTimer(NPC, 500, "CheckForBirds")
  25. end