ataintedSapswillscout429196.lua 1002 B

12345678910111213141516171819202122232425262728293031323334353637
  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. 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, 428759)
  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