9
3

abattlewolfP2.lua 960 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. NPCModule(NPC, Spawn)
  11. SetSeeHide(NPC,1)
  12. AddTimer(NPC, 800, "followsentry")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function followsentry(NPC)
  21. local zone = GetZone(NPC)
  22. local sentry_location = GetSpawnByLocationID(zone, 133775373)
  23. local leaderX = GetX(sentry_location)
  24. local leaderY = GetY(sentry_location)
  25. local leaderZ = GetZ(sentry_location)
  26. local speed = 2
  27. if GetDistance(NPC, sentry_location) >= 2 then
  28. speed = 2
  29. MoveToLocation(NPC, leaderX, leaderY, leaderZ, speed)
  30. end
  31. AddTimer(NPC, 1500, "followsentry")
  32. end