Files
2018-06-07 00:32:29 +01:00

924 lines
39 KiB
Java
Executable File

package script.conversation;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;
import script.*;
public class death_watch_scientist extends script.base_script
{
public death_watch_scientist()
{
}
public static String c_stringFile = "conversation/death_watch_scientist";
public boolean death_watch_scientist_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public int death_watch_scientist_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_5c9a6921"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_6a31dcdf");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (death_watch_scientist_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_2313ac9e");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_63e494d6");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 2);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_499c388b"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_aabf00d1");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_2313ac9e"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_e45dce3");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (death_watch_scientist_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_e7b6a48e");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_504b2f50");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_63e494d6"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_ac332e1a");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_6462ee3d");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_e7b6a48e"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_ac332e1a");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_6462ee3d");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_504b2f50"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_8ea92d7b");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_6462ee3d"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_95833e54");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (death_watch_scientist_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_be3bfbe9");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_378814dd");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_1a745122");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 6);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_be3bfbe9"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_e32f0a5b");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_6789e90e");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 7);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_378814dd"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_25d8aa7d");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_27");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 12);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_1a745122"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_59959987");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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.death_watch_scientist.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_6789e90e"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_c8dd74ed");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_58a0e26");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 8);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_58a0e26"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_a7d1b9b8");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_e11df8ba");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_e11df8ba"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_76196af");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_8d3d9470");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_8d3d9470"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_2f08b49c");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_27"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_29");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_31");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_31"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_ef0cca06");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_34");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_34"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_36");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_38");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_38"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_40");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_44"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_46");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_48");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_48"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_4b6c9d58");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_51");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 19);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_51"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_14718ef0");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_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_54");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int death_watch_scientist_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_54"))
{
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_56");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isMob(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.death_watch_scientist");
}
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
{
int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById(menu);
menuInfoData.setServerNotify(false);
setCondition(self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.death_watch_scientist");
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 (death_watch_scientist_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_66da3f03");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (death_watch_scientist_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (death_watch_scientist_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_5c9a6921");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_499c388b");
}
utils.setScriptVar(player, "conversation.death_watch_scientist.branchId", 1);
npcStartConversation(player, npc, "death_watch_scientist", message, responses);
}
else
{
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("death_watch_scientist"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.death_watch_scientist.branchId");
if (branchId == 1 && death_watch_scientist_handleBranch1(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 2 && death_watch_scientist_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 3 && death_watch_scientist_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 5 && death_watch_scientist_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 6 && death_watch_scientist_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && death_watch_scientist_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && death_watch_scientist_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && death_watch_scientist_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && death_watch_scientist_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && death_watch_scientist_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && death_watch_scientist_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && death_watch_scientist_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && death_watch_scientist_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && death_watch_scientist_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && death_watch_scientist_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && death_watch_scientist_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 20 && death_watch_scientist_handleBranch20(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.death_watch_scientist.branchId");
return SCRIPT_CONTINUE;
}
}