ataintedSapswillscout429196.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/ataintedSapswillscout429196.lua
  3. Script Purpose : Follow script for ataintedSapswillscout429196.lua
  4. Script Author : Rylec
  5. Script Date : 06-01-2020 10:08:43
  6. Script Notes : Follow script
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "level", "4")
  10. SpawnSet(NPC, "difficulty", "5")
  11. SpawnSet(NPC, "size", "32")
  12. AddTimer(NPC, 800, "followmorak")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function followmorak(NPC)
  21. local zone = GetZone(NPC)
  22. local morak_location = GetSpawnByLocationID(zone, 428759)
  23. local leaderX = GetX(morak_location)
  24. local leaderY = GetY(morak_location)
  25. local leaderZ = GetZ(morak_location)
  26. local speed = 2
  27. if GetDistance(NPC, morak_location) >= 2 then
  28. speed = 2
  29. MoveToLocation(NPC, leaderX, leaderY, leaderZ, speed)
  30. end
  31. AddTimer(NPC, 1500, "followmorak")
  32. end