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

1896 lines
54 KiB
Plaintext

// ======================================================================
//
// npe_pilot_medium.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.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/npe_pilot_medium";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_pilot_medium_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasCompletedEasy (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_pilot_easy_4");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_isOnMission (obj_id player, obj_id npc)
{
return (groundquests.isTaskActive(player, "npe_pilot_medium_1", "launch") ||
groundquests.isTaskActive(player, "npe_pilot_medium_1", "onSpaceQuest") ||
groundquests.isTaskActive(player, "npe_pilot_medium_2", "launch") ||
groundquests.isTaskActive(player, "npe_pilot_medium_2", "onSpaceQuest") ||
groundquests.isTaskActive(player, "npe_pilot_medium_3", "launch") ||
groundquests.isTaskActive(player, "npe_pilot_medium_3", "onSpaceQuest") ||
groundquests.isTaskActive(player, "npe_pilot_medium_4", "launch") ||
groundquests.isTaskActive(player, "npe_pilot_medium_4", "onSpaceQuest"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_startedHard (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "npe_pilot_hard_1");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasFailedMedMission1 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_medium_1", "failedMed1");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasWonMedMission1 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_medium_1") ||
groundquests.isTaskActive(player, "npe_pilot_medium_1", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasFailedMedMission2 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_medium_2","failedMed2");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasWonMedMission2 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_medium_2") ||
groundquests.isTaskActive(player, "npe_pilot_medium_2", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasWonMedMission3 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_medium_3") ||
groundquests.isTaskActive(player, "npe_pilot_medium_3", "report"));
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasFailedMedMission3 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_medium_3", "failedMed3");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasFailedMedMission4 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_pilot_medium_4","failedMed4");
}
// ----------------------------------------------------------------------
boolean npe_pilot_medium_condition_hasWonMedMission4 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_pilot_medium_4") ||
groundquests.isTaskActive(player, "npe_pilot_medium_4", "report"));
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_pilot_medium_action_grantReward1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantReward2 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantReward3 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantReward4 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reported");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantMedMission2 (obj_id player, obj_id npc)
{
//clear the space quests
space_quest.clearQuestFlags(player, "recovery", "npe_med_main_2");
space_quest.clearQuestFlags(player, "rescue", "npe_med_main_2a");
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_2b");
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_med_main_2c");
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_2d");
//clear the ground quest
groundquests.clearQuest(player, "npe_pilot_medium_2");
//regrant the ground quest
groundquests.grantQuest(player, "npe_pilot_medium_2");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantMedMission1 (obj_id player, obj_id npc)
{
//clear the space quests
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_1");
space_quest.clearQuestFlags(player, "destroy", "npe_med_main_1a");
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_1b");
//clear the ground quest
groundquests.clearQuest(player, "npe_pilot_medium_1");
//regrant the ground quest
groundquests.grantQuest(player, "npe_pilot_medium_1");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantMedMission3 (obj_id player, obj_id npc)
{
//clear the space quests
space_quest.clearQuestFlags(player, "destroy", "npe_med_main_3");
space_quest.clearQuestFlags(player, "rescue", "npe_med_main_3a");
space_quest.clearQuestFlags(player, "escort", "npe_med_main_3b");
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_3c");
//clear the ground quest
groundquests.clearQuest(player, "npe_pilot_medium_3");
//regrant the quest
groundquests.grantQuest(player, "npe_pilot_medium_3");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_PlayEffects (obj_id player, obj_id npc)
{
playClientEffectLoc(player, "clienteffect/int_camshake_heavy.cef", getLocation(player), 0);
playClientEffectObj(player, "sound/exp_big_2.snd", player, "");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_grantMedMission4 (obj_id player, obj_id npc)
{
//clear the space quest
space_quest.clearQuestFlags(player, "destroy", "npe_med_main_4");
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_med_main_4a");
space_quest.clearQuestFlags(player, "destroy_surpriseattack", "npe_med_main_4b");
space_quest.clearQuestFlags(player, "patrol", "npe_med_main_4c");
//clear the ground quest
groundquests.clearQuest(player, "npe_pilot_medium_4");
//regrant the ground quest
groundquests.grantQuest(player, "npe_pilot_medium_4");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_signalFoundAleas (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "talktome");
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc,player);
}
// ----------------------------------------------------------------------
void npe_pilot_medium_action_sendToDartas (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_pilot_dartas");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_pilot_medium_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Thanks t'you, pilot, the Bright Jewel Ribbon be quiet as a purring gurrcat. Ye best be talkin' t'Dartas.
//-- [RESPONSE NOTE]
//-- PLAYER: Who is Dartas?
if (response == "s_100")
{
npe_pilot_medium_action_grantReward4 (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Dartas is as tough as the Scarlet Dawn, m'friend. Iffin' ya thought the Bright Jewel was hard, wait til ya see what Dartas has t'offer ya.
string_id message = new string_id (c_stringFile, "s_263");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where can I find him?
boolean hasResponse0 = false;
if (npe_pilot_medium_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_101");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Once I leave Point Station, how do I continue being a pilot?
if (response == "s_80")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Oh, that. Ye'll be gettin' messages through the mail system regardin' different opportunities on continuin' being a pilot once you return to whatever planet yer goin' to.
string_id message = new string_id (c_stringFile, "s_81");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Okay, thanks. See ya!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_medium.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Dartas is as tough as the Scarlet Dawn, m'friend. Iffin' ya thought the Bright Jewel was hard, wait til ya see what Dartas has t'offer ya.
//-- [RESPONSE NOTE]
//-- PLAYER: Where can I find him?
if (response == "s_101")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_sendToDartas (player, npc);
//-- NPC: Right over there.
string_id message = new string_id (c_stringFile, "s_102");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh, that. Ye'll be gettin' messages through the mail system regardin' different opportunities on continuin' being a pilot once you return to whatever planet yer goin' to.
//-- [RESPONSE NOTE]
//-- PLAYER: Okay, thanks. See ya!
if (response == "s_82")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: I'll be seein' ya later.
string_id message = new string_id (c_stringFile, "s_83");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Come crawlin' back, hm? After I told ya not to go out? Why should I even give ya the light of day?
//-- [RESPONSE NOTE]
//-- PLAYER: You were right. But I still want to make it right.
if (response == "s_256")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: I can barely tell ya what t'do anymore. Do what ya feel is necessary.
string_id message = new string_id (c_stringFile, "s_257");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Then I'll come back victorious!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_258");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I can barely tell ya what t'do anymore. Do what ya feel is necessary.
//-- [RESPONSE NOTE]
//-- PLAYER: Then I'll come back victorious!
if (response == "s_258")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission4 (player, npc);
//-- NPC: Yeah, but don't be sayin' I put ya up to it!
string_id message = new string_id (c_stringFile, "s_259");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We've been makin' some progress against them Black Sun thugs...
//-- [RESPONSE NOTE]
//-- PLAYER: But not enough! We have to launch a counter-attack.
if (response == "s_89")
{
npe_pilot_medium_action_grantReward3 (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: What? Now don't be goin' out there, tryin' t'be a hero! Yer all alike! Tryin' t'save the day! Yer not ready.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can handle it.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_91");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What? Now don't be goin' out there, tryin' t'be a hero! Yer all alike! Tryin' t'save the day! Yer not ready.
//-- [RESPONSE NOTE]
//-- PLAYER: I can handle it.
if (response == "s_91")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_PlayEffects (player, npc);
//-- NPC: No, ya can't! Them Black Sun thugs are quicker and more agile in the depths. Don't be a fool! Iffin' ya do go out by yerself, I'll--
string_id message = new string_id (c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: --I'm going!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_93");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, ya can't! Them Black Sun thugs are quicker and more agile in the depths. Don't be a fool! Iffin' ya do go out by yerself, I'll--
//-- [RESPONSE NOTE]
//-- PLAYER: --I'm going!
if (response == "s_93")
{
npe_pilot_medium_action_grantMedMission4 (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Don't leave here! Yer disobeyin' my orders, pilot!
string_id message = new string_id (c_stringFile, "s_94");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What are ya doin' here, pilot? Is there somethin' ya missed?
//-- [RESPONSE NOTE]
//-- PLAYER: I failed my mission.
if (response == "s_248")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: What is it with ya and failin'? Get back out there! Don't give up on me now!
string_id message = new string_id (c_stringFile, "s_249");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll do better this time!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_250");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What is it with ya and failin'? Get back out there! Don't give up on me now!
//-- [RESPONSE NOTE]
//-- PLAYER: I'll do better this time!
if (response == "s_250")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission3 (player, npc);
//-- NPC: I'll believe it when I see it, pilot.
string_id message = new string_id (c_stringFile, "s_251");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I bet yer thinkin' yer pretty great fer savin' the Kallor brothers, hm? Ah, what am I sayin'... ya did good!
//-- [RESPONSE NOTE]
//-- PLAYER: All in a day's work.
if (response == "s_77")
{
npe_pilot_medium_action_grantReward2 (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Anyway...Me boys came back with pertinent infermation regardin' the weaknesses of the Black Sun bases. We call them suckers the 'Salient Trinity'.
string_id message = new string_id (c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: And that's why the Black Sun were so intent on capturing them.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_79");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 19);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Anyway...Me boys came back with pertinent infermation regardin' the weaknesses of the Black Sun bases. We call them suckers the 'Salient Trinity'.
//-- [RESPONSE NOTE]
//-- PLAYER: And that's why the Black Sun were so intent on capturing them.
if (response == "s_79")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Yeah, yeah. An' it looks like they 'ave attacked 'gain.
string_id message = new string_id (c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let me go help them.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_117");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yeah, yeah. An' it looks like they 'ave attacked 'gain.
//-- [RESPONSE NOTE]
//-- PLAYER: Let me go help them.
if (response == "s_117")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission3 (player, npc);
//-- NPC: Ya think ya can handle more Black Sun thugs? So go and make us Car'das proud, yah?
string_id message = new string_id (c_stringFile, "s_119");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What? What do ya know? Are they safe? Are me boys safe, %TU?!
//-- [RESPONSE NOTE]
//-- PLAYER: I... failed.
if (response == "s_242")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: What?! Noo! Get back out there and make it up t'me, pilot! I don't want any excuses!
string_id message = new string_id (c_stringFile, "s_243");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes... yes, ma'am.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_244");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 23);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What?! Noo! Get back out there and make it up t'me, pilot! I don't want any excuses!
//-- [RESPONSE NOTE]
//-- PLAYER: Yes... yes, ma'am.
if (response == "s_244")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission2 (player, npc);
//-- NPC: Now git!
string_id message = new string_id (c_stringFile, "s_245");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew they were up t'somethin'. Them tricky Black Sun. Ya did well, I 'spose.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you.
if (response == "s_68")
{
npe_pilot_medium_action_grantReward1 (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: I'm gonna send ya up there t'save me boys, the Kallor brothers. Seems them Black Sun got the best of them somehow.
string_id message = new string_id (c_stringFile, "s_69");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, of course!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_70");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'm gonna send ya up there t'save me boys, the Kallor brothers. Seems them Black Sun got the best of them somehow.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, of course!
if (response == "s_70")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission2 (player, npc);
//-- NPC: Now, git up there. Waris is needin' yer help first. His ship was captured by them Black Sun thugs.
string_id message = new string_id (c_stringFile, "s_71");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What in the galaxy are ya doin' here? Did ya fail yer assignment?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, but I'm willing to try again!
if (response == "s_236")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: I knew ya weren't good enough fer the Bright Jewel Ribbon. Well! What are ya still doin' here? Git out there an' try again!
string_id message = new string_id (c_stringFile, "s_237");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, ma'am.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_238");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 29);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew ya weren't good enough fer the Bright Jewel Ribbon. Well! What are ya still doin' here? Git out there an' try again!
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, ma'am.
if (response == "s_238")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_on_dismissing");
npe_pilot_medium_action_grantMedMission1 (player, npc);
//-- NPC: Shoo!
string_id message = new string_id (c_stringFile, "s_239");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_pilot_medium_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So... ya think yer ready for the Bright Jewel Ribbon Quadrant, hm? I'll believe it when I see it. Ya don't look like pilot material t'me.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, yes I am. Danger won't scare me off.
if (response == "s_126")
{
npe_pilot_medium_action_signalFoundAleas (player, npc);
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: Then, let's git ya on yer first assignment. We'll see how ya fair against them Black Sun thugs. What's yer name? Th--, um. %TU?
string_id message = new string_id (c_stringFile, "s_128");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yeah, that's it.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_130");
utils.setScriptVar (player, "conversation.npe_pilot_medium.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_medium.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_medium_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Then, let's git ya on yer first assignment. We'll see how ya fair against them Black Sun thugs. What's yer name? Th--, um. %TU?
//-- [RESPONSE NOTE]
//-- PLAYER: Yeah, that's it.
if (response == "s_130")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
//-- NPC: All right, %TU. Let's see what yer made of. Yer first assignment involves patrolin' the Bright Jewel Ribbon. Are ye up to it?
string_id message = new string_id (c_stringFile, "s_132");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, I am.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_134");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 33);
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_medium.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_medium_handleBranch33 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: All right, %TU. Let's see what yer made of. Yer first assignment involves patrolin' the Bright Jewel Ribbon. Are ye up to it?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, I am.
if (response == "s_134")
{
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_grantMedMission1 (player, npc);
//-- NPC: Keep yer wits 'bout ya. I don't want yer body parts spread across the Bright Jewel, ya hear?
string_id message = new string_id (c_stringFile, "s_136");
utils.removeScriptVar (player, "conversation.npe_pilot_medium.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_medium");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable( self, true );
// setCondition( self, CONDITION_SPACE_INTERESTING );
setName( self, "Aleas Rans'ery (Ace Car'das Pilot)" );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable( self, true );
setName( self, "Aleas Rans'ery (Ace 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_medium");
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_medium_condition_startedHard (player, npc))
{
//-- NPC: Aren't ya supposed to be workin' for Dartas?
string_id message = new string_id (c_stringFile, "s_60");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_isOnMission (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: What are ya doin' here? Are ye already on an assignment?
string_id message = new string_id (c_stringFile, "s_235");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasWonMedMission4 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: Thanks t'you, pilot, the Bright Jewel Ribbon be quiet as a purring gurrcat. Ye best be talkin' t'Dartas.
string_id message = new string_id (c_stringFile, "s_97");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Who is Dartas?
boolean hasResponse0 = false;
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Once I leave Point Station, how do I continue being a pilot?
boolean hasResponse1 = false;
if (npe_pilot_medium_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_100");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 3);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasFailedMedMission4 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: Come crawlin' back, hm? After I told ya not to go out? Why should I even give ya the light of day?
string_id message = new string_id (c_stringFile, "s_96");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You were right. But I still want to make it right.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_256");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 8);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasWonMedMission3 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: We've been makin' some progress against them Black Sun thugs...
string_id message = new string_id (c_stringFile, "s_87");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: But not enough! We have to launch a counter-attack.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_medium.branchId", 11);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasFailedMedMission3 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: What are ya doin' here, pilot? Is there somethin' ya missed?
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I failed my mission.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_248");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 15);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasWonMedMission2 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: I bet yer thinkin' yer pretty great fer savin' the Kallor brothers, hm? Ah, what am I sayin'... ya did good!
string_id message = new string_id (c_stringFile, "s_75");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: All in a day's work.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_77");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 18);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasFailedMedMission2 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: What? What do ya know? Are they safe? Are me boys safe, %TU?!
string_id message = new string_id (c_stringFile, "s_74");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I... failed.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_242");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 22);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_pilot_medium", 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_medium_condition_hasWonMedMission1 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: I knew they were up t'somethin'. Them tricky Black Sun. Ya did well, I 'spose.
string_id message = new string_id (c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_68");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 25);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasFailedMedMission1 (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: What in the galaxy are ya doin' here? Did ya fail yer assignment?
string_id message = new string_id (c_stringFile, "s_103");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, but I'm willing to try again!
boolean hasResponse0 = false;
if (npe_pilot_medium_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_236");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 28);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition_hasCompletedEasy (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: So... ya think yer ready for the Bright Jewel Ribbon Quadrant, hm? I'll believe it when I see it. Ya don't look like pilot material t'me.
string_id message = new string_id (c_stringFile, "s_190");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, yes I am. Danger won't scare me off.
boolean hasResponse0 = false;
if (npe_pilot_medium_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_126");
utils.setScriptVar (player, "conversation.npe_pilot_medium.branchId", 31);
npcStartConversation (player, npc, "npe_pilot_medium", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_pilot_medium_condition__defaultCondition (player, npc))
{
npe_pilot_medium_action_facePlayer (player, npc);
//-- NPC: Bah! Ye don't have enough experience t'fly with me! Y'should talk t'Serissu. He's around here somewhere.
string_id message = new string_id (c_stringFile, "s_120");
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_medium")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.npe_pilot_medium.branchId");
if (branchId == 3 && npe_pilot_medium_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && npe_pilot_medium_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && npe_pilot_medium_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && npe_pilot_medium_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && npe_pilot_medium_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && npe_pilot_medium_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && npe_pilot_medium_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && npe_pilot_medium_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && npe_pilot_medium_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && npe_pilot_medium_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && npe_pilot_medium_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && npe_pilot_medium_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && npe_pilot_medium_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && npe_pilot_medium_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && npe_pilot_medium_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && npe_pilot_medium_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && npe_pilot_medium_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && npe_pilot_medium_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 29 && npe_pilot_medium_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && npe_pilot_medium_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && npe_pilot_medium_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 33 && npe_pilot_medium_handleBranch33 (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_medium.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================