123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- --[[
- Script Name : SpawnScripts/OutpostOverlord/acliffdiverhawk.lua
- Script Author : Cynnar
- Script Date : 2018.12.24 12:12:43
- Script Purpose :
- Script Notes : Hawk needs to turn around after the return flight to original location
- --]]
- function spawn(NPC)
- end
- function respawn(NPC)
- spawn(NPC)
- end
- function hailed(NPC, Spawn)
- end
- function FlyToMoleRat(NPC)
-
- local TargetMoleRat = GetTempVariable(NPC, "MoleRat")
-
- if TargetMoleRat ~= nil then
- local x = GetX(TargetMoleRat)
- local y = GetY(TargetMoleRat)
- local z = GetZ(TargetMoleRat)
-
- MoveToLocation(NPC, x, y, z, 8, "KillMoleRat")
- end
- end
- function KillMoleRat(NPC)
- local MoleRat = GetTempVariable(NPC, "MoleRat")
- if MoleRat ~= nil then
- SetTempVariable(NPC, "MoleRat", nil)
- Despawn(MoleRat)
- AddTimer(NPC, 2500, "ReturnHome")
- end
- end
- function ReturnHome(NPC)
- local x = GetOrigX(NPC)
- local y = GetORigY(NPC)
- local z = GetOrigZ(NPC)
- if IsInCombat(NPC) == false then
- MoveToLocation(NPC, x, y, z, 5)
- end
- end
|