mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
35 lines
844 B
Plaintext
35 lines
844 B
Plaintext
|
|
|
|
include library.ai_lib;
|
|
|
|
|
|
trigger OnAttach()
|
|
{
|
|
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
obj_id player = getObjIdObjVar( self, "newbie_handoff.mission.player" );
|
|
|
|
string missionType = getStringObjVar( self, "newbie_handoff.mission.type" );
|
|
dictionary params = new dictionary();
|
|
params.put("type", missionType);
|
|
|
|
if ( missionType.equals("brawler") ||
|
|
missionType.equals("marksman") )
|
|
{
|
|
LOG ("newbie_handoff_destroy", "Target creature has been killed.");
|
|
messageTo (player, "missionDestroyComplete", params, 0, true);
|
|
}
|
|
else if ( missionType.equals("scout") )
|
|
{
|
|
LOG ("newbie_handoff_harvest", "Target creature has been killed.");
|
|
messageTo (player, "missionHarvestTargetDead", params, 3, true);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|