package script.conversation; import script.library.*; import script.*; public class station_endor extends script.base_script { public station_endor() { } public static String c_stringFile = "conversation/station_endor"; public boolean station_endor_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean station_endor_condition_canAfford50(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.canAffordShipRepairs(player, npc, 0.50f); } public boolean station_endor_condition_canAfford25(obj_id player, obj_id npc) throws InterruptedException { return (space_crafting.canAffordShipRepairs(player, npc, 0.25f) && space_crafting.isDamaged(player)); } public boolean station_endor_condition_canAfford75(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.canAffordShipRepairs(player, npc, 0.75f); } public boolean station_endor_condition_canAfford100(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.canAffordShipRepairs(player, npc, 1.0f); } public boolean station_endor_condition_needRepairs(obj_id player, obj_id npc) throws InterruptedException { float fltDamage = space_crafting.getDamageTotal(player, getPilotedShip(player)); if (fltDamage > 0) { return true; } return false; } public boolean station_endor_condition_isTooFar(obj_id player, obj_id npc) throws InterruptedException { space_combat.playCombatTauntSound(player); obj_id containingShip = space_transition.getContainingShip(player); return (getDistance(npc, containingShip) > space_transition.STATION_COMM_MAX_DISTANCE); } public boolean station_endor_condition_hasCompletedHalfTier3(obj_id player, obj_id npc) throws InterruptedException { int skillCount = 0; if (hasSkill(player, "pilot_imperial_navy_starships_03")) { skillCount++; } if (hasSkill(player, "pilot_imperial_navy_weapons_03")) { skillCount++; } if (hasSkill(player, "pilot_imperial_navy_procedures_03")) { skillCount++; } if (hasSkill(player, "pilot_imperial_navy_droid_03")) { skillCount++; } if (hasSkill(player, "pilot_neutral_starships_03")) { skillCount++; } if (hasSkill(player, "pilot_neutral_weapons_03")) { skillCount++; } if (hasSkill(player, "pilot_neutral_procedures_03")) { skillCount++; } if (hasSkill(player, "pilot_neutral_droid_03")) { skillCount++; } return (skillCount > 1); } public boolean station_endor_condition_readyForStoryOne(obj_id player, obj_id npc) throws InterruptedException { if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_TATOOINE)) { return false; } if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_CORELLIA)) { return false; } if (space_quest.hasQuest(player)) { return false; } return (station_endor_condition_hasCompletedHalfTier3(player, npc) && !station_endor_condition_hasCompletedFirstSeries(player, npc)); } public boolean station_endor_condition_hasCompletedFirstSeries(obj_id player, obj_id npc) throws InterruptedException { if (space_quest.hasCompletedQuest(player, "rescue", "stn_endor_irs_imp_tier3_1a")) { return true; } else { return false; } } public boolean station_endor_condition_readyForStoryTwo(obj_id player, obj_id npc) throws InterruptedException { if (station_endor_condition_readyForStoryOne(player, npc)) { return false; } if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_TATOOINE)) { return false; } if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_CORELLIA)) { return false; } if (space_quest.hasQuest(player)) { return false; } return (station_endor_condition_hasCompletedHalfTier3(player, npc) && !station_endor_condition_hasCompletedSecondSeries(player, npc)); } public boolean station_endor_condition_hasCompletedSecondSeries(obj_id player, obj_id npc) throws InterruptedException { if (space_quest.hasCompletedQuest(player, "escort", "stn_endor_irs_imp_tier3_2a")) { return true; } else { return false; } } public boolean station_endor_condition_readyForStoryThree(obj_id player, obj_id npc) throws InterruptedException { if (station_endor_condition_readyForStoryOne(player, npc)) { return false; } if (station_endor_condition_readyForStoryTwo(player, npc)) { return false; } if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_TATOOINE)) { return false; } if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_CORELLIA)) { return false; } if (space_quest.hasQuest(player)) { return false; } return (station_endor_condition_hasCompletedHalfTier3(player, npc) && !station_endor_condition_hasCompletedThirdSeries(player, npc)); } public boolean station_endor_condition_hasCompletedThirdSeries(obj_id player, obj_id npc) throws InterruptedException { if (space_quest.hasCompletedQuest(player, "patrol", "stn_endor_irs_imp_tier3_3a")) { return true; } else { return false; } } public boolean station_endor_condition_isReadyForDutyMissions(obj_id player, obj_id npc) throws InterruptedException { if (space_quest.hasQuest(player)) { return false; } return (station_endor_condition_hasCompletedThirdSeries(player, npc) && space_flags.hasCompletedTierThree(player)); } public boolean station_endor_condition_canTakeQuest(obj_id player, obj_id npc) throws InterruptedException { if (space_quest.hasQuest(player)) { return false; } return true; } public boolean station_endor_condition_canAttackImperial(obj_id player, obj_id npc) throws InterruptedException { if (space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player)) { return true; } return false; } public boolean station_endor_condition_canAttackRebel(obj_id player, obj_id npc) throws InterruptedException { if (space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player)) { return true; } return false; } public boolean station_endor_condition_canHandleTier4(obj_id player, obj_id npc) throws InterruptedException { return space_flags.hasCompletedTierThree(player); } public void station_endor_action_landStation3(obj_id player, obj_id npc) throws InterruptedException { space_content.landPlayer(player, npc, "Mos Espa Starport"); } public void station_endor_action_fix25(obj_id player, obj_id npc) throws InterruptedException { space_crafting.doStationToShipRepairs(player, npc, 0.25f); } public void station_endor_action_fix50(obj_id player, obj_id npc) throws InterruptedException { space_crafting.doStationToShipRepairs(player, npc, 0.50f); } public void station_endor_action_fix75(obj_id player, obj_id npc) throws InterruptedException { space_crafting.doStationToShipRepairs(player, npc, 0.75f); } public void station_endor_action_fix100(obj_id player, obj_id npc) throws InterruptedException { space_crafting.doStationToShipRepairs(player, npc, 1.0f); } public void station_endor_action_landStation1(obj_id player, obj_id npc) throws InterruptedException { space_content.landPlayer(player, npc, "Research Outpost"); } public void station_endor_action_landStation2(obj_id player, obj_id npc) throws InterruptedException { space_content.landPlayer(player, npc, "Smuggler Outpost"); } public void station_endor_action_grantMissionOne(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "rescue", "stn_endor_irs_imp_tier3_1a"); space_quest.grantQuest(player, "destroy_surpriseattack", "stn_endor_irs_imp_tier3_1a_sa"); } public void station_endor_action_grantMissionTwo(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "escort", "stn_endor_irs_imp_tier3_2a"); } public void station_endor_action_grantMissionThree(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "patrol", "stn_endor_irs_imp_tier3_3a"); } public void station_endor_action_grantDestroyDutyMission(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "stn_endor_irs_imp_tier4_1"); } public void station_endor_action_grantEscortDutyMission(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "escort_duty", "stn_endor_irs_imp_tier4_1"); } public void station_endor_action_grantImperialDuty4(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_imperial_tier4"); } public void station_endor_action_grantImperialDuty5(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "kessel_imperial_tier5"); } public void station_endor_action_grantRebelDuty4(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_rebel_tier4"); } public void station_endor_action_grantRebelDuty5(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "kessel_rebel_tier5"); } public void station_endor_action_grantBlackSunDuty4(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_blacksun_tier4"); } public void station_endor_action_grantBlackSunDuty5(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_blacksun_tier5"); } public void station_endor_action_grantImperialDuty5_2(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_imperial_tier5"); } public void station_endor_action_grantRebelDuty5_2(obj_id player, obj_id npc) throws InterruptedException { space_quest.grantQuest(player, "destroy_duty", "endor_rebel_tier5"); } public String station_endor_tokenTO_tokenTO0001(obj_id player, obj_id npc) throws InterruptedException { return new String(); } public int station_endor_tokenDI_getStationRepairCost25(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.getStationRepairCost(player, npc, 0.25f); } public int station_endor_tokenDI_getStationRepairCost50(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.getStationRepairCost(player, npc, 0.50f); } public int station_endor_tokenDI_getStationRepairCost75(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.getStationRepairCost(player, npc, 0.75f); } public int station_endor_tokenDI_getStationRepairCost100(obj_id player, obj_id npc) throws InterruptedException { return space_crafting.getStationRepairCost(player, npc, 1.0f); } public int station_endor_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_25759913")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9eae7799"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_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_4a43e175"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_2610c442")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_35417d09"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_fc27931b"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_31e68e8b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_5f4952b7")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2a121119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAfford50(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford75(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAfford100(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8ae30058"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_c98e000"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_14897567"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_70876928"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_169df3bb"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_c3d359f2")) { if (station_endor_condition_readyForStoryOne(player, npc)) { string_id message = new string_id(c_stringFile, "s_24dd12a9"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_90fc8440"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_55"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 24); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_4360fc64")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_7272cd2a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_203953bd"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_a115d9be"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 27); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_8353c277")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_809da719"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_143e876a"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2f9e3b7b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 30); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_cfc852d9")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_78f29efc"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_d9c39726"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_fb6681b8"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 33); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_80")) { if (station_endor_condition_canHandleTier4(player, npc)) { string_id message = new string_id(c_stringFile, "s_82"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } boolean hasResponse8 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_84"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_113"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_87"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_92"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_114"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_96"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_100"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_104"); } if (hasResponse8) { responses[responseIndex++] = new string_id(c_stringFile, "s_108"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 38); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_4a43e175")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9e0cc5c"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_c6f610d3"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_695e2019"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 4); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_c6f610d3")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_landStation2(player, npc); string_id message = new string_id(c_stringFile, "s_592038e"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_695e2019")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_landStation1(player, npc); string_id message = new string_id(c_stringFile, "s_75d638d8"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_fc27931b")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_landStation1(player, npc); string_id message = new string_id(c_stringFile, "s_ab6892a7"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_31e68e8b")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_478bdae6"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_8ae30058")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_c0d7347d"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_d70dba34"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_4c695dbd"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 11); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost25(player, npc); npcSpeak(player, pp); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost25(player, npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_c98e000")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_edc85a49"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_895d093"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_31"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 14); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost50(player, npc); npcSpeak(player, pp); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost50(player, npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_14897567")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_460bcfda"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_ebe2e111"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 17); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost75(player, npc); npcSpeak(player, pp); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost75(player, npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_70876928")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_b68693bb"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_43"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_46"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 20); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost100(player, npc); npcSpeak(player, pp); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); pp.digitInteger = station_endor_tokenDI_getStationRepairCost100(player, npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_169df3bb")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_e8eb7684"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_d70dba34")) { station_endor_action_fix25(player, npc); if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_a22bada4"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_4c695dbd")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9445899b"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_895d093")) { station_endor_action_fix50(player, npc); if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_549ada4b"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_31")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_685bb895"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_ebe2e111")) { station_endor_action_fix75(player, npc); if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_c6b82293"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_38")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_eb2adf47"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_43")) { station_endor_action_fix100(player, npc); if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_7bc8f950"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_46")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_3b68a624"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_90fc8440")) { station_endor_action_grantMissionOne(player, npc); if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_b40dc05e"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); return SCRIPT_CONTINUE; } } if (response.equals("s_55")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_cc059cc2"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford25(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_readyForStoryOne(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_readyForStoryTwo(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_readyForStoryThree(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition_isReadyForDutyMissions(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition_canTakeQuest(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_25759913"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2610c442"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_5f4952b7"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_c3d359f2"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_4360fc64"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_8353c277"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_cfc852d9"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_80"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 2); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_25759913")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9eae7799"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_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_4a43e175"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_2610c442")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_35417d09"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_fc27931b"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_31e68e8b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_5f4952b7")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2a121119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAfford50(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford75(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAfford100(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8ae30058"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_c98e000"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_14897567"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_70876928"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_169df3bb"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_c3d359f2")) { if (station_endor_condition_readyForStoryOne(player, npc)) { string_id message = new string_id(c_stringFile, "s_24dd12a9"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_90fc8440"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_55"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 24); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_4360fc64")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_7272cd2a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_203953bd"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_a115d9be"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 27); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_8353c277")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_809da719"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_143e876a"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2f9e3b7b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 30); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_cfc852d9")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_78f29efc"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_d9c39726"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_fb6681b8"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 33); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_80")) { if (station_endor_condition_canHandleTier4(player, npc)) { string_id message = new string_id(c_stringFile, "s_82"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } boolean hasResponse8 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_84"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_113"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_87"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_92"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_114"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_96"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_100"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_104"); } if (hasResponse8) { responses[responseIndex++] = new string_id(c_stringFile, "s_108"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 38); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_203953bd")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantMissionTwo(player, npc); string_id message = new string_id(c_stringFile, "s_c0da04f9"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); return SCRIPT_CONTINUE; } } if (response.equals("s_a115d9be")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_a19e12a1"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford25(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_readyForStoryOne(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_readyForStoryTwo(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_readyForStoryThree(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition_isReadyForDutyMissions(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition_canTakeQuest(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_25759913"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2610c442"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_5f4952b7"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_c3d359f2"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_4360fc64"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_8353c277"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_cfc852d9"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_80"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 2); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_25759913")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9eae7799"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_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_4a43e175"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_2610c442")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_35417d09"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_fc27931b"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_31e68e8b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_5f4952b7")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2a121119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAfford50(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford75(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAfford100(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8ae30058"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_c98e000"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_14897567"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_70876928"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_169df3bb"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_c3d359f2")) { if (station_endor_condition_readyForStoryOne(player, npc)) { string_id message = new string_id(c_stringFile, "s_24dd12a9"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_90fc8440"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_55"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 24); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_4360fc64")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_7272cd2a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_203953bd"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_a115d9be"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 27); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_8353c277")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_809da719"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_143e876a"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2f9e3b7b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 30); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_cfc852d9")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_78f29efc"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_d9c39726"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_fb6681b8"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 33); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_80")) { if (station_endor_condition_canHandleTier4(player, npc)) { string_id message = new string_id(c_stringFile, "s_82"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } boolean hasResponse8 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_84"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_113"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_87"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_92"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_114"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_96"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_100"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_104"); } if (hasResponse8) { responses[responseIndex++] = new string_id(c_stringFile, "s_108"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 38); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_143e876a")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantMissionThree(player, npc); string_id message = new string_id(c_stringFile, "s_2d9d1ee4"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); return SCRIPT_CONTINUE; } } if (response.equals("s_2f9e3b7b")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_a9d26781"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford25(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_readyForStoryOne(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_readyForStoryTwo(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_readyForStoryThree(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition_isReadyForDutyMissions(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition_canTakeQuest(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_25759913"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2610c442"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_5f4952b7"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_c3d359f2"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_4360fc64"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_8353c277"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_cfc852d9"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_80"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 2); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_25759913")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_9eae7799"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_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_4a43e175"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_2610c442")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_35417d09"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_fc27931b"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_31e68e8b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_5f4952b7")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2a121119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAfford50(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford75(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAfford100(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8ae30058"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_c98e000"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_14897567"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_70876928"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_169df3bb"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_c3d359f2")) { if (station_endor_condition_readyForStoryOne(player, npc)) { string_id message = new string_id(c_stringFile, "s_24dd12a9"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_90fc8440"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_55"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 24); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_4360fc64")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_7272cd2a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_203953bd"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_a115d9be"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 27); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_8353c277")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_809da719"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_143e876a"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2f9e3b7b"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 30); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_cfc852d9")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_78f29efc"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_d9c39726"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_fb6681b8"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 33); 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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } if (response.equals("s_80")) { if (station_endor_condition_canHandleTier4(player, npc)) { string_id message = new string_id(c_stringFile, "s_82"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAttackImperial(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_canAttackRebel(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } boolean hasResponse8 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_84"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_113"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_87"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_92"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_114"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_96"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_100"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_104"); } if (hasResponse8) { responses[responseIndex++] = new string_id(c_stringFile, "s_108"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 38); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch33(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_d9c39726")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantEscortDutyMission(player, npc); string_id message = new string_id(c_stringFile, "s_1572cf8"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); return SCRIPT_CONTINUE; } } if (response.equals("s_fb6681b8")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantDestroyDutyMission(player, npc); string_id message = new string_id(c_stringFile, "s_1110e057"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_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_96ff1c97"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_26dfa294"); } utils.setScriptVar(player, "conversation.station_endor.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_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_96ff1c97")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_a168a94b"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_26dfa294")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2944ab48"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); prose_package pp = new prose_package(); pp.stringId = message; pp.actor.set(player); pp.target.set(npc); npcEndConversationWithMessage(player, pp); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int station_endor_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_84")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantRebelDuty4(player, npc); string_id message = new string_id(c_stringFile, "s_89"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_113")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantRebelDuty5_2(player, npc); string_id message = new string_id(c_stringFile, "s_115"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_87")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantRebelDuty5(player, npc); string_id message = new string_id(c_stringFile, "s_90"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_92")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantImperialDuty4(player, npc); string_id message = new string_id(c_stringFile, "s_94"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_114")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantImperialDuty5_2(player, npc); string_id message = new string_id(c_stringFile, "s_116"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_96")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantImperialDuty5(player, npc); string_id message = new string_id(c_stringFile, "s_98"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_100")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantBlackSunDuty4(player, npc); string_id message = new string_id(c_stringFile, "s_102"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_104")) { if (station_endor_condition__defaultCondition(player, npc)) { station_endor_action_grantBlackSunDuty5(player, npc); string_id message = new string_id(c_stringFile, "s_106"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_108")) { if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_110"); utils.removeScriptVar(player, "conversation.station_endor.branchId"); npcEndConversationWithMessage(player, message); 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_station_endor.iff"); return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { setCondition(self, CONDITION_CONVERSABLE); setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_endor.iff"); 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_endor"); 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_endor_condition_isTooFar(player, npc)) { string_id message = new string_id(c_stringFile, "s_e1c14e1d"); chat.chat(npc, player, message); return SCRIPT_CONTINUE; } if (station_endor_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_de3168cf"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (station_endor_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (station_endor_condition_canAfford25(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (station_endor_condition_readyForStoryOne(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (station_endor_condition_readyForStoryTwo(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (station_endor_condition_readyForStoryThree(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } boolean hasResponse6 = false; if (station_endor_condition_isReadyForDutyMissions(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } boolean hasResponse7 = false; if (station_endor_condition_canTakeQuest(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_25759913"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2610c442"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_5f4952b7"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_c3d359f2"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_4360fc64"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_8353c277"); } if (hasResponse6) { responses[responseIndex++] = new string_id(c_stringFile, "s_cfc852d9"); } if (hasResponse7) { responses[responseIndex++] = new string_id(c_stringFile, "s_80"); } utils.setScriptVar(player, "conversation.station_endor.branchId", 2); npcStartConversation(player, npc, "station_endor", message, responses); } else { chat.chat(npc, player, message); } 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_endor")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.station_endor.branchId"); if (branchId == 2 && station_endor_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 3 && station_endor_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 4 && station_endor_handleBranch4(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && station_endor_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 10 && station_endor_handleBranch10(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && station_endor_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && station_endor_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && station_endor_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 20 && station_endor_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 24 && station_endor_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 26 && station_endor_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 27 && station_endor_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 29 && station_endor_handleBranch29(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 30 && station_endor_handleBranch30(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 32 && station_endor_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 33 && station_endor_handleBranch33(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 35 && station_endor_handleBranch35(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 38 && station_endor_handleBranch38(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_endor.branchId"); return SCRIPT_CONTINUE; } }