mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
51 lines
979 B
Plaintext
51 lines
979 B
Plaintext
include library.ai_lib;
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
int timeOut = rand (5, 15 );
|
|
messageTo (self, "startPatrol", null, timeOut, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
int timeOut = rand (5, 10);
|
|
messageTo (self, "startPatrol", null, timeOut, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler startPatrol()
|
|
{
|
|
|
|
location guard1 = new location (4000, 37, -6284, "yavin4", null);
|
|
ai_lib.aiPathTo (self, guard1);
|
|
addLocationTarget ("marker", guard1, 1);
|
|
return SCRIPT_CONTINUE;
|
|
|
|
}
|
|
|
|
|
|
trigger OnArrivedAtLocation (string name)
|
|
{
|
|
if (name == "marker")
|
|
{
|
|
messageTo(self, "nextSpot", null, 10, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
if (name == "marker2")
|
|
{
|
|
messageTo(self, "startPatrol", null, 10, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler nextSpot()
|
|
{
|
|
location home = new location (4075, 37, -6284, "yavin4", null);
|
|
ai_lib.aiPathTo (self, home);
|
|
addLocationTarget ("marker2", home, 1);
|
|
return SCRIPT_CONTINUE;
|
|
}
|