package script.conversation; import script.*; import script.base_class.*; import script.combat_engine.*; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; import script.base_script; import script.library.ai_lib; import script.library.chat; import script.library.conversation; import script.library.groundquests; import script.library.utils; public class wod_outcast2 extends script.base_script { public wod_outcast2() { } public static String c_stringFile = "conversation/wod_outcast2"; public boolean wod_outcast2_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_outcast2_condition_talkTaskActive(obj_id player, obj_id npc) throws InterruptedException { return groundquests.isTaskActive(player, "wod_outcast_2", "talkOutcastNightsister"); } public boolean wod_outcast2_condition_condition0002(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_outcast2_condition_condition0003(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_outcast2_condition_condition0004(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_outcast2_condition_condition0005(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_outcast2_condition_leansSM(obj_id player, obj_id npc) throws InterruptedException { return (utils.getIntScriptVar(npc, "lean." + player) < 0); } public boolean wod_outcast2_condition_leansNS(obj_id player, obj_id npc) throws InterruptedException { return (utils.getIntScriptVar(npc, "lean." + player) > 0); } public boolean wod_outcast2_condition_hasQuestActive(obj_id player, obj_id npc) throws InterruptedException { utils.removeScriptVar(npc, "lean." + player); return questIsQuestActive(questGetQuestId("quest/wod_outcast_2"), player) && groundquests.isTaskActive(player, "wod_outcast_2", "talkOutcastNightsister"); } public void wod_outcast2_action_sendOutcastNS(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "wod_outcast_nightsister_win"); groundquests.failTask(player, "quest/wod_outcast_2", "talkOutcastSinging"); utils.removeScriptVar(npc, "lean." + player); } public void wod_outcast2_action_sendOutcastSM(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "wod_outcast_singing_win"); groundquests.failTask(player, "quest/wod_outcast_2", "talkOutcastNightsister"); utils.removeScriptVar(npc, "lean." + player); } public void wod_outcast2_action_leanNS(obj_id player, obj_id npc) throws InterruptedException { if (!utils.hasScriptVar(npc, "lean." + player)) { utils.setScriptVar(npc, "lean." + player, 1); } else { utils.setScriptVar(npc, "lean." + player, utils.getIntScriptVar(npc, "lean." + player) + 1); } } public void wod_outcast2_action_leanSM(obj_id player, obj_id npc) throws InterruptedException { if (!utils.hasScriptVar(npc, "lean." + player)) { utils.setScriptVar(npc, "lean." + player, -1); } else { utils.setScriptVar(npc, "lean." + player, utils.getIntScriptVar(npc, "lean." + player) - 1); } } public int wod_outcast2_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_46")) { if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_47"); utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_9")) { if (wod_outcast2_condition_talkTaskActive(player, npc)) { string_id message = new string_id(c_stringFile, "s_11"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_13"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_18"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 4); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_13")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_48"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_49"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_18")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_50"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_51"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_49")) { if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_52"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_35"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_36"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_35")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_38"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_54"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_36")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_37"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_55"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_51")) { if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_53"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_35"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_36"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_35")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_38"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_54"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_36")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_37"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_55"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_35")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_38"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_54"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_36")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_37"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_55"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_54")) { if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_56"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_42"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_39")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_43"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_42")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_55")) { if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_57"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_42"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_39")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_43"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_42")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_39")) { wod_outcast2_action_leanSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_43"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_42")) { wod_outcast2_action_leanNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_63")) { if (wod_outcast2_condition_leansSM(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_66"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 18); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (wod_outcast2_condition_leansNS(player, npc)) { string_id message = new string_id(c_stringFile, "s_70"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_72"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_63")) { if (wod_outcast2_condition_leansSM(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_66"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 18); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (wod_outcast2_condition_leansNS(player, npc)) { string_id message = new string_id(c_stringFile, "s_70"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_72"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_63")) { if (wod_outcast2_condition_leansSM(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_66"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 18); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } if (wod_outcast2_condition_leansNS(player, npc)) { string_id message = new string_id(c_stringFile, "s_70"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_72"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 20); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_66")) { wod_outcast2_action_sendOutcastSM(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_68"); utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public int wod_outcast2_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_72")) { wod_outcast2_action_sendOutcastNS(player, npc); if (wod_outcast2_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_74"); utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } public static int lean = 0; public int OnInitialize(obj_id self) throws InterruptedException { if ((!isTangible(self)) || (isPlayer(self))) { detachScript(self, "conversation.wod_outcast2"); } 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.wod_outcast2"); 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 (!wod_outcast2_condition_hasQuestActive(player, npc)) { string_id message = new string_id(c_stringFile, "s_45"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_46"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 1); npcStartConversation(player, npc, "wod_outcast2", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (wod_outcast2_condition_talkTaskActive(player, npc)) { string_id message = new string_id(c_stringFile, "s_7"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_9"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 3); npcStartConversation(player, npc, "wod_outcast2", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (!wod_outcast2_condition_condition0003(player, npc)) { string_id message = new string_id(c_stringFile, "s_29"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_35"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_36"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 9); npcStartConversation(player, npc, "wod_outcast2", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (!wod_outcast2_condition_condition0004(player, npc)) { string_id message = new string_id(c_stringFile, "s_33"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_outcast2_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_39"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_42"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 14); npcStartConversation(player, npc, "wod_outcast2", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (!wod_outcast2_condition_condition0005(player, npc)) { string_id message = new string_id(c_stringFile, "s_62"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_outcast2_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_63"); } utils.setScriptVar(player, "conversation.wod_outcast2.branchId", 17); npcStartConversation(player, npc, "wod_outcast2", 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("wod_outcast2")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.wod_outcast2.branchId"); if (branchId == 1 && wod_outcast2_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 3 && wod_outcast2_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 4 && wod_outcast2_handleBranch4(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 5 && wod_outcast2_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 6 && wod_outcast2_handleBranch6(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && wod_outcast2_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 8 && wod_outcast2_handleBranch8(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 9 && wod_outcast2_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 10 && wod_outcast2_handleBranch10(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && wod_outcast2_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 12 && wod_outcast2_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 13 && wod_outcast2_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && wod_outcast2_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 15 && wod_outcast2_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 16 && wod_outcast2_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && wod_outcast2_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 18 && wod_outcast2_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 20 && wod_outcast2_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.wod_outcast2.branchId"); return SCRIPT_CONTINUE; } }