mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
1426 lines
61 KiB
Java
Executable File
1426 lines
61 KiB
Java
Executable File
package script.conversation;
|
|
|
|
import script.library.*;
|
|
import script.*;
|
|
|
|
public class npe_pilot_easy extends script.base_script
|
|
{
|
|
public npe_pilot_easy()
|
|
{
|
|
}
|
|
public static String c_stringFile = "conversation/npe_pilot_easy";
|
|
public boolean npe_pilot_easy_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return true;
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasFailedEasyMission1(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_pilot_easy_1", "failedEasy1");
|
|
}
|
|
public boolean npe_pilot_easy_condition_isOnMission(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (groundquests.isTaskActive(player, "npe_pilot_easy_1", "launch") || groundquests.isTaskActive(player, "npe_pilot_easy_1", "onSpaceQuest") || groundquests.isTaskActive(player, "npe_pilot_easy_2", "launch") || groundquests.isTaskActive(player, "npe_pilot_easy_2", "onSpaceQuest") || groundquests.isTaskActive(player, "npe_pilot_easy_3", "launch") || groundquests.isTaskActive(player, "npe_pilot_easy_3", "onSpaceQuest") || groundquests.isTaskActive(player, "npe_pilot_easy_4", "launch") || groundquests.isTaskActive(player, "npe_pilot_easy_4", "onSpaceQuest"));
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasWonEasyMission1(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_1") || groundquests.isTaskActive(player, "npe_pilot_easy_1", "report"));
|
|
}
|
|
public boolean npe_pilot_easy_condition_startedMedium(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isQuestActiveOrComplete(player, "npe_pilot_medium_1");
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasFailedEasyMission2(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_pilot_easy_2", "failedEasy2");
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasWonEasyMission2(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_2") || groundquests.isTaskActive(player, "npe_pilot_easy_2", "report"));
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasFailedEasyMission3(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_pilot_easy_3", "failedEasy3");
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasWonEasyMission3(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_3") || groundquests.isTaskActive(player, "npe_pilot_easy_3", "report"));
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasFailedEasyMission4(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_pilot_easy_4", "failedEasy4");
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasWonEasyMission4(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_4") || groundquests.isTaskActive(player, "npe_pilot_easy_4", "report"));
|
|
}
|
|
public boolean npe_pilot_easy_condition_hasFinishedTraining(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_pilot_training_3");
|
|
}
|
|
public void npe_pilot_easy_action_grantEasyMission1(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_1");
|
|
space_quest.clearQuestFlags(player, "inspect", "npe_easy_main_1a");
|
|
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_easy_main_1b");
|
|
space_quest.clearQuestFlags(player, "delivery_no_pickup", "npe_easy_main_1c");
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_1d");
|
|
groundquests.clearQuest(player, "npe_pilot_easy_1");
|
|
groundquests.grantQuest(player, "npe_pilot_easy_1");
|
|
}
|
|
public void npe_pilot_easy_action_grantEasyMission2(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
space_quest.clearQuestFlags(player, "escort", "npe_easy_main_2");
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_2b");
|
|
groundquests.clearQuest(player, "npe_pilot_easy_2");
|
|
groundquests.grantQuest(player, "npe_pilot_easy_2");
|
|
}
|
|
public void npe_pilot_easy_action_grantEasyMission3(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
space_quest.clearQuestFlags(player, "delivery_no_pickup", "npe_easy_main_3");
|
|
space_quest.clearQuestFlags(player, "delivery_no_pickup", "npe_easy_main_3a");
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_3b");
|
|
groundquests.clearQuest(player, "npe_pilot_easy_3");
|
|
groundquests.grantQuest(player, "npe_pilot_easy_3");
|
|
}
|
|
public void npe_pilot_easy_action_grantEasyMission4(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_4");
|
|
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_easy_main_4a");
|
|
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_easy_main_4b");
|
|
space_quest.clearQuestFlags(player, "patrol", "npe_easy_main_4c");
|
|
groundquests.clearQuest(player, "npe_pilot_easy_4");
|
|
groundquests.grantQuest(player, "npe_pilot_easy_4");
|
|
}
|
|
public void npe_pilot_easy_action_grantReward1(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "reported");
|
|
}
|
|
public void npe_pilot_easy_action_grantReward2(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "reported");
|
|
}
|
|
public void npe_pilot_easy_action_grantReward3(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "reported");
|
|
}
|
|
public void npe_pilot_easy_action_grantReward4(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "reported");
|
|
}
|
|
public void npe_pilot_easy_action_sendToAleas(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.grantQuest(player, "npe_pilot_aleas");
|
|
}
|
|
public void npe_pilot_easy_action_signalFoundLaetin(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
groundquests.sendSignal(player, "talktome");
|
|
}
|
|
public void npe_pilot_easy_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
public int npe_pilot_easy_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_297"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "salute1");
|
|
string_id message = new string_id(c_stringFile, "s_298");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_287"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_288");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_289");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 5);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_289"))
|
|
{
|
|
npe_pilot_easy_action_grantReward4(player, npc);
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_290");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (npe_pilot_easy_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_184");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_119");
|
|
}
|
|
if (hasResponse2)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_80");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 6);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_184"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "salute1");
|
|
npe_pilot_easy_action_sendToAleas(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_185");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_119"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_120");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_127");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 8);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_80"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_82");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 10);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_127"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "salute1");
|
|
npe_pilot_easy_action_sendToAleas(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_139");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_82"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_83");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_293"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_294");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_295");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 13);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_295"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission4(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_296");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_132"))
|
|
{
|
|
npe_pilot_easy_action_grantReward3(player, npc);
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_134");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (npe_pilot_easy_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_186");
|
|
}
|
|
if (hasResponse1)
|
|
{
|
|
responses[responseIndex++] = new string_id(c_stringFile, "s_136");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 16);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_186"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission4(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_142");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
if (response.equals("s_136"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_138");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_140");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 17);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_140"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission4(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_142");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_281"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "nod");
|
|
string_id message = new string_id(c_stringFile, "s_282");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_283");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 20);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_283"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission3(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_284");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_154"))
|
|
{
|
|
npe_pilot_easy_action_grantReward2(player, npc);
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_189");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_193");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 23);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_193"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission3(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_197");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_265"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_270");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_271");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 26);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_271"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission2(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_272");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_176"))
|
|
{
|
|
npe_pilot_easy_action_grantReward1(player, npc);
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_201");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_221");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 29);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_221"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission2(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_223");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_247"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_252");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_253");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 32);
|
|
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.npe_pilot_easy.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 npe_pilot_easy_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_253"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "salute1");
|
|
npe_pilot_easy_action_grantEasyMission1(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_254");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch34(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_192"))
|
|
{
|
|
npe_pilot_easy_action_signalFoundLaetin(player, npc);
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "rub_chin_thoughtful");
|
|
string_id message = new string_id(c_stringFile, "s_229");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_309");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 35);
|
|
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.npe_pilot_easy.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 npe_pilot_easy_handleBranch35(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_309"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_311");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_313");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 36);
|
|
npcSpeak(player, message);
|
|
npcSetConversationResponses(player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch36(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_313"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_grantEasyMission1(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_315");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
npcEndConversationWithMessage(player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
public int npe_pilot_easy_handleBranch38(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_89"))
|
|
{
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "nod");
|
|
string_id message = new string_id(c_stringFile, "s_91");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.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.npe_pilot_easy");
|
|
}
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
setInvulnerable(self, true);
|
|
setName(self, "Laetin A'shera (Trained Car'das Pilot)");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
setInvulnerable(self, true);
|
|
setName(self, "Laetin A'shera (Trained Car'das Pilot)");
|
|
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.npe_pilot_easy");
|
|
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 (npe_pilot_easy_condition_startedMedium(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_70");
|
|
chat.chat(npc, player, message);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_isOnMission(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_235");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_297");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 2);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasWonEasyMission4(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_287");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 4);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasFailedEasyMission4(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_126");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_293");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 12);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasWonEasyMission3(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_130");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_132");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 15);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasFailedEasyMission3(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_148");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_281");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 19);
|
|
prose_package pp = new prose_package();
|
|
pp.stringId = message;
|
|
pp.actor.set(player);
|
|
pp.target.set(npc);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", 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 (npe_pilot_easy_condition_hasWonEasyMission2(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_152");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_154");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 22);
|
|
prose_package pp = new prose_package();
|
|
pp.stringId = message;
|
|
pp.actor.set(player);
|
|
pp.target.set(npc);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", 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 (npe_pilot_easy_condition_hasFailedEasyMission2(player, npc))
|
|
{
|
|
doAnimationAction(npc, "sigh_deeply");
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_170");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_265");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 25);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasWonEasyMission1(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_174");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_176");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 28);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasFailedEasyMission1(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_188");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_247");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 31);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition_hasFinishedTraining(player, npc))
|
|
{
|
|
doAnimationAction(npc, "point_accusingly");
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_190");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_192");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 34);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat(npc, player, message);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (npe_pilot_easy_condition__defaultCondition(player, npc))
|
|
{
|
|
npe_pilot_easy_action_facePlayer(player, npc);
|
|
string_id message = new string_id(c_stringFile, "s_87");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (npe_pilot_easy_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_89");
|
|
}
|
|
utils.setScriptVar(player, "conversation.npe_pilot_easy.branchId", 38);
|
|
npcStartConversation(player, npc, "npe_pilot_easy", 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("npe_pilot_easy"))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
obj_id npc = self;
|
|
int branchId = utils.getIntScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
if (branchId == 2 && npe_pilot_easy_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 4 && npe_pilot_easy_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 5 && npe_pilot_easy_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 6 && npe_pilot_easy_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 8 && npe_pilot_easy_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 10 && npe_pilot_easy_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 12 && npe_pilot_easy_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 13 && npe_pilot_easy_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 15 && npe_pilot_easy_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 16 && npe_pilot_easy_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 17 && npe_pilot_easy_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 19 && npe_pilot_easy_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 20 && npe_pilot_easy_handleBranch20(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 22 && npe_pilot_easy_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 23 && npe_pilot_easy_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 25 && npe_pilot_easy_handleBranch25(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 26 && npe_pilot_easy_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 28 && npe_pilot_easy_handleBranch28(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 29 && npe_pilot_easy_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 31 && npe_pilot_easy_handleBranch31(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 32 && npe_pilot_easy_handleBranch32(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 34 && npe_pilot_easy_handleBranch34(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 35 && npe_pilot_easy_handleBranch35(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 36 && npe_pilot_easy_handleBranch36(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (branchId == 38 && npe_pilot_easy_handleBranch38(player, npc, response) == SCRIPT_CONTINUE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
utils.removeScriptVar(player, "conversation.npe_pilot_easy.branchId");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|