// ====================================================================== // // community_crafter.script // Copyright 2003, Sony Online Entertainment // All Rights Reserved. // // DO NOT EDIT THIS AUTO-GENERATED FILE. PLEASE USE THE CONVERATION EDITOR! // // ====================================================================== // ====================================================================== // Library Includes // ====================================================================== include library.ai_lib; include library.chat; include library.community_crafting; include library.sui; include library.utils; // ====================================================================== // Script Constants // ====================================================================== string c_stringFile = "conversation/community_crafter"; // ====================================================================== // Script Conditions // ====================================================================== boolean community_crafter_condition__defaultCondition (obj_id player, obj_id npc) { return true; } // ---------------------------------------------------------------------- boolean community_crafter_condition_isPlayerCommunityCrafting (obj_id player, obj_id npc) { obj_id craftingTracker = getObjIdObjVar(npc, OBJVAR_CRAFTING_TRACKER); if (isIdValid(craftingTracker)) { if (community_crafting.isSessionActive(craftingTracker) && community_crafting.isPlayerCrafting(craftingTracker, player)) { return true; } } return false; } // ---------------------------------------------------------------------- boolean community_crafter_condition_isCommunityCraftingEnabled (obj_id player, obj_id npc) { obj_id craftingTracker = getObjIdObjVar(npc, OBJVAR_CRAFTING_TRACKER); if (isIdValid(craftingTracker)) { return community_crafting.isSessionActive(craftingTracker); } return false; } // ---------------------------------------------------------------------- boolean community_crafter_condition_canAddPlayer (obj_id player, obj_id npc) { obj_id craftingTracker = getObjIdObjVar(npc, OBJVAR_CRAFTING_TRACKER); if (isIdValid(craftingTracker)) { if (community_crafting.isSessionActive(craftingTracker) && community_crafting.getNumPlayersCrafting(craftingTracker) < community_crafting.MAX_PLAYERS_PER_PROJECT && !community_crafting.isPlayerCrafting(player)) { return true; } } return false; } // ---------------------------------------------------------------------- boolean community_crafter_condition_isTrackingQuality (obj_id player, obj_id npc) { return utils.getBooleanScriptVar(npc, SCRIPTVAR_TRACKING_QUALITY); } // ---------------------------------------------------------------------- boolean community_crafter_condition_isTrackingQuantity (obj_id player, obj_id npc) { return utils.getBooleanScriptVar(npc, SCRIPTVAR_TRACKING_QUANTITY); } // ---------------------------------------------------------------------- boolean community_crafter_condition_isTrackingSlots (obj_id player, obj_id npc) { return utils.getBooleanScriptVar(npc, SCRIPTVAR_TRACKING_SLOTS); } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot1 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 1; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot2 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 2; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot3 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 3; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot4 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 4; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot5 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 5; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot6 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 6; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot7 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 7; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot8 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 8; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot9 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 9; } // ---------------------------------------------------------------------- boolean community_crafter_condition_hasSlot10 (obj_id player, obj_id npc) { return getNumSlots(npc) >= 10; } // ====================================================================== // Script Actions // ====================================================================== void community_crafter_action_addPlayerToProject (obj_id player, obj_id npc) { obj_id craftingTracker = getObjIdObjVar(npc, OBJVAR_CRAFTING_TRACKER); if (isIdValid(craftingTracker)) { boolean result = community_crafting.grantSchematicToPlayer(craftingTracker, player); } } // ---------------------------------------------------------------------- void community_crafter_action_openMyInventoryToPlayer (obj_id player, obj_id npc) { obj_id inventory = utils.getInventoryContainer(npc); if (isIdValid(inventory)) { // set our inventory owner to null for a bit so the player can open it if (queueCommand(player, ##"openContainer", inventory, "", COMMAND_PRIORITY_IMMEDIATE)) { // start checking that the player hasn't moved away from us dictionary params = new dictionary(); params.put("npc", npc); messageTo(player, "handleViewingNpcInventory", params, 15, false); } } } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot1Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 1, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerProjectAttributes (obj_id player, obj_id npc) { showPlayerProjectAttribs(npc, player); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot2Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 2, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot4Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 4, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot5Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 5, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot6Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 6, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot7Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 7, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot8Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 8, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot9Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 9, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot10Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 10, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerProjectQuality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 0, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot3Quality (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 3, true); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot1Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 1, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot2Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 2, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot4Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 4, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot5Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 5, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot6Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 6, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot7Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 7, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot8Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 8, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot9Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 9, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot10Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 10, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerProjectQuantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 0, false); } // ---------------------------------------------------------------------- void community_crafter_action_showPlayerSlot3Quantity (obj_id player, obj_id npc) { showPlayerProjectStats(npc, player, 3, false); } // ====================================================================== // Script %TO Tokens // ====================================================================== // ====================================================================== // Script %DI Tokens // ====================================================================== // ====================================================================== // Script %DF Tokens // ====================================================================== // ====================================================================== // User Script Triggers // ====================================================================== /*********************************************************************************/ // Constants const java.text.NumberFormat qualityFormat = new java.text.DecimalFormat("####.00"); const string OBJVAR_CRAFTING_TRACKER = community_crafting.OBJVAR_COMMUNITY_CRAFTING_TRACKER; const string SCRIPTVAR_TRACKING_QUALITY = "community_crafting.quality"; const string SCRIPTVAR_TRACKING_QUANTITY = "community_crafting.quantity"; const string SCRIPTVAR_TRACKING_SLOTS = "community_crafting.slots"; const string SCRIPTVAR_TRACKING_NUM_SLOTS = "community_crafting.numSlots"; const string_id SID_RANKINGS_TITLE = new string_id("crafting", "player_rankings"); const string_id SID_ATTRIBUTES_TITLE = new string_id("crafting", "project_attributes"); const string_id SID_NO_PLAYERS = new string_id("crafting", "no_players"); const string SCRIPT_INVENTORY = "systems.crafting.community_crafting.npc_inventory"; /*********************************************************************************/ // Triggers trigger OnInitialize () { if ((!isMob (self)) || (isPlayer (self))) detachScript(self, "conversation.community_crafter"); setCondition (self, CONDITION_CONVERSABLE); initializeMe(self); return SCRIPT_CONTINUE; } trigger OnAttach () { setCondition (self, CONDITION_CONVERSABLE); initializeMe(self); return SCRIPT_CONTINUE; } trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo) { 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; } trigger OnIncapacitated (obj_id killer) { clearCondition (self, CONDITION_CONVERSABLE); detachScript (self, "conversation.community_crafter"); return SCRIPT_CONTINUE; } /*********************************************************************************/ // Utility functions void initializeMe (obj_id self) { // make sure my inventory object has the script attached to it so that // I can let players add ingredients to the project obj_id inventory = utils.getInventoryContainer(self); if (isIdValid(inventory)) { if (!hasScript(inventory, SCRIPT_INVENTORY)) attachScript(inventory, SCRIPT_INVENTORY); setObjVar(inventory, OBJVAR_CRAFTING_TRACKER, getObjIdObjVar(self, OBJVAR_CRAFTING_TRACKER)); } // cache some of the project data on me cacheProjectData(self); } void cacheProjectData (obj_id self) { if (community_crafter_condition_isCommunityCraftingEnabled(obj_id.NULL_ID, self)) { obj_id craftingTracker = getObjIdObjVar(self, OBJVAR_CRAFTING_TRACKER); if (!isIdValid(craftingTracker)) return; utils.setScriptVar(self, SCRIPTVAR_TRACKING_QUALITY, community_crafting.getIsTrackingQuality(craftingTracker)); utils.setScriptVar(self, SCRIPTVAR_TRACKING_QUANTITY, community_crafting.getIsTrackingQuantity(craftingTracker)); utils.setScriptVar(self, SCRIPTVAR_TRACKING_SLOTS, community_crafting.getIsTrackingSlots(craftingTracker)); utils.setScriptVar(self, SCRIPTVAR_TRACKING_NUM_SLOTS, community_crafting.getNumSlots(craftingTracker)); } } int getNumSlots(obj_id self) { return utils.getIntScriptVar(self, SCRIPTVAR_TRACKING_NUM_SLOTS); } void showPlayerProjectAttribs(obj_id self, obj_id player) { if (community_crafter_condition_isCommunityCraftingEnabled(obj_id.NULL_ID, self)) { obj_id craftingTracker = getObjIdObjVar(self, OBJVAR_CRAFTING_TRACKER); if (!isIdValid(craftingTracker)) return; Vector names = new Vector(); Vector values = new Vector(); if (!community_crafting.getProjectAttributes(craftingTracker, names, values)) return; string[] attributes = new string[names.size()]; for (int i = 0; i < attributes.length; ++i) { attributes[i] = "@" + names.get(i) + " \\>200" + values.get(i); } int pid = sui.listbox(player, "", "@" + SID_ATTRIBUTES_TITLE, sui.OK_ONLY, attributes); } } void showPlayerProjectStats(obj_id self, obj_id player, int slot, boolean quality) { if (community_crafter_condition_isCommunityCraftingEnabled(obj_id.NULL_ID, self)) { obj_id craftingTracker = getObjIdObjVar(self, OBJVAR_CRAFTING_TRACKER); if (!isIdValid(craftingTracker)) return; Vector playerIds = new Vector(); Vector playerNames = new Vector(); Vector values = new Vector(); if (!community_crafting.getPlayerRanking(craftingTracker, playerIds, playerNames, values, !quality, slot)) { return; } if (quality) { for (int i = 0; i < values.size(); ++i) { // format the values to a percent-type display double f = ((Float)(values.get(i))).doubleValue(); values.set(i, qualityFormat.format(f)); } } Vector rankings = new Vector(); for (int i = 0; i < playerIds.size(); ++i) { if (isIdValid((obj_id)(playerIds.get(i)))) { if (playerIds.get(i) == player) { // highlight the player who's requesting the list rankings.add( "\\#pcontrast1 " + getPlayerName((obj_id)(playerIds.get(i))) + "\\>200" + values.get(i) + "\\#." ); } else { rankings.add( getPlayerName((obj_id)(playerIds.get(i))) + "\\>200" + values.get(i) ); } } } if (rankings.size() == 0) rankings.add("@" + SID_NO_PLAYERS); int pid = sui.listbox(player, "", "@" + SID_RANKINGS_TITLE, sui.OK_ONLY, rankings); } } // ====================================================================== // Script Triggers // ====================================================================== //-- This function should move to base_class.java boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) { Object[] objects = new Object[responses.length]; System.arraycopy(responses, 0, objects, 0, responses.length); return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } // ---------------------------------------------------------------------- trigger OnStartNpcConversation (obj_id player) { if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player)) return SCRIPT_OVERRIDE; //-- [NOTE] if (community_crafter_condition_isCommunityCraftingEnabled (player, self)) { //-- NPC: What would you like to do? string_id message = new string_id (c_stringFile, "s_67afc98f"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to join the crafting project. boolean hasResponse0 = false; if (community_crafter_condition_canAddPlayer (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to add an ingredient to the project. boolean hasResponse1 = false; if (community_crafter_condition_isPlayerCommunityCrafting (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to get the status of the project. boolean hasResponse2 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++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_19fc7d2c"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_be3f098d"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_df409550"); setObjVar (player, "conversation.community_crafter.branchId", 1); npcStartConversation (player, self, "community_crafter", message, responses); } else { chat.chat (self, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (!community_crafter_condition_isCommunityCraftingEnabled (player, self)) { //-- NPC: There is no crafting project currently being run. Please come back later. string_id message = new string_id (c_stringFile, "s_bc2ccc0e"); chat.chat (self, message); return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnStartNpcConversation were false."); return SCRIPT_CONTINUE; } // ---------------------------------------------------------------------- trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response) { if (conversationId != "community_crafter") return SCRIPT_CONTINUE; int branchId = getIntObjVar (player, "conversation.community_crafter.branchId"); //-- [BRANCH NOTE] //-- NPC: What would you like to do? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to join the crafting project. if (branchId == 1 && response == "s_19fc7d2c") { community_crafter_action_addPlayerToProject (player, self); //-- [NOTE] if (community_crafter_condition_isPlayerCommunityCrafting (player, self)) { //-- NPC: You have been given the schematics needed for the project. When you have an ingredient ready, see me to add it to the project. string_id message = new string_id (c_stringFile, "s_ee1783df"); removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } //-- [NOTE] if (!community_crafter_condition_isPlayerCommunityCrafting (player, self)) { //-- NPC: I'm sorry, you could not be given the project schematics. string_id message = new string_id (c_stringFile, "s_834bacde"); removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to do?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: What would you like to do? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to add an ingredient to the project. if (branchId == 1 && response == "s_be3f098d") { //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { community_crafter_action_openMyInventoryToPlayer (player, self); //-- NPC: Please put the ingredients you want to add into my inventory. string_id message = new string_id (c_stringFile, "s_739cd87c"); removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to do?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: What would you like to do? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to get the status of the project. if (branchId == 1 && response == "s_df409550") { //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to do?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: What would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to see the project's current attributes. if (branchId == 5 && response == "s_ff02a401") { community_crafter_action_showPlayerProjectAttributes (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: What would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. if (branchId == 5 && response == "s_7e041771") { //-- [NOTE] if (community_crafter_condition_isTrackingSlots (player, self)) { //-- NPC: Which slot would you like to know about? string_id message = new string_id (c_stringFile, "s_167908ad"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Slot 1 boolean hasResponse0 = false; if (community_crafter_condition_hasSlot1 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Slot 2 boolean hasResponse1 = false; if (community_crafter_condition_hasSlot2 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Slot 3 boolean hasResponse2 = false; if (community_crafter_condition_hasSlot3 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } //-- PLAYER: Slot 4 boolean hasResponse3 = false; if (community_crafter_condition_hasSlot4 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } //-- PLAYER: Slot 5 boolean hasResponse4 = false; if (community_crafter_condition_hasSlot5 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } //-- PLAYER: Slot 6 boolean hasResponse5 = false; if (community_crafter_condition_hasSlot6 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } //-- PLAYER: Slot 7 boolean hasResponse6 = false; if (community_crafter_condition_hasSlot7 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } //-- PLAYER: Slot 8 boolean hasResponse7 = false; if (community_crafter_condition_hasSlot8 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } //-- PLAYER: Slot 9 boolean hasResponse8 = false; if (community_crafter_condition_hasSlot9 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } //-- PLAYER: Slot 10 boolean hasResponse9 = false; if (community_crafter_condition_hasSlot10 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse9 = true; } //-- PLAYER: The overall project. boolean hasResponse10 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse10 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_939f367c"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_9edc10a5"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_9a1d0d12"); if (hasResponse3) responses [responseIndex++] = new string_id (c_stringFile, "s_845a5d17"); if (hasResponse4) responses [responseIndex++] = new string_id (c_stringFile, "s_809b40a0"); if (hasResponse5) responses [responseIndex++] = new string_id (c_stringFile, "s_8dd86679"); if (hasResponse6) responses [responseIndex++] = new string_id (c_stringFile, "s_89197bce"); if (hasResponse7) responses [responseIndex++] = new string_id (c_stringFile, "s_b156c673"); if (hasResponse8) responses [responseIndex++] = new string_id (c_stringFile, "s_b597dbc4"); if (hasResponse9) responses [responseIndex++] = new string_id (c_stringFile, "s_d2ad4c9c"); if (hasResponse10) responses [responseIndex++] = new string_id (c_stringFile, "s_a489b2f6"); setObjVar (player, "conversation.community_crafter.branchId", 6); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: What would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: I'd like to know about the amount of ingredients players are giving. if (branchId == 5 && response == "s_ebaa218a") { //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: Which slot would you like to know about? string_id message = new string_id (c_stringFile, "s_167908ad"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Slot 1 boolean hasResponse0 = false; if (community_crafter_condition_hasSlot1 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Slot 2 boolean hasResponse1 = false; if (community_crafter_condition_hasSlot2 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Slot 3 boolean hasResponse2 = false; if (community_crafter_condition_hasSlot3 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } //-- PLAYER: Slot 4 boolean hasResponse3 = false; if (community_crafter_condition_hasSlot4 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } //-- PLAYER: Slot 5 boolean hasResponse4 = false; if (community_crafter_condition_hasSlot5 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse4 = true; } //-- PLAYER: Slot 6 boolean hasResponse5 = false; if (community_crafter_condition_hasSlot6 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse5 = true; } //-- PLAYER: Slot 7 boolean hasResponse6 = false; if (community_crafter_condition_hasSlot7 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse6 = true; } //-- PLAYER: Slot 8 boolean hasResponse7 = false; if (community_crafter_condition_hasSlot8 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse7 = true; } //-- PLAYER: Slot 9 boolean hasResponse8 = false; if (community_crafter_condition_hasSlot9 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse8 = true; } //-- PLAYER: Slot 10 boolean hasResponse9 = false; if (community_crafter_condition_hasSlot10 (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse9 = true; } //-- PLAYER: The overall project boolean hasResponse10 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse10 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_939f367c"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_9edc10a5"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_9a1d0d12"); if (hasResponse3) responses [responseIndex++] = new string_id (c_stringFile, "s_845a5d17"); if (hasResponse4) responses [responseIndex++] = new string_id (c_stringFile, "s_809b40a0"); if (hasResponse5) responses [responseIndex++] = new string_id (c_stringFile, "s_8dd86679"); if (hasResponse6) responses [responseIndex++] = new string_id (c_stringFile, "s_89197bce"); if (hasResponse7) responses [responseIndex++] = new string_id (c_stringFile, "s_b156c673"); if (hasResponse8) responses [responseIndex++] = new string_id (c_stringFile, "s_b597dbc4"); if (hasResponse9) responses [responseIndex++] = new string_id (c_stringFile, "s_d2ad4c9c"); if (hasResponse10) responses [responseIndex++] = new string_id (c_stringFile, "s_212d314f"); setObjVar (player, "conversation.community_crafter.branchId", 7); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 1 if (branchId == 6 && response == "s_939f367c") { community_crafter_action_showPlayerSlot1Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 2 if (branchId == 6 && response == "s_9edc10a5") { community_crafter_action_showPlayerSlot2Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 3 if (branchId == 6 && response == "s_9a1d0d12") { community_crafter_action_showPlayerSlot3Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 4 if (branchId == 6 && response == "s_845a5d17") { community_crafter_action_showPlayerSlot4Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 5 if (branchId == 6 && response == "s_809b40a0") { community_crafter_action_showPlayerSlot5Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 6 if (branchId == 6 && response == "s_8dd86679") { community_crafter_action_showPlayerSlot6Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 7 if (branchId == 6 && response == "s_89197bce") { community_crafter_action_showPlayerSlot7Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 8 if (branchId == 6 && response == "s_b156c673") { community_crafter_action_showPlayerSlot8Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 9 if (branchId == 6 && response == "s_b597dbc4") { community_crafter_action_showPlayerSlot9Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 10 if (branchId == 6 && response == "s_d2ad4c9c") { community_crafter_action_showPlayerSlot10Quality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: The overall project. if (branchId == 6 && response == "s_a489b2f6") { community_crafter_action_showPlayerProjectQuality (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 1 if (branchId == 7 && response == "s_939f367c") { community_crafter_action_showPlayerSlot1Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 2 if (branchId == 7 && response == "s_9edc10a5") { community_crafter_action_showPlayerSlot2Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 3 if (branchId == 7 && response == "s_9a1d0d12") { community_crafter_action_showPlayerSlot3Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 4 if (branchId == 7 && response == "s_845a5d17") { community_crafter_action_showPlayerSlot4Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 5 if (branchId == 7 && response == "s_809b40a0") { community_crafter_action_showPlayerSlot5Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 6 if (branchId == 7 && response == "s_8dd86679") { community_crafter_action_showPlayerSlot6Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 7 if (branchId == 7 && response == "s_89197bce") { community_crafter_action_showPlayerSlot7Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 8 if (branchId == 7 && response == "s_b156c673") { community_crafter_action_showPlayerSlot8Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 9 if (branchId == 7 && response == "s_b597dbc4") { community_crafter_action_showPlayerSlot9Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: Slot 10 if (branchId == 7 && response == "s_d2ad4c9c") { community_crafter_action_showPlayerSlot10Quantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } //-- [BRANCH NOTE] //-- NPC: Which slot would you like to know about? //-- [RESPONSE NOTE] //-- PLAYER: The overall project if (branchId == 7 && response == "s_212d314f") { community_crafter_action_showPlayerProjectQuantity (player, self); //-- [NOTE] if (community_crafter_condition__defaultCondition (player, self)) { //-- NPC: What would you like to know about? string_id message = new string_id (c_stringFile, "s_261bbc0d"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I'd like to see the project's current attributes. boolean hasResponse0 = false; if (community_crafter_condition__defaultCondition (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'd like to know about the quality of the ingredients players are giving. boolean hasResponse1 = false; if (community_crafter_condition_isTrackingQuality (player, self)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I'd like to know about the amount of ingredients players are giving. boolean hasResponse2 = false; if (community_crafter_condition_isTrackingQuantity (player, self)) { ++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_ff02a401"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_7e041771"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_ebaa218a"); setObjVar (player, "conversation.community_crafter.branchId", 5); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { removeObjVar (player, "conversation.community_crafter.branchId"); npcSpeak (player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Which slot would you like to know about?' were false."); return SCRIPT_CONTINUE; } chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse."); removeObjVar (player, "conversation.community_crafter.branchId"); return SCRIPT_CONTINUE; } // ======================================================================