47 lines
No EOL
1.1 KiB
Text
Executable file
47 lines
No EOL
1.1 KiB
Text
Executable file
--[[
|
|
Script Name : SpawnScripts/Freeport/aFreeportvisitant56893lua
|
|
Script Author : Premierio015
|
|
Script Date : 2021.05.05 09:05:15
|
|
Script Purpose :
|
|
:
|
|
--]]
|
|
|
|
function spawn(NPC)
|
|
movement_loop_start(NPC)
|
|
end
|
|
|
|
function movement_loop_start(NPC)
|
|
MoveToLocation(NPC, -278.78, -56.17, 205.11, 2)
|
|
MoveToLocation(NPC, -250.06, -56.07, 204.01, 2)
|
|
MoveToLocation(NPC, -250.04, -56.07, 201.55, 2, "heading")
|
|
end
|
|
|
|
function heading(NPC)
|
|
SetHeading(NPC, 358.76)
|
|
AddTimer(NPC, 10000, "movement_loop_continue", 1)
|
|
end
|
|
|
|
function movement_loop_continue(NPC)
|
|
MoveToLocation(NPC, -250.06, -56.07, 204.01, 2)
|
|
MoveToLocation(NPC, -278.78, -56.17, 205.11, 2)
|
|
MoveToLocation(NPC, -299.40, -58.94, 202.41, 2, "heading2")
|
|
end
|
|
|
|
function heading2(NPC)
|
|
SetHeading(NPC, 116.35)
|
|
AddTimer(NPC, 10000, "movement_loop_start", 1)
|
|
end
|
|
|
|
function hailed(NPC, Spawn)
|
|
FaceTarget(NPC, Spawn)
|
|
local choice = MakeRandomInt(1, 2)
|
|
if choice == 1 then
|
|
AddTimer(NPC, 10000, "movement_loop_start", 1)
|
|
else
|
|
AddTimer(NPC, 10000, "movement_loop_continue", 1)
|
|
end
|
|
end
|
|
|
|
function respawn(NPC)
|
|
spawn(NPC)
|
|
end |