mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
47 lines
879 B
Plaintext
47 lines
879 B
Plaintext
include library.locations;
|
|
include library.ai_lib;
|
|
include library.utils;
|
|
|
|
trigger OnAttach()
|
|
{
|
|
location here = getLocation(self);
|
|
|
|
location someLoc = null;
|
|
int x = 0;
|
|
|
|
while (x < 10)
|
|
{
|
|
location loc = utils.getRandomLocationInRing(here, 100, 500);
|
|
someLoc = locations.getGoodLocationAroundLocation(loc, 5f, 5f, 50f, 50f);
|
|
|
|
if (someLoc!= null)
|
|
break;
|
|
|
|
x++;
|
|
}
|
|
|
|
setObjVar(self, "event.ep3_trando_herald.wookiee_loc", someLoc);
|
|
|
|
messageTo(self, "startRunningAway", null, 3, false);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler startRunningAway()
|
|
{
|
|
location loc = getLocationObjVar(self, "event.ep3_trando_herald.wookiee_loc");
|
|
|
|
ai_lib.aiPathTo(self, loc);
|
|
setMovementRun(self);
|
|
|
|
messageTo(self, "disappearIntoTheCrowd", null, 20, false);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler disappearIntoTheCrowd()
|
|
{
|
|
destroyObject(self);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
} |