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

1082 lines
45 KiB
Java
Executable File

package script.conversation;
import script.library.*;
import script.*;
public class nova_rank3 extends script.base_script
{
public nova_rank3()
{
}
public static String c_stringFile = "conversation/nova_rank3";
public boolean nova_rank3_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean nova_rank3_condition_isNovaAligned(obj_id player, obj_id npc) throws InterruptedException
{
return hasCompletedCollectionSlot(player, "nova_rank_01_03");
}
public boolean nova_rank3_condition_onQuest_01(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isQuestActive(player, "nova_rank3_02") && !groundquests.isTaskActive(player, "nova_rank3_02", "wait_01"));
}
public boolean nova_rank3_condition_winQuest_01(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isTaskActive(player, "nova_rank3_02", "wait_01") || groundquests.hasCompletedQuest(player, "nova_rank3_02"));
}
public boolean nova_rank3_condition_onQuest_02(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isQuestActive(player, "nova_rank3_03") && !groundquests.isTaskActive(player, "nova_rank3_03", "wait_01"));
}
public boolean nova_rank3_condition_winQuest_02(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isTaskActive(player, "nova_rank3_03", "wait_01") || groundquests.hasCompletedQuest(player, "nova_rank3_03"));
}
public boolean nova_rank3_condition_onQuest_03(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isQuestActive(player, "nova_rank3_04") && !groundquests.isTaskActive(player, "nova_rank3_04", "wait_01"));
}
public boolean nova_rank3_condition_winQuest_03(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isTaskActive(player, "nova_rank3_04", "wait_01") || groundquests.hasCompletedQuest(player, "nova_rank3_04"));
}
public boolean nova_rank3_condition_onQuest_04(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isQuestActive(player, "nova_rank3_05") && !groundquests.isTaskActive(player, "nova_rank3_05", "wait_01"));
}
public boolean nova_rank3_condition_winQuest_04(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isTaskActive(player, "nova_rank3_05", "wait_01"));
}
public boolean nova_rank3_condition_finishedAll(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "nova_rank3_05");
}
public void nova_rank3_action_grantQuest_01(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "nova_rank3_02");
}
public void nova_rank3_action_clearRegrant_01(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.clearQuest(player, "nova_rank3_02");
space_quest.clearQuestFlags(player, "patrol", "nova_rank3_02");
space_quest.clearQuestFlags(player, "rescue", "nova_rank3_01");
groundquests.grantQuest(player, "nova_rank3_02");
}
public void nova_rank3_action_sendQuestSignal_01(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "nova_rank3_02");
}
public void nova_rank3_action_grantQuest_02(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "nova_rank3_03");
}
public void nova_rank3_action_sendQuestSignal_02(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "nova_rank3_03");
}
public void nova_rank3_action_clearRegrant_02(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.clearQuest(player, "nova_rank3_03");
space_quest.clearQuestFlags(player, "patrol", "nova_rank3_03");
space_quest.clearQuestFlags(player, "survival", "nova_rank3_01");
groundquests.grantQuest(player, "nova_rank3_03");
}
public void nova_rank3_action_grantQuest_03(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "nova_rank3_04");
}
public void nova_rank3_action_clearRegrant_03(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.clearQuest(player, "nova_rank3_04");
space_quest.clearQuestFlags(player, "patrol", "nova_rank3_04");
space_quest.clearQuestFlags(player, "convoy", "nova_rank3_01");
groundquests.grantQuest(player, "nova_rank3_04");
}
public void nova_rank3_action_sendQuestSignal_03(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "nova_rank3_04");
}
public void nova_rank3_action_grantQuest_04(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "nova_rank3_05");
}
public void nova_rank3_action_clearRegrant_04(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.clearQuest(player, "nova_rank3_05");
space_quest.clearQuestFlags(player, "patrol", "nova_rank3_05");
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "nova_rank3_01");
groundquests.grantQuest(player, "nova_rank3_05");
}
public void nova_rank3_action_sendQuestSignal_04(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "nova_rank3_05");
}
public int nova_rank3_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_56"))
{
nova_rank3_action_sendQuestSignal_04(player, npc);
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_57");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_58");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_58"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_59");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_60");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_60"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_61");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_52"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_54");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_53"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_clearRegrant_04(player, npc);
string_id message = new string_id(c_stringFile, "s_55");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_48"))
{
nova_rank3_action_sendQuestSignal_03(player, npc);
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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.nova_rank3.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_50"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_grantQuest_04(player, npc);
string_id message = new string_id(c_stringFile, "s_51");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_44"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_46");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_45"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_clearRegrant_03(player, npc);
string_id message = new string_id(c_stringFile, "s_47");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_38"))
{
nova_rank3_action_sendQuestSignal_02(player, npc);
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_39");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_40");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_40"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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.nova_rank3.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_42"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_grantQuest_03(player, npc);
string_id message = new string_id(c_stringFile, "s_62");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_66"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_68");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_70"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_clearRegrant_02(player, npc);
string_id message = new string_id(c_stringFile, "s_72");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_76"))
{
nova_rank3_action_sendQuestSignal_01(player, npc);
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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.nova_rank3.branchId", 23);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_80"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_82");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_84");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 24);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_84"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_grantQuest_02(player, npc);
string_id message = new string_id(c_stringFile, "s_86");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_90"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_92");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_94"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_clearRegrant_01(player, npc);
string_id message = new string_id(c_stringFile, "s_96");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_100"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_102");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_104");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 30);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_104"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_106");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_108");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 31);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int nova_rank3_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_108"))
{
if (nova_rank3_condition__defaultCondition(player, npc))
{
nova_rank3_action_grantQuest_01(player, npc);
string_id message = new string_id(c_stringFile, "s_110");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isTangible(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.nova_rank3");
}
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.nova_rank3");
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 (nova_rank3_condition_finishedAll(player, npc))
{
string_id message = new string_id(c_stringFile, "s_7");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_winQuest_04(player, npc))
{
string_id message = new string_id(c_stringFile, "s_8");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_56");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 2);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_onQuest_04(player, npc))
{
string_id message = new string_id(c_stringFile, "s_14");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (nova_rank3_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_52");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_53");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 6);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_winQuest_03(player, npc))
{
string_id message = new string_id(c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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.nova_rank3.branchId", 9);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_onQuest_03(player, npc))
{
string_id message = new string_id(c_stringFile, "s_26");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (nova_rank3_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_44");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_45");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 12);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_winQuest_02(player, npc))
{
string_id message = new string_id(c_stringFile, "s_32");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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.nova_rank3.branchId", 15);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_onQuest_02(player, npc))
{
string_id message = new string_id(c_stringFile, "s_64");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (nova_rank3_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_66");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_70");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 19);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_winQuest_01(player, npc))
{
string_id message = new string_id(c_stringFile, "s_74");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_76");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 22);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_onQuest_01(player, npc))
{
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (nova_rank3_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_90");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_94");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 26);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition_isNovaAligned(player, npc))
{
string_id message = new string_id(c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (nova_rank3_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_100");
}
utils.setScriptVar(player, "conversation.nova_rank3.branchId", 29);
npcStartConversation(player, npc, "nova_rank3", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (nova_rank3_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_112");
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("nova_rank3"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.nova_rank3.branchId");
if (branchId == 2 && nova_rank3_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 3 && nova_rank3_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && nova_rank3_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 6 && nova_rank3_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && nova_rank3_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && nova_rank3_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && nova_rank3_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && nova_rank3_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && nova_rank3_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && nova_rank3_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && nova_rank3_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 22 && nova_rank3_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 23 && nova_rank3_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 24 && nova_rank3_handleBranch24(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 26 && nova_rank3_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 29 && nova_rank3_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 30 && nova_rank3_handleBranch30(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 31 && nova_rank3_handleBranch31(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.nova_rank3.branchId");
return SCRIPT_CONTINUE;
}
}