9
3

abattlewolfP2.lua 859 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/abattlewolfP2.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.09.09 07:09:22
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 800, "followsentry")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function followsentry(NPC)
  18. local zone = GetZone(NPC)
  19. local sentry_location = GetSpawnByLocationID(zone, 133775373)
  20. local leaderX = GetX(sentry_location)
  21. local leaderY = GetY(sentry_location)
  22. local leaderZ = GetZ(sentry_location)
  23. local speed = 2
  24. if GetDistance(NPC, sentry_location) >= 2 then
  25. speed = 2
  26. MoveToLocation(NPC, leaderX, leaderY, leaderZ, speed)
  27. end
  28. AddTimer(NPC, 1500, "followsentry")
  29. end