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

1776 lines
76 KiB
Java
Executable File

package script.conversation;
import script.library.ai_lib;
import script.library.chat;
import script.library.groundquests;
import script.library.utils;
import script.*;
public class talus_nashal_agent extends script.base_script
{
public talus_nashal_agent()
{
}
public static String c_stringFile = "conversation/talus_nashal_agent";
public boolean talus_nashal_agent_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean talus_nashal_agent_condition_completePreviousArc(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "corellia_39_chirq_council_04");
}
public boolean talus_nashal_agent_condition_onFindWeakness(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "talus_nashal_find_weakness");
}
public boolean talus_nashal_agent_condition_completeMother(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.hasCompletedQuest(player, "talus_nashal_goto_mother")) && (!groundquests.isQuestActive(player, "talus_nashal_rescue_operation"));
}
public boolean talus_nashal_agent_condition_onTalkAgent(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "talus_nashal_rescue_operation", "rescue_op_signal_01_02");
}
public boolean talus_nashal_agent_condition_completeRescue(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "talus_nashal_rescue_operation");
}
public boolean talus_nashal_agent_condition_onGrimReturn(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "talus_nashal_grim_discovery", "grim_discovery_signal_02_10");
}
public boolean talus_nashal_agent_condition_completedGenocideGate(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedTask(player, "talus_dearic_genocide", "genocide_retrieve_01_02");
}
public boolean talus_nashal_agent_condition_onGenocideReturn(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "talus_dearic_genocide", "genocide_signal_01_08");
}
public boolean talus_nashal_agent_condition_completeGenocide(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "talus_dearic_genocide");
}
public boolean talus_nashal_agent_condition_afterTalkAgent(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedTask(player, "talus_nashal_rescue_operation", "rescue_op_signal_01_02");
}
public boolean talus_nashal_agent_condition_completeGrimNeedGeno(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.hasCompletedQuest(player, "talus_nashal_grim_discovery") && !groundquests.isQuestActive(player, "talus_dearic_genocide"));
}
public boolean talus_nashal_agent_condition_onGenocide(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isTaskActive(player, "talus_dearic_genocide", "genocide_gotoloc_01_01") || groundquests.isTaskActive(player, "talus_dearic_genocide", "genocide_retrieve_01_02"));
}
public boolean talus_nashal_agent_condition_onDroidBunkerGoto(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActiveOrComplete(player, "corellia_droid_bunker_legacy_goto");
}
public void talus_nashal_agent_action_grantGotoKiki(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_nashal_goto_kiki");
}
public void talus_nashal_agent_action_pointerSignal(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "selonian_talk_agent");
}
public void talus_nashal_agent_action_grantGotoDathnaeya(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_goto_dathnaeya");
}
public void talus_nashal_agent_action_signalTalkAgent(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "rescue_op_signal_01_02");
}
public void talus_nashal_agent_action_grantDeletedQuest(obj_id player, obj_id npc) throws InterruptedException
{
if (groundquests.hasCompletedQuest(player, "talus_nashal_evolution"))
{
groundquests.grantQuest(player, "talus_nashal_grim_discovery");
}
else if (groundquests.hasCompletedQuest(player, "talus_nashal_tracking_crew"))
{
groundquests.grantQuest(player, "talus_nashal_evolution");
}
else if (groundquests.hasCompletedQuest(player, "talus_nashal_rescue_operation"))
{
groundquests.grantQuest(player, "talus_nashal_tracking_crew");
}
}
public void talus_nashal_agent_action_grimSignal(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "grim_discovery_signal_02_10");
}
public void talus_nashal_agent_action_grantGenocide(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_genocide");
}
public void talus_nashal_agent_action_grantBetterGenetics(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_better_genetics");
}
public void talus_nashal_agent_action_grantPleaPity(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_plea_pity");
}
public void talus_nashal_agent_action_grantFindSource(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_find_source");
}
public void talus_nashal_agent_action_signalGenocideReward(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "genocide_signal_01_08");
}
public void talus_nashal_agent_action_grantDroidBunkerQuest(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "corellia_droid_bunker_legacy_goto");
}
public int talus_nashal_agent_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_256"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_258");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_260"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_262");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_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_264");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_268");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_264"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_266");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_268"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantDroidBunkerQuest(player, npc);
string_id message = new string_id(c_stringFile, "s_270");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_274"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_276");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_278");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 8);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_278"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_280");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_282");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 9);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcSpeak(player, pp);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcEndConversationWithMessage(player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_282"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_signalGenocideReward(player, npc);
string_id message = new string_id(c_stringFile, "s_284");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_288"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_290");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_292");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 12);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_292"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_294");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
boolean hasResponse3 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_296");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_304");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_312");
}
if (hasResponse3)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_320");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_296"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantFindSource(player, npc);
string_id message = new string_id(c_stringFile, "s_298");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_300");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_304"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantBetterGenetics(player, npc);
string_id message = new string_id(c_stringFile, "s_306");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_308");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_312"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantPleaPity(player, npc);
string_id message = new string_id(c_stringFile, "s_314");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_316");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_320"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_322");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_300"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_302");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
boolean hasResponse3 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_296");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_304");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_312");
}
if (hasResponse3)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_320");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_296"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantFindSource(player, npc);
string_id message = new string_id(c_stringFile, "s_298");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_300");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_304"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantBetterGenetics(player, npc);
string_id message = new string_id(c_stringFile, "s_306");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_308");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_312"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantPleaPity(player, npc);
string_id message = new string_id(c_stringFile, "s_314");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_316");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_320"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_322");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_308"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_310");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
boolean hasResponse3 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_296");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_304");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_312");
}
if (hasResponse3)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_320");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_296"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantFindSource(player, npc);
string_id message = new string_id(c_stringFile, "s_298");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_300");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_304"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantBetterGenetics(player, npc);
string_id message = new string_id(c_stringFile, "s_306");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_308");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_312"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantPleaPity(player, npc);
string_id message = new string_id(c_stringFile, "s_314");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_316");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_320"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_322");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_316"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_318");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
boolean hasResponse3 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_296");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_304");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_312");
}
if (hasResponse3)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_320");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_296"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantFindSource(player, npc);
string_id message = new string_id(c_stringFile, "s_298");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_300");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_304"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantBetterGenetics(player, npc);
string_id message = new string_id(c_stringFile, "s_306");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_308");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_312"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantPleaPity(player, npc);
string_id message = new string_id(c_stringFile, "s_314");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_316");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_320"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_322");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_328"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantGenocide(player, npc);
string_id message = new string_id(c_stringFile, "s_330");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_334"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grimSignal(player, npc);
string_id message = new string_id(c_stringFile, "s_336");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_338");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 25);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_338"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantGenocide(player, npc);
string_id message = new string_id(c_stringFile, "s_340");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_344"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantDeletedQuest(player, npc);
string_id message = new string_id(c_stringFile, "s_346");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_350"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_352");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_356"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_signalTalkAgent(player, npc);
string_id message = new string_id(c_stringFile, "s_358");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_366"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_368");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_370");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 36);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_370"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_372");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_374");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 37);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_nashal_agent_handleBranch37(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_374"))
{
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
talus_nashal_agent_action_grantGotoKiki(player, npc);
string_id message = new string_id(c_stringFile, "s_376");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.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.talus_nashal_agent");
}
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.talus_nashal_agent");
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 (talus_nashal_agent_condition_onDroidBunkerGoto(player, npc))
{
string_id message = new string_id(c_stringFile, "s_125");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completeGenocide(player, npc))
{
string_id message = new string_id(c_stringFile, "s_254");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_nashal_agent_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_256");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_260");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 2);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_onGenocideReturn(player, npc))
{
string_id message = new string_id(c_stringFile, "s_272");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_274");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 7);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completedGenocideGate(player, npc))
{
string_id message = new string_id(c_stringFile, "s_286");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_288");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 11);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_onGenocide(player, npc))
{
string_id message = new string_id(c_stringFile, "s_324");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completeGrimNeedGeno(player, npc))
{
string_id message = new string_id(c_stringFile, "s_326");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_328");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 22);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_onGrimReturn(player, npc))
{
string_id message = new string_id(c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_334");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 24);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completeRescue(player, npc))
{
string_id message = new string_id(c_stringFile, "s_342");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_344");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 27);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_afterTalkAgent(player, npc))
{
string_id message = new string_id(c_stringFile, "s_348");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_350");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 29);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_onTalkAgent(player, npc))
{
string_id message = new string_id(c_stringFile, "s_354");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_356");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 31);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
npcStartConversation(player, npc, "talus_nashal_agent", null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(npc);
chat.chat(npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completeMother(player, npc))
{
talus_nashal_agent_action_grantGotoDathnaeya(player, npc);
string_id message = new string_id(c_stringFile, "s_360");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_onFindWeakness(player, npc))
{
string_id message = new string_id(c_stringFile, "s_362");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition_completePreviousArc(player, npc))
{
talus_nashal_agent_action_pointerSignal(player, npc);
string_id message = new string_id(c_stringFile, "s_364");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_nashal_agent_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_366");
}
utils.setScriptVar(player, "conversation.talus_nashal_agent.branchId", 35);
npcStartConversation(player, npc, "talus_nashal_agent", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_nashal_agent_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_378");
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("talus_nashal_agent"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.talus_nashal_agent.branchId");
if (branchId == 2 && talus_nashal_agent_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && talus_nashal_agent_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && talus_nashal_agent_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && talus_nashal_agent_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && talus_nashal_agent_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 11 && talus_nashal_agent_handleBranch11(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && talus_nashal_agent_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && talus_nashal_agent_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && talus_nashal_agent_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && talus_nashal_agent_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && talus_nashal_agent_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && talus_nashal_agent_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && talus_nashal_agent_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && talus_nashal_agent_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 22 && talus_nashal_agent_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 24 && talus_nashal_agent_handleBranch24(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 25 && talus_nashal_agent_handleBranch25(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 27 && talus_nashal_agent_handleBranch27(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 29 && talus_nashal_agent_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 31 && talus_nashal_agent_handleBranch31(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 35 && talus_nashal_agent_handleBranch35(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 36 && talus_nashal_agent_handleBranch36(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 37 && talus_nashal_agent_handleBranch37(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.talus_nashal_agent.branchId");
return SCRIPT_CONTINUE;
}
}