mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
43 lines
811 B
Plaintext
43 lines
811 B
Plaintext
include library.ai_lib;
|
|
|
|
trigger OnAttach()
|
|
{
|
|
|
|
setInvulnerable(self, true);
|
|
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
|
ai_lib.stop(self);
|
|
pickNameByTemplate(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
void pickNameByTemplate(obj_id self)
|
|
{
|
|
string name = " ";
|
|
string whatAmI = getTemplateName(self);
|
|
|
|
if(whatAmI.equals("object/mobile/dressed_stormtrooper_m.iff"))
|
|
{
|
|
int roll = rand(100, 999);
|
|
name = "TK-" + roll;
|
|
}
|
|
|
|
if(whatAmI.equals("object/mobile/dressed_tie_fighter_m.iff"))
|
|
{
|
|
int roll = rand(100, 999);
|
|
name = "DS-" + roll;
|
|
}
|
|
|
|
if(whatAmI.equals("object/mobile/atat.iff"))
|
|
name = "AT-AT";
|
|
|
|
if(whatAmI.equals("object/mobile/atst.iff"))
|
|
name = "AT-ST";
|
|
|
|
if(whatAmI.equals("object/mobile/bantha_saddle.iff"))
|
|
name = "a bantha mount";
|
|
|
|
setName(self, name);
|
|
|
|
return;
|
|
|
|
} |