package script.conversation; import script.library.ai_lib; import script.library.chat; import script.library.groundquests; import script.library.utils; import script.*; public class ep3_myyydril_weaponsmith extends script.base_script { public ep3_myyydril_weaponsmith() { } public static String c_stringFile = "conversation/ep3_myyydril_weaponsmith"; public boolean ep3_myyydril_weaponsmith_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean ep3_myyydril_weaponsmith_condition_hasSkillWeapon(obj_id player, obj_id npc) throws InterruptedException { return hasSkill(player, "class_munitions_phase1_novice"); } public boolean ep3_myyydril_weaponsmith_condition_isTaskOneActive(obj_id player, obj_id npc) throws InterruptedException { if (groundquests.isTaskActive(player, "ep3_myyydril_treesh_craft_1", 1) || groundquests.hasCompletedTask(player, "ep3_myyydril_treesh_craft_1", 1)) { return true; } else { return false; } } public boolean ep3_myyydril_weaponsmith_condition_isTaskCompleted(obj_id player, obj_id npc) throws InterruptedException { return (groundquests.hasCompletedTask(player, "ep3_myyydril_treesh_craft_1", 1) && !groundquests.hasCompletedQuest(player, "ep3_myyydril_treesh_craft_1")); } public boolean ep3_myyydril_weaponsmith_condition_hasCompletedQuestOne(obj_id player, obj_id npc) throws InterruptedException { return groundquests.hasCompletedQuest(player, "ep3_myyydril_treesh_craft_1"); } public boolean ep3_myyydril_weaponsmith_condition_isTaskActiveTwo(obj_id player, obj_id npc) throws InterruptedException { if (groundquests.isTaskActive(player, "ep3_myyydril_treesh_gather_2", 0) || groundquests.hasCompletedTask(player, "ep3_myyydril_treesh_gather_2", 0)) { return true; } else { return false; } } public boolean ep3_myyydril_weaponsmith_condition_hasCompletedQuestTwo(obj_id player, obj_id npc) throws InterruptedException { return groundquests.hasCompletedQuest(player, "ep3_myyydril_treesh_gather_2"); } public boolean ep3_myyydril_weaponsmith_condition_questCompleteNoSchem(obj_id player, obj_id npc) throws InterruptedException { return (groundquests.hasCompletedQuest(player, "ep3_myyydril_treesh_craft_1") && !hasSchematic(player, "object/draft_schematic/weapon/appearance/weapon_appearance_knife_naktra_crystal.iff")); } public void ep3_myyydril_weaponsmith_action_giveQuestOne(obj_id player, obj_id npc) throws InterruptedException { groundquests.grantQuest(player, "ep3_myyydril_treesh_craft_1"); grantSchematic(player, "object/draft_schematic/weapon/knife_naktra_crystal_false.iff"); sendSystemMessage(player, new string_id("dungeon/myyydril", "knife")); } public void ep3_myyydril_weaponsmith_action_grantSchemetic(obj_id player, obj_id npc) throws InterruptedException { revokeSchematic(player, "object/draft_schematic/weapon/knife_naktra_crystal_false.iff"); grantSchematic(player, "object/draft_schematic/weapon/appearance/weapon_appearance_knife_naktra_crystal.iff"); groundquests.sendSignal(player, "giveSwords"); } public void ep3_myyydril_weaponsmith_action_giveSignal1(obj_id player, obj_id npc) throws InterruptedException { groundquests.sendSignal(player, "giveSwords"); } public void ep3_myyydril_weaponsmith_action_giveQuestTwo(obj_id player, obj_id npc) throws InterruptedException { groundquests.grantQuest(player, "ep3_myyydril_treesh_gather_2"); } public int ep3_myyydril_weaponsmith_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_762")) { doAnimationAction(player, "poke"); if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_766"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_myyydril_weaponsmith_condition_questCompleteNoSchem(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_770"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_35"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_770")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_774"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_35")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ep3_myyydril_weaponsmith_action_grantSchemetic(player, npc); string_id message = new string_id(c_stringFile, "s_36"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_782")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_786"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_790"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_790")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ep3_myyydril_weaponsmith_action_grantSchemetic(player, npc); string_id message = new string_id(c_stringFile, "s_794"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_802")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_806"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_810"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 9); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_810")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_814"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_822")) { doAnimationAction(player, "cover_mouth"); if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_826"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_830"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 12); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_830")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_834"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_838"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 13); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_838")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_842"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_846"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 14); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_846")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_850"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_854"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_878"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 15); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_854")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_858"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_862"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_872"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 16); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); } return SCRIPT_CONTINUE; } } if (response.equals("s_878")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_882"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int ep3_myyydril_weaponsmith_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_862")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { ep3_myyydril_weaponsmith_action_giveQuestOne(player, npc); string_id message = new string_id(c_stringFile, "s_866"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } if (response.equals("s_872")) { if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_953"); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); npcEndConversationWithMessage(player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isMob(self)) || (isPlayer(self))) { detachScript(self, "conversation.ep3_myyydril_weaponsmith"); } setCondition(self, CONDITION_CONVERSABLE); setName(self, new string_id("ep3/npc_names", "treesh")); setInvulnerable(self, true); return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { setCondition(self, CONDITION_CONVERSABLE); setName(self, new string_id("ep3/npc_names", "treesh")); setInvulnerable(self, true); return SCRIPT_CONTINUE; } public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException { int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null); menu_info_data menuInfoData = menuInfo.getMenuItemById(menu); menuInfoData.setServerNotify(false); setCondition(self, CONDITION_CONVERSABLE); faceTo(self, player); return SCRIPT_CONTINUE; } public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException { clearCondition(self, CONDITION_CONVERSABLE); detachScript(self, "conversation.ep3_myyydril_weaponsmith"); 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 (ep3_myyydril_weaponsmith_condition_hasCompletedQuestOne(player, npc)) { string_id message = new string_id(c_stringFile, "s_758"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_762"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 1); npcStartConversation(player, npc, "ep3_myyydril_weaponsmith", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_myyydril_weaponsmith_condition_isTaskCompleted(player, npc)) { string_id message = new string_id(c_stringFile, "s_778"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_782"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 5); npcStartConversation(player, npc, "ep3_myyydril_weaponsmith", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_myyydril_weaponsmith_condition_isTaskOneActive(player, npc)) { string_id message = new string_id(c_stringFile, "s_798"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_802"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 8); npcStartConversation(player, npc, "ep3_myyydril_weaponsmith", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_myyydril_weaponsmith_condition_hasSkillWeapon(player, npc)) { string_id message = new string_id(c_stringFile, "s_818"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (ep3_myyydril_weaponsmith_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_822"); } utils.setScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId", 11); npcStartConversation(player, npc, "ep3_myyydril_weaponsmith", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (ep3_myyydril_weaponsmith_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_886"); 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("ep3_myyydril_weaponsmith")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); if (branchId == 1 && ep3_myyydril_weaponsmith_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 2 && ep3_myyydril_weaponsmith_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 5 && ep3_myyydril_weaponsmith_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 6 && ep3_myyydril_weaponsmith_handleBranch6(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 8 && ep3_myyydril_weaponsmith_handleBranch8(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 9 && ep3_myyydril_weaponsmith_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && ep3_myyydril_weaponsmith_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 12 && ep3_myyydril_weaponsmith_handleBranch12(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 13 && ep3_myyydril_weaponsmith_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 14 && ep3_myyydril_weaponsmith_handleBranch14(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 15 && ep3_myyydril_weaponsmith_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 16 && ep3_myyydril_weaponsmith_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.ep3_myyydril_weaponsmith.branchId"); return SCRIPT_CONTINUE; } }