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

2146 lines
60 KiB
Plaintext

// ======================================================================
//
// npe_pilot_easy.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.skill;
include library.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/npe_pilot_easy";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_pilot_easy_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasFailedEasyMission1 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_easy_1", "failedEasy1");
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_isOnMission (obj_id player, obj_id npc)
{
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"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasWonEasyMission1 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_1") ||
groundquests.isTaskActive(player, "npe_pilot_easy_1", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_startedMedium (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "npe_pilot_medium_1");
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasFailedEasyMission2 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_easy_2", "failedEasy2");
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasWonEasyMission2 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_2") ||
groundquests.isTaskActive(player, "npe_pilot_easy_2", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasFailedEasyMission3 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_easy_3", "failedEasy3");
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasWonEasyMission3 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_3") ||
groundquests.isTaskActive(player, "npe_pilot_easy_3", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasFailedEasyMission4 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_easy_4", "failedEasy4");
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasWonEasyMission4 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_easy_4") ||
groundquests.isTaskActive(player, "npe_pilot_easy_4", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_easy_condition_hasFinishedTraining (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_pilot_training_3");
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_pilot_easy_action_grantEasyMission1 (obj_id player, obj_id npc)
{
//clear the spacequests
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");
//clear the groundquest
groundquests.clearQuest(player, "npe_pilot_easy_1");
//regrant the groundquest
groundquests.grantQuest(player, "npe_pilot_easy_1");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantEasyMission2 (obj_id player, obj_id npc)
{
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");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantEasyMission3 (obj_id player, obj_id npc)
{
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");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantEasyMission4 (obj_id player, obj_id npc)
{
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");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantReward1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantReward2 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantReward3 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_grantReward4 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_sendToAleas (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_pilot_aleas");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_signalFoundLaetin (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "talktome");
}
// ----------------------------------------------------------------------
void npe_pilot_easy_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc,player);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_pilot_easy_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Pilot, you're already on an assignment. You should go back up there and handle things.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you. I'll return to my duty.
if (response == "s_297")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
//-- NPC: Then do so.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ah, you've returned. It looked like we were going to lose you there. But you survived. Clearly, you're one of our best pilots. It's time to assign you to another quadrant. The Lucent Ivaya is now safe.
//-- [RESPONSE NOTE]
//-- PLAYER: Will I still be working with you?
if (response == "s_287")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Unfortunately not, my friend. I only oversee the Lucent Ivaya and her activities. By the way, your computers have been cleaned of all traces of the Black Envy virus.
string_id message = new string_id (c_stringFile, "s_288");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do I do now?
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Unfortunately not, my friend. I only oversee the Lucent Ivaya and her activities. By the way, your computers have been cleaned of all traces of the Black Envy virus.
//-- [RESPONSE NOTE]
//-- PLAYER: What do I do now?
if (response == "s_289")
{
npe_pilot_easy_action_grantReward4 (player, npc);
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: You should meet with Aleas if you want to continue to help us with the Black Sun in Ord Mantell.
string_id message = new string_id (c_stringFile, "s_290");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will, thank you.
boolean hasResponse0 = false;
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Who is Aleas?
boolean hasResponse1 = false;
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Once I'm out of here, how do I continue my piloting?
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You should meet with Aleas if you want to continue to help us with the Black Sun in Ord Mantell.
//-- [RESPONSE NOTE]
//-- PLAYER: I will, thank you.
if (response == "s_184")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
npe_pilot_easy_action_sendToAleas (player, npc);
//-- NPC: I hope to see you around, pilot. For now... be safe.
string_id message = new string_id (c_stringFile, "s_185");
utils.removeScriptVar (player, "conversation.npe_pilot_easy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Who is Aleas?
if (response == "s_119")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Aleas Rans'ery handles anything that deals with the Bright Jewel Ribbon Quadrant. It concerns the defensive assignments for our pilots. Basically, it's the next step up from the Lucent Ivaya.
string_id message = new string_id (c_stringFile, "s_120");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you for the information.
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;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Once I'm out of here, how do I continue my piloting?
if (response == "s_80")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Once you return to the real world, you'll get several messages through the mail system regarding different piloting opportunities. You should keep your eyes open.
string_id message = new string_id (c_stringFile, "s_81");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks again.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Aleas Rans'ery handles anything that deals with the Bright Jewel Ribbon Quadrant. It concerns the defensive assignments for our pilots. Basically, it's the next step up from the Lucent Ivaya.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you for the information.
if (response == "s_127")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
npe_pilot_easy_action_sendToAleas (player, npc);
//-- NPC: I hope to see you around, pilot. For now... be safe.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Once you return to the real world, you'll get several messages through the mail system regarding different piloting opportunities. You should keep your eyes open.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks again.
if (response == "s_82")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Be well!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Pilot! I just heard... Are you okay? Luckily, you got out of there alive, my friend.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm fine. Just letting my wounds of failure heal.
if (response == "s_293")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: The Talonbane Cobra is an agile foe. You have another chance to get him. Just pick up the pieces and get out there. You'll do it this time. I know it!
string_id message = new string_id (c_stringFile, "s_294");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you, sir. I'll get out there as soon as possible!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The Talonbane Cobra is an agile foe. You have another chance to get him. Just pick up the pieces and get out there. You'll do it this time. I know it!
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you, sir. I'll get out there as soon as possible!
if (response == "s_295")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission4 (player, npc);
//-- NPC: Good! I have total confidence in your ability to do this.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Get mission 4
//-- NPC: As you came in, my men scanned your ship for this new virus strain. Unfortunately, your computer's information system is thick with the virus. The Black Sun know our every move.
//-- [RESPONSE NOTE]
//-- PLAYER: Perhaps, we can use it to our advantage.
if (response == "s_132")
{
npe_pilot_easy_action_grantReward3 (player, npc);
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Hm. It's an interesting thought. Perhaps we could finally draw out the infamous Talonbane Cobra. You've obviously defeated everything else they've thrown at you.
string_id message = new string_id (c_stringFile, "s_134");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm willing to face him.
boolean hasResponse0 = false;
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What's the Talonbane Cobra?
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hm. It's an interesting thought. Perhaps we could finally draw out the infamous Talonbane Cobra. You've obviously defeated everything else they've thrown at you.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm willing to face him.
if (response == "s_186")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission4 (player, npc);
//-- NPC: You may have to. I know where to draw him out. I want you to go to the Lurid Aurora Nebula.
string_id message = new string_id (c_stringFile, "s_142");
utils.removeScriptVar (player, "conversation.npe_pilot_easy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What's the Talonbane Cobra?
if (response == "s_136")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: One of the best officers the Black Sun has. A very skilled, heartless assassin.
string_id message = new string_id (c_stringFile, "s_138");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm willing to face him.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: One of the best officers the Black Sun has. A very skilled, heartless assassin.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm willing to face him.
if (response == "s_140")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission4 (player, npc);
//-- NPC: You may have to. I know where to draw him out. I want you to go to the Lurid Aurora Nebula.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: %TU, I understand the Lucent Ivaya can be an unforgiving friend, but...
//-- [RESPONSE NOTE]
//-- PLAYER: I know, I know. Give me another chance.
if (response == "s_281")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: Try it again. We still have time to deliver the warning to our friends, the Dynath.
string_id message = new string_id (c_stringFile, "s_282");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you, sir!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Try it again. We still have time to deliver the warning to our friends, the Dynath.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you, sir!
if (response == "s_283")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission3 (player, npc);
//-- NPC: Come back with good news, young pilot!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Get mission 3
//-- NPC: Remarkable job, young %TU. I'm glad you've returned home safely.
//-- [RESPONSE NOTE]
//-- PLAYER: The Black Sun are getting more aggressive.
if (response == "s_154")
{
npe_pilot_easy_action_grantReward2 (player, npc);
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: We need to tell our allies, the Dynathians, that the Black Sun activity has increased greatly.
string_id message = new string_id (c_stringFile, "s_189");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We need to tell our allies, the Dynathians, that the Black Sun activity has increased greatly.
//-- [RESPONSE NOTE]
//-- PLAYER: I can do this.
if (response == "s_193")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission3 (player, npc);
//-- NPC: Get going. They need to know as soon as possible.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I heard the bad news.
//-- [RESPONSE NOTE]
//-- PLAYER: I know. I'm so sorry. The Black Sun are vicious.
if (response == "s_265")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: Look, this is your chance to right a wrong. Another miner has been attacked by the Black Sun. Try again.
string_id message = new string_id (c_stringFile, "s_270");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, sir! I won't let you down.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Look, this is your chance to right a wrong. Another miner has been attacked by the Black Sun. Try again.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, sir! I won't let you down.
if (response == "s_271")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission2 (player, npc);
//-- NPC: Good to hear, pilot! Now go. We're counting on you!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Get mission 2
//-- NPC: You handled yourself well out there. I'm very impressed.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you.
if (response == "s_176")
{
npe_pilot_easy_action_grantReward1 (player, npc);
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: While you were gone, a Dynath miner was damaged by a Black Sun destroyer near the Masul'ivis Asteroid Belt.
string_id message = new string_id (c_stringFile, "s_201");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What should we do?
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: While you were gone, a Dynath miner was damaged by a Black Sun destroyer near the Masul'ivis Asteroid Belt.
//-- [RESPONSE NOTE]
//-- PLAYER: What should we do?
if (response == "s_221")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission2 (player, npc);
//-- NPC: You'll need to go out there, find the ship and escort it here as safely and as quickly as possible.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I see you've come back with your tail between your legs, pilot. What happened out there?
//-- [RESPONSE NOTE]
//-- PLAYER: I... don't know, sir. Please let me try again.
if (response == "s_247")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: You need to try harder, young %TU. Just go try again.
string_id message = new string_id (c_stringFile, "s_252");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you, sir!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You need to try harder, young %TU. Just go try again.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you, sir!
if (response == "s_253")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
npe_pilot_easy_action_grantEasyMission1 (player, npc);
//-- NPC: Make us proud, young pilot.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch34 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You there! This isn't a place to be milling about unless you're a pilot, friend.
//-- [RESPONSE NOTE]
//-- PLAYER: But I am one. Serissu sent me.
if (response == "s_192")
{
npe_pilot_easy_action_signalFoundLaetin (player, npc);
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: Oh, I see. Let me look. Yes. %TU, is it? Yes, you're assigned to me. I guess we should get started.
string_id message = new string_id (c_stringFile, "s_229");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You got it, sir!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch35 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh, I see. Let me look. Yes. %TU, is it? Yes, you're assigned to me. I guess we should get started.
//-- [RESPONSE NOTE]
//-- PLAYER: You got it, sir!
if (response == "s_309")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
//-- NPC: There's a fleet of mining vessels coming in from another system. Our intelligence agency suspects a Black Sun spy to be among them.
string_id message = new string_id (c_stringFile, "s_311");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Understood.
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There's a fleet of mining vessels coming in from another system. Our intelligence agency suspects a Black Sun spy to be among them.
//-- [RESPONSE NOTE]
//-- PLAYER: Understood.
if (response == "s_313")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_grantEasyMission1 (player, npc);
//-- NPC: Use the space terminal to launch your ship and get to it!
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;
}
// ----------------------------------------------------------------------
int npe_pilot_easy_handleBranch38 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hm. Have you gone through pilot training yet? Have you picked your lot in life? I suggest speaking with Serissu or Han Solo respectively. Come back when you've completed both things.
//-- [RESPONSE NOTE]
//-- PLAYER: I will go now.
if (response == "s_89")
{
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: Very good.
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;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
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;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable( self, true );
setName( self, "Laetin A'shera (Trained Car'das Pilot)" );
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
{
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;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.npe_pilot_easy");
return SCRIPT_CONTINUE;
}
// ======================================================================
// Script Triggers
// ======================================================================
//-- This function should move to base_class.java
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
// ----------------------------------------------------------------------
trigger OnStartNpcConversation (obj_id player)
{
obj_id npc = self;
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
return SCRIPT_OVERRIDE;
//-- [NOTE]
if (npe_pilot_easy_condition_startedMedium (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Aren't you supposed to be working with Aleas?
string_id message = new string_id (c_stringFile, "s_70");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_easy_condition_isOnMission (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Pilot, you're already on an assignment. You should go back up there and handle things.
string_id message = new string_id (c_stringFile, "s_235");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you. I'll return to my duty.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasWonEasyMission4 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Ah, you've returned. It looked like we were going to lose you there. But you survived. Clearly, you're one of our best pilots. It's time to assign you to another quadrant. The Lucent Ivaya is now safe.
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Will I still be working with you?
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasFailedEasyMission4 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Pilot! I just heard... Are you okay? Luckily, you got out of there alive, my friend.
string_id message = new string_id (c_stringFile, "s_126");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm fine. Just letting my wounds of failure heal.
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;
}
//-- [NOTE] Get mission 4
if (npe_pilot_easy_condition_hasWonEasyMission3 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: As you came in, my men scanned your ship for this new virus strain. Unfortunately, your computer's information system is thick with the virus. The Black Sun know our every move.
string_id message = new string_id (c_stringFile, "s_130");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Perhaps, we can use it to our advantage.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasFailedEasyMission3 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: %TU, I understand the Lucent Ivaya can be an unforgiving friend, but...
string_id message = new string_id (c_stringFile, "s_148");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I know, I know. Give me another chance.
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;
}
//-- [NOTE] Get mission 3
if (npe_pilot_easy_condition_hasWonEasyMission2 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Remarkable job, young %TU. I'm glad you've returned home safely.
string_id message = new string_id (c_stringFile, "s_152");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Black Sun are getting more aggressive.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasFailedEasyMission2 (player, npc))
{
doAnimationAction (npc, "sigh_deeply");
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: I heard the bad news.
string_id message = new string_id (c_stringFile, "s_170");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I know. I'm so sorry. The Black Sun are vicious.
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;
}
//-- [NOTE] Get mission 2
if (npe_pilot_easy_condition_hasWonEasyMission1 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: You handled yourself well out there. I'm very impressed.
string_id message = new string_id (c_stringFile, "s_174");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasFailedEasyMission1 (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: I see you've come back with your tail between your legs, pilot. What happened out there?
string_id message = new string_id (c_stringFile, "s_188");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I... don't know, sir. Please let me try again.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition_hasFinishedTraining (player, npc))
{
doAnimationAction (npc, "point_accusingly");
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: You there! This isn't a place to be milling about unless you're a pilot, friend.
string_id message = new string_id (c_stringFile, "s_190");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: But I am one. Serissu sent me.
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;
}
//-- [NOTE]
if (npe_pilot_easy_condition__defaultCondition (player, npc))
{
npe_pilot_easy_action_facePlayer (player, npc);
//-- NPC: Hm. Have you gone through pilot training yet? Have you picked your lot in life? I suggest speaking with Serissu or Han Solo respectively. Come back when you've completed both things.
string_id message = new string_id (c_stringFile, "s_87");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will go now.
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;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "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;
}
// ======================================================================