diff --git a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_camdoen.java b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_camdoen.java old mode 100644 new mode 100755 index 49e2c2645..d1133ff19 --- a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_camdoen.java +++ b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_camdoen.java @@ -1,7364 +1,1329 @@ package script.conversation; -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - import script.library.ai_lib; import script.library.chat; -import script.library.combat; import script.library.groundquests; -import script.library.money; import script.library.utils; +import script.*; -public class azure_cabal_camdoen extends script.base_script +public class azure_cabal_camdoen extends script.conversation.base.conversation_base { + public String conversation = "conversation.azure_cabal_camdoen"; + public String c_stringFile = "conversation/azure_cabal_camdoen"; + public azure_cabal_camdoen() { + super.scriptName = "azure_cabal_camdoen"; + super.conversation = conversation; + super.c_stringFile = c_stringFile; } - public static String c_stringFile = "conversation/azure_cabal_camdoen"; - public boolean azure_cabal_camdoen_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException - { - return true; - } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(obj_id player, obj_id npc) throws InterruptedException + + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_dm2"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_dml1"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_dml2"); } - public boolean azure_cabal_camdoen_condition_onTask_30ENF_Q1_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onTask_30ENF_Q1_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_wfs_quest_complete"); } - public boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player, obj_id npc) throws InterruptedException + public boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_camdoen_01") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_camdoen_02")); } - public boolean azure_cabal_camdoen_condition_onQuest_30ENF_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onQuest_30ENF_Q1(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_dm1"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_dm2"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_dm3") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_dm3_retrieve")); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_retrieve_01") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_dml1")); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_dm1"); } - public boolean azure_cabal_camdoen_condition_onTask_30ENF_Q2_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onTask_30ENF_Q2_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_wfs_quest_complete"); } - public boolean azure_cabal_camdoen_condition_onQuest_30ENF_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onQuest_30ENF_Q2(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02"); } - public boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_camdoen_01"); } - public boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q2(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_camdoen_02"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_02", "ac_30_camdoen_02_retrieve_02"); } - public boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_sacrifice_retrieve") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01", "ac_30_camdoen_01_sacrifice_enc")); } - public void azure_cabal_camdoen_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_camdoen_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc3_camdoen_01"); } - public void azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_repeater_loruna_enf_30_signal_clear_quest"); } - public void azure_cabal_camdoen_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException - { - faceTo(npc, player); - } - public void azure_cabal_camdoen_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_camdoen_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc3_camdoen_02"); } - public void azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_quest_complete"); } - public void azure_cabal_camdoen_action_signal_30ENF_no_sacrifice(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_camdoen_action_signal_30ENF_no_sacrifice(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.clearQuest(player, "ac_repeater_loruna_enf_30_dnpc3_camdoen_01"); groundquests.grantQuest(player, "quest/ac_ongoing_launchpad_loruna_repeater"); } - public String azure_cabal_camdoen_tokenTO_playerFirstName(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_camdoen_tokenTO_playerFirstName(obj_id player) throws InterruptedException { - String name = getFirstName(player); - return name; + return getFirstName(player); } - public String azure_cabal_camdoen_tokenTO_playersProfession(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_camdoen_tokenTO_playersProfession() throws InterruptedException { - return new String(); + return ""; } - public int azure_cabal_camdoen_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_170")) { azure_cabal_camdoen_action_grant30Q1(player, npc); - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_172")); + return SCRIPT_CONTINUE; } - if (response.equals("s_171")) + else if (response.equals("s_171")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_181"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_182"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_183"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 3); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_181", "s_182", "s_183"}, 3, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_182")) { azure_cabal_camdoen_action_grant30Q1(player, npc); - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_172")); + return SCRIPT_CONTINUE; } - if (response.equals("s_183")) + else if (response.equals("s_183")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_185")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_175")) { azure_cabal_camdoen_action_grant30Q2(player, npc); - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } if (response.equals("s_176")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_177"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_178"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_179"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 7); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_177", "s_178", "s_179"}, 7, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_178")) { azure_cabal_camdoen_action_grant30Q2(player, npc); - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } - if (response.equals("s_179")) + else if (response.equals("s_179")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_186"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_186")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch9(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_196")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch11(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_193")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_194")) + else if (response.equals("s_194")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch12(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_216")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_218"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_220"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_221"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_218", "s_220", "s_221"}, 13, player); } - if (response.equals("s_217")) + else if (response.equals("s_217")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 16); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 16, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch13(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_220")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) + return craft_response(new String[] {"s_222", "s_223", "s_224"}, 14, player); + /* + ** Code simplification has shown this is now unreachable - leaving it here for future reference if this is not supposed + ** to be the case. It's believeable that it's meant to be skipped, but also looks like it could have been a bug. + + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_222"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_223"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_224"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 14); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - } - if (response.equals("s_221")) - { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; + */ } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch14(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_223")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_225"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_237"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 15); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_225", "s_237"}, 15, player); } if (response.equals("s_224")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch15(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_237")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 16); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 16, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch16(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_228")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_229"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_230"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_231"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_233"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_229", "s_228", "s_227", "s_233"}, 17, player); } - if (response.equals("s_227")) + else if (response.equals("s_227")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch17(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_230")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_232"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_235"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_236"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 18); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_232", "s_235", "s_236"}, 18, player); } - if (response.equals("s_231")) + else if (response.equals("s_231")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_233")) + else if (response.equals("s_233")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch18(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_235")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } if (response.equals("s_236")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch19(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_239")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_241"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_243"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_252"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_244"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_241", "s_243", "s_252", "s_244"}, 20, player); } - if (response.equals("s_240")) + else if (response.equals("s_240")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 22); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 22, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch20(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_243")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_253"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_254"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_255"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 21); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_253", "s_254", "s_255"}, 21, player); } - if (response.equals("s_252")) + else if (response.equals("s_252")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 22); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 22, player); } - if (response.equals("s_244")) + else if (response.equals("s_244")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch21(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_254")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 22); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 22, player); } - if (response.equals("s_255")) + else if (response.equals("s_255")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch22(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_245")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_247"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_248"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_249"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_247", "s_248", "s_249"}, 23, player); } - if (response.equals("s_246")) + else if (response.equals("s_246")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch23(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_248")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_250"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_251"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 24); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_250", "s_251"}, 24, player); } - if (response.equals("s_249")) + else if (response.equals("s_249")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch24(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_251")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch25(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_108")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_110"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_111"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_112"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_110", "s_111", "s_112"}, 26, player); } - if (response.equals("s_109")) + else if (response.equals("s_109")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 29); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 29, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch26(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_111")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_113"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_114"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_118"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 27); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_113", "s_114", "s_118"}, 27, player); } - if (response.equals("s_112")) + else if (response.equals("s_112")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 29); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 29, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch27(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_114")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_339"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_339")); + return SCRIPT_CONTINUE; } - if (response.equals("s_118")) + else if (response.equals("s_118")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 29); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 29, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch29(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_121")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_122"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_124"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_125"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 30); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_122", "s_124", "s_125"}, 30, player); } - if (response.equals("s_123")) + else if (response.equals("s_123")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch30(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_124")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_126"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_126")); + return SCRIPT_CONTINUE; } if (response.equals("s_125")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch32(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_87")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_89"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_91"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 33); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_89", "s_91", "s_104"}, 33, player); } - if (response.equals("s_106")) + else if (response.equals("s_106")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_340"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_340"}, 37, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch33(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch33(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_91")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_93"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_128"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_102"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_93", "s_128", "s_102"}, 34, player); } - if (response.equals("s_104")) + else if (response.equals("s_104")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_340"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_340"}, 37, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch34(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch34(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_128")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_129"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_131"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 35); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_129", "s_131"}, 35, player); } - if (response.equals("s_102")) + else if (response.equals("s_102")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_340"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_340"}, 37, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch35(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_131")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_133"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_139"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_133", "s_139"}, 36, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch36(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_139")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_340"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_340"}, 37, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch37(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_132")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_136"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_140"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_341"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 38); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_136", "s_140", "s_341"}, 38, player); } - if (response.equals("s_340")) + else if (response.equals("s_340")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch38(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_140")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_142"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_142")); + return SCRIPT_CONTINUE; } - if (response.equals("s_341")) + else if (response.equals("s_341")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 12); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 12, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 19, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 25, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[]{"s_203", "s_87", "s_106"}, 32, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q1E(player)) { - string_id message = new string_id(c_stringFile, "s_299"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_301"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_303"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_299", "s_301", "s_303"}, 40, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch40(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch40(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_301")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_313"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_315"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_320"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 41); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_313", "s_315", "s_320"}, 41, player); } - if (response.equals("s_303")) + else if (response.equals("s_303")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch41(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch41(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_315")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_317"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_321"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_322"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 42); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_317", "s_321", "s_322"}, 42, player); } - if (response.equals("s_320")) + else if (response.equals("s_320")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch42(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch42(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_321")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_323"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_324"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_325"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 43); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_323", "s_324", "s_325"}, 43, player); } - if (response.equals("s_322")) + else if (response.equals("s_322")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch43(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch43(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_324")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_326"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_327"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_329"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 44); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_326", "s_327", "s_329"}, 44, player); } - if (response.equals("s_325")) + else if (response.equals("s_325")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch44(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch44(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_327")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_331"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_332"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_333"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 45); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_331", "s_332", "s_333"}, 45, player); } - if (response.equals("s_329")) + else if (response.equals("s_329")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch45(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch45(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_332")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_334"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_335"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_336"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 46); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_334", "s_335", "s_336"}, 46, player); } - if (response.equals("s_333")) + else if (response.equals("s_333")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch46(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch46(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_335")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_337"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_337")); + return SCRIPT_CONTINUE; } - if (response.equals("s_336")) + else if (response.equals("s_336")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_305"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_307"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_309"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_305", "s_307", "s_309"}, 48, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch48(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch48(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_307")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_334"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_335"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_336"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 46); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_334", "s_335", "s_336"}, 46, player); } - if (response.equals("s_309")) + else if (response.equals("s_309")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - azure_cabal_camdoen_action_signal_30ENF_no_sacrifice(player, npc); - string_id message = new string_id(c_stringFile, "s_311"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + azure_cabal_camdoen_action_signal_30ENF_no_sacrifice(player, npc); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_311")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch52(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch52(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_200")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch53(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch53(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_283")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 54, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 60, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 65, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 70); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 70, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player)) { - azure_cabal_camdoen_action_facePlayer(player, npc); - string_id message = new string_id(c_stringFile, "s_352"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_354"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); + faceTo(npc, player); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_352")); return SCRIPT_CONTINUE; } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_354")); + return SCRIPT_CONTINUE; } - if (response.equals("s_356")) + else if (response.equals("s_356")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch54(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch54(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_360")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_362"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_364"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_366"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_382"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_362", "s_364", "s_366", "s_382"}, 55, player); } - if (response.equals("s_384")) + else if (response.equals("s_384")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 58, player); } if (response.equals("s_403")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch55(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch55(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_364")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_366")) + else if (response.equals("s_366")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_368"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_370"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_372"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_380"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_368", "s_370", "s_372", "s_380"}, 56, player); } - if (response.equals("s_382")) + else if (response.equals("s_382")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 58, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch56(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch56(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_370")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_372")) + else if (response.equals("s_372")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_374"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_376"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_378"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 57); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_374", "s_376", "s_378"}, 57, player); } - if (response.equals("s_380")) + else if (response.equals("s_380")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 58, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch57(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch57(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_376")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_378")) + else if (response.equals("s_378")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 58, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch58(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch58(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_388")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_390")) + else if (response.equals("s_390")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_392"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_394"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 59); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_392", "s_394"}, 59, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch59(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch59(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_394")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch60(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch60(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_288")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 61, player); } - if (response.equals("s_312")) + else if (response.equals("s_312")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_314"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_316"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_318"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 64); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_314", "s_316", "s_318"}, 64, player); } - if (response.equals("s_401")) + else if (response.equals("s_401")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch61(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch61(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_292")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_294")) + else if (response.equals("s_294")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_296"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_298"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_300"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_308"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 62); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_296", "s_298", "s_300", "s_308"}, 62, player); } - if (response.equals("s_310")) + else if (response.equals("s_310")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 54, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 60, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 65, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 70); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 70, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player)) { - azure_cabal_camdoen_action_facePlayer(player, npc); - string_id message = new string_id(c_stringFile, "s_352"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_354"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); + faceTo(npc, player); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_352")); return SCRIPT_CONTINUE; } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_354")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch62(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch62(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_298")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_300")) + else if (response.equals("s_300")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_302"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_304"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_306"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_302", "s_304", "s_306"}, 63, player); } - if (response.equals("s_308")) + else if (response.equals("s_308")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 54, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 60, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 65, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 70); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 70, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player)) { - azure_cabal_camdoen_action_facePlayer(player, npc); - string_id message = new string_id(c_stringFile, "s_352"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_354"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); + faceTo(npc, player); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_352")); return SCRIPT_CONTINUE; } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_354")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch63(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch63(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_304")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_306")) + else if (response.equals("s_306")) { - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 54, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 60, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 65, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 70); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 70, player); } - if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player, npc)) + if (azure_cabal_camdoen_condition_onAssignment_30ENF_Q2D_inv_use(player)) { - azure_cabal_camdoen_action_facePlayer(player, npc); - string_id message = new string_id(c_stringFile, "s_352"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_354"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); + faceTo(npc, player); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_352")); return SCRIPT_CONTINUE; } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_354")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch64(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch64(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_316")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_318")) + else if (response.equals("s_318")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_camdoen_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 61, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch65(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch65(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_399")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_404"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_406"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_407"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 66); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_404", "s_406", "s_407"}, 66, player); } - if (response.equals("s_400")) + else if (response.equals("s_400")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 68); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 68, player); } - if (response.equals("s_402")) + else if (response.equals("s_402")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch66(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch66(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_406")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_408"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_410"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_409"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 67); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_408", "s_410", "s_409"}, 67, player); } - if (response.equals("s_407")) + else if (response.equals("s_407")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 68); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 68, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch67(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch67(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_410")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 68); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 68, player); } - if (response.equals("s_409")) + else if (response.equals("s_409")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch68(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch68(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_413")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_415"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_416"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 69); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_415", "s_416"}, 69, player); } - if (response.equals("s_414")) + else if (response.equals("s_414")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch69(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch69(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_416")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch70(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch70(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_417")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_420"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_421"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_422"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 71); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_420", "s_421", "s_422"}, 71, player); } - if (response.equals("s_418")) + else if (response.equals("s_418")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 72); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 72, player); } - if (response.equals("s_419")) + else if (response.equals("s_419")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch71(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch71(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_421")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 72); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 72, player); } - if (response.equals("s_422")) + else if (response.equals("s_422")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch72(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch72(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_424")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_426"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_427"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_428"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 73); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_426", "s_427", "s_428"}, 73, player); } if (response.equals("s_425")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch73(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch73(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_427")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_429"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_430"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_431"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 74); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_429", "s_430", "s_431"}, 74, player); } if (response.equals("s_428")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch74(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch74(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_430")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_432"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_433"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 75); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_432", "s_433"}, 75, player); } if (response.equals("s_431")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_camdoen_handleBranch75(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_camdoen_handleBranch75(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_433")) { - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int OnInitialize(obj_id self) throws InterruptedException - { - if ((!isTangible(self)) || (isPlayer(self))) - { - detachScript(self, "conversation.azure_cabal_camdoen"); - } - 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); - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - clearCondition(self, CONDITION_CONVERSABLE); - detachScript(self, "conversation.azure_cabal_camdoen"); - 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)) + if (ai_lib.isInCombat(self) || ai_lib.isInCombat(player)) { return SCRIPT_OVERRIDE; } - if (azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1(player, npc)) + if (azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q1(player)) { - azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_168"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_170"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_171"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 1); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_168", "s_170", "s_171"}, 1, player, self); } - if (azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q2(player, npc)) + if (azure_cabal_camdoen_condition_onTask_30ENF_Repeater_Q2(player)) { - azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_174"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_175"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_176"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 5); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_camdoen_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_174", "s_175", "s_176"}, 5, player, self); } - if (azure_cabal_camdoen_condition_onTask_30ENF_Q1_Return(player, npc)) + if (azure_cabal_camdoen_condition_onTask_30ENF_Q1_Return(player)) { - azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_189"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_196"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 9); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_189", "s_196"}, 9, player, self); } - if (azure_cabal_camdoen_condition_onQuest_30ENF_Q1(player, npc)) + if (azure_cabal_camdoen_condition_onQuest_30ENF_Q1(player)) { - string_id message = new string_id(c_stringFile, "s_192"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_193"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_194"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 11); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_192", "s_193", "s_194"}, 11, player, self); } - if (azure_cabal_camdoen_condition_onTask_30ENF_Q2_Return(player, npc)) + if (azure_cabal_camdoen_condition_onTask_30ENF_Q2_Return(player)) { - azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_191"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_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_200"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 52); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_camdoen_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_191", "s_200"}, 52, player, self); } - if (azure_cabal_camdoen_condition_onQuest_30ENF_Q2(player, npc)) + if (azure_cabal_camdoen_condition_onQuest_30ENF_Q2(player)) { - string_id message = new string_id(c_stringFile, "s_282"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_camdoen_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_283"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_356"); - } - utils.setScriptVar(player, "conversation.azure_cabal_camdoen.branchId", 53); - npcStartConversation(player, npc, "azure_cabal_camdoen", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_282", "s_283", "s_356"}, 53, player, self); } - if (azure_cabal_camdoen_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_359"); - chat.chat(npc, player, message); - return SCRIPT_CONTINUE; - } - chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); + chat.chat(self, player, new string_id(c_stringFile, "s_359")); return SCRIPT_CONTINUE; } public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException @@ -7367,262 +1332,259 @@ public class azure_cabal_camdoen extends script.base_script { return SCRIPT_CONTINUE; } - obj_id npc = self; - int branchId = utils.getIntScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - if (branchId == 1 && azure_cabal_camdoen_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) + int branchId = utils.getIntScriptVar(player, conversation + ".branchId"); + if (branchId == 1 && azure_cabal_camdoen_handleBranch1(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 3 && azure_cabal_camdoen_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 3 && azure_cabal_camdoen_handleBranch3(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 5 && azure_cabal_camdoen_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 5 && azure_cabal_camdoen_handleBranch5(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 7 && azure_cabal_camdoen_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 7 && azure_cabal_camdoen_handleBranch7(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 9 && azure_cabal_camdoen_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 9 && azure_cabal_camdoen_handleBranch9(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 11 && azure_cabal_camdoen_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 11 && azure_cabal_camdoen_handleBranch11(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 12 && azure_cabal_camdoen_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 12 && azure_cabal_camdoen_handleBranch12(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 13 && azure_cabal_camdoen_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 13 && azure_cabal_camdoen_handleBranch13(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 14 && azure_cabal_camdoen_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 14 && azure_cabal_camdoen_handleBranch14(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 15 && azure_cabal_camdoen_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 15 && azure_cabal_camdoen_handleBranch15(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 16 && azure_cabal_camdoen_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 16 && azure_cabal_camdoen_handleBranch16(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 17 && azure_cabal_camdoen_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 17 && azure_cabal_camdoen_handleBranch17(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 18 && azure_cabal_camdoen_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 18 && azure_cabal_camdoen_handleBranch18(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 19 && azure_cabal_camdoen_handleBranch19(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 19 && azure_cabal_camdoen_handleBranch19(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 20 && azure_cabal_camdoen_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 20 && azure_cabal_camdoen_handleBranch20(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 21 && azure_cabal_camdoen_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 21 && azure_cabal_camdoen_handleBranch21(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 22 && azure_cabal_camdoen_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 22 && azure_cabal_camdoen_handleBranch22(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 23 && azure_cabal_camdoen_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 23 && azure_cabal_camdoen_handleBranch23(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 24 && azure_cabal_camdoen_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 24 && azure_cabal_camdoen_handleBranch24(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 25 && azure_cabal_camdoen_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 25 && azure_cabal_camdoen_handleBranch25(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 26 && azure_cabal_camdoen_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 26 && azure_cabal_camdoen_handleBranch26(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 27 && azure_cabal_camdoen_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 27 && azure_cabal_camdoen_handleBranch27(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 29 && azure_cabal_camdoen_handleBranch29(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 29 && azure_cabal_camdoen_handleBranch29(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 30 && azure_cabal_camdoen_handleBranch30(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 30 && azure_cabal_camdoen_handleBranch30(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 32 && azure_cabal_camdoen_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 32 && azure_cabal_camdoen_handleBranch32(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 33 && azure_cabal_camdoen_handleBranch33(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 33 && azure_cabal_camdoen_handleBranch33(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 34 && azure_cabal_camdoen_handleBranch34(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 34 && azure_cabal_camdoen_handleBranch34(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 35 && azure_cabal_camdoen_handleBranch35(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 35 && azure_cabal_camdoen_handleBranch35(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 36 && azure_cabal_camdoen_handleBranch36(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 36 && azure_cabal_camdoen_handleBranch36(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 37 && azure_cabal_camdoen_handleBranch37(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 37 && azure_cabal_camdoen_handleBranch37(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 38 && azure_cabal_camdoen_handleBranch38(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 38 && azure_cabal_camdoen_handleBranch38(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 40 && azure_cabal_camdoen_handleBranch40(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 40 && azure_cabal_camdoen_handleBranch40(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 41 && azure_cabal_camdoen_handleBranch41(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 41 && azure_cabal_camdoen_handleBranch41(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 42 && azure_cabal_camdoen_handleBranch42(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 42 && azure_cabal_camdoen_handleBranch42(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 43 && azure_cabal_camdoen_handleBranch43(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 43 && azure_cabal_camdoen_handleBranch43(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 44 && azure_cabal_camdoen_handleBranch44(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 44 && azure_cabal_camdoen_handleBranch44(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 45 && azure_cabal_camdoen_handleBranch45(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 45 && azure_cabal_camdoen_handleBranch45(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 46 && azure_cabal_camdoen_handleBranch46(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 46 && azure_cabal_camdoen_handleBranch46(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 48 && azure_cabal_camdoen_handleBranch48(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 48 && azure_cabal_camdoen_handleBranch48(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 52 && azure_cabal_camdoen_handleBranch52(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 52 && azure_cabal_camdoen_handleBranch52(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 53 && azure_cabal_camdoen_handleBranch53(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 53 && azure_cabal_camdoen_handleBranch53(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 54 && azure_cabal_camdoen_handleBranch54(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 54 && azure_cabal_camdoen_handleBranch54(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 55 && azure_cabal_camdoen_handleBranch55(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 55 && azure_cabal_camdoen_handleBranch55(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 56 && azure_cabal_camdoen_handleBranch56(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 56 && azure_cabal_camdoen_handleBranch56(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 57 && azure_cabal_camdoen_handleBranch57(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 57 && azure_cabal_camdoen_handleBranch57(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 58 && azure_cabal_camdoen_handleBranch58(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 58 && azure_cabal_camdoen_handleBranch58(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 59 && azure_cabal_camdoen_handleBranch59(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 59 && azure_cabal_camdoen_handleBranch59(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 60 && azure_cabal_camdoen_handleBranch60(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 60 && azure_cabal_camdoen_handleBranch60(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 61 && azure_cabal_camdoen_handleBranch61(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 61 && azure_cabal_camdoen_handleBranch61(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 62 && azure_cabal_camdoen_handleBranch62(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 62 && azure_cabal_camdoen_handleBranch62(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 63 && azure_cabal_camdoen_handleBranch63(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 63 && azure_cabal_camdoen_handleBranch63(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 64 && azure_cabal_camdoen_handleBranch64(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 64 && azure_cabal_camdoen_handleBranch64(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 65 && azure_cabal_camdoen_handleBranch65(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 65 && azure_cabal_camdoen_handleBranch65(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 66 && azure_cabal_camdoen_handleBranch66(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 66 && azure_cabal_camdoen_handleBranch66(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 67 && azure_cabal_camdoen_handleBranch67(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 67 && azure_cabal_camdoen_handleBranch67(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 68 && azure_cabal_camdoen_handleBranch68(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 68 && azure_cabal_camdoen_handleBranch68(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 69 && azure_cabal_camdoen_handleBranch69(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 69 && azure_cabal_camdoen_handleBranch69(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 70 && azure_cabal_camdoen_handleBranch70(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 70 && azure_cabal_camdoen_handleBranch70(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 71 && azure_cabal_camdoen_handleBranch71(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 71 && azure_cabal_camdoen_handleBranch71(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 72 && azure_cabal_camdoen_handleBranch72(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 72 && azure_cabal_camdoen_handleBranch72(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 73 && azure_cabal_camdoen_handleBranch73(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 73 && azure_cabal_camdoen_handleBranch73(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 74 && azure_cabal_camdoen_handleBranch74(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 74 && azure_cabal_camdoen_handleBranch74(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 75 && azure_cabal_camdoen_handleBranch75(player, npc, response) == SCRIPT_CONTINUE) + if (branchId == 75 && azure_cabal_camdoen_handleBranch75(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); - utils.removeScriptVar(player, "conversation.azure_cabal_camdoen.branchId"); - return SCRIPT_CONTINUE; + return super.OnNpcConversationResponse(self, conversationId, player, response); } } diff --git a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_haadj.java b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_haadj.java old mode 100644 new mode 100755 index d3c15c80c..d51bf93f1 --- a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_haadj.java +++ b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_haadj.java @@ -1,100 +1,93 @@ package script.conversation; -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - import script.library.ai_lib; import script.library.chat; -import script.library.combat; import script.library.groundquests; -import script.library.money; import script.library.utils; +import script.*; -public class azure_cabal_haadj extends script.base_script +public class azure_cabal_haadj extends script.conversation.base.conversation_base { + public String conversation = "conversation.azure_cabal_haadj"; + public String c_stringFile = "conversation/azure_cabal_haadj"; + public azure_cabal_haadj() { + super.scriptName = "azure_cabal_haadj"; + super.conversation = conversation; + super.c_stringFile = c_stringFile; } - public static String c_stringFile = "conversation/azure_cabal_haadj"; - public boolean azure_cabal_haadj_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException - { - return true; - } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(obj_id player, obj_id npc) throws InterruptedException + + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01", "ac_30_haadj_01_dm2"); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01", "ac_30_haadj_01_dml1"); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01", "ac_30_haadj_01_dml2"); } - public boolean azure_cabal_haadj_condition_onTask_30ENF_Q1_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onTask_30ENF_Q1_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01", "ac_30_haadj_01_wfs_quest_complete"); } - public boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player, obj_id npc) throws InterruptedException + public boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_haadj_01") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_haadj_02")); } - public boolean azure_cabal_haadj_condition_onQuest_30ENF_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onQuest_30ENF_Q1(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01"); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dm1"); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dm2"); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dml1") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dml1_retrieve")); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dml2_retrieve") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_dml2")); } - public boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01", "ac_30_haadj_01_dm1"); } - public boolean azure_cabal_haadj_condition_onTask_30ENF_Q2_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onTask_30ENF_Q2_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02", "ac_30_haadj_02_wfs_quest_complete"); } - public boolean azure_cabal_haadj_condition_onQuest_30ENF_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onQuest_30ENF_Q2(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02"); } - public boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_haadj_01"); } - public boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q2(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_haadj_02"); } - public boolean azure_cabal_haadj_condition_onQuest_30ENF_Q1orQ2(obj_id player, obj_id npc) throws InterruptedException + public boolean azure_cabal_haadj_condition_onQuest_30ENF_Q1orQ2(obj_id player) throws InterruptedException { return (groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_01") || groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc1_haadj_02")); } - public void azure_cabal_haadj_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_haadj_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc1_haadj_01"); } - public void azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_repeater_loruna_enf_30_signal_clear_quest"); @@ -103,6885 +96,1156 @@ public class azure_cabal_haadj extends script.base_script { faceTo(npc, player); } - public void azure_cabal_haadj_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_haadj_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc1_haadj_02"); } - public void azure_cabal_haadj_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_haadj_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_quest_complete"); } - public String azure_cabal_haadj_tokenTO_playerFirstName(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_haadj_tokenTO_playerFirstName(obj_id player) throws InterruptedException { - String name = getFirstName(player); - return name; + return getFirstName(player); } - public String azure_cabal_haadj_tokenTO_playersProfession(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_haadj_tokenTO_playersProfession() throws InterruptedException { - return new String(); + return ""; } - public int azure_cabal_haadj_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_170")) { azure_cabal_haadj_action_grant30Q1(player, npc); - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + string_id message = new string_id(c_stringFile, "s_172"); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, message); + return SCRIPT_CONTINUE; } - if (response.equals("s_171")) + else if (response.equals("s_171")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_181"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_182"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_183"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 3); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_181", "s_182", "s_183"}, 3, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_182")) { azure_cabal_haadj_action_grant30Q1(player, npc); - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_172")); + return SCRIPT_CONTINUE; } - if (response.equals("s_183")) + else if (response.equals("s_183")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_185")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_175")) { azure_cabal_haadj_action_grant30Q2(player, npc); - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } - if (response.equals("s_176")) + else if (response.equals("s_176")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_177"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_178"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_179"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 7); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_177", "s_178", "s_179"}, 7, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_178")) { azure_cabal_haadj_action_grant30Q2(player, npc); - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } - if (response.equals("s_179")) + else if (response.equals("s_179")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_186"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_186")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch9(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_196")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch11(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_200")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch12(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_193")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_194")) + else if (response.equals("s_194")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch13(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_216")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_218"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_220"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_221"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 14); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_218", "s_220", "s_221"}, 14, player); } - if (response.equals("s_217")) + else if (response.equals("s_217")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 17, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch14(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_220")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_222"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_223"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_224"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 15); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_222", "s_223", "s_224"}, 15, player); } - if (response.equals("s_221")) + else if (response.equals("s_221")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch15(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_223")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_225"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_237"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 16); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_225", "s_237"}, 16, player); } - if (response.equals("s_224")) + else if (response.equals("s_224")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + string_id message = new string_id(c_stringFile, "s_167"); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, message); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch16(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_237")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 17, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch17(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_228")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_229"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_230"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_231"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_233"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 18); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_229", "s_230", "s_231", "s_233"}, 18, player); } - if (response.equals("s_227")) + else if (response.equals("s_227")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch18(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_230")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_232"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_235"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_236"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_232", "s_235", "s_236"}, 19, player); } - if (response.equals("s_231")) + else if (response.equals("s_231")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_233")) + else if (response.equals("s_233")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch19(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_235")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_236")) + else if (response.equals("s_236")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch20(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_239")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_241"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_243"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_252"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_244"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 21); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_241", "s_243", "s_252", "s_244"}, 21, player); } - if (response.equals("s_240")) + else if (response.equals("s_240")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch21(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_243")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_253"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_254"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_255"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 22); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_253", "s_254", "s_255"}, 22, player); } - if (response.equals("s_252")) + else if (response.equals("s_252")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } - if (response.equals("s_244")) + else if (response.equals("s_244")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch22(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_254")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } - if (response.equals("s_255")) + else if (response.equals("s_255")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch23(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_245")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_247"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_248"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_249"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 24); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_247", "s_248", "s_249"}, 24, player); } - if (response.equals("s_246")) + else if (response.equals("s_246")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch24(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_248")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_250"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_251"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_250", "s_251"}, 25, player); } - if (response.equals("s_249")) + else if (response.equals("s_249")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch25(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_251")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch26(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_108")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_110"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_111"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_112"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 27); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_110", "s_111", "s_112"}, 27, player); } - if (response.equals("s_109")) + else if (response.equals("s_109")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch27(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_111")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_113"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_114"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_118"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 28); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_113", "s_114", "s_118"}, 28, player); } - if (response.equals("s_112")) + else if (response.equals("s_112")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch28(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_114")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_115"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_116"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_117"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 29); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_115", "s_116", "s_117"}, 29, player); } - if (response.equals("s_118")) + else if (response.equals("s_118")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch29(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_116")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_119"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_119")); + return SCRIPT_CONTINUE; } - if (response.equals("s_117")) + else if (response.equals("s_117")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch31(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_121")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_122"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_124"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_125"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_122", "s_124", "s_125"}, 32, player); } - if (response.equals("s_123")) + else if (response.equals("s_123")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch32(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_124")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_126"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_126")); + return SCRIPT_CONTINUE; } - if (response.equals("s_125")) + else if (response.equals("s_125")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch34(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch34(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_87")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_89"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_91"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 35); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_89", "s_91", "s_104"}, 35, player); } - if (response.equals("s_106")) + else if (response.equals("s_106")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 40, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch35(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_91")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_93"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_128"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_102"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_93", "s_128", "s_102"}, 36, player); } - if (response.equals("s_104")) + else if (response.equals("s_104")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 40, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch36(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_128")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_129"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_131"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_129", "s_131"}, 37, player); } - if (response.equals("s_102")) + else if (response.equals("s_102")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 40, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch37(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_131")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_133"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_135"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_139"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 38); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_133", "s_135", "s_139"}, 38, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch38(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_135")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_137"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_137")); + return SCRIPT_CONTINUE; } - if (response.equals("s_139")) + else if (response.equals("s_139")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_364"}, 40, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch40(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch40(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_132")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_136"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_140"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_162"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 41); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_136", "s_140", "s_162"}, 41, player); } - if (response.equals("s_164")) + else if (response.equals("s_164")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch41(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch41(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_140")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_142"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_144"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_160"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 42); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_142", "s_144", "s_160"}, 42, player); } - if (response.equals("s_162")) + else if (response.equals("s_162")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch42(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch42(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_144")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_146"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_148"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_158"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 43); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_146", "s_148", "s_158"}, 43, player); } - if (response.equals("s_160")) + else if (response.equals("s_160")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + string_id message = new string_id(c_stringFile, "s_167"); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, message); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch43(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch43(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_148")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_150"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_152"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_156"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 44); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_150", "s_152", "s_156"}, 44, player); } - if (response.equals("s_158")) + else if (response.equals("s_158")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + string_id message = new string_id(c_stringFile, "s_167"); + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, message); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch44(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch44(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_152")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_154"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_154")); + return SCRIPT_CONTINUE; } - if (response.equals("s_156")) + else if (response.equals("s_156")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch48(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch48(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_283")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 49, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 55, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 60, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 65, player); } } - if (response.equals("s_328")) + else if (response.equals("s_328")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch49(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch49(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_360")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_362"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_364"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_366"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_382"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 50); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_362", "s_364", "s_366", "s_382"}, 50, player); } - if (response.equals("s_384")) + else if (response.equals("s_384")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 53); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 53, player); } - if (response.equals("s_403")) + else if (response.equals("s_403")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch50(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch50(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_364")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_366")) + else if (response.equals("s_366")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_368"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_370"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_372"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_380"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 51); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_368", "s_370", "s_372", "s_380"}, 51, player); } - if (response.equals("s_382")) + else if (response.equals("s_382")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 53); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 53, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch51(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch51(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_370")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_372")) + else if (response.equals("s_372")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_374"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_376"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_378"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 52); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_374", "s_376", "s_378"}, 52, player); } - if (response.equals("s_380")) + else if (response.equals("s_380")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 53); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 53, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch52(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch52(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_376")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_378")) + else if (response.equals("s_378")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 53); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 53, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch53(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch53(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_388")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_390")) + else if (response.equals("s_390")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_392"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_394"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_392", "s_394"}, 54, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch54(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch54(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_394")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch55(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch55(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_288")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 56, player); } - if (response.equals("s_312")) + else if (response.equals("s_312")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_314"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_316"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_318"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 59); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_314", "s_316", "s_318"}, 59, player); } - if (response.equals("s_401")) + else if (response.equals("s_401")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch56(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch56(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_292")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_294")) + else if (response.equals("s_294")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_296"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_298"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_300"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_308"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 57); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_296", "s_298", "s_300", "s_308"}, 57, player); } - if (response.equals("s_310")) - { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + else if (response.equals("s_310")) { + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player)) { + return craft_response(new String[]{"s_358", "s_360", "s_384", "s_403"}, 49, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player)) { + return craft_response(new String[]{"s_286", "s_288", "s_312", "s_401"}, 55, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player)) { + return craft_response(new String[]{"s_396", "s_399", "s_400", "s_402"}, 60, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player)) { + return craft_response(new String[]{"s_398", "s_417", "s_418", "s_419"}, 65, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch57(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch57(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_298")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_300")) + else if (response.equals("s_300")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_302"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_304"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_306"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_302", "s_304", "s_306"}, 58, player); } - if (response.equals("s_308")) + else if (response.equals("s_308")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 49, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 55, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 60, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 65, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch58(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch58(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_304")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_306")) + else if (response.equals("s_306")) { - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 49, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 55, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 60, player); } - if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_haadj_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 65, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch59(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch59(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_316")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_318")) + else if (response.equals("s_318")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_haadj_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 56, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch60(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch60(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_399")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_404"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_406"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_407"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_404", "s_406", "s_407"}, 61, player); } - if (response.equals("s_400")) + else if (response.equals("s_400")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 63, player); } - if (response.equals("s_402")) + else if (response.equals("s_402")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch61(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch61(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_406")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_408"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_410"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_409"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 62); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_408", "s_410", "s_409"}, 62, player); } - if (response.equals("s_407")) + else if (response.equals("s_407")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 63, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch62(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch62(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_410")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 63, player); } - if (response.equals("s_409")) + else if (response.equals("s_409")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch63(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch63(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_413")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_415"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_416"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 64); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_415", "s_416"}, 64, player); } - if (response.equals("s_414")) + else if (response.equals("s_414")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch64(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch64(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_416")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch65(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch65(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_417")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_420"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_421"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_422"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 66); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_420", "s_421", "s_422"}, 66, player); } - if (response.equals("s_418")) + else if (response.equals("s_418")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 67); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 67, player); } - if (response.equals("s_419")) + else if (response.equals("s_419")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch66(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch66(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_421")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 67); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 67, player); } - if (response.equals("s_422")) + else if (response.equals("s_422")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch67(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch67(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_424")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_426"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_427"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_428"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 68); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_426", "s_427", "s_428"}, 68, player); } - if (response.equals("s_425")) + else if (response.equals("s_425")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch68(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch68(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_427")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_429"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_430"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_431"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 69); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_429", "s_430", "s_431"}, 69, player); } - if (response.equals("s_428")) + else if (response.equals("s_428")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch69(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch69(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_430")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_432"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_433"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 70); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_432", "s_433"}, 70, player); } - if (response.equals("s_431")) + else if (response.equals("s_431")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_haadj_handleBranch70(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_haadj_handleBranch70(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_433")) { - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int OnInitialize(obj_id self) throws InterruptedException - { - if ((!isTangible(self)) || (isPlayer(self))) - { - detachScript(self, "conversation.azure_cabal_haadj"); - } - 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); - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - clearCondition(self, CONDITION_CONVERSABLE); - detachScript(self, "conversation.azure_cabal_haadj"); - 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)) + if (ai_lib.isInCombat(self) || ai_lib.isInCombat(player)) { return SCRIPT_OVERRIDE; } - if (azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1(player, npc)) + else if (azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q1(player)) { - azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_168"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_170"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_171"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 1); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_168", "s_170", "s_171"}, 1, player, self); } - if (azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q2(player, npc)) + else if (azure_cabal_haadj_condition_onTask_30ENF_Repeater_Q2(player)) { - azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_174"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_175"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_176"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 5); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_haadj_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_174", "s_175", "s_176"}, 5, player, self); } - if (azure_cabal_haadj_condition_onTask_30ENF_Q1_Return(player, npc)) + else if (azure_cabal_haadj_condition_onTask_30ENF_Q1_Return(player)) { - azure_cabal_haadj_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_189"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_196"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 9); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_haadj_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_189", "s_196"}, 9, player, self); } - if (azure_cabal_haadj_condition_onTask_30ENF_Q2_Return(player, npc)) + else if (azure_cabal_haadj_condition_onTask_30ENF_Q2_Return(player)) { - azure_cabal_haadj_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_191"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_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_200"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 11); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_haadj_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_191", "s_200"}, 11, player, self); } - if (azure_cabal_haadj_condition_onQuest_30ENF_Q1(player, npc)) + else if (azure_cabal_haadj_condition_onQuest_30ENF_Q1(player)) { - string_id message = new string_id(c_stringFile, "s_192"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_193"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_194"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 12); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_192", "s_193", "s_194"}, 12, player, self); } - if (azure_cabal_haadj_condition_onQuest_30ENF_Q2(player, npc)) + else if (azure_cabal_haadj_condition_onQuest_30ENF_Q2(player)) { - string_id message = new string_id(c_stringFile, "s_282"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_haadj_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_283"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_328"); - } - utils.setScriptVar(player, "conversation.azure_cabal_haadj.branchId", 48); - npcStartConversation(player, npc, "azure_cabal_haadj", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_282", "s_283", "s_328"}, 48, player, self); } - if (azure_cabal_haadj_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_330"); - chat.chat(npc, player, message); - return SCRIPT_CONTINUE; - } - chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); + chat.chat(self, player, new string_id(c_stringFile, "s_330")); return SCRIPT_CONTINUE; } public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException @@ -6990,246 +1254,245 @@ public class azure_cabal_haadj extends script.base_script { return SCRIPT_CONTINUE; } - obj_id npc = self; - int branchId = utils.getIntScriptVar(player, "conversation.azure_cabal_haadj.branchId"); - if (branchId == 1 && azure_cabal_haadj_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) + int branchId = utils.getIntScriptVar(player, conversation + ".branchId"); + if (branchId == 1 && azure_cabal_haadj_handleBranch1(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 3 && azure_cabal_haadj_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 3 && azure_cabal_haadj_handleBranch3(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 5 && azure_cabal_haadj_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 5 && azure_cabal_haadj_handleBranch5(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 7 && azure_cabal_haadj_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 7 && azure_cabal_haadj_handleBranch7(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 9 && azure_cabal_haadj_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 9 && azure_cabal_haadj_handleBranch9(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 11 && azure_cabal_haadj_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 11 && azure_cabal_haadj_handleBranch11(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 12 && azure_cabal_haadj_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 12 && azure_cabal_haadj_handleBranch12(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 13 && azure_cabal_haadj_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 13 && azure_cabal_haadj_handleBranch13(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 14 && azure_cabal_haadj_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 14 && azure_cabal_haadj_handleBranch14(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 15 && azure_cabal_haadj_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 15 && azure_cabal_haadj_handleBranch15(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 16 && azure_cabal_haadj_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 16 && azure_cabal_haadj_handleBranch16(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 17 && azure_cabal_haadj_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 17 && azure_cabal_haadj_handleBranch17(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 18 && azure_cabal_haadj_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 18 && azure_cabal_haadj_handleBranch18(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 19 && azure_cabal_haadj_handleBranch19(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 19 && azure_cabal_haadj_handleBranch19(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 20 && azure_cabal_haadj_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 20 && azure_cabal_haadj_handleBranch20(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 21 && azure_cabal_haadj_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 21 && azure_cabal_haadj_handleBranch21(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 22 && azure_cabal_haadj_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 22 && azure_cabal_haadj_handleBranch22(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 23 && azure_cabal_haadj_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 23 && azure_cabal_haadj_handleBranch23(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 24 && azure_cabal_haadj_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 24 && azure_cabal_haadj_handleBranch24(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 25 && azure_cabal_haadj_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 25 && azure_cabal_haadj_handleBranch25(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 26 && azure_cabal_haadj_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 26 && azure_cabal_haadj_handleBranch26(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 27 && azure_cabal_haadj_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 27 && azure_cabal_haadj_handleBranch27(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 28 && azure_cabal_haadj_handleBranch28(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 28 && azure_cabal_haadj_handleBranch28(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 29 && azure_cabal_haadj_handleBranch29(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 29 && azure_cabal_haadj_handleBranch29(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 31 && azure_cabal_haadj_handleBranch31(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 31 && azure_cabal_haadj_handleBranch31(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 32 && azure_cabal_haadj_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 32 && azure_cabal_haadj_handleBranch32(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 34 && azure_cabal_haadj_handleBranch34(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 34 && azure_cabal_haadj_handleBranch34(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 35 && azure_cabal_haadj_handleBranch35(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 35 && azure_cabal_haadj_handleBranch35(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 36 && azure_cabal_haadj_handleBranch36(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 36 && azure_cabal_haadj_handleBranch36(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 37 && azure_cabal_haadj_handleBranch37(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 37 && azure_cabal_haadj_handleBranch37(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 38 && azure_cabal_haadj_handleBranch38(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 38 && azure_cabal_haadj_handleBranch38(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 40 && azure_cabal_haadj_handleBranch40(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 40 && azure_cabal_haadj_handleBranch40(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 41 && azure_cabal_haadj_handleBranch41(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 41 && azure_cabal_haadj_handleBranch41(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 42 && azure_cabal_haadj_handleBranch42(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 42 && azure_cabal_haadj_handleBranch42(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 43 && azure_cabal_haadj_handleBranch43(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 43 && azure_cabal_haadj_handleBranch43(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 44 && azure_cabal_haadj_handleBranch44(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 44 && azure_cabal_haadj_handleBranch44(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 48 && azure_cabal_haadj_handleBranch48(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 48 && azure_cabal_haadj_handleBranch48(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 49 && azure_cabal_haadj_handleBranch49(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 49 && azure_cabal_haadj_handleBranch49(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 50 && azure_cabal_haadj_handleBranch50(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 50 && azure_cabal_haadj_handleBranch50(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 51 && azure_cabal_haadj_handleBranch51(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 51 && azure_cabal_haadj_handleBranch51(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 52 && azure_cabal_haadj_handleBranch52(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 52 && azure_cabal_haadj_handleBranch52(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 53 && azure_cabal_haadj_handleBranch53(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 53 && azure_cabal_haadj_handleBranch53(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 54 && azure_cabal_haadj_handleBranch54(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 54 && azure_cabal_haadj_handleBranch54(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 55 && azure_cabal_haadj_handleBranch55(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 55 && azure_cabal_haadj_handleBranch55(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 56 && azure_cabal_haadj_handleBranch56(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 56 && azure_cabal_haadj_handleBranch56(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 57 && azure_cabal_haadj_handleBranch57(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 57 && azure_cabal_haadj_handleBranch57(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 58 && azure_cabal_haadj_handleBranch58(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 58 && azure_cabal_haadj_handleBranch58(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 59 && azure_cabal_haadj_handleBranch59(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 59 && azure_cabal_haadj_handleBranch59(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 60 && azure_cabal_haadj_handleBranch60(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 60 && azure_cabal_haadj_handleBranch60(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 61 && azure_cabal_haadj_handleBranch61(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 61 && azure_cabal_haadj_handleBranch61(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 62 && azure_cabal_haadj_handleBranch62(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 62 && azure_cabal_haadj_handleBranch62(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 63 && azure_cabal_haadj_handleBranch63(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 63 && azure_cabal_haadj_handleBranch63(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 64 && azure_cabal_haadj_handleBranch64(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 64 && azure_cabal_haadj_handleBranch64(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 65 && azure_cabal_haadj_handleBranch65(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 65 && azure_cabal_haadj_handleBranch65(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 66 && azure_cabal_haadj_handleBranch66(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 66 && azure_cabal_haadj_handleBranch66(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 67 && azure_cabal_haadj_handleBranch67(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 67 && azure_cabal_haadj_handleBranch67(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 68 && azure_cabal_haadj_handleBranch68(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 68 && azure_cabal_haadj_handleBranch68(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 69 && azure_cabal_haadj_handleBranch69(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 69 && azure_cabal_haadj_handleBranch69(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 70 && azure_cabal_haadj_handleBranch70(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 70 && azure_cabal_haadj_handleBranch70(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); - utils.removeScriptVar(player, "conversation.azure_cabal_haadj.branchId"); + chat.chat(self, "Error: Fell through all branches and responses for OnNpcConversationResponse."); + utils.removeScriptVar(player, conversation + ".branchId"); return SCRIPT_CONTINUE; } } diff --git a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_hoolar.java b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_hoolar.java old mode 100644 new mode 100755 index dedc9e257..14b0efae7 --- a/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_hoolar.java +++ b/sku.0/sys.server/compiled/game/script/conversation/azure_cabal_hoolar.java @@ -1,100 +1,94 @@ package script.conversation; import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; import script.library.ai_lib; import script.library.chat; -import script.library.combat; import script.library.groundquests; -import script.library.money; import script.library.utils; -public class azure_cabal_hoolar extends script.base_script +public class azure_cabal_hoolar extends script.conversation.base.conversation_base { + public String conversation = "conversation.azure_cabal_hoolar"; + public String c_stringFile = "conversation/azure_cabal_hoolar"; + public azure_cabal_hoolar() { + super.scriptName = "azure_cabal_hoolar"; + super.conversation = conversation; + super.c_stringFile = c_stringFile; } - public static String c_stringFile = "conversation/azure_cabal_hoolar"; - public boolean azure_cabal_hoolar_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException - { - return true; - } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(obj_id player, obj_id npc) throws InterruptedException + + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01", "ac_30_hoolar_01_dm2"); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01", "ac_30_hoolar_01_dml1"); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01", "ac_30_hoolar_01_dml2"); } - public boolean azure_cabal_hoolar_condition_onTask_30ENF_Q1_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onTask_30ENF_Q1_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01", "ac_30_hoolar_01_wfs_quest_complete"); } - public boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player, obj_id npc) throws InterruptedException + public boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1orQ2(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_hoolar_01") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_hoolar_02")); } - public boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q1(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01"); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dm1"); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dm2"); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dml1") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dml1_retrieve")); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(obj_id player) throws InterruptedException { return (groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dml2_retrieve") || groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_dml2")); } - public boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01", "ac_30_hoolar_01_dm1"); } - public boolean azure_cabal_hoolar_condition_onTask_30ENF_Q2_Return(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onTask_30ENF_Q2_Return(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02", "ac_30_hoolar_02_wfs_quest_complete"); } - public boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q2(obj_id player) throws InterruptedException { return groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02"); } - public boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_hoolar_01"); } - public boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q2(obj_id player, obj_id npc) throws InterruptedException + private boolean azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q2(obj_id player) throws InterruptedException { return groundquests.isTaskActive(player, "ac_repeater_loruna_enf_30", "ac_repeater_loruna_enf_30_WFS_hoolar_02"); } - public boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q1orQ2(obj_id player, obj_id npc) throws InterruptedException + public boolean azure_cabal_hoolar_condition_onQuest_30ENF_Q1orQ2(obj_id player) throws InterruptedException { return (groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_01") || groundquests.isQuestActive(player, "ac_repeater_loruna_enf_30_dnpc2_hoolar_02")); } - public void azure_cabal_hoolar_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_hoolar_action_grant30Q1(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc2_hoolar_01"); } - public void azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_repeater_loruna_enf_30_signal_clear_quest"); @@ -103,6183 +97,1061 @@ public class azure_cabal_hoolar extends script.base_script { faceTo(npc, player); } - public void azure_cabal_hoolar_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_hoolar_action_grant30Q2(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.grantQuest(player, "quest/ac_repeater_loruna_enf_30_dnpc2_hoolar_02"); } - public void azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException + private void azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); groundquests.sendSignal(player, "ac_quest_complete"); } - public String azure_cabal_hoolar_tokenTO_playerFirstName(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_hoolar_tokenTO_playerFirstName(obj_id player) throws InterruptedException { - String name = getFirstName(player); - return name; + return getFirstName(player); } - public String azure_cabal_hoolar_tokenTO_playersProfession(obj_id player, obj_id npc) throws InterruptedException + public String azure_cabal_hoolar_tokenTO_playersProfession() throws InterruptedException { - return new String(); + return ""; } - public int azure_cabal_hoolar_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_170")) { azure_cabal_hoolar_action_grant30Q1(player, npc); - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_172")); + return SCRIPT_CONTINUE; } if (response.equals("s_171")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_181"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_182"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_183"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 3); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_181", "s_182", "s_183"}, 3, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_182")) { azure_cabal_hoolar_action_grant30Q1(player, npc); - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_172")); + return SCRIPT_CONTINUE; } if (response.equals("s_183")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_185")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_175")) { azure_cabal_hoolar_action_grant30Q2(player, npc); - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } if (response.equals("s_176")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_177"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_178"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_179"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 7); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_177", "s_178", "s_179"}, 7, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_178")) { azure_cabal_hoolar_action_grant30Q2(player, npc); - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_180")); + return SCRIPT_CONTINUE; } if (response.equals("s_179")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_186"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_186")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch9(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_196")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch11(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_200")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_198")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch12(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_193")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_194")) + else if (response.equals("s_194")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch13(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_216")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_218"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_220"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_221"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 14); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_218", "s_220", "s_221"}, 14, player); } - if (response.equals("s_217")) + else if (response.equals("s_217")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 17, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch14(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_220")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_222"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_223"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_224"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 15); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_222", "s_223", "s_224"}, 15, player); } - if (response.equals("s_221")) + else if (response.equals("s_221")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch15(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_223")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_225"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_237"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 16); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_225", "s_237"}, 16, player); } - if (response.equals("s_224")) + else if (response.equals("s_224")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch16(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_237")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_219"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_228"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_227"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_219", "s_228", "s_227"}, 17, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch17(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_228")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_229"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_230"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_231"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_233"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 18); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_229", "s_230", "s_231", "s_233"}, 18, player); } - if (response.equals("s_227")) + else if (response.equals("s_227")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch18(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_230")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_232"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_235"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_236"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 19); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_232", "s_235", "s_236"}, 19, player); } - if (response.equals("s_231")) + else if (response.equals("s_231")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } - if (response.equals("s_233")) + else if (response.equals("s_233")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch19(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_235")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_236")) + else if (response.equals("s_236")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch20(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_239")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_241"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_243"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_252"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_244"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 21); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_241", "s_243", "s_252", "s_244"}, 21, player); } - if (response.equals("s_240")) + else if (response.equals("s_240")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch21(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_243")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_253"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_254"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_255"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 22); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_253", "s_254", "s_255"}, 22, player); } - if (response.equals("s_252")) + else if (response.equals("s_252")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } - if (response.equals("s_244")) + else if (response.equals("s_244")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch22(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_254")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_242"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_245"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_246"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 23); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_242", "s_245", "s_246"}, 23, player); } - if (response.equals("s_255")) + else if (response.equals("s_255")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch23(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_245")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_247"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_248"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_249"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 24); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_247", "s_248", "s_249"}, 24, player); } - if (response.equals("s_246")) + else if (response.equals("s_246")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch24(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_248")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_250"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_251"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_250", "s_251"}, 25, player); } - if (response.equals("s_249")) + else if (response.equals("s_249")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch25(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_251")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch26(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_108")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_110"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_111"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_112"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 27); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_110", "s_111", "s_112"}, 27, player); } - if (response.equals("s_109")) + else if (response.equals("s_109")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 30, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch27(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_111")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_113"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_114"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_118"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 28); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_113", "s_114", "s_118"}, 28, player); } - if (response.equals("s_112")) + else if (response.equals("s_112")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch28(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_114")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_115"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_116"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_117"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 29); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_115", "s_116", "s_117"}, 29, player); } - if (response.equals("s_118")) + else if (response.equals("s_118")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch29(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_116")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_119"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_119")); + return SCRIPT_CONTINUE; } - if (response.equals("s_117")) + else if (response.equals("s_117")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_120"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_121"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_123"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_120", "s_121", "s_123"}, 31, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch31(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_121")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_122"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_124"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_125"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 32); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_122", "s_124", "s_125"}, 32, player); } - if (response.equals("s_123")) + else if (response.equals("s_123")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch32(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_124")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_126"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_126")); + return SCRIPT_CONTINUE; } - if (response.equals("s_125")) + else if (response.equals("s_125")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch34(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch34(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_87")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_89"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_91"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 35); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_89", "s_91", "s_104"}, 35, player); } - if (response.equals("s_106")) + else if (response.equals("s_106")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 39); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 39, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch35(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_91")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_93"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_128"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_102"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_93", "s_128", "s_102"}, 36, player); } - if (response.equals("s_104")) + else if (response.equals("s_104")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 39); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 39, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch36(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_128")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_129"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_131"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_129", "s_131"}, 37, player); } - if (response.equals("s_102")) + else if (response.equals("s_102")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 39); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 39, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch37(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_131")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_133"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_139"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 38); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_133", "s_139"}, 38, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch38(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_139")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_127"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_132"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_164"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 39); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_127", "s_132", "s_164"}, 39, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch39(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch39(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_132")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_136"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_140"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_162"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 40); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_136", "s_140", "s_162"}, 40, player); } - if (response.equals("s_164")) + else if (response.equals("s_164")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch40(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch40(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_140")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_142"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_142")); + return SCRIPT_CONTINUE; } - if (response.equals("s_162")) + else if (response.equals("s_162")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1A(player)) { - string_id message = new string_id(c_stringFile, "s_197"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_216"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_217"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 13); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_197", "s_216", "s_217"}, 13, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1B(player)) { - string_id message = new string_id(c_stringFile, "s_199"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_239"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_240"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_199", "s_239", "s_240"}, 20, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1C(player)) { - string_id message = new string_id(c_stringFile, "s_201"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_108"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_109"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_201", "s_108", "s_109"}, 26, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q1D(player)) { - string_id message = new string_id(c_stringFile, "s_203"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_87"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_106"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_203", "s_87", "s_106"}, 34, player); } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_167")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch44(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch44(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_283")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 45); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_384", "s_403"}, 45, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 51); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 51, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 56, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 61, player); } } - if (response.equals("s_328")) + else if (response.equals("s_328")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch45(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch45(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_360")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_362"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_364"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_366"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_382"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 46); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_362", "s_364", "s_366", "s_382"}, 46, player); } - if (response.equals("s_384")) + else if (response.equals("s_384")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 49, player); } - if (response.equals("s_403")) + else if (response.equals("s_403")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch46(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch46(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_364")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_366")) + else if (response.equals("s_366")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_368"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_370"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_372"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_380"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 47); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_368", "s_370", "s_372", "s_380"}, 47, player); } - if (response.equals("s_382")) + else if (response.equals("s_382")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 49, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch47(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch47(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_370")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_372")) + else if (response.equals("s_372")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_374"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_376"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_378"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 48); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_374", "s_376", "s_378"}, 48, player); } - if (response.equals("s_380")) + else if (response.equals("s_380")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 49, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch48(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch48(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_376")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_378")) + else if (response.equals("s_378")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_386"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_388"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_390"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 49); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_386", "s_388", "s_390"}, 49, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch49(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch49(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_388")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_390")) + else if (response.equals("s_390")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_392"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_394"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 50); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_392", "s_394"}, 50, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch50(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch50(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_394")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch51(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch51(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_288")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 52); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 52, player); } - if (response.equals("s_312")) + else if (response.equals("s_312")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_314"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_316"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_318"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 55); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_314", "s_316", "s_318"}, 55, player); } - if (response.equals("s_401")) + else if (response.equals("s_401")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch52(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch52(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_292")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_294")) + else if (response.equals("s_294")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_296"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_298"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_300"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_308"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 53); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_296", "s_298", "s_300", "s_308"}, 53, player); } - if (response.equals("s_310")) + else if (response.equals("s_310")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 45); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 45, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 51); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 51, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 56, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 61, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch53(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch53(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_298")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_300")) + else if (response.equals("s_300")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_302"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_304"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_306"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 54); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_302", "s_304", "s_306"}, 54, player); } - if (response.equals("s_308")) + else if (response.equals("s_308")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 45); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 45, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 51); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 51, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 56, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 61, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch54(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch54(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_304")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_306")) + else if (response.equals("s_306")) { - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2A(player)) { - string_id message = new string_id(c_stringFile, "s_358"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_360"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_384"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_403"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 45); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_358", "s_360", "s_384", "s_403"}, 45, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2B(player)) { - string_id message = new string_id(c_stringFile, "s_286"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_288"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_312"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_401"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 51); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_286", "s_288", "s_312", "s_401"}, 51, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2C(player)) { - string_id message = new string_id(c_stringFile, "s_396"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_399"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_400"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_402"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 56); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_396", "s_399", "s_400", "s_402"}, 56, player); } - if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player, npc)) + if (azure_cabal_hoolar_condition_onAssignment_30ENF_Q2D(player)) { - string_id message = new string_id(c_stringFile, "s_398"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_417"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_418"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_419"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 61); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; + return craft_response(new String[] {"s_398", "s_417", "s_418", "s_419"}, 61, player); } } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch55(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch55(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_316")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } - if (response.equals("s_318")) + else if (response.equals("s_318")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_290"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (azure_cabal_hoolar_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_292"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_294"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_310"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 52); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_290", "s_292", "s_294", "s_310"}, 52, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch56(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch56(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_399")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_404"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_406"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_407"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 57); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_404", "s_406", "s_407"}, 57, player); } - if (response.equals("s_400")) + else if (response.equals("s_400")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 59); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 59, player); } - if (response.equals("s_402")) + else if (response.equals("s_402")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch57(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch57(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_406")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_408"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_410"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_409"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 58); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_408", "s_410", "s_409"}, 58, player); } - if (response.equals("s_407")) + else if (response.equals("s_407")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 59); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 59, player); } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch58(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch58(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_410")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_411"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_413"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_414"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 59); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_411", "s_413", "s_414"}, 59, player); } - if (response.equals("s_409")) + else if (response.equals("s_409")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch59(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch59(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_413")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_415"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_416"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 60); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_415", "s_416"}, 60, player); } - if (response.equals("s_414")) + else if (response.equals("s_414")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch60(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch60(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_416")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch61(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch61(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_417")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_420"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_421"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_422"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 62); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_420", "s_421", "s_422"}, 62, player); } - if (response.equals("s_418")) + else if (response.equals("s_418")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 63, player); } - if (response.equals("s_419")) + else if (response.equals("s_419")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch62(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch62(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_421")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_423"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_424"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_425"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 63); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_423", "s_424", "s_425"}, 63, player); } - if (response.equals("s_422")) + else if (response.equals("s_422")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch63(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch63(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_424")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_426"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_427"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_428"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 64); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_426", "s_427", "s_428"}, 64, player); } - if (response.equals("s_425")) + else if (response.equals("s_425")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch64(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch64(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_427")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_429"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_430"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_431"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 65); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_429", "s_430", "s_431"}, 65, player); } - if (response.equals("s_428")) + else if (response.equals("s_428")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch65(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch65(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_430")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_432"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_433"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 66); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } + return craft_response(new String[] {"s_432", "s_433"}, 66, player); } - if (response.equals("s_431")) + else if (response.equals("s_431")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int azure_cabal_hoolar_handleBranch66(obj_id player, obj_id npc, string_id response) throws InterruptedException + private int azure_cabal_hoolar_handleBranch66(obj_id player, string_id response) throws InterruptedException { if (response.equals("s_433")) { - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, new string_id(c_stringFile, "s_195")); + return SCRIPT_CONTINUE; } return SCRIPT_DEFAULT; } - public int OnInitialize(obj_id self) throws InterruptedException - { - if ((!isTangible(self)) || (isPlayer(self))) - { - detachScript(self, "conversation.azure_cabal_hoolar"); - } - 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); - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - clearCondition(self, CONDITION_CONVERSABLE); - detachScript(self, "conversation.azure_cabal_hoolar"); - 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)) + if (ai_lib.isInCombat(self) || ai_lib.isInCombat(player)) { return SCRIPT_OVERRIDE; } - if (azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1(player, npc)) + else if (azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q1(player)) { - azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_168"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_170"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_171"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 1); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_168", "s_170", "s_171"}, 1, player, self); } - if (azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q2(player, npc)) + else if (azure_cabal_hoolar_condition_onTask_30ENF_Repeater_Q2(player)) { - azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_174"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_175"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_176"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 5); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_hoolar_action_signal_30ENF_ClearRepeaterQuest(player, self); + return craft_repeater(new String[] {"s_174", "s_175", "s_176"}, 5, player, self); } - if (azure_cabal_hoolar_condition_onTask_30ENF_Q1_Return(player, npc)) + else if (azure_cabal_hoolar_condition_onTask_30ENF_Q1_Return(player)) { - azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_189"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_196"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 9); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_189", "s_196"}, 9, player, self); } - if (azure_cabal_hoolar_condition_onTask_30ENF_Q2_Return(player, npc)) + else if (azure_cabal_hoolar_condition_onTask_30ENF_Q2_Return(player)) { - azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(player, npc); - string_id message = new string_id(c_stringFile, "s_191"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_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_200"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 11); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + azure_cabal_hoolar_action_signal_30ENF_CompleteQuest(player, self); + return craft_repeater(new String[] {"s_191", "s_200"}, 11, player, self); } - if (azure_cabal_hoolar_condition_onQuest_30ENF_Q1(player, npc)) + else if (azure_cabal_hoolar_condition_onQuest_30ENF_Q1(player)) { - string_id message = new string_id(c_stringFile, "s_192"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_193"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_194"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 12); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_192", "s_193", "s_194"}, 12, player, self); } - if (azure_cabal_hoolar_condition_onQuest_30ENF_Q2(player, npc)) + else if (azure_cabal_hoolar_condition_onQuest_30ENF_Q2(player)) { - string_id message = new string_id(c_stringFile, "s_282"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (azure_cabal_hoolar_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_283"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_328"); - } - utils.setScriptVar(player, "conversation.azure_cabal_hoolar.branchId", 44); - npcStartConversation(player, npc, "azure_cabal_hoolar", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; + return craft_repeater(new String[] {"s_282", "s_283", "s_328"}, 44, player, self); } - if (azure_cabal_hoolar_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_330"); - chat.chat(npc, player, message); - return SCRIPT_CONTINUE; - } - chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); + chat.chat(self, player, new string_id(c_stringFile, "s_330")); return SCRIPT_CONTINUE; } public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException @@ -6288,234 +1160,233 @@ public class azure_cabal_hoolar extends script.base_script { return SCRIPT_CONTINUE; } - obj_id npc = self; - int branchId = utils.getIntScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); - if (branchId == 1 && azure_cabal_hoolar_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) + int branchId = utils.getIntScriptVar(player, conversation + ".branchId"); + if (branchId == 1 && azure_cabal_hoolar_handleBranch1(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 3 && azure_cabal_hoolar_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 3 && azure_cabal_hoolar_handleBranch3(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 5 && azure_cabal_hoolar_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 5 && azure_cabal_hoolar_handleBranch5(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 7 && azure_cabal_hoolar_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 7 && azure_cabal_hoolar_handleBranch7(player, self, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 9 && azure_cabal_hoolar_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 9 && azure_cabal_hoolar_handleBranch9(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 11 && azure_cabal_hoolar_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 11 && azure_cabal_hoolar_handleBranch11(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 12 && azure_cabal_hoolar_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 12 && azure_cabal_hoolar_handleBranch12(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 13 && azure_cabal_hoolar_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 13 && azure_cabal_hoolar_handleBranch13(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 14 && azure_cabal_hoolar_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 14 && azure_cabal_hoolar_handleBranch14(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 15 && azure_cabal_hoolar_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 15 && azure_cabal_hoolar_handleBranch15(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 16 && azure_cabal_hoolar_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 16 && azure_cabal_hoolar_handleBranch16(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 17 && azure_cabal_hoolar_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 17 && azure_cabal_hoolar_handleBranch17(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 18 && azure_cabal_hoolar_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 18 && azure_cabal_hoolar_handleBranch18(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 19 && azure_cabal_hoolar_handleBranch19(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 19 && azure_cabal_hoolar_handleBranch19(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 20 && azure_cabal_hoolar_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 20 && azure_cabal_hoolar_handleBranch20(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 21 && azure_cabal_hoolar_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 21 && azure_cabal_hoolar_handleBranch21(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 22 && azure_cabal_hoolar_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 22 && azure_cabal_hoolar_handleBranch22(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 23 && azure_cabal_hoolar_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 23 && azure_cabal_hoolar_handleBranch23(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 24 && azure_cabal_hoolar_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 24 && azure_cabal_hoolar_handleBranch24(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 25 && azure_cabal_hoolar_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 25 && azure_cabal_hoolar_handleBranch25(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 26 && azure_cabal_hoolar_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 26 && azure_cabal_hoolar_handleBranch26(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 27 && azure_cabal_hoolar_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 27 && azure_cabal_hoolar_handleBranch27(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 28 && azure_cabal_hoolar_handleBranch28(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 28 && azure_cabal_hoolar_handleBranch28(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 29 && azure_cabal_hoolar_handleBranch29(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 29 && azure_cabal_hoolar_handleBranch29(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 31 && azure_cabal_hoolar_handleBranch31(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 31 && azure_cabal_hoolar_handleBranch31(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 32 && azure_cabal_hoolar_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 32 && azure_cabal_hoolar_handleBranch32(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 34 && azure_cabal_hoolar_handleBranch34(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 34 && azure_cabal_hoolar_handleBranch34(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 35 && azure_cabal_hoolar_handleBranch35(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 35 && azure_cabal_hoolar_handleBranch35(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 36 && azure_cabal_hoolar_handleBranch36(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 36 && azure_cabal_hoolar_handleBranch36(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 37 && azure_cabal_hoolar_handleBranch37(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 37 && azure_cabal_hoolar_handleBranch37(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 38 && azure_cabal_hoolar_handleBranch38(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 38 && azure_cabal_hoolar_handleBranch38(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 39 && azure_cabal_hoolar_handleBranch39(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 39 && azure_cabal_hoolar_handleBranch39(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 40 && azure_cabal_hoolar_handleBranch40(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 40 && azure_cabal_hoolar_handleBranch40(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 44 && azure_cabal_hoolar_handleBranch44(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 44 && azure_cabal_hoolar_handleBranch44(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 45 && azure_cabal_hoolar_handleBranch45(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 45 && azure_cabal_hoolar_handleBranch45(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 46 && azure_cabal_hoolar_handleBranch46(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 46 && azure_cabal_hoolar_handleBranch46(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 47 && azure_cabal_hoolar_handleBranch47(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 47 && azure_cabal_hoolar_handleBranch47(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 48 && azure_cabal_hoolar_handleBranch48(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 48 && azure_cabal_hoolar_handleBranch48(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 49 && azure_cabal_hoolar_handleBranch49(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 49 && azure_cabal_hoolar_handleBranch49(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 50 && azure_cabal_hoolar_handleBranch50(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 50 && azure_cabal_hoolar_handleBranch50(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 51 && azure_cabal_hoolar_handleBranch51(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 51 && azure_cabal_hoolar_handleBranch51(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 52 && azure_cabal_hoolar_handleBranch52(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 52 && azure_cabal_hoolar_handleBranch52(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 53 && azure_cabal_hoolar_handleBranch53(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 53 && azure_cabal_hoolar_handleBranch53(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 54 && azure_cabal_hoolar_handleBranch54(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 54 && azure_cabal_hoolar_handleBranch54(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 55 && azure_cabal_hoolar_handleBranch55(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 55 && azure_cabal_hoolar_handleBranch55(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 56 && azure_cabal_hoolar_handleBranch56(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 56 && azure_cabal_hoolar_handleBranch56(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 57 && azure_cabal_hoolar_handleBranch57(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 57 && azure_cabal_hoolar_handleBranch57(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 58 && azure_cabal_hoolar_handleBranch58(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 58 && azure_cabal_hoolar_handleBranch58(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 59 && azure_cabal_hoolar_handleBranch59(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 59 && azure_cabal_hoolar_handleBranch59(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 60 && azure_cabal_hoolar_handleBranch60(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 60 && azure_cabal_hoolar_handleBranch60(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 61 && azure_cabal_hoolar_handleBranch61(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 61 && azure_cabal_hoolar_handleBranch61(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 62 && azure_cabal_hoolar_handleBranch62(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 62 && azure_cabal_hoolar_handleBranch62(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 63 && azure_cabal_hoolar_handleBranch63(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 63 && azure_cabal_hoolar_handleBranch63(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 64 && azure_cabal_hoolar_handleBranch64(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 64 && azure_cabal_hoolar_handleBranch64(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 65 && azure_cabal_hoolar_handleBranch65(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 65 && azure_cabal_hoolar_handleBranch65(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == 66 && azure_cabal_hoolar_handleBranch66(player, npc, response) == SCRIPT_CONTINUE) + else if (branchId == 66 && azure_cabal_hoolar_handleBranch66(player, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); - utils.removeScriptVar(player, "conversation.azure_cabal_hoolar.branchId"); + chat.chat(self, "Error: Fell through all branches and responses for OnNpcConversationResponse."); + utils.removeScriptVar(player, conversation + ".branchId"); return SCRIPT_CONTINUE; } } diff --git a/sku.0/sys.server/compiled/game/script/conversation/base/conversation_base.java b/sku.0/sys.server/compiled/game/script/conversation/base/conversation_base.java new file mode 100755 index 000000000..fe0e6d65d --- /dev/null +++ b/sku.0/sys.server/compiled/game/script/conversation/base/conversation_base.java @@ -0,0 +1,102 @@ +package script.conversation.base; + +import script.*; +import script.library.ai_lib; +import script.library.chat; +import script.library.utils; + +public class conversation_base extends script.base_script +{ + public String c_stringFile = ""; + public String scriptName = ""; + public String conversation = ""; + public conversation_base() + { + } + public int OnInitialize(obj_id self) throws InterruptedException + { + if ((!isTangible(self)) || (isPlayer(self))) + { + detachScript(self, conversation); + } + 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); + return SCRIPT_CONTINUE; + } + public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException + { + clearCondition(self, CONDITION_CONVERSABLE); + detachScript(self, conversation); + 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 + { + if (ai_lib.isInCombat(self) || ai_lib.isInCombat(player)) + { + return SCRIPT_OVERRIDE; + } + chat.chat(self, "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 + { + chat.chat(self, "Error: Fell through all branches and responses for OnNpcConversationResponse."); + utils.removeScriptVar(player, conversation + ".branchId"); + return SCRIPT_CONTINUE; + } + protected int craft_response(String[] responseStrings, int branchId, obj_id player) throws InterruptedException{ + string_id message = new string_id(c_stringFile, responseStrings[0]); + string_id responses[] = new string_id[responseStrings.length]; + for(int i = 1; i < responseStrings.length; i++){ + responses[i] = new string_id(c_stringFile, responseStrings[i]); + } + if(responses.length > 1){ + utils.setScriptVar(player, conversation + ".branchId", branchId); + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + } + else + { + utils.removeScriptVar(player, conversation + ".branchId"); + npcEndConversationWithMessage(player, message); + } + return SCRIPT_CONTINUE; + } + protected int craft_repeater(String[] responseStrings, int branchId, obj_id player, obj_id self) throws InterruptedException{ + string_id message = new string_id(c_stringFile, responseStrings[0]); + string_id responses[] = new string_id[responseStrings.length]; + + for(int i = 1; i < responseStrings.length; i++){ + responses[i] = new string_id(c_stringFile, responseStrings[i]); + } + + if(responseStrings.length > 1) { + utils.setScriptVar(player, conversation + ".branchId", branchId); + npcStartConversation(player, self, scriptName, message, responses); + } + else{ + chat.chat(self, player, message); + } + + return SCRIPT_CONTINUE; + + } +} diff --git a/sku.0/sys.server/compiled/game/script/string_id.java b/sku.0/sys.server/compiled/game/script/string_id.java old mode 100644 new mode 100755 index c457f7f76..fbc4baaee --- a/sku.0/sys.server/compiled/game/script/string_id.java +++ b/sku.0/sys.server/compiled/game/script/string_id.java @@ -8,7 +8,6 @@ package script; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.ObjectStreamException; import java.io.Serializable; public class string_id implements Comparable, Serializable @@ -170,35 +169,22 @@ public class string_id implements Comparable, Serializable * * @returns true if the objects have the same data, false if not */ - public boolean equals(Object o) - { - try + public boolean equals(String o){ + return m_asciiId.equals(o); + } + public boolean equals(string_id o){ + if ( m_table.equals(o.m_table)) { - if ( o instanceof string_id ) + if (m_asciiId != null && m_asciiId.length() != 0) { - string_id id = (string_id)o; - if ( m_table.equals(id.m_table)) - { - if (m_asciiId != null && m_asciiId.length() != 0) - { - if (m_asciiId.equals(id.m_asciiId)) - return true; - } else if (m_indexId == id.m_indexId ) - return true; - } + if (m_asciiId.equals(o.m_asciiId)) return true; } - else if (o instanceof String) - { - String s = (String)o; - if (m_asciiId.equals(s)) - return true; - } - } - catch (ClassCastException err) - { + else if (m_indexId == o.m_indexId ) + return true; } return false; - } // equals + } + // equals /** * \defgroup serialize Serialize support functions