Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/wod_azzenaj.java
T

1120 lines
45 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_azzenaj extends script.base_script
{
public wod_azzenaj()
{
}
public static String c_stringFile = "conversation/wod_azzenaj";
public boolean wod_azzenaj_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean wod_azzenaj_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_azzenaj_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_azzenaj_condition_hasPreqComplete(obj_id player, obj_id npc) throws InterruptedException
{
if ((hasObjVar(player, "wod_prologue_quests")) && (groundquests.hasCompletedQuest(player, "wod_rubina_goto_sm")) && (!groundquests.hasCompletedQuest(player, "wod_themepark_lost_e01")))
{
return true;
}
return false;
}
public boolean wod_azzenaj_condition_onReturnLostISM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "wod_themepark_lost_e01", "returnAzz");
}
public boolean wod_azzenaj_condition_onReturnLostIISM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "wod_themepark_lost_e02", "returnAzz2");
}
public boolean wod_azzenaj_condition_hasQuestActiveI(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "wod_themepark_lost_e01");
}
public boolean wod_azzenaj_condition_hasQuestActiveII(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "wod_themepark_lost_e02");
}
public boolean wod_azzenaj_condition_hasQuestActiveIII(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "wod_themepark_ehs_1");
}
public boolean wod_azzenaj_condition_completedQuestLostISM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "wod_themepark_lost_e01");
}
public boolean wod_azzenaj_condition_completedQuestLostIISM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "wod_themepark_lost_e02");
}
public boolean wod_azzenaj_condition_hasQuestActiveIV(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "wod_queen_mother_boss_fight");
}
public boolean wod_azzenaj_condition_onReturnHateSistersSM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "wod_themepark_ehs_1", "goBackAzz");
}
public boolean wod_azzenaj_condition_completedQuestHatesSistersSM(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "wod_themepark_ehs_1");
}
public void wod_azzenaj_action_sendReturnedSignalLostISM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "hasReturnedAzz");
}
public void wod_azzenaj_action_sendReturnedSignalLostIISM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "hasReturnedAzz2");
}
public void wod_azzenaj_action_grantTPLostISM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "quest/wod_themepark_lost_e01");
}
public void wod_azzenaj_action_grantTPLostIISM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "quest/wod_themepark_lost_e02");
}
public void wod_azzenaj_action_grantTPHateSistersSM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "quest/wod_themepark_ehs_1");
}
public void wod_azzenaj_action_grantTPQueenBossFightSM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.clearQuest(player, "quest/wod_queen_mother_boss_fight");
groundquests.grantQuest(player, "quest/wod_queen_mother_boss_fight");
}
public void wod_azzenaj_action_sendReturnedSignalHateSistersSM(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "hasComeBack");
}
public int wod_azzenaj_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_16"))
{
wod_azzenaj_action_sendReturnedSignalLostISM(player, npc);
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_47");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 23);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_47"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_51");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_55");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 24);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_42"))
{
wod_azzenaj_action_sendReturnedSignalLostIISM(player, npc);
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_94");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_94"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_96");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_98");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 19);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_65"))
{
wod_azzenaj_action_sendReturnedSignalHateSistersSM(player, npc);
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_111");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_113");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_113"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_117");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_113"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_117");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_117"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_119");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (wod_azzenaj_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_121");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_125");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_121"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
wod_azzenaj_action_grantTPQueenBossFightSM(player, npc);
string_id message = new string_id(c_stringFile, "s_123");
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_125"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_127");
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_94"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_96");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_98");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 19);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_98"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_100");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_102");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_102"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_104");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_106");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_106"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
wod_azzenaj_action_grantTPHateSistersSM(player, npc);
string_id message = new string_id(c_stringFile, "s_108");
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_47"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_51");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_55");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 24);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_55"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
wod_azzenaj_action_grantTPLostIISM(player, npc);
string_id message = new string_id(c_stringFile, "s_59");
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_66"))
{
if (wod_azzenaj_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_azzenaj_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_74");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_74"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_80");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 28);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.wod_azzenaj.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_CONTINUE;
}
public int wod_azzenaj_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_80"))
{
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
wod_azzenaj_action_grantTPLostISM(player, npc);
string_id message = new string_id(c_stringFile, "s_84");
utils.removeScriptVar(player, "conversation.wod_azzenaj.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_azzenaj");
}
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_azzenaj");
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_azzenaj_condition_IsNS(player, npc))
{
string_id message = new string_id(c_stringFile, "s_4");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_IsIndifferent(player, npc))
{
string_id message = new string_id(c_stringFile, "s_6");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_onReturnLostISM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_15");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_16");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 3);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_onReturnLostIISM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_40");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_42");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 5);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_onReturnHateSistersSM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_63");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_65");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 7);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_hasQuestActiveI(player, npc))
{
string_id message = new string_id(c_stringFile, "s_35");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_hasQuestActiveII(player, npc))
{
string_id message = new string_id(c_stringFile, "s_38");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_hasQuestActiveIII(player, npc))
{
string_id message = new string_id(c_stringFile, "s_85");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_hasQuestActiveIV(player, npc))
{
string_id message = new string_id(c_stringFile, "s_81");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_completedQuestHatesSistersSM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_111");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_113");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 13);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_completedQuestLostIISM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_94");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 18);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_completedQuestLostISM(player, npc))
{
string_id message = new string_id(c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_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_47");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 23);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition_hasPreqComplete(player, npc))
{
string_id message = new string_id(c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_66");
}
utils.setScriptVar(player, "conversation.wod_azzenaj.branchId", 26);
npcStartConversation(player, npc, "wod_azzenaj", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (wod_azzenaj_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_90");
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_azzenaj"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.wod_azzenaj.branchId");
if (branchId == 3 && wod_azzenaj_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && wod_azzenaj_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 5 && wod_azzenaj_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 6 && wod_azzenaj_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && wod_azzenaj_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && wod_azzenaj_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && wod_azzenaj_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && wod_azzenaj_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && wod_azzenaj_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && wod_azzenaj_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && wod_azzenaj_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 20 && wod_azzenaj_handleBranch20(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 21 && wod_azzenaj_handleBranch21(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 23 && wod_azzenaj_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 24 && wod_azzenaj_handleBranch24(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 26 && wod_azzenaj_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 27 && wod_azzenaj_handleBranch27(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 28 && wod_azzenaj_handleBranch28(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_azzenaj.branchId");
return SCRIPT_CONTINUE;
}
}