package script.conversation; import script.library.*; import script.*; public class ep3_stren_colo extends script.base_script { public ep3_stren_colo() { } public static String c_stringFile = "conversation/ep3_stren_colo"; public boolean ep3_stren_colo_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean ep3_stren_colo_condition_hasCompleted10WookieeQuest(obj_id player, obj_id npc) throws InterruptedException { return (groundquests.isTaskActive(player, "ep3_sera_10_wookiee_teeth", "isReadyForReward")); } public boolean ep3_stren_colo_condition_bountyCollect(obj_id player, obj_id npc) throws InterruptedException { return false; } public boolean ep3_stren_colo_condition_bountyOffer(obj_id player, obj_id npc) throws InterruptedException { return false; } public boolean ep3_stren_colo_condition_hasJesskBounty(obj_id player, obj_id npc) throws InterruptedException { return (groundquests.isQuestActive(player, "ep3_stren_jessk_bounty") || groundquests.hasCompletedQuest(player, "ep3_stren_jessk_bounty")); } public boolean ep3_stren_colo_condition_isReadyForJesskReward(obj_id player, obj_id npc) throws InterruptedException { return groundquests.isTaskActive(player, "ep3_stren_jessk_bounty", "hasKilledJessk"); } public boolean ep3_stren_colo_condition_hasDornBounty(obj_id player, obj_id npc) throws InterruptedException { return (space_quest.hasQuest(player) || space_quest.hasWonQuestRecursive(player, "assassinate", "ep3_stren_dorn_lackey")); } public boolean ep3_stren_colo_condition_isReadyForDornReward(obj_id player, obj_id npc) throws InterruptedException { return (space_quest.hasWonQuest(player, "destroy_surpriseattack", "ep3_stren_dorn_bounty") && !space_quest.hasReceivedReward(player, "destroy_surpriseattack", "ep3_stren_dorn_bounty")); } public boolean ep3_stren_colo_condition_isClinetRebel(obj_id player, obj_id npc) throws InterruptedException { if (factions.isRebel(player)) { if (factions.isOnLeave(player)) { return false; } return true; } return false; } public void ep3_stren_colo_action_giveReward10Wookieequest(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "give10TeethReward"); } public void ep3_stren_colo_action_giveJesskBounty(obj_id player, obj_id npc) throws InterruptedException { groundquests.grantQuest(player, "ep3_stren_jessk_bounty"); } public void ep3_stren_colo_action_giveJesskReward(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "collectJeskReward"); } public void ep3_stren_colo_action_giveJesskTien(obj_id player, obj_id npc) throws InterruptedException { groundquests.grantQuest(player, "ep3_stren_jessk_bounty_tien"); } public void ep3_stren_colo_action_giveDornBelga(obj_id player, obj_id npc) throws InterruptedException { groundquests.grantQuest(player, "ep3_stren_dorn_bounty_belga"); } public void ep3_stren_colo_action_giveDornReward(obj_id player, obj_id npc) throws InterruptedException { space_quest.giveReward(player, "destroy_surpriseattack", "ep3_stren_dorn_bounty", 10000); } public int ep3_stren_colo_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_20")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_22"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition_isReadyForJesskReward(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_condition_isReadyForDornReward(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_61"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_57")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ep3_stren_colo_action_giveJesskReward(player, npc); string_id message = new string_id(c_stringFile, "s_25"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_61")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ep3_stren_colo_action_giveDornReward(player, npc); string_id message = new string_id(c_stringFile, "s_63"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_29")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_67"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_71")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_73"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (!ep3_stren_colo_condition_hasJesskBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (!ep3_stren_colo_condition_hasDornBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_75"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_89"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_99"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 8); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_75")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_77"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_79"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_89")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_91"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_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_93"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_97"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_99")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_101"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_79")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_81"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_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_83"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_87"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_83")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ep3_stren_colo_action_giveJesskTien(player, npc); string_id message = new string_id(c_stringFile, "s_85"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_87")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_73"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (!ep3_stren_colo_condition_hasJesskBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (!ep3_stren_colo_condition_hasDornBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_75"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_89"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_99"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 8); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_93")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ep3_stren_colo_action_giveDornBelga(player, npc); string_id message = new string_id(c_stringFile, "s_95"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_97")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_73"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (!ep3_stren_colo_condition_hasJesskBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (!ep3_stren_colo_condition_hasDornBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_75"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_89"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_99"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 8); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_105")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_107"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_109"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_127")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "gesticulate_wildly"); string_id message = new string_id(c_stringFile, "s_129"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_109")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_111"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_113"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_113")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ep3_stren_colo_action_giveReward10Wookieequest(player, npc); string_id message = new string_id(c_stringFile, "s_115"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_117"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 18); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_117")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_121"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 19); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_121")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_123"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_125"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_125")) { if (ep3_stren_colo_condition_isClinetRebel(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_bountyCollect(player, npc)) { string_id message = new string_id(c_stringFile, "s_51"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_20"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_bountyOffer(player, npc)) { string_id message = new string_id(c_stringFile, "s_69"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_71"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_hasCompleted10WookieeQuest(player, npc)) { doAnimationAction(npc, "adjust"); string_id message = new string_id(c_stringFile, "s_103"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_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_105"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_127"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 15); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_131"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_133"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_135"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_137"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_139"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 22); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_stren_colo_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_133")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_22"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition_isReadyForJesskReward(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_condition_isReadyForDornReward(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_61"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_135")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_73"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (!ep3_stren_colo_condition_hasJesskBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (!ep3_stren_colo_condition_hasDornBounty(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_75"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_89"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_99"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 8); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_137")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_119"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_121"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 19); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_139")) { if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_141"); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isMob(self)) || (isPlayer(self))) { detachScript(self, "conversation.ep3_stren_colo"); } setCondition(self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { setCondition(self, CONDITION_CONVERSABLE); 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); faceTo(self, player); return SCRIPT_CONTINUE; } public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException { clearCondition(self, CONDITION_CONVERSABLE); detachScript(self, "conversation.ep3_stren_colo"); 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 (ep3_stren_colo_condition_isClinetRebel(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); chat.chat(npc, player, message); return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_bountyCollect(player, npc)) { string_id message = new string_id(c_stringFile, "s_51"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_20"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 2); npcStartConversation(player, npc, "ep3_stren_colo", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_bountyOffer(player, npc)) { string_id message = new string_id(c_stringFile, "s_69"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_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_71"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 7); npcStartConversation(player, npc, "ep3_stren_colo", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition_hasCompleted10WookieeQuest(player, npc)) { doAnimationAction(npc, "adjust"); string_id message = new string_id(c_stringFile, "s_103"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_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_105"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_127"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 15); npcStartConversation(player, npc, "ep3_stren_colo", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_stren_colo_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_131"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (ep3_stren_colo_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_133"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_135"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_137"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_139"); } utils.setScriptVar(player, "conversation.ep3_stren_colo.branchId", 22); npcStartConversation(player, npc, "ep3_stren_colo", 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("ep3_stren_colo")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.ep3_stren_colo.branchId"); if (branchId == 2 && ep3_stren_colo_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 3 && ep3_stren_colo_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && ep3_stren_colo_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 8 && ep3_stren_colo_handleBranch8(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 9 && ep3_stren_colo_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 10 && ep3_stren_colo_handleBranch10(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 12 && ep3_stren_colo_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 15 && ep3_stren_colo_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 16 && ep3_stren_colo_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && ep3_stren_colo_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 18 && ep3_stren_colo_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 19 && ep3_stren_colo_handleBranch19(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 20 && ep3_stren_colo_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 22 && ep3_stren_colo_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.ep3_stren_colo.branchId"); return SCRIPT_CONTINUE; } }