mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
42 lines
1.3 KiB
Java
42 lines
1.3 KiB
Java
package script.holocron;
|
|
|
|
import script.*;
|
|
import script.base_class.*;
|
|
import script.combat_engine.*;
|
|
import java.util.Arrays;
|
|
import java.util.Hashtable;
|
|
import java.util.Vector;
|
|
import script.base_script;
|
|
|
|
import script.library.ai_lib;
|
|
|
|
public class destroy_target extends script.base_script
|
|
{
|
|
public destroy_target()
|
|
{
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
|
|
{
|
|
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;
|
|
}
|
|
}
|