package script.conversation; import script.library.*; import script.*; public class mtp_complaint_department extends script.base_script { public mtp_complaint_department() { } public static String c_stringFile = "conversation/mtp_complaint_department"; public boolean mtp_complaint_department_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean mtp_complaint_department_condition_hasMeatlumpMono(obj_id player, obj_id npc) throws InterruptedException { if (buff.hasBuff(player, "mtp_meatlump_kiss_debuff")) { return true; } return false; } public boolean mtp_complaint_department_condition_noMeatlumpMono(obj_id player, obj_id npc) throws InterruptedException { if (!buff.hasBuff(player, "mtp_meatlump_kiss_debuff")) { return true; } return false; } public void mtp_complaint_department_action_LumpAndMonoRebate(obj_id player, obj_id npc) throws InterruptedException { String mtp_complaint_particle = "appearance/pt_mtp_lightning.prt"; playClientEffectObj(player, mtp_complaint_particle, player, "root"); int playerHealth = getHealth(player); float fltPlayerHealth = playerHealth; fltPlayerHealth *= 0.8; playerHealth = (int)fltPlayerHealth; setHealth(player, playerHealth); obj_id pInv = utils.getInventoryContainer(player); obj_id rebateLump = static_item.createNewItemFunction("item_meatlump_lump_01_01", pInv); buff.removeBuff(player, "mtp_meatlump_kiss_debuff"); } public int mtp_complaint_department_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_6")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_17"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_24"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_25"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_13")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_19"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_21"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_52")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_54"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_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_56"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_60")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_90"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_129"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_130"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_65")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_67"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_69"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_73"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_140")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_142"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_24")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_25")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_27"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_21")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_30"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_29")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_31"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_32"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_36"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_42"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_44"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_46"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_127"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_32")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_86"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_36")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_87"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_42")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_88"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_44")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_89"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_46")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_48"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_127")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_128"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_56")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_129")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_131"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_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_133"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_130")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_132"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_133")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_134"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_6"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_13"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_52"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_60"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_65"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_140"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 1); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_6")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_17"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_24"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_25"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_13")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_19"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_21"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_52")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_54"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_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_56"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_60")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_90"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_129"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_130"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_65")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_67"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_69"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_73"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_140")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_142"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_69")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_71"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_6"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_13"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_52"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_60"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_65"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_140"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 1); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_73")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_75"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_77"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_116"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 22); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_6")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_17"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_24"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_25"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_13")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_19"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_21"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_52")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_54"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_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_56"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_60")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_90"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_129"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_130"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_65")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_67"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_69"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_73"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_140")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_142"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_77")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_79"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_81"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_85"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 23); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_116")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_118"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_122"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_136"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 33); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_81")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_83"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_85")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_92"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 25); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_94")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_98")) { if (mtp_complaint_department_condition_hasMeatlumpMono(player, npc)) { string_id message = new string_id(c_stringFile, "s_100"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_110"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 27); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_114"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_6"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_13"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_52"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_60"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_65"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_140"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 1); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_102")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_104"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_120"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_125"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 28); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_110")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_120")) { mtp_complaint_department_action_LumpAndMonoRebate(player, npc); if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_121"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_125")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_126"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_6")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_17"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_24"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_25"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_13")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_19"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_21"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_29"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_52")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_54"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_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_56"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_60")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_90"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_129"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_130"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_65")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_67"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_69"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_73"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_140")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_142"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int mtp_complaint_department_handleBranch33(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_122")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_124"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_136")) { if (mtp_complaint_department_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_138"); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isTangible(self)) || (isPlayer(self))) { detachScript(self, "conversation.mtp_complaint_department"); } 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.mtp_complaint_department"); return SCRIPT_CONTINUE; } public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException { Object[] objects = new Object[responses.length]; System.arraycopy(responses, 0, objects, 0, responses.length); return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException { obj_id npc = self; if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player)) { return SCRIPT_OVERRIDE; } if (mtp_complaint_department_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "nervous"); string_id message = new string_id(c_stringFile, "s_4"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } boolean hasResponse5 = false; if (mtp_complaint_department_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_6"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_13"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_52"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_60"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_65"); } if (hasResponse5) { responses[responseIndex++] = new string_id(c_stringFile, "s_140"); } utils.setScriptVar(player, "conversation.mtp_complaint_department.branchId", 1); npcStartConversation(player, npc, "mtp_complaint_department", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); return SCRIPT_CONTINUE; } public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException { if (!conversationId.equals("mtp_complaint_department")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.mtp_complaint_department.branchId"); if (branchId == 1 && mtp_complaint_department_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 2 && mtp_complaint_department_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 5 && mtp_complaint_department_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && mtp_complaint_department_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && mtp_complaint_department_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 16 && mtp_complaint_department_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && mtp_complaint_department_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 18 && mtp_complaint_department_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 20 && mtp_complaint_department_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 21 && mtp_complaint_department_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 22 && mtp_complaint_department_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 23 && mtp_complaint_department_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 25 && mtp_complaint_department_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 27 && mtp_complaint_department_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 28 && mtp_complaint_department_handleBranch28(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 32 && mtp_complaint_department_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 33 && mtp_complaint_department_handleBranch33(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.mtp_complaint_department.branchId"); return SCRIPT_CONTINUE; } }