9
3

awarwolf2.lua 894 B

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