package script.conversation; import script.*; import script.library.ai_lib; import script.library.chat; import script.library.utils; public class biogenic_herald_dealer extends script.base_script { public biogenic_herald_dealer() { } public static String c_stringFile = "conversation/biogenic_herald_dealer"; public boolean biogenic_herald_dealer_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean biogenic_herald_dealer_condition_get_waypoint(obj_id player, obj_id npc) throws InterruptedException { location loc; obj_id[] waypoints = getWaypointsInDatapad(player); for (obj_id waypoint : waypoints) { loc = getWaypointLocation(waypoint); if (loc.x == -6488.0f && loc.z == -417.0f) { return true; } } return false; } public boolean biogenic_herald_dealer_condition_check_inv(obj_id player, obj_id npc) throws InterruptedException { String datatable = "datatables/npc/relic_dealer/relic_geonosian_bio_bunker.iff"; String item = ""; String itemTemplate = ""; int itemLength = dataTableGetNumRows(datatable); int x = 0; int y = 0; obj_id inventory = utils.getInventoryContainer(player); if (isIdValid(inventory)) { obj_id[] contents = utils.getContents(inventory, true); if (contents != null) { for (x = 0; x < contents.length; x++) { y = 0; itemTemplate = getTemplateName(contents[x]); while (y < itemLength) { item = dataTableGetString(datatable, y, "items"); if (itemTemplate.equals(item)) { return true; } y++; } } } } return false; } public void biogenic_herald_dealer_action_give_waypoint(obj_id player, obj_id npc) throws InterruptedException { location cave = new location(-6488, 0, -417); obj_id waypoint = createWaypointInDatapad(player, cave); setWaypointName(waypoint, "Mysterious Cave"); setWaypointColor(waypoint, "blue"); setWaypointVisible(waypoint, true); setWaypointActive(waypoint, true); } public void biogenic_herald_dealer_action_face_to(obj_id player, obj_id npc) throws InterruptedException { faceTo(npc, player); } public void biogenic_herald_dealer_action_start_dealing(obj_id player, obj_id npc) throws InterruptedException { dictionary params = new dictionary(); params.put("player", player); messageTo(npc, "startDealing", params, 1.0f, false); } public int biogenic_herald_dealer_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_520ae1e7")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_8a046130"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition_check_inv(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_52beeae8"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_2b7c5c5a"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_93f3969d")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_f2d5ae08"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_52beeae8")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_start_dealing(player, npc); string_id message = new string_id(c_stringFile, "s_551304d2"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_2b7c5c5a")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_ce4b0ac8"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_321d898b")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_bbf0856c"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_b1be0157"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_e13e9abc"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_d78255c2"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_14b834bb")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2688b2a3"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_61f5ac3"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_253d6dd2"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_4399b8ac"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_490e56dd")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_163"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_b1be0157")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_3dc0cd9d"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_aa4a4ec4"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_f51b07ff"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_1f5ef4a0"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_52"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 8); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_e13e9abc")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2688b2a3"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_61f5ac3"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_253d6dd2"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_4399b8ac"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_d78255c2")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_aa4a4ec4")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_ac44ebc8"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_7828a8aa"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_e4e38e80"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_f51b07ff")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_827f01ce"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_c0036582"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_674fdb0a"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 11); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_1f5ef4a0")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_e998f1ae"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_45"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_85f5abed"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_52")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_54"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_7828a8aa")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_827f01ce"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_c0036582"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_674fdb0a"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 11); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_e4e38e80")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_188c477d"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_c0036582")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_12f0f46"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_6ecc5ef7"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_27"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_674fdb0a")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_a70cda4"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_33"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_35"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_39")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_41"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_6ecc5ef7")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_5b67bd"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8d32acbf"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_156"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 22); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_27")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_29"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_33")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_5b67bd"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8d32acbf"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_156"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 22); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_35")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_37"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_45")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_ac44ebc8"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_7828a8aa"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_e4e38e80"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_85f5abed")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_827f01ce"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_c0036582"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_674fdb0a"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 11); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_48")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_50"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_61f5ac3")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_5b67bd"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8d32acbf"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_156"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 22); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_253d6dd2")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_bbf0856c"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_b1be0157"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_e13e9abc"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_d78255c2"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_4399b8ac")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_5c031163"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_8d32acbf")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_86db3ca8"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_e00ac98e"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_53fdb2c3"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 23); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_156")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2608508b"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_e00ac98e")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_83b0842f"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition_check_inv(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_894992c6"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_72308e43"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_9c48be16"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_53fdb2c3")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_2608508b"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_894992c6")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_46aee9"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_70"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 25); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_72308e43")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_1945c2e"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition_check_inv(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_88"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_113ae28f"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_1fc825af"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 30); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_9c48be16")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_give_waypoint(player, npc); string_id message = new string_id(c_stringFile, "s_153"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_70")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_72"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_74"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_78"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 26); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_74")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_start_dealing(player, npc); string_id message = new string_id(c_stringFile, "s_76"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_78")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_80"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_88")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_90"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_92"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_104"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 31); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_113ae28f")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_give_waypoint(player, npc); string_id message = new string_id(c_stringFile, "s_b9c59c4a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition_check_inv(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_110"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 36); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_1fc825af")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_give_waypoint(player, npc); string_id message = new string_id(c_stringFile, "s_ec4e1fe"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition_check_inv(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_132"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 42); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_92")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_94"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_96"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_100"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 32); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_104")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_106"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_96")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_start_dealing(player, npc); string_id message = new string_id(c_stringFile, "s_98"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_100")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_102"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_110")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; 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_126"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 37); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_114")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_116"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_118"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_122"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 38); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_126")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_128"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_118")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_start_dealing(player, npc); string_id message = new string_id(c_stringFile, "s_120"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_122")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_124"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch42(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_132")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_134"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_136"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_148"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 43); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch43(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_136")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_138"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; 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_144"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 44); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_148")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_150"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int biogenic_herald_dealer_handleBranch44(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_140")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_start_dealing(player, npc); string_id message = new string_id(c_stringFile, "s_142"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_144")) { if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_146"); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isMob(self)) || (isPlayer(self))) { detachScript(self, "conversation.biogenic_herald_dealer"); } setCondition(self, CONDITION_CONVERSABLE); setInvulnerable(self, true); return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { setCondition(self, CONDITION_CONVERSABLE); setInvulnerable(self, true); 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.biogenic_herald_dealer"); 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 (biogenic_herald_dealer_condition_get_waypoint(player, npc)) { biogenic_herald_dealer_action_face_to(player, npc); string_id message = new string_id(c_stringFile, "s_ec7227cf"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_520ae1e7"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_93f3969d"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 1); npcStartConversation(player, npc, "biogenic_herald_dealer", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { biogenic_herald_dealer_action_face_to(player, npc); string_id message = new string_id(c_stringFile, "s_ca3bfa0f"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (biogenic_herald_dealer_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (biogenic_herald_dealer_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_321d898b"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_14b834bb"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_490e56dd"); } utils.setScriptVar(player, "conversation.biogenic_herald_dealer.branchId", 6); npcStartConversation(player, npc, "biogenic_herald_dealer", 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("biogenic_herald_dealer")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); if (branchId == 1 && biogenic_herald_dealer_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 2 && biogenic_herald_dealer_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 6 && biogenic_herald_dealer_handleBranch6(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && biogenic_herald_dealer_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 8 && biogenic_herald_dealer_handleBranch8(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 9 && biogenic_herald_dealer_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && biogenic_herald_dealer_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 12 && biogenic_herald_dealer_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && biogenic_herald_dealer_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && biogenic_herald_dealer_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 21 && biogenic_herald_dealer_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 22 && biogenic_herald_dealer_handleBranch22(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 23 && biogenic_herald_dealer_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 24 && biogenic_herald_dealer_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 25 && biogenic_herald_dealer_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 26 && biogenic_herald_dealer_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 30 && biogenic_herald_dealer_handleBranch30(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 31 && biogenic_herald_dealer_handleBranch31(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 32 && biogenic_herald_dealer_handleBranch32(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 36 && biogenic_herald_dealer_handleBranch36(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 37 && biogenic_herald_dealer_handleBranch37(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 38 && biogenic_herald_dealer_handleBranch38(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 42 && biogenic_herald_dealer_handleBranch42(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 43 && biogenic_herald_dealer_handleBranch43(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 44 && biogenic_herald_dealer_handleBranch44(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.biogenic_herald_dealer.branchId"); return SCRIPT_CONTINUE; } }