ataintedSapswillscout429236.lua 1006 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/ataintedSapswillscout429236.lua
  3. Script Purpose : Follow script for ataintedSapswillscout429236.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", "3")
  10. SpawnSet(NPC, "difficulty", "5")
  11. AddTimer(NPC, 900, "followmorak")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function followmorak(NPC)
  20. local zone = GetZone(NPC)
  21. local morak_location = GetSpawnByLocationID(zone, 428683)
  22. local leaderX = GetX(morak_location)
  23. local leaderY = GetY(morak_location)
  24. local leaderZ = GetZ(morak_location)
  25. local speed = 2
  26. if GetDistance(NPC, morak_location) >= 2 then
  27. speed = 2
  28. MoveToLocation(NPC, leaderX, leaderY, leaderZ, speed)
  29. end
  30. AddTimer(NPC, 3000, "followmorak")
  31. end