Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/station_rebel_outpost.java
T
2018-06-07 00:32:29 +01:00

1972 lines
84 KiB
Java
Executable File

package script.conversation;
import script.library.*;
import script.*;
public class station_rebel_outpost extends script.base_script
{
public station_rebel_outpost()
{
}
public static String c_stringFile = "conversation/station_rebel_outpost";
public boolean station_rebel_outpost_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean station_rebel_outpost_condition_hasFailed_rebel_escort_alpha(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasFailedQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
}
public boolean station_rebel_outpost_condition_isPlayerImperial(obj_id player, obj_id npc) throws InterruptedException
{
return (space_battlefield.isInImperialShip(player) || pvpGetAlignedFaction(player) == (-615855020));
}
public boolean station_rebel_outpost_condition_isRebelFactionWithMission(obj_id player, obj_id npc) throws InterruptedException
{
if (space_battlefield.isInNeutralShip(player))
{
return ((pvpGetAlignedFaction(player) == (370444368)) && space_quest.hasQuest(player));
}
else
{
return false;
}
}
public boolean station_rebel_outpost_condition_isInYacht(obj_id player, obj_id npc) throws InterruptedException
{
obj_id ship = space_transition.getContainingShip(player);
if (isIdValid(ship))
{
String template = getTemplateName(ship);
if (template != null && template.endsWith("_yacht.iff"))
{
return true;
}
}
return false;
}
public boolean station_rebel_outpost_condition_isPlayerNeutral(obj_id player, obj_id npc) throws InterruptedException
{
if (space_battlefield.isInNeutralShip(player))
{
if (pvpGetAlignedFaction(player) == (370444368))
{
return false;
}
else
{
return true;
}
}
return false;
}
public boolean station_rebel_outpost_condition_isTooFar(obj_id player, obj_id npc) throws InterruptedException
{
obj_id containingShip = space_transition.getContainingShip(player);
return (getDistance(npc, containingShip) > space_transition.STATION_COMM_MAX_DISTANCE);
}
public boolean station_rebel_outpost_condition_hasWon_rebel_escort_alpha(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasWonQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
}
public boolean station_rebel_outpost_condition_hasBeenRewarded_rebel_escort_alpha(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasReceivedReward(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
}
public boolean station_rebel_outpost_condition_isReady_for_escort_alpha(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasWonQuest(player, "assassinate", "ep3_kash_station_assassinate_rebel") && !space_quest.hasWonQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
}
public boolean station_rebel_outpost_condition_hasBeenRewarded_heavy_xwing(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasReceivedReward(player, "recovery", "ep3_heavy_xwing_recovery"));
}
public boolean station_rebel_outpost_condition_hasWon_heavy_xwing_recovery(obj_id player, obj_id npc) throws InterruptedException
{
return (space_quest.hasWonQuest(player, "recovery", "ep3_heavy_xwing_recovery") && !space_quest.hasReceivedReward(player, "recovery", "ep3_heavy_xwing_recovery"));
}
public void station_rebel_outpost_action_grant_duty_destroy(obj_id player, obj_id npc) throws InterruptedException
{
space_quest.grantQuest(player, "destroy_duty", "ep3_kash_station_destroy_duty_rebel");
}
public void station_rebel_outpost_action_grant_duty_escort(obj_id player, obj_id npc) throws InterruptedException
{
space_quest.grantQuest(player, "escort_duty", "ep3_kash_station_escort_duty_rebel");
}
public void station_rebel_outpost_action_grant_escort_alpha(obj_id player, obj_id npc) throws InterruptedException
{
space_quest.grantQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha");
}
public void station_rebel_outpost_action_setPlayerToOvertStatus(obj_id player, obj_id npc) throws InterruptedException
{
space_transition.setPlayerOvert(player, (370444368));
}
public void station_rebel_outpost_action_giveReward_rebel_hologram(obj_id player, obj_id npc) throws InterruptedException
{
space_quest.giveReward(player, "escort", "ep3_kash_station_rebel_escort_alpha", 5000, "object/tangible/furniture/ep3_rewards/hologram_insignia_rebel_01.iff");
}
public void station_rebel_outpost_action_grantMission_heavy_xwing_recovery(obj_id player, obj_id npc) throws InterruptedException
{
space_quest.grantQuest(player, "recovery", "ep3_heavy_xwing_recovery");
}
public void station_rebel_outpost_action_giveReward_heavy_xwing(obj_id player, obj_id npc) throws InterruptedException
{
badge.grantBadge(player, "bdg_kash_rebel_heavy_xwing");
space_quest.giveReward(player, "recovery", "ep3_heavy_xwing_recovery", 15000, "object/tangible/ship/crafted/chassis/advanced_xwing_reward_deed.iff");
}
public int station_rebel_outpost_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_719"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_721");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_835"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_836");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_1110"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_giveReward_heavy_xwing(player, npc);
string_id message = new string_id(c_stringFile, "s_1111");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_731"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grant_escort_alpha(player, npc);
string_id message = new string_id(c_stringFile, "s_733");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_737"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grant_escort_alpha(player, npc);
string_id message = new string_id(c_stringFile, "s_739");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_741");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_749");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_741"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_743");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_745");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_749"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_751");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_753");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_745"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_747");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_753"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_755");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_757");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_757"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_759");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_763"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_765");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_767");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_777");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_787");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_791"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_setPlayerToOvertStatus(player, npc);
string_id message = new string_id(c_stringFile, "s_831");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_793"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_795");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_797");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_805");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_813");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_817"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_819");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_767"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_769");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_771");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_775");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_777"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_779");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_781");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_785");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 23);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_787"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_789");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_771"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grant_duty_destroy(player, npc);
string_id message = new string_id(c_stringFile, "s_773");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_775"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_765");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_767");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_777");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_787");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_781"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grant_duty_escort(player, npc);
string_id message = new string_id(c_stringFile, "s_783");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_785"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_765");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_767");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_777");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_787");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_797"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grantMission_heavy_xwing_recovery(player, npc);
string_id message = new string_id(c_stringFile, "s_799");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_801");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_805"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_807");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_809");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 29);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_813"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_815");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_797");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_805");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_813");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_801"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_803");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_809"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_811");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_797");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_805");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_813");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_797"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grantMission_heavy_xwing_recovery(player, npc);
string_id message = new string_id(c_stringFile, "s_799");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_801");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_805"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_807");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_809");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 29);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_813"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_815");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_797");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_805");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_813");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_797"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_grantMission_heavy_xwing_recovery(player, npc);
string_id message = new string_id(c_stringFile, "s_799");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_801");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_805"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_807");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_809");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 29);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_813"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_815");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_797");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_805");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_813");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch33(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_823"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_giveReward_rebel_hologram(player, npc);
string_id message = new string_id(c_stringFile, "s_825");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_829"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_setPlayerToOvertStatus(player, npc);
string_id message = new string_id(c_stringFile, "s_831");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_833"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_837");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_839"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_841");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_843");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 38);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_843"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_845");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_847");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 39);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch39(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_847"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_849");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_829");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_833");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_839");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 35);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcSpeak(player, pp);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int station_rebel_outpost_handleBranch40(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_829"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
station_rebel_outpost_action_setPlayerToOvertStatus(player, npc);
string_id message = new string_id(c_stringFile, "s_831");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, pp);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_833"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_837");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_839"))
{
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_841");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_843");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 38);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setObjVar(self, "convo.appearance", "object/mobile/space_comm_kash_reb_base.iff");
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setObjVar(self, "convo.appearance", "object/mobile/space_comm_kash_reb_base.iff");
detachScript(self, "space.content_tools.spacestation");
return SCRIPT_CONTINUE;
}
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
{
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
menuInfoData.setServerNotify(false);
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.station_rebel_outpost");
return SCRIPT_CONTINUE;
}
public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException
{
obj_id npc = self;
if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player))
{
return SCRIPT_OVERRIDE;
}
if (station_rebel_outpost_condition_isInYacht(player, npc))
{
string_id message = new string_id(c_stringFile, "s_713");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_isPlayerImperial(player, npc))
{
string_id message = new string_id(c_stringFile, "s_715");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_isRebelFactionWithMission(player, npc))
{
string_id message = new string_id(c_stringFile, "s_717");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_719");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_835");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 3);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcStartConversation(player, npc, "station_rebel_outpost", null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_isPlayerNeutral(player, npc))
{
string_id message = new string_id(c_stringFile, "s_725");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_isTooFar(player, npc))
{
string_id message = new string_id(c_stringFile, "s_727");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_hasWon_heavy_xwing_recovery(player, npc))
{
string_id message = new string_id(c_stringFile, "s_850");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_1110");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 8);
npcStartConversation(player, npc, "station_rebel_outpost", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_hasFailed_rebel_escort_alpha(player, npc))
{
string_id message = new string_id(c_stringFile, "s_729");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_731");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 10);
npcStartConversation(player, npc, "station_rebel_outpost", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_isReady_for_escort_alpha(player, npc))
{
string_id message = new string_id(c_stringFile, "s_735");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_737");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 12);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcStartConversation(player, npc, "station_rebel_outpost", null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_hasBeenRewarded_rebel_escort_alpha(player, npc))
{
string_id message = new string_id(c_stringFile, "s_761");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (!station_rebel_outpost_condition_hasBeenRewarded_heavy_xwing(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
boolean hasResponse3 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_763");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_791");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_793");
}
if (hasResponse3)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_817");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 19);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcStartConversation(player, npc, "station_rebel_outpost", null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition_hasWon_rebel_escort_alpha(player, npc))
{
string_id message = new string_id(c_stringFile, "s_821");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_823");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 33);
npcStartConversation(player, npc, "station_rebel_outpost", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_827");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (station_rebel_outpost_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_829");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_833");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_839");
}
utils.setScriptVar(player, "conversation.station_rebel_outpost.branchId", 35);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcStartConversation(player, npc, "station_rebel_outpost", null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException
{
if (!conversationId.equals("station_rebel_outpost"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.station_rebel_outpost.branchId");
if (branchId == 3 && station_rebel_outpost_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && station_rebel_outpost_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && station_rebel_outpost_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && station_rebel_outpost_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && station_rebel_outpost_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && station_rebel_outpost_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && station_rebel_outpost_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && station_rebel_outpost_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && station_rebel_outpost_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 20 && station_rebel_outpost_handleBranch20(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 21 && station_rebel_outpost_handleBranch21(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 23 && station_rebel_outpost_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 26 && station_rebel_outpost_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 27 && station_rebel_outpost_handleBranch27(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 29 && station_rebel_outpost_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 30 && station_rebel_outpost_handleBranch30(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 31 && station_rebel_outpost_handleBranch31(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 33 && station_rebel_outpost_handleBranch33(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 35 && station_rebel_outpost_handleBranch35(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 38 && station_rebel_outpost_handleBranch38(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 39 && station_rebel_outpost_handleBranch39(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 40 && station_rebel_outpost_handleBranch40(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.station_rebel_outpost.branchId");
return SCRIPT_CONTINUE;
}
}