abattlewolfP1.lua 961 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/abattlewolfP1.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.09.09 07:09:20
  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, 1000, "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, 133775374)
  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