diff --git a/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java b/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java index c286a023f..d8df18008 100644 --- a/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java +++ b/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java @@ -6,13 +6,13 @@ import script.combat_engine.*; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; -import script.base_script; import script.library.ai_lib; import script.library.chat; import script.library.conversation; import script.library.groundquests; import script.library.utils; +import script.systems.movement.public_instance_setup; public class wod_rubina extends script.base_script { @@ -47,6 +47,24 @@ public class wod_rubina extends script.base_script public static final String CAN_STATUS_SLIGHT_SM = "clan_status_slight_sm"; public static final String CAN_STATUS_ONE_QUEST = "clan_status_one_quest"; public static final String CAN_STATUS_BALANCE = "clan_status_balance"; + + + public static final String TASK_RESPONSE_TELL_ME_MORE = "task_response_tell_me_more"; + public static final String TASK_RESPONSE_INFO_HERBS = "response_task_info_herbs"; + public static final String TASK_RESPONSE_INFO_ENEMIES = "task_response_info_enemies"; + public static final String TASK_RESPONSE_INFO_WISDOM = "task_response_info_wisdom"; + public static final String TASK_RESPONSE_WHERE_CAN_FIND_HERBS = "task_response_where_can_find_herbs"; + public static final String TASK_RESPONSE_GATHER_HERBS = "task_response_gather_herbs"; + + + public static final String TASK_REPLY_HERBS_LOCATION = "task_reply_herbs_location"; + public static final String TASK_REPLY_ASK_ABOUT_ENEMIES = "task_reply_ask_about_enemies"; + public static final String TASK_RESPONSE_CAN_HANDLE_ENEMIES = "task_response_can_handle_enemies"; + + + public static final String TASK_REPLY_CAN_HANDLE_ENEMIES = "task_reply_can_handle_enemies"; + public static final String TASK_RESPONSE_ELIMINATE_ENEMIES = "task_response_eliminate_enemies"; + public static final String WHY_GAIN_FAVOR = "why_gain_favor"; public static final String HELP_ONE_CLAN = "help_one_clan"; public static final String HOW_CHANGE_CLANS = "how_change_clans"; @@ -67,11 +85,20 @@ public class wod_rubina extends script.base_script public static final String RUBINA_EXPLAINS_SPIDER_CLAN = "rubina_explains_spider_clan"; public static final String RUBINA_EXPLAINS_MAGIC = "rubina_explains_magic"; public static final String RUBINA_EXPLAINS_TASKS = "rubina_explains_tasks"; + public static final String RUBINA_EXPLAINS_HERBS = "rubina_explains_herbs"; public static final String TASK_MORE_INFO_REPLY = "task_more_info_reply"; public static final String BRANCH_ID = "conversation.wod_rubina.branchId"; - public static final int BRANCH_INTRODUCTION = 1; - public static final int BRANCH_SMALL_TASKS = 2; - public static final int BRANCH_TASK_MORE_INFO = 3; + + public static final int BRANCH_NOT_IN_PLANS = 0; //Player has no business with Rubona + public static final int BRANCH_INTRODUCTION = 1; //occurs when the player first meets Rubina + public static final int BRANCH_RUBINA_ASKS_FOR_HELP = 2; //Rubina asks the player to perform small tasks; they are dicussing the tasks + public static final int BRANCH_TASKS_TYPES = 3; //The player asks Rubina for information about the tasks + public static final int BRANCH_TASKS_TYPES_INFO = 4; //The player asks Rubina for information about the tasks + + + + public static final int BRANCH_TASK_MORE_INFO = 5; //The player asks Rubina for information about the tasks + public int wod_rubina_handleIntroduction(obj_id player, obj_id npc, string_id response) throws InterruptedException @@ -87,13 +114,24 @@ public class wod_rubina extends script.base_script return SCRIPT_DEFAULT; } - public int wod_rubina_handleSmallTasks(obj_id player, obj_id npc, string_id response) throws InterruptedException + public int wod_rubina_handleAsksForHelp(obj_id player, obj_id npc, string_id response) throws InterruptedException { string_id message = null; if (response.equals(OK_GIVE_ME_A_TASK)) { message = new string_id(c_stringFile, SMALL_TASKS_TASK_REPLY); + string_id responses[] = new string_id[4]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_TELL_ME_MORE); + responses[1] = new string_id(c_stringFile, TASK_RESPONSE_INFO_HERBS); + responses[2] = new string_id(c_stringFile, TASK_RESPONSE_INFO_ENEMIES); + responses[3] = new string_id(c_stringFile, TASK_RESPONSE_INFO_WISDOM); + + utils.setScriptVar(player, BRANCH_ID, BRANCH_TASKS_TYPES); + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; } + //information is a terminating branch... else if (response.equals(MORE_INFORMATION)) { string_id taskMoreInfo = new string_id(c_stringFile, SMALL_TASKS_INFO_REPLY); @@ -125,6 +163,129 @@ public class wod_rubina extends script.base_script return SCRIPT_DEFAULT; } + public int wod_rubina_discuss_task_types(obj_id player, obj_id npc, string_id response) throws InterruptedException + { + + string_id message = null; + if (response.equals(TASK_RESPONSE_TELL_ME_MORE)) + { + message = new string_id(c_stringFile, TASK_MORE_INFO_REPLY); + string_id responses[] = new string_id[4]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_INFO_HERBS); + responses[1] = new string_id(c_stringFile, TASK_RESPONSE_INFO_ENEMIES); + responses[2] = new string_id(c_stringFile, TASK_RESPONSE_INFO_WISDOM); + + + utils.setScriptVar(player, BRANCH_ID, BRANCH_TASKS_TYPES_INFO); + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; + } + + return SCRIPT_DEFAULT; + + } + + public int wod_rubina_discuss_task_types_info(obj_id player, obj_id npc, string_id response) throws InterruptedException + { + + //note that we stay in the branch BRANCH_TASKS_TYPES_INFO + + string_id message = null; + + //Herbs + + + if (response.equals(TASK_RESPONSE_INFO_HERBS)) + { + message = new string_id(c_stringFile, RUBINA_EXPLAINS_HERBS); + string_id responses[] = new string_id[1]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_WHERE_CAN_FIND_HERBS); + + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; + } + + + if (response.equals(TASK_RESPONSE_WHERE_CAN_FIND_HERBS)) + { + message = new string_id(c_stringFile, TASK_REPLY_HERBS_LOCATION); + string_id responses[] = new string_id[1]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_GATHER_HERBS); + + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; + } + + if (response.equals(TASK_RESPONSE_GATHER_HERBS)) + { + + //TODO trigger quest + + return SCRIPT_CONTINUE; + } + + + //enemies + + if (response.equals(TASK_RESPONSE_INFO_ENEMIES)) + { + message = new string_id(c_stringFile, TASK_REPLY_ASK_ABOUT_ENEMIES); + string_id responses[] = new string_id[1]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_CAN_HANDLE_ENEMIES); + + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; + } + + + if (response.equals(TASK_RESPONSE_CAN_HANDLE_ENEMIES)) + { + + message = new string_id(c_stringFile, TASK_REPLY_CAN_HANDLE_ENEMIES); + string_id responses[] = new string_id[1]; + responses[0] = new string_id(c_stringFile, TASK_RESPONSE_ELIMINATE_ENEMIES); + + npcSpeak(player, message); + npcSetConversationResponses(player, responses); + return SCRIPT_CONTINUE; + } + + + //wisdom + + + //quest triggers + + + + + if (response.equals(TASK_RESPONSE_GATHER_HERBS)) + { + + //TODO trigger quest + + return SCRIPT_CONTINUE; + } + + if (response.equals(TASK_RESPONSE_ELIMINATE_ENEMIES)) + { + + //TODO trigger quest + + return SCRIPT_CONTINUE; + } + + + return SCRIPT_DEFAULT; + + + } + + public string_id wod_rubina_getStatusReply(obj_id player, obj_id npc) throws InterruptedException { int questCount = 0; @@ -292,6 +453,66 @@ public class wod_rubina extends script.base_script return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } + + + private int GetStartingConversationBranch(obj_id player) throws InterruptedException + { + if (groundquests.isTaskActive(player, "wod_prologue_walkabout_02", "speakWithRubina")) + { + return BRANCH_INTRODUCTION; + } + + //Do we need to update after the completed? + if (groundquests.hasCompletedQuest(player, "wod_prologue_walkabout_02")) + { + return BRANCH_RUBINA_ASKS_FOR_HELP; + } + + return BRANCH_NOT_IN_PLANS; + } + + private string_id GetStartingConversationMessage(int branch_id) + { + + if (branch_id == BRANCH_INTRODUCTION) + { + return new string_id(c_stringFile, HELLO_DEARIE); + } + + if (branch_id == BRANCH_RUBINA_ASKS_FOR_HELP) + { + return new string_id(c_stringFile, ASSIST_WITH_SMALL_TASKS); + } + + + return new string_id(c_stringFile, NOT_IN_MY_PLANS); + } + + private string_id[] GetStartingConversationResponses(int branch_id) + { + + if (branch_id == BRANCH_INTRODUCTION) + { + string_id responses[] = new string_id[1]; + responses[0] = new string_id(c_stringFile, SUITING_PURPOSE); + return responses; + + } + + if (branch_id == BRANCH_RUBINA_ASKS_FOR_HELP) + { + string_id responses[] = new string_id[3]; + responses[0] = new string_id(c_stringFile, OK_GIVE_ME_A_TASK); + responses[1] = new string_id(c_stringFile, MORE_INFORMATION); + responses[2] = new string_id(c_stringFile, HOW_AM_I_DOING); + return responses; + } + + return null; + } + + + public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException { obj_id npc = self; @@ -299,51 +520,83 @@ public class wod_rubina extends script.base_script { return SCRIPT_OVERRIDE; } - if (groundquests.isTaskActive(player, "wod_prologue_walkabout_02", "speakWithRubina")) + + int branch_id = GetStartingConversationBranch(player); + + //fetch the message for the starting branch + //fetch the player responses + + string_id message = GetStartingConversationMessage(branch_id); + string_id responses[] = GetStartingConversationResponses(branch_id); + + utils.setScriptVar(player, BRANCH_ID, branch_id); + + if (responses != null) { - string_id message = new string_id(c_stringFile, HELLO_DEARIE); - string_id responses[] = new string_id[1]; - responses[0] = new string_id(c_stringFile, SUITING_PURPOSE); - utils.setScriptVar(player, BRANCH_ID, BRANCH_INTRODUCTION); npcStartConversation(player, npc, "wod_rubina", message, responses); return SCRIPT_CONTINUE; } - if (groundquests.hasCompletedQuest(player, "wod_prologue_walkabout_02")) - { - string_id message = new string_id(c_stringFile, ASSIST_WITH_SMALL_TASKS); - string_id responses[] = new string_id[3]; - responses[0] = new string_id(c_stringFile, OK_GIVE_ME_A_TASK); - responses[1] = new string_id(c_stringFile, MORE_INFORMATION); - responses[2] = new string_id(c_stringFile, HOW_AM_I_DOING); - utils.setScriptVar(player, BRANCH_ID, BRANCH_SMALL_TASKS); - npcStartConversation(player, npc, "wod_rubina", message, responses); - return SCRIPT_CONTINUE; - } - string_id message = new string_id(c_stringFile, NOT_IN_MY_PLANS); + chat.chat(npc, player, message); + return SCRIPT_CONTINUE; } + + public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException { if (!conversationId.equals("wod_rubina")) { return SCRIPT_CONTINUE; } + obj_id npc = self; int branchId = utils.getIntScriptVar(player, BRANCH_ID); + if (branchId == BRANCH_INTRODUCTION && wod_rubina_handleIntroduction(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } - if (branchId == BRANCH_SMALL_TASKS && wod_rubina_handleSmallTasks(player, npc, response) == SCRIPT_CONTINUE) + + + if (branchId == BRANCH_RUBINA_ASKS_FOR_HELP && wod_rubina_handleAsksForHelp(player, npc, response) == SCRIPT_CONTINUE) { - return SCRIPT_CONTINUE; + return SCRIPT_CONTINUE; } + + + if (branchId == BRANCH_TASKS_TYPES && wod_rubina_discuss_task_types(player, npc, response) == SCRIPT_CONTINUE) + { + return SCRIPT_CONTINUE; + } + + if (branchId == BRANCH_TASKS_TYPES_INFO && wod_rubina_discuss_task_types_info(player, npc, response) == SCRIPT_CONTINUE) + { + return SCRIPT_CONTINUE; + } + + + + + + +// public static final int BRANCH_TASKS_TYPES = 3; //The player asks Rubina for information about the tasks +// public static final int BRANCH_TASK_MORE_INFO = 4; //The player asks Rubina for information about the tasks + + + + + /* + if (branchId == BRANCH_TASK_MORE_INFO && wod_rubina_handleTaskMoreInfo(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } + + + */ + chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, BRANCH_ID); return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java.bak b/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java.bak deleted file mode 100644 index 124738942..000000000 --- a/sku.0/sys.server/compiled/game/script/conversation/wod_rubina.java.bak +++ /dev/null @@ -1,2749 +0,0 @@ -package script.conversation; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.chat; -import script.library.conversation; -import script.library.groundquests; -import script.library.utils; - -public class wod_rubina extends script.base_script -{ - public wod_rubina() - { - } - public static String c_stringFile = "conversation/wod_rubina"; - public boolean wod_rubina_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException - { - return true; - } - public boolean wod_rubina_condition_onReturnWalkabout2(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_prologue_walkabout_02", "speakWithRubina"); - } - public boolean wod_rubina_condition_walkabout2Finished(obj_id player, obj_id npc) throws InterruptedException - { - if (!hasObjVar(player, "wod_prologue_quests")) - { - setObjVar(player, "wod_prologue_quests", 0); - } - else - { - if (getIntObjVar(player, "wod_prologue_quests") > 8) - { - setObjVar(player, "wod_prologue_quests", 8); - } - if (getIntObjVar(player, "wod_prologue_quests") < -8) - { - setObjVar(player, "wod_prologue_quests", -8); - } - } - if (questIsQuestComplete(questGetQuestId("quest/wod_prologue_kill_rancor"), player)) - { - groundquests.clearQuest(player, "quest/wod_prologue_kill_rancor"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_prologue_kill_spider_clan"), player)) - { - groundquests.clearQuest(player, "quest/wod_prologue_kill_spider_clan"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_prologue_herb_gathering"), player)) - { - groundquests.clearQuest(player, "quest/wod_prologue_herb_gathering"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_1"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_1"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_2"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_2"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_3"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_3"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_4"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_4"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_5"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_5"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_6"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_6"); - } - if (questIsQuestComplete(questGetQuestId("quest/wod_outcast_7"), player)) - { - groundquests.clearQuest(player, "quest/wod_outcast_7"); - } - return questIsQuestComplete(questGetQuestId("quest/wod_prologue_walkabout_02"), player); - } - public boolean wod_rubina_condition_oneQuestComplete(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status == 1 || status == -1) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_SMSlight(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status < -1) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_NSSlight(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status > 1) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_SMMost(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status < -4) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_NSMost(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status > 4) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_SMFull(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status < -7) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_NSFull(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status > 7) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_onReturnHerbsNS(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_prologue_herb_gathering", "returnForTreatNightsister"); - } - public boolean wod_rubina_condition_onReturnRancorNS(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_prologue_kill_rancor", "waitForRubinaNightsisterRancor") || groundquests.isTaskActive(player, "wod_prologue_kill_spider_clan", "waitForRubinaNightsisterSpider"); - } - public boolean wod_rubina_condition_zeroQuestComplete(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if (status == 0) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_onReturnWisdomSM(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_outcast_1", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_2", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_3", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_4", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_5", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_6", "talkRubinaSinging") || groundquests.isTaskActive(player, "wod_outcast_7", "talkRubinaSinging"); - } - public boolean wod_rubina_condition_onReturnHerbsSM(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_prologue_herb_gathering", "returnForTreatSinging"); - } - public boolean wod_rubina_condition_onReturnWisdomNS(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_outcast_1", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_2", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_3", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_4", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_5", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_6", "talkRubinaNightsister") || groundquests.isTaskActive(player, "wod_outcast_7", "talkRubinaNightsister"); - } - public boolean wod_rubina_condition_onReturnRancorSM(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_prologue_kill_rancor", "waitForRubinaSingingRancor") || groundquests.isTaskActive(player, "wod_prologue_kill_spider_clan", "waitForRubinaSingingSpider"); - } - public boolean wod_rubina_condition_hasQuestsActive(obj_id player, obj_id npc) throws InterruptedException - { - return questIsQuestActive(questGetQuestId("quest/wod_prologue_kill_rancor"), player) || questIsQuestActive(questGetQuestId("quest/wod_prologue_kill_spider_clan"), player) || questIsQuestActive(questGetQuestId("quest/wod_prologue_herb_gathering"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_1"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_2"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_3"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_4"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_5"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_6"), player) || questIsQuestActive(questGetQuestId("quest/wod_outcast_7"), player); - } - public boolean wod_rubina_condition_readyToGoNS(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if ((status > 7) && (!groundquests.hasCompletedQuest(player, "wod_rubina_goto_ns"))) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_readyToGoSM(obj_id player, obj_id npc) throws InterruptedException - { - int status = getIntObjVar(player, "wod_prologue_quests"); - if ((status < -7) && (!groundquests.hasCompletedQuest(player, "wod_rubina_goto_sm"))) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_onReturnChest(obj_id player, obj_id npc) throws InterruptedException - { - if (groundquests.isTaskActive(player, "wod_rubina_chest", "giveCylinder")) - { - return true; - } - else if (groundquests.hasCompletedQuest(player, "wod_rubina_chest") && !groundquests.hasCompletedQuest(player, "wod_left_behind") && !questIsQuestActive(questGetQuestId("quest/wod_left_behind"), player)) - { - return true; - } - return false; - } - public boolean wod_rubina_condition_onReturnLeftBehind(obj_id player, obj_id npc) throws InterruptedException - { - return groundquests.isTaskActive(player, "wod_left_behind", "giveCache"); - } - public void wod_rubina_action_sendReturnedSignalWalkabout2(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "speakWithRubina"); - } - public void wod_rubina_action_grantPrologueHerbs(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.grantQuest(player, "quest/wod_prologue_herb_gathering"); - } - public void wod_rubina_action_grantPrologueEnemies(obj_id player, obj_id npc) throws InterruptedException - { - int rng = rand(0, 100); - if (rng > 50) - { - groundquests.grantQuest(player, "quest/wod_prologue_kill_rancor"); - } - else - { - groundquests.grantQuest(player, "quest/wod_prologue_kill_spider_clan"); - } - } - public void wod_rubina_action_grantPrologueWisdom(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.grantQuest(player, "quest/wod_outcast_" + rand(1, 7)); - } - public void wod_rubina_action_sendReturnedRancorNS(obj_id player, obj_id npc) throws InterruptedException - { - if (groundquests.isTaskActive(player, "wod_prologue_kill_rancor", "waitForRubinaNightsisterRancor")) - { - groundquests.sendSignal(player, "waitForRubinaNightsisterRancor"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") + 1); - modifyCollectionSlotValue(player, "wod_prologue_kill_rancors_01", 1); - } - if (groundquests.isTaskActive(player, "wod_prologue_kill_spider_clan", "waitForRubinaNightsisterSpider")) - { - groundquests.sendSignal(player, "waitForRubinaNightsisterSpider"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") + 1); - modifyCollectionSlotValue(player, "wod_prologue_kill_spiders_01", 1); - } - } - public void wod_rubina_action_sendReturnedRancorSM(obj_id player, obj_id npc) throws InterruptedException - { - if (groundquests.isTaskActive(player, "wod_prologue_kill_rancor", "waitForRubinaSingingRancor")) - { - groundquests.sendSignal(player, "waitForRubinaSingingRancor"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") - 1); - modifyCollectionSlotValue(player, "wod_prologue_kill_rancors_01", 1); - } - if (groundquests.isTaskActive(player, "wod_prologue_kill_spider_clan", "waitForRubinaSingingSpider")) - { - groundquests.sendSignal(player, "waitForRubinaSingingSpider"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") - 1); - modifyCollectionSlotValue(player, "wod_prologue_kill_spiders_01", 1); - } - } - public void wod_rubina_action_sendReturnedHerbsNS(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "selectBasketNightsister"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") + 1); - modifyCollectionSlotValue(player, "wod_prologue_ns_herb_01", 1); - } - public void wod_rubina_action_sendReturnedHerbsSM(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "selectBasketSiging"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") - 1); - modifyCollectionSlotValue(player, "wod_prologue_herb_01", 1); - } - public void wod_rubina_action_sendReturnedWisdomNS(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "wod_outcast_nightsister_win_2"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") + 1); - modifyCollectionSlotValue(player, "wod_prologue_nightsister_outcasts_01", 1); - } - public void wod_rubina_action_sendReturnedWisdomSM(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "wod_outcast_singing_win_2"); - setObjVar(player, "wod_prologue_quests", getIntObjVar(player, "wod_prologue_quests") - 1); - modifyCollectionSlotValue(player, "wod_prologue_singing_outcasts_01", 1); - } - public void wod_rubina_action_grantGoToNS(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.grantQuest(player, "quest/wod_rubina_goto_ns"); - } - public void wod_rubina_action_grantGoToSM(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.grantQuest(player, "quest/wod_rubina_goto_sm"); - } - public void wod_rubina_action_sendReturnedSignalChest(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "hasGivenCylinder"); - } - public void wod_rubina_action_grantLeftBehind(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.grantQuest(player, "quest/wod_left_behind"); - } - public void wod_rubina_action_sendReturnedSignalLeftBehind(obj_id player, obj_id npc) throws InterruptedException - { - groundquests.sendSignal(player, "gaveCache"); - } - public float wod_rubina_tokenDF_tokenDF0001(obj_id player, obj_id npc) throws InterruptedException - { - return 0.f; - } - public int wod_rubina_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_22")) - { - wod_rubina_action_sendReturnedSignalWalkabout2(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_66"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_45")) - { - wod_rubina_action_sendReturnedHerbsNS(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_27"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_49")) - { - wod_rubina_action_sendReturnedHerbsSM(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_31"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_37")) - { - wod_rubina_action_sendReturnedRancorNS(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_27"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_41")) - { - wod_rubina_action_sendReturnedRancorSM(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_31"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_29")) - { - wod_rubina_action_sendReturnedWisdomNS(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_27"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_33")) - { - wod_rubina_action_sendReturnedWisdomSM(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_31"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_160")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_161"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_174"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 16); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_174")) - { - wod_rubina_action_sendReturnedSignalChest(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_171"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_172"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 17); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_172")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantLeftBehind(player, npc); - string_id message = new string_id(c_stringFile, "s_173"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_186")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_189"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_190"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 20); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_190")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_193"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_194"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 21); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_194")) - { - wod_rubina_action_sendReturnedSignalLeftBehind(player, npc); - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_195"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_68")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_70"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_72"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_88"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_92"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_96"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_104")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_106"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - boolean hasResponse4 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse4 = true; - } - boolean hasResponse5 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse5 = true; - } - boolean hasResponse6 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse6 = true; - } - boolean hasResponse7 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse7 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_191"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_130"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_134"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_139"); - } - if (hasResponse4) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_143"); - } - if (hasResponse5) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_150"); - } - if (hasResponse6) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_163"); - } - if (hasResponse7) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_166"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_154")) - { - if (wod_rubina_condition_readyToGoNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_125"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_127"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_124"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 47); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_readyToGoSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_122"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_123"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_121"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 50); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_202"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_156"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_200"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_158"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_198"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_164"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_oneQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_196"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_zeroQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_204"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_72")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_74"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_175"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_177"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_179"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 26); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_88")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueHerbs(player, npc); - string_id message = new string_id(c_stringFile, "s_90"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_92")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueEnemies(player, npc); - string_id message = new string_id(c_stringFile, "s_94"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_96")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueWisdom(player, npc); - string_id message = new string_id(c_stringFile, "s_98"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_175")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_176"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_181"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 27); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_177")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_178"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_183"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 30); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_179")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_187"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 33); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_181")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_182"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_88"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 28); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_88")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueHerbs(player, npc); - string_id message = new string_id(c_stringFile, "s_90"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_183")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_92"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 31); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_92")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueEnemies(player, npc); - string_id message = new string_id(c_stringFile, "s_94"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch33(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_187")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_188"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_96"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 34); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch34(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_96")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantPrologueWisdom(player, npc); - string_id message = new string_id(c_stringFile, "s_98"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_191")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_192"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_169"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 37); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_130")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_132"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_134")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_137"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_139")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_141"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_143")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_145"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_150")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_151"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_163")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_165"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_166")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_167"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_169")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_170"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_118"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 38); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_118")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_125"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch47(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_127")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantGoToNS(player, npc); - string_id message = new string_id(c_stringFile, "s_58"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_124")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_152"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_68"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_154"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 24); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch49(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_45")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_47"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_49"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_148"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_145"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_96"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_100")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_102"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - boolean hasResponse4 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse4 = true; - } - boolean hasResponse5 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse5 = true; - } - boolean hasResponse6 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse6 = true; - } - boolean hasResponse7 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse7 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_130"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_120"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_124"); - } - if (hasResponse4) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_143"); - } - if (hasResponse5) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_132"); - } - if (hasResponse6) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_163"); - } - if (hasResponse7) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_166"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_158")) - { - if (wod_rubina_condition_readyToGoNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_174"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_178"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 47); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_readyToGoSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_182"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_186"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 50); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_170"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_173"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_177"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_181"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_193"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_oneQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_196"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_zeroQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_206"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch50(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_123")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - wod_rubina_action_grantGoToSM(player, npc); - string_id message = new string_id(c_stringFile, "s_119"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_121")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_152"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_68"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_154"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 24); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int wod_rubina_handleBranch52(obj_id player, obj_id npc, string_id response) throws InterruptedException - { - if (response.equals("s_45")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_47"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_49"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_148"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_145"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_96"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 25); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_100")) - { - if (wod_rubina_condition__defaultCondition(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_102"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - boolean hasResponse3 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse3 = true; - } - boolean hasResponse4 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse4 = true; - } - boolean hasResponse5 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse5 = true; - } - boolean hasResponse6 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse6 = true; - } - boolean hasResponse7 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse7 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_130"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_120"); - } - if (hasResponse3) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_124"); - } - if (hasResponse4) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_143"); - } - if (hasResponse5) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_132"); - } - if (hasResponse6) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_163"); - } - if (hasResponse7) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_166"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 36); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - } - if (response.equals("s_158")) - { - if (wod_rubina_condition_readyToGoNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_172"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_174"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_178"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 47); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_readyToGoSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_180"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_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_182"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_186"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 50); - npcSpeak(player, message); - npcSetConversationResponses(player, responses); - } - else - { - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_170"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSFull(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_173"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_177"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSMost(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_181"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_SMSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_185"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_NSSlight(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_193"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_oneQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_196"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_zeroQuestComplete(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_206"); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - npcEndConversationWithMessage(player, message); - return SCRIPT_CONTINUE; - } - } - return SCRIPT_DEFAULT; - } - public int OnInitialize(obj_id self) throws InterruptedException - { - if ((!isTangible(self)) || (isPlayer(self))) - { - detachScript(self, "conversation.wod_rubina"); - } - setCondition(self, CONDITION_CONVERSABLE); - setCondition(self, CONDITION_INTERESTING); - return SCRIPT_CONTINUE; - } - public int OnAttach(obj_id self) throws InterruptedException - { - setCondition(self, CONDITION_CONVERSABLE); - setCondition(self, CONDITION_INTERESTING); - 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); - setCondition(self, CONDITION_INTERESTING); - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - clearCondition(self, CONDITION_CONVERSABLE); - setCondition(self, CONDITION_INTERESTING); - detachScript(self, "conversation.wod_rubina"); - return SCRIPT_CONTINUE; - } - public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException - { - Object[] objects = new Object[responses.length]; - System.arraycopy(responses, 0, objects, 0, responses.length); - return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); - } - public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException - { - obj_id npc = self; - if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player)) - { - return SCRIPT_OVERRIDE; - } - if (wod_rubina_condition_onReturnWalkabout2(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_20"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_22"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 1); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnHerbsNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_43"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_45"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 3); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnHerbsSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_47"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_49"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 5); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnRancorNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_35"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_37"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 7); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnRancorSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_39"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_41"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 9); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnWisdomNS(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_27"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_29"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 11); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnWisdomSM(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_31"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_33"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 13); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnChest(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_159"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_160"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 15); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_onReturnLeftBehind(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_184"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_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_186"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 19); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_hasQuestsActive(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_147"); - chat.chat(npc, player, message); - return SCRIPT_CONTINUE; - } - if (wod_rubina_condition_walkabout2Finished(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_66"); - int numberOfResponses = 0; - boolean hasResponse = false; - boolean hasResponse0 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse0 = true; - } - boolean hasResponse1 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse1 = true; - } - boolean hasResponse2 = false; - if (wod_rubina_condition__defaultCondition(player, npc)) - { - ++numberOfResponses; - hasResponse = true; - hasResponse2 = true; - } - if (hasResponse) - { - int responseIndex = 0; - string_id responses[] = new string_id[numberOfResponses]; - if (hasResponse0) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_68"); - } - if (hasResponse1) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_104"); - } - if (hasResponse2) - { - responses[responseIndex++] = new string_id(c_stringFile, "s_154"); - } - utils.setScriptVar(player, "conversation.wod_rubina.branchId", 24); - npcStartConversation(player, npc, "wod_rubina", message, responses); - } - else - { - chat.chat(npc, player, message); - } - return SCRIPT_CONTINUE; - } - if (!wod_rubina_condition_walkabout2Finished(player, npc)) - { - string_id message = new string_id(c_stringFile, "s_206"); - chat.chat(npc, player, message); - return SCRIPT_CONTINUE; - } - chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); - return SCRIPT_CONTINUE; - } - public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException - { - if (!conversationId.equals("wod_rubina")) - { - return SCRIPT_CONTINUE; - } - obj_id npc = self; - int branchId = utils.getIntScriptVar(player, "conversation.wod_rubina.branchId"); - if (branchId == 1 && wod_rubina_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 3 && wod_rubina_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 5 && wod_rubina_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 7 && wod_rubina_handleBranch7(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 9 && wod_rubina_handleBranch9(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 11 && wod_rubina_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 13 && wod_rubina_handleBranch13(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 15 && wod_rubina_handleBranch15(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 16 && wod_rubina_handleBranch16(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 17 && wod_rubina_handleBranch17(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 19 && wod_rubina_handleBranch19(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 20 && wod_rubina_handleBranch20(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 21 && wod_rubina_handleBranch21(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 24 && wod_rubina_handleBranch24(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 25 && wod_rubina_handleBranch25(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 26 && wod_rubina_handleBranch26(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 27 && wod_rubina_handleBranch27(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 28 && wod_rubina_handleBranch28(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 30 && wod_rubina_handleBranch30(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 31 && wod_rubina_handleBranch31(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 33 && wod_rubina_handleBranch33(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 34 && wod_rubina_handleBranch34(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 36 && wod_rubina_handleBranch36(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 37 && wod_rubina_handleBranch37(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 38 && wod_rubina_handleBranch38(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 47 && wod_rubina_handleBranch47(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 49 && wod_rubina_handleBranch49(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 50 && wod_rubina_handleBranch50(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - if (branchId == 52 && wod_rubina_handleBranch52(player, npc, response) == SCRIPT_CONTINUE) - { - return SCRIPT_CONTINUE; - } - chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); - utils.removeScriptVar(player, "conversation.wod_rubina.branchId"); - return SCRIPT_CONTINUE; - } -}