mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
1251 lines
51 KiB
Java
1251 lines
51 KiB
Java
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_klee extends script.base_script
|
|
{
|
|
public wod_klee()
|
|
{
|
|
}
|
|
public static String c_stringFile = "conversation/wod_klee";
|
|
public boolean wod_klee_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return true;
|
|
}
|
|
public boolean wod_klee_condition_IsNS(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
if (!hasObjVar(player, "wod_prologue_quests"))
|
|
{
|
|
return false;
|
|
}
|
|
int status = getIntObjVar(player, "wod_prologue_quests");
|
|
if (status > -1)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public boolean wod_klee_condition_IsIndifferent(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
if (!hasObjVar(player, "wod_prologue_quests"))
|
|
{
|
|
return false;
|
|
}
|
|
int status = getIntObjVar(player, "wod_prologue_quests");
|
|
if ((status < 0) && (status > -8))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public boolean wod_klee_condition_hasQuestActive(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_kill_clan"), player) && questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_kill_spiderclan"), player) && (questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_recon"), player) || questIsQuestComplete(questGetQuestId("quest/wod_themepark_sm_recon"), player));
|
|
}
|
|
public boolean wod_klee_condition_hasPreqComplete(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
if ((hasObjVar(player, "wod_prologue_quests")) && (groundquests.hasCompletedQuest(player, "wod_rubina_goto_sm")))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public boolean wod_klee_condition_onReturnKillClanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "wod_themepark_sm_kill_clan", "returnSing");
|
|
}
|
|
public boolean wod_klee_condition_onReturnKillSpiderclanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "wod_themepark_sm_kill_spiderclan", "returnSing");
|
|
}
|
|
public boolean wod_klee_condition_onReturnGhostRewardSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "wod_sm_ghost_reward", "returnFromRecon");
|
|
}
|
|
public boolean wod_klee_condition_hasFinishedRecon(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
int status = getIntObjVar(player, "wod_prologue_quests");
|
|
if ((status < -7) && questIsQuestActive(questGetQuestId("quest/wod_rubina_chest"), player))
|
|
{
|
|
return false;
|
|
}
|
|
if ((status < -7) && !groundquests.hasCompletedQuest(player, "wod_rubina_chest") && groundquests.hasCompletedQuest(player, "wod_sm_ghost_reward"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public boolean wod_klee_condition_hasNotFinishedRecon(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
int status = getIntObjVar(player, "wod_prologue_quests");
|
|
if ((status < -7) && questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_recon"), player))
|
|
{
|
|
return false;
|
|
}
|
|
if ((status < -7) && !groundquests.hasCompletedQuest(player, "wod_themepark_sm_recon"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public boolean wod_klee_condition_QuestSpiderclanAlreadyActive(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_kill_spiderclan"), player);
|
|
}
|
|
public boolean wod_klee_condition_QuestClanAlreadyActive(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return questIsQuestActive(questGetQuestId("quest/wod_themepark_sm_kill_clan"), player);
|
|
}
|
|
public void wod_klee_action_sendReturnedSignalKillClanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "hasReturnedSing");
|
|
}
|
|
public void wod_klee_action_sendReturnedSignalKillSpiderclanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "hasReturnedSingSpider");
|
|
}
|
|
public void wod_klee_action_sendReturnedSignalGhostRewardSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "hasReturnedFromRecon");
|
|
}
|
|
public void wod_klee_action_grantTPKillClanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
if (groundquests.hasCompletedQuest(player, "wod_themepark_sm_kill_clan"))
|
|
{
|
|
groundquests.clearQuest(player, "quest/wod_themepark_sm_kill_clan");
|
|
}
|
|
groundquests.grantQuest(player, "quest/wod_themepark_sm_kill_clan");
|
|
}
|
|
public void wod_klee_action_grantTPKillSpiderclanSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
if (groundquests.hasCompletedQuest(player, "wod_themepark_sm_kill_spiderclan"))
|
|
{
|
|
groundquests.clearQuest(player, "quest/wod_themepark_sm_kill_spiderclan");
|
|
}
|
|
groundquests.grantQuest(player, "quest/wod_themepark_sm_kill_spiderclan");
|
|
}
|
|
public void wod_klee_action_grantTPReconSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.grantQuest(player, "quest/wod_themepark_sm_recon");
|
|
}
|
|
public void wod_klee_action_grantTPRubinaChestSM(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.grantQuest(player, "quest/wod_rubina_chest");
|
|
}
|
|
public int wod_klee_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_50"))
|
|
{
|
|
wod_klee_action_sendReturnedSignalKillClanSM(player, npc);
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_52");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_44"))
|
|
{
|
|
wod_klee_action_sendReturnedSignalKillSpiderclanSM(player, npc);
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_52");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_64"))
|
|
{
|
|
wod_klee_action_sendReturnedSignalGhostRewardSM(player, npc);
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_52");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_20"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_22");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (wod_klee_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_24");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_28");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 11);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_30"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (wod_klee_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_34");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_38");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 13);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_40"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_43");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (wod_klee_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_47");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_54");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 15);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_67"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_71");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 17);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_24"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
wod_klee_action_grantTPKillSpiderclanSM(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_26");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_28"))
|
|
{
|
|
if (wod_klee_condition_IsNS(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_5");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_IsIndifferent(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_7");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillClanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_50");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 3);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillSpiderclanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_44");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 5);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnGhostRewardSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_64");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 7);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasQuestActive(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_66");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasPreqComplete(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (!wod_klee_condition_QuestSpiderclanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (!wod_klee_condition_QuestClanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (wod_klee_condition_hasNotFinishedRecon(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
boolean hasResponse3 = false;
|
|
if (wod_klee_condition_hasFinishedRecon(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_20");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_30");
|
|
}
|
|
if (hasResponse2)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_40");
|
|
}
|
|
if (hasResponse3)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_67");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 10);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_62");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_34"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
wod_klee_action_grantTPKillClanSM(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_36");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_38"))
|
|
{
|
|
if (wod_klee_condition_IsNS(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_5");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_IsIndifferent(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_7");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillClanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_50");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 3);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillSpiderclanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_44");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 5);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnGhostRewardSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_64");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 7);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasQuestActive(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_66");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasPreqComplete(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (!wod_klee_condition_QuestSpiderclanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (!wod_klee_condition_QuestClanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (wod_klee_condition_hasNotFinishedRecon(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
boolean hasResponse3 = false;
|
|
if (wod_klee_condition_hasFinishedRecon(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_20");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_30");
|
|
}
|
|
if (hasResponse2)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_40");
|
|
}
|
|
if (hasResponse3)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_67");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 10);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_62");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_47"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
wod_klee_action_grantTPReconSM(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_51");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_54"))
|
|
{
|
|
if (wod_klee_condition_IsNS(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_5");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_IsIndifferent(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_7");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillClanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_50");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 3);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillSpiderclanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_44");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 5);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnGhostRewardSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_64");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 7);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasQuestActive(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_66");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasPreqComplete(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (!wod_klee_condition_QuestSpiderclanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (!wod_klee_condition_QuestClanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (wod_klee_condition_hasNotFinishedRecon(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
boolean hasResponse3 = false;
|
|
if (wod_klee_condition_hasFinishedRecon(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_20");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_30");
|
|
}
|
|
if (hasResponse2)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_40");
|
|
}
|
|
if (hasResponse3)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_67");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 10);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_62");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int wod_klee_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_71"))
|
|
{
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
wod_klee_action_grantTPRubinaChestSM(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_73");
|
|
utils.removeScriptVar(player, "conversation.wod_klee.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnInitialize(obj_id self) throws InterruptedException
|
|
{
|
|
if ((!isTangible(self)) || (isPlayer(self)))
|
|
{
|
|
detachScript(self, "conversation.wod_klee");
|
|
}
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
|
|
{
|
|
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
|
|
menuInfoData.setServerNotify(false);
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
|
|
{
|
|
clearCondition(self, CONDITION_CONVERSABLE);
|
|
detachScript(self, "conversation.wod_klee");
|
|
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_klee_condition_IsNS(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_5");
|
|
chat.chat(npc, player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_IsIndifferent(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_7");
|
|
chat.chat(npc, player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillClanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_50");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 3);
|
|
npcStartConversation(player, npc, "wod_klee", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnKillSpiderclanSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_44");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 5);
|
|
npcStartConversation(player, npc, "wod_klee", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_onReturnGhostRewardSM(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (wod_klee_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_64");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 7);
|
|
npcStartConversation(player, npc, "wod_klee", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasQuestActive(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_66");
|
|
chat.chat(npc, player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition_hasPreqComplete(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (!wod_klee_condition_QuestSpiderclanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (!wod_klee_condition_QuestClanAlreadyActive(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (wod_klee_condition_hasNotFinishedRecon(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
boolean hasResponse3 = false;
|
|
if (wod_klee_condition_hasFinishedRecon(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_20");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_30");
|
|
}
|
|
if (hasResponse2)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_40");
|
|
}
|
|
if (hasResponse3)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_67");
|
|
}
|
|
utils.setScriptVar(player, "conversation.wod_klee.branchId", 10);
|
|
npcStartConversation(player, npc, "wod_klee", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (wod_klee_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_62");
|
|
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_klee"))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
obj_id npc = self;
|
|
int branchId = utils.getIntScriptVar(player, "conversation.wod_klee.branchId");
|
|
if (branchId == 3 && wod_klee_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 5 && wod_klee_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 7 && wod_klee_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 10 && wod_klee_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 11 && wod_klee_handleBranch11(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 13 && wod_klee_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 15 && wod_klee_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 17 && wod_klee_handleBranch17(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_klee.branchId");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|