ataintedSapswillscout429196.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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, "hp", 55)
  12. SpawnSet(NPC, "power", 35)
  13. SpawnSet(NPC, "size", "32")
  14. AddTimer(NPC, 800, "followmorak")
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function followmorak(NPC)
  23. local zone = GetZone(NPC)
  24. local morak_location = GetSpawnByLocationID(zone, 428759)
  25. local leaderX = GetX(morak_location)
  26. local leaderY = GetY(morak_location)
  27. local leaderZ = GetZ(morak_location)
  28. local speed = 2
  29. if GetDistance(NPC, morak_location) >= 2 then
  30. speed = 2
  31. MoveToLocation(NPC, leaderX, leaderY, leaderZ, speed)
  32. end
  33. AddTimer(NPC, 1500, "followmorak")
  34. end