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.content; import script.library.conversation; import script.library.groundquests; import script.library.utils; public class wod_ns_guide extends script.base_script { public wod_ns_guide() { } public static String c_stringFile = "conversation/wod_ns_guide"; public boolean wod_ns_guide_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean wod_ns_guide_condition_onReturnGoToNS(obj_id player, obj_id npc) throws InterruptedException { return (groundquests.isTaskActive(player, "wod_rubina_goto_ns", "arrived") || groundquests.hasCompletedQuest(player, "wod_rubina_goto_ns")); } public boolean wod_ns_guide_condition_IsSM(obj_id player, obj_id npc) throws InterruptedException { if (!hasObjVar(player, "wod_prologue_quests")) { return false; } int status = getIntObjVar(player, "wod_prologue_quests"); if (status < 1) { return true; } return false; } public boolean wod_ns_guide_condition_GoToNSFinished(obj_id player, obj_id npc) throws InterruptedException { if ((hasObjVar(player, "wod_prologue_quests")) && (groundquests.isTaskActive(player, "wod_rubina_goto_ns", "arrived") || groundquests.hasCompletedQuest(player, "wod_rubina_goto_ns"))) { return true; } return false; } public boolean wod_ns_guide_condition_IsIndifferent(obj_id player, obj_id npc) throws InterruptedException { if (!hasObjVar(player, "wod_prologue_quests")) { return false; } int status = getIntObjVar(player, "wod_prologue_quests"); if ((status > 0) && (status < 8)) { return true; } return false; } public boolean wod_ns_guide_condition_IsEntertainer(obj_id player, obj_id npc) throws InterruptedException { if (content.isEntertainer(player)) { return true; } return false; } public boolean wod_ns_guide_condition_IsTrader(obj_id player, obj_id npc) throws InterruptedException { if (content.isCrafter(player)) { return true; } return false; } public void wod_ns_guide_action_SendReturnedSignalGoToNS(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "arrivedNs"); } public int wod_ns_guide_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_14")) { wod_ns_guide_action_SendReturnedSignalGoToNS(player, npc); if (wod_ns_guide_condition_GoToNSFinished(player, npc)) { string_id message = new string_id(c_stringFile, "s_16"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_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_18"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_22"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_111"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 4); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_18")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_20"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_22")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_24"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_111")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_112"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_48")) { if (wod_ns_guide_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_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_57")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_58"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_38")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_40"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_42"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_47"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 11); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_50")) { if (wod_ns_guide_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_ns_guide_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_ns_guide.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_42")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_44"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_47")) { if (wod_ns_guide_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_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_55")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_60"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_66")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_68"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_70"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 17); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_70")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_72"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; 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.wod_ns_guide.branchId", 18); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_74")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_76"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_78")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_80"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_86")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_88"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_90")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_92"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_98")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_100"); utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_102")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_104"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } boolean hasResponse2 = false; if (wod_ns_guide_condition_IsTrader(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } boolean hasResponse3 = false; if (wod_ns_guide_condition_IsEntertainer(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } boolean hasResponse4 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_26"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_34"); } if (hasResponse2) { responses[responseIndex++] = new string_id(c_stringFile, "s_62"); } if (hasResponse3) { responses[responseIndex++] = new string_id(c_stringFile, "s_82"); } if (hasResponse4) { responses[responseIndex++] = new string_id(c_stringFile, "s_94"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int wod_ns_guide_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_26")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_28"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_48"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_57"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 7); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_34")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_36"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_38"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_50"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_62")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_ns_guide.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_82")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_84"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_86"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_90"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 21); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_94")) { if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_96"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (wod_ns_guide_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_98"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_102"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 24); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.wod_ns_guide.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isTangible(self)) || (isPlayer(self))) { detachScript(self, "conversation.wod_ns_guide"); } 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_ns_guide"); 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_ns_guide_condition_IsSM(player, npc)) { doAnimationAction(npc, "dismiss"); string_id message = new string_id(c_stringFile, "s_5"); chat.chat(npc, player, message); return SCRIPT_CONTINUE; } if (wod_ns_guide_condition_IsIndifferent(player, npc)) { doAnimationAction(npc, "point_away"); string_id message = new string_id(c_stringFile, "s_8"); chat.chat(npc, player, message); return SCRIPT_CONTINUE; } if (wod_ns_guide_condition_onReturnGoToNS(player, npc)) { string_id message = new string_id(c_stringFile, "s_12"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (wod_ns_guide_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_14"); } utils.setScriptVar(player, "conversation.wod_ns_guide.branchId", 3); npcStartConversation(player, npc, "wod_ns_guide", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (wod_ns_guide_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_103"); 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_ns_guide")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.wod_ns_guide.branchId"); if (branchId == 3 && wod_ns_guide_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 4 && wod_ns_guide_handleBranch4(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 6 && wod_ns_guide_handleBranch6(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 7 && wod_ns_guide_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 8 && wod_ns_guide_handleBranch8(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 10 && wod_ns_guide_handleBranch10(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && wod_ns_guide_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 13 && wod_ns_guide_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && wod_ns_guide_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 16 && wod_ns_guide_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 17 && wod_ns_guide_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 18 && wod_ns_guide_handleBranch18(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 20 && wod_ns_guide_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 21 && wod_ns_guide_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 23 && wod_ns_guide_handleBranch23(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 24 && wod_ns_guide_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 26 && wod_ns_guide_handleBranch26(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_ns_guide.branchId"); return SCRIPT_CONTINUE; } }