TitiusAuspex.lua 722 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Freeport/TitiusAuspex.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.07.19 11:07:39
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. AddTimer(NPC, 700, "followguard", 1, Spawn)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. GenericGuardHail(NPC, Spawn, Faction)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function followguard(NPC, Spawn)
  20. local zone = GetZone(NPC)
  21. local leader = GetSpawnByLocationID(zone, 55809)
  22. SetFollowTarget(NPC, leader)
  23. if not IsFollowing(NPC) then
  24. ToggleFollow(NPC)
  25. SetSpeed(NPC, 1.9)
  26. end
  27. end