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

3808 lines
101 KiB
Plaintext

// ======================================================================
//
// captain_piett.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.conversation;
include library.factions;
include library.groundquests;
include library.holiday;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/captain_piett";
// ======================================================================
// Script Conditions
// ======================================================================
boolean captain_piett_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasNotStartedQuestLine (obj_id player, obj_id npc)
{
faceTo(npc, player);
return (!groundquests.isQuestActiveOrComplete(player, "outbreak_quest_01_imperial")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_quest_01_rebel")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_quest_01_neutral"));
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasFirstQuestImperial (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.isQuestActive(player, "outbreak_quest_01_imperial");
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasSecondQuestImperial (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.isQuestActive(player, "outbreak_quest_02_imperial");
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasFoundStormtroopers (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.hasCompletedQuest(player, "outbreak_quest_02_imperial");
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasCompletedMissions (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "outbreak_quest_facility_05_imperial", "speakPietteDebrief");
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasCompletedAll (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "outbreak_quest_facility_05_imperial")
&& groundquests.hasCompletedQuest(player, "outbreak_quest_final_imperial");
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_isLiveConversion (obj_id player, obj_id npc)
{
return captain_piett_condition_hasNotStartedQuestLine(player,npc)
&&
(groundquests.isTaskActive(player, "outbreak_live_conversion_imperial", "speakPiett")
|| groundquests.hasCompletedQuest(player, "outbreak_live_conversion_imperial"))
||
(groundquests.isTaskActive(player, "outbreak_switch_to_imperial", "speakPiett")
|| groundquests.hasCompletedQuest(player, "outbreak_switch_to_imperial"));
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_isPlayerNeutral (obj_id player, obj_id npc)
{
return captain_piett_condition_isLiveConversion(player, npc) && !factions.isImperial(player) && !factions.isRebel(player);
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_isPlayerRebel (obj_id player, obj_id npc)
{
return captain_piett_condition_isLiveConversion(player, npc) && factions.isRebel(player);
}
// ----------------------------------------------------------------------
boolean captain_piett_condition_hasDeletedLiveConversion (obj_id player, obj_id npc)
{
if(groundquests.hasCompletedQuest(player, "quest_08_dathomir_outpost_final")
|| groundquests.hasCompletedQuest(player, "quest_08_dathomir_outpost"))
{
if(!groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_rebel")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_imperial")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_neutral")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_neutral")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_rebel")
&& !groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_imperial"))
return true;
}
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void captain_piett_action_grantMissionOne (obj_id player, obj_id npc)
{
faceTo(npc, player);
groundquests.grantQuest(player, "quest/outbreak_quest_01_imperial");
}
// ----------------------------------------------------------------------
void captain_piett_action_completeQuest5 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "hasSpokenPietteDebreif");
if(!hasCompletedCollectionSlot(player, "outbreak_flare_s_slot"))
{
modifyCollectionSlotValue(player, "outbreak_flare_s_slot", 1);
}
}
// ----------------------------------------------------------------------
void captain_piett_action_clearLiveConversion (obj_id player, obj_id npc)
{
if(!groundquests.isTaskActive(player, "outbreak_live_conversion_imperial", "speakPiett")
&& !groundquests.isTaskActive(player, "outbreak_switch_to_imperial", "speakPiett"))
return;
groundquests.sendSignal(player, "liveConversionSpokePiett");
}
// ----------------------------------------------------------------------
void captain_piett_action_revokeImpGrantReb (obj_id player, obj_id npc)
{
if(groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_imperial"))
{
groundquests.clearQuest(player, "outbreak_live_conversion_imperial");
groundquests.grantQuest(player, "outbreak_switch_to_rebel");
}
if(groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_imperial"))
{
groundquests.clearQuest(player, "outbreak_switch_to_imperial");
groundquests.grantQuest(player, "outbreak_switch_to_rebel");
}
}
// ----------------------------------------------------------------------
void captain_piett_action_revokeImpGrantNeut (obj_id player, obj_id npc)
{
if(groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_imperial"))
{
groundquests.clearQuest(player, "outbreak_live_conversion_imperial");
groundquests.grantQuest(player, "outbreak_switch_to_neutral");
}
if(groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_imperial"))
{
groundquests.clearQuest(player, "outbreak_switch_to_imperial");
groundquests.grantQuest(player, "outbreak_switch_to_neutral");
}
}
// ----------------------------------------------------------------------
void captain_piett_action_revokeEntireImpQuestLine (obj_id player, obj_id npc)
{
holiday.removeAllCompletedQuestsForDeathTroopers(player);
}
// ----------------------------------------------------------------------
void captain_piett_action_grantRebQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "outbreak_switch_to_rebel");
}
// ----------------------------------------------------------------------
void captain_piett_action_grantImpQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "outbreak_switch_to_imperial");
}
// ----------------------------------------------------------------------
void captain_piett_action_grantNeutQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "outbreak_switch_to_neutral");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int captain_piett_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I have no pending tasks left for you, %TU.
//-- [RESPONSE NOTE]
//-- PLAYER: I want to do it all again.
if (response == "s_157")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Excuse me?
string_id message = new string_id (c_stringFile, "s_158");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to do all the quests again.
boolean hasResponse0 = false;
if (captain_piett_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_159");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Excuse me?
//-- [RESPONSE NOTE]
//-- PLAYER: I want to do all the quests again.
if (response == "s_159")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you absolutely sure, %TU? You won't be able to reverse this. You will only get to keep your rewards.
string_id message = new string_id (c_stringFile, "s_160");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_161");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 3);
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.captain_piett.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 captain_piett_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you absolutely sure, %TU? You won't be able to reverse this. You will only get to keep your rewards.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_161")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_revokeEntireImpQuestLine (player, npc);
//-- NPC: Done. Which version of the story would you like?
string_id message = new string_id (c_stringFile, "s_162");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Imperial again.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Rebel
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Neutral
boolean hasResponse2 = false;
if (captain_piett_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_163");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_165");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_166");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Done. Which version of the story would you like?
//-- [RESPONSE NOTE]
//-- PLAYER: Imperial again.
if (response == "s_163")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantImpQuest (player, npc);
//-- NPC: Done.
string_id message = new string_id (c_stringFile, "s_164");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Rebel
if (response == "s_165")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantRebQuest (player, npc);
//-- NPC: Done.
string_id message = new string_id (c_stringFile, "s_167");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Neutral
if (response == "s_166")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantNeutQuest (player, npc);
//-- NPC: Done.
string_id message = new string_id (c_stringFile, "s_168");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I don't think anyone will believe the report I will submit on this case, but I suppose that is my problem. You on the other hand have fulfilled your duties honorably.
//-- [RESPONSE NOTE]
//-- PLAYER: Please take the sample.
if (response == "s_124")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "handshake_tandem");
doAnimationAction (player, "handshake_tandem");
//-- NPC: Ah, yes.
string_id message = new string_id (c_stringFile, "s_125");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I hope this wont happen again.
boolean hasResponse0 = false;
if (captain_piett_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.captain_piett.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ah, yes.
//-- [RESPONSE NOTE]
//-- PLAYER: I hope this wont happen again.
if (response == "s_126")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: After this debacle I'm sure the Blackwing research will be discontinued...but you never know.
string_id message = new string_id (c_stringFile, "s_127");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'd rather not know.
boolean hasResponse0 = false;
if (captain_piett_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_128");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: After this debacle I'm sure the Blackwing research will be discontinued...but you never know.
//-- [RESPONSE NOTE]
//-- PLAYER: I'd rather not know.
if (response == "s_128")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
doAnimationAction (player, "salute1");
captain_piett_action_completeQuest5 (player, npc);
//-- NPC: Understood. %TU, you are dismissed.
string_id message = new string_id (c_stringFile, "s_129");
utils.removeScriptVar (player, "conversation.captain_piett.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 captain_piett_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes?
//-- [RESPONSE NOTE]
//-- PLAYER: I was told by Darth Vader to report to you.
if (response == "s_29")
{
doAnimationAction (player, "salute1");
//-- [NOTE]
if (captain_piett_condition_isPlayerNeutral (player, npc))
{
//-- NPC: Well, originally we contacted you because we thought you supported the Empire. I see you are a freelancer.
string_id message = new string_id (c_stringFile, "s_139");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I think they need my help.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No I want to help you.
boolean hasResponse1 = false;
if (captain_piett_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_141");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_143");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition_isPlayerRebel (player, npc))
{
//-- NPC: Well, originally we contacted you because we thought you supported the Empire. I see you are a a nasty rebel.
string_id message = new string_id (c_stringFile, "s_140");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I think they need my help.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No I want to help you.
boolean hasResponse1 = false;
if (captain_piett_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_142");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_144");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: I see. I was informed by Imperial High Command that a special 'volunteer' would be sent.
string_id message = new string_id (c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is going on here Captain?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm ready to serve.
boolean hasResponse1 = false;
if (captain_piett_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_51");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_192");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, originally we contacted you because we thought you supported the Empire. I see you are a freelancer.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I think they need my help.
if (response == "s_141")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you sure? Once you start working for them there wont be any turning back.
string_id message = new string_id (c_stringFile, "s_145");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_149");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No I want to help you.
if (response == "s_143")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you sure? Once you start working for me there wont be any turning back.
string_id message = new string_id (c_stringFile, "s_146");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_150");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 19);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you sure? Once you start working for them there wont be any turning back.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_149")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_revokeImpGrantNeut (player, npc);
//-- NPC: Well then...see you around...probably dead.
string_id message = new string_id (c_stringFile, "s_153");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you sure? Once you start working for me there wont be any turning back.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_150")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: In that case, %TU, I have been waiting for you. Imperial High Command mentioned you as a special 'volunteer' for this job.
string_id message = new string_id (c_stringFile, "s_156");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is going on here Captain?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm ready to serve.
boolean hasResponse1 = false;
if (captain_piett_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_51");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_192");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 26);
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.captain_piett.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 captain_piett_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: In that case, %TU, I have been waiting for you. Imperial High Command mentioned you as a special 'volunteer' for this job.
//-- [RESPONSE NOTE]
//-- PLAYER: What is going on here Captain?
if (response == "s_51")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: The situation is dire. A large portion of Dathomir had to be quarantined. You may have noticed the barriers.
string_id message = new string_id (c_stringFile, "s_53");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Quarantined? Is there a disease?
boolean hasResponse0 = false;
if (captain_piett_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_55");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm ready to serve.
if (response == "s_192")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: So are you ready for your mission briefing?
string_id message = new string_id (c_stringFile, "s_194");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (captain_piett_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_196");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 49);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, originally we contacted you because we thought you supported the Empire. I see you are a a nasty rebel.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I think they need my help.
if (response == "s_142")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you sure? Once you start working for them there wont be any turning back.
string_id message = new string_id (c_stringFile, "s_147");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_151");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No I want to help you.
if (response == "s_144")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you sure? Once you start working for me there wont be any turning back.
string_id message = new string_id (c_stringFile, "s_148");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_152");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you sure? Once you start working for them there wont be any turning back.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_151")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_revokeImpGrantReb (player, npc);
//-- NPC: Well then...see you around...probably dead.
string_id message = new string_id (c_stringFile, "s_154");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you sure? Once you start working for me there wont be any turning back.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_152")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: In that case, %TU, I have been waiting for you. Imperial High Command mentioned you as a special 'volunteer' for this job.
string_id message = new string_id (c_stringFile, "s_155");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is going on here Captain?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm ready to serve.
boolean hasResponse1 = false;
if (captain_piett_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_51");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_192");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 26);
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.captain_piett.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 captain_piett_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: In that case, %TU, I have been waiting for you. Imperial High Command mentioned you as a special 'volunteer' for this job.
//-- [RESPONSE NOTE]
//-- PLAYER: What is going on here Captain?
if (response == "s_51")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: The situation is dire. A large portion of Dathomir had to be quarantined. You may have noticed the barriers.
string_id message = new string_id (c_stringFile, "s_53");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Quarantined? Is there a disease?
boolean hasResponse0 = false;
if (captain_piett_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_55");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm ready to serve.
if (response == "s_192")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: So are you ready for your mission briefing?
string_id message = new string_id (c_stringFile, "s_194");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (captain_piett_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_196");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 49);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I see. I was informed by Imperial High Command that a special 'volunteer' would be sent.
//-- [RESPONSE NOTE]
//-- PLAYER: What is going on here Captain?
if (response == "s_51")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: The situation is dire. A large portion of Dathomir had to be quarantined. You may have noticed the barriers.
string_id message = new string_id (c_stringFile, "s_53");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Quarantined? Is there a disease?
boolean hasResponse0 = false;
if (captain_piett_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_55");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm ready to serve.
if (response == "s_192")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: So are you ready for your mission briefing?
string_id message = new string_id (c_stringFile, "s_194");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (captain_piett_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_196");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 49);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch27 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The situation is dire. A large portion of Dathomir had to be quarantined. You may have noticed the barriers.
//-- [RESPONSE NOTE]
//-- PLAYER: Quarantined? Is there a disease?
if (response == "s_55")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Well yes, you could call it that. There was an accident, possibly sabotage, at an Imperial Research Facility and as a result several became infected.
string_id message = new string_id (c_stringFile, "s_57");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How is it spread?
boolean hasResponse0 = false;
if (captain_piett_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_59");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 28);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well yes, you could call it that. There was an accident, possibly sabotage, at an Imperial Research Facility and as a result several became infected.
//-- [RESPONSE NOTE]
//-- PLAYER: How is it spread?
if (response == "s_59")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: All research into the problem suggest it is an airborne virus and highly contagious.
string_id message = new string_id (c_stringFile, "s_61");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: There is no cure?
boolean hasResponse0 = false;
if (captain_piett_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_63");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 29);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: All research into the problem suggest it is an airborne virus and highly contagious.
//-- [RESPONSE NOTE]
//-- PLAYER: There is no cure?
if (response == "s_63")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nervous");
//-- NPC: No, not for this.
string_id message = new string_id (c_stringFile, "s_65");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No cure? Why isn't orbital bombardment being used?
boolean hasResponse0 = false;
if (captain_piett_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_67");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 30);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch30 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, not for this.
//-- [RESPONSE NOTE]
//-- PLAYER: No cure? Why isn't orbital bombardment being used?
if (response == "s_67")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: I believe Lord Vader thought you might be able to help avoid the need for such measures. Orbital bombardment isn't exactly a precise science and killing civilians won't exactly win the hearts of the galaxy.
string_id message = new string_id (c_stringFile, "s_69");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see.
boolean hasResponse0 = false;
if (captain_piett_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_71");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 31);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I believe Lord Vader thought you might be able to help avoid the need for such measures. Orbital bombardment isn't exactly a precise science and killing civilians won't exactly win the hearts of the galaxy.
//-- [RESPONSE NOTE]
//-- PLAYER: I see.
if (response == "s_71")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Are you ready to be briefed on your mission, %TU?
string_id message = new string_id (c_stringFile, "s_73");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
utils.setScriptVar (player, "conversation.captain_piett.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.captain_piett.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 captain_piett_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you ready to be briefed on your mission, %TU?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes
if (response == "s_76")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: You are to travel to the Research and Prison Facility and gain entrance to the primary research lab there. Inside you are to locate at least one sample of a chemical named 'Blackwing.' You have a secondary mission of destroying the virus.
string_id message = new string_id (c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds doable.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What about the virus?
boolean hasResponse1 = false;
if (captain_piett_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_80");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_190");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 33);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch33 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You are to travel to the Research and Prison Facility and gain entrance to the primary research lab there. Inside you are to locate at least one sample of a chemical named 'Blackwing.' You have a secondary mission of destroying the virus.
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds doable.
if (response == "s_80")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: You aren't worried about the virus?
string_id message = new string_id (c_stringFile, "s_82");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Uh, a little.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No, are you?
boolean hasResponse1 = false;
if (captain_piett_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_84");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_184");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 34);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What about the virus?
if (response == "s_190")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Luckily there seems to be a way to inoculate against contracting the virus.
string_id message = new string_id (c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Seems to be?
boolean hasResponse0 = false;
if (captain_piett_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_88");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch34 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You aren't worried about the virus?
//-- [RESPONSE NOTE]
//-- PLAYER: Uh, a little.
if (response == "s_84")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Luckily there seems to be a way to inoculate against contracting the virus.
string_id message = new string_id (c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Seems to be?
boolean hasResponse0 = false;
if (captain_piett_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_88");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, are you?
if (response == "s_184")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: I would be if I were you.
string_id message = new string_id (c_stringFile, "s_186");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Oh wait...I could die.
boolean hasResponse0 = false;
if (captain_piett_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_188");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 48);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch35 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Luckily there seems to be a way to inoculate against contracting the virus.
//-- [RESPONSE NOTE]
//-- PLAYER: Seems to be?
if (response == "s_88")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Unfortunately the only way to find out for sure is to seek out the individual giving the inoculation.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You don't know where this individual is?
boolean hasResponse0 = false;
if (captain_piett_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_92");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 36);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Unfortunately the only way to find out for sure is to seek out the individual giving the inoculation.
//-- [RESPONSE NOTE]
//-- PLAYER: You don't know where this individual is?
if (response == "s_92")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: We have received reports this person is at a refugee camp just on the other side of the walls. If you decide to take this mission, a waypoint will be provided.
string_id message = new string_id (c_stringFile, "s_94");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see.
boolean hasResponse0 = false;
if (captain_piett_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_96");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 37);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch37 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We have received reports this person is at a refugee camp just on the other side of the walls. If you decide to take this mission, a waypoint will be provided.
//-- [RESPONSE NOTE]
//-- PLAYER: I see.
if (response == "s_96")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Any other questions?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is the payment for fulfilling the missions?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So there are survivors?
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You haven't mentioned anything regarding symptoms.
boolean hasResponse2 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: You mentioned this may be sabotage?
boolean hasResponse3 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: No, I'm ready.
boolean hasResponse4 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = 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_114");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch38 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Any other questions?
//-- [RESPONSE NOTE]
//-- PLAYER: What is the payment for fulfilling the missions?
if (response == "s_100")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: I assure you that Lord Vader will be very very pleased.
string_id message = new string_id (c_stringFile, "s_102");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Okay then, give me the mission.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need a number Captain.
boolean hasResponse1 = false;
if (captain_piett_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_104");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 39);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: So there are survivors?
if (response == "s_114")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Quite a few based on reports.
string_id message = new string_id (c_stringFile, "s_116");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Why aren't they being evacuated?
boolean hasResponse0 = false;
if (captain_piett_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_118");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 42);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You haven't mentioned anything regarding symptoms.
if (response == "s_134")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Symptoms for the disease are the sudden onset of seizures followed by a phase where the victim appears dead.
string_id message = new string_id (c_stringFile, "s_136");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Oh. Wait, what?
boolean hasResponse0 = false;
if (captain_piett_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_138");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 44);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You mentioned this may be sabotage?
if (response == "s_174")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Lord Vader is convinced the Rebellion is behind the outbreak. Most likely one or more saboteurs thought they were destroying an Imperial weapon, but really released it. Rebel scum! They are nothing more than well funded terrorists.
string_id message = new string_id (c_stringFile, "s_176");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see.
boolean hasResponse0 = false;
if (captain_piett_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_178");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 46);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, I'm ready.
if (response == "s_180")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantMissionOne (player, npc);
//-- NPC: I have uploaded the details to your datapad. Give your authorization code to the officer at the gate to gain entry.
string_id message = new string_id (c_stringFile, "s_182");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch39 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I assure you that Lord Vader will be very very pleased.
//-- [RESPONSE NOTE]
//-- PLAYER: Okay then, give me the mission.
if (response == "s_104")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantMissionOne (player, npc);
//-- NPC: I have uploaded the details to your datapad. Give your authorization code to the officer at the gate to gain entry.
string_id message = new string_id (c_stringFile, "s_106");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need a number Captain.
if (response == "s_108")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Perhaps you'd like to contact Darth Vader and ask yourself.
string_id message = new string_id (c_stringFile, "s_110");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Uh, no thanks.
boolean hasResponse0 = false;
if (captain_piett_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_112");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 41);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch41 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Perhaps you'd like to contact Darth Vader and ask yourself.
//-- [RESPONSE NOTE]
//-- PLAYER: Uh, no thanks.
if (response == "s_112")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Any other questions?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is the payment for fulfilling the missions?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So there are survivors?
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You haven't mentioned anything regarding symptoms.
boolean hasResponse2 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: You mentioned this may be sabotage?
boolean hasResponse3 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: No, I'm ready.
boolean hasResponse4 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = 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_114");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch42 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Quite a few based on reports.
//-- [RESPONSE NOTE]
//-- PLAYER: Why aren't they being evacuated?
if (response == "s_118")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: We have tried. Venturing into the quarantine zone has proven to be fatal to rescue parties.
string_id message = new string_id (c_stringFile, "s_120");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see.
boolean hasResponse0 = false;
if (captain_piett_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.captain_piett.branchId", 43);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch43 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We have tried. Venturing into the quarantine zone has proven to be fatal to rescue parties.
//-- [RESPONSE NOTE]
//-- PLAYER: I see.
if (response == "s_132")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Any other questions?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is the payment for fulfilling the missions?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So there are survivors?
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You haven't mentioned anything regarding symptoms.
boolean hasResponse2 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: You mentioned this may be sabotage?
boolean hasResponse3 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: No, I'm ready.
boolean hasResponse4 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = 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_114");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch44 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Symptoms for the disease are the sudden onset of seizures followed by a phase where the victim appears dead.
//-- [RESPONSE NOTE]
//-- PLAYER: Oh. Wait, what?
if (response == "s_138")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: The victim goes through a short phase where they appear dead. This is a temporary state. Later the victim appears to partially recover but becomes very violent.
string_id message = new string_id (c_stringFile, "s_170");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see.
boolean hasResponse0 = false;
if (captain_piett_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_172");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 45);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch45 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The victim goes through a short phase where they appear dead. This is a temporary state. Later the victim appears to partially recover but becomes very violent.
//-- [RESPONSE NOTE]
//-- PLAYER: I see.
if (response == "s_172")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Any other questions?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is the payment for fulfilling the missions?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So there are survivors?
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You haven't mentioned anything regarding symptoms.
boolean hasResponse2 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: You mentioned this may be sabotage?
boolean hasResponse3 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: No, I'm ready.
boolean hasResponse4 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = 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_114");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch46 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Lord Vader is convinced the Rebellion is behind the outbreak. Most likely one or more saboteurs thought they were destroying an Imperial weapon, but really released it. Rebel scum! They are nothing more than well funded terrorists.
//-- [RESPONSE NOTE]
//-- PLAYER: I see.
if (response == "s_178")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Any other questions?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is the payment for fulfilling the missions?
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So there are survivors?
boolean hasResponse1 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You haven't mentioned anything regarding symptoms.
boolean hasResponse2 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: You mentioned this may be sabotage?
boolean hasResponse3 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: No, I'm ready.
boolean hasResponse4 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = 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_114");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch48 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I would be if I were you.
//-- [RESPONSE NOTE]
//-- PLAYER: Oh wait...I could die.
if (response == "s_188")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: Luckily there seems to be a way to inoculate against contracting the virus.
string_id message = new string_id (c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Seems to be?
boolean hasResponse0 = false;
if (captain_piett_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_88");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch49 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So are you ready for your mission briefing?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes
if (response == "s_196")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: You are to travel to the Research and Prison Facility and gain entrance to the primary research lab there. Inside you are to locate at least one sample of a chemical named 'Blackwing.' You have a secondary mission of destroying the virus.
string_id message = new string_id (c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds doable.
boolean hasResponse0 = false;
if (captain_piett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What about the virus?
boolean hasResponse1 = false;
if (captain_piett_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_80");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_190");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 33);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int captain_piett_handleBranch50 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Uh, hello. You look like you might be lost. Would you like to know what is going on here?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_200")
{
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
captain_piett_action_grantImpQuest (player, npc);
//-- NPC: Okay...uh, let me contact you via comm after I check with Lord Vader.
string_id message = new string_id (c_stringFile, "s_202");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isTangible (self)) || (isPlayer (self)))
detachScript(self, "conversation.captain_piett");
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
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.captain_piett");
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 (captain_piett_condition_hasCompletedAll (player, npc))
{
//-- NPC: I have no pending tasks left for you, %TU.
string_id message = new string_id (c_stringFile, "s_130");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to do it all again.
boolean hasResponse0 = false;
if (captain_piett_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_157");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 1);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "captain_piett", 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 (captain_piett_condition_hasCompletedMissions (player, npc))
{
//-- NPC: I don't think anyone will believe the report I will submit on this case, but I suppose that is my problem. You on the other hand have fulfilled your duties honorably.
string_id message = new string_id (c_stringFile, "s_123");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Please take the sample.
boolean hasResponse0 = false;
if (captain_piett_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_124");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 8);
npcStartConversation (player, npc, "captain_piett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition_hasFoundStormtroopers (player, npc))
{
//-- NPC: Great job finding the Stormtrooper contingent. Now complete your missions and report back.
string_id message = new string_id (c_stringFile, "s_122");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition_hasSecondQuestImperial (player, npc))
{
//-- NPC: You need to find those Stormtroopers at the Research and Prison facility, %TU. I'll be in touch once you locate them.
string_id message = new string_id (c_stringFile, "s_121");
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 (captain_piett_condition_hasFirstQuestImperial (player, npc))
{
//-- NPC: Please hurry, %TU, the lives of many depend on your success.
string_id message = new string_id (c_stringFile, "s_74");
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 (captain_piett_condition_isLiveConversion (player, npc))
{
doAnimationAction (npc, "nod");
captain_piett_action_clearLiveConversion (player, npc);
//-- NPC: Yes?
string_id message = new string_id (c_stringFile, "s_27");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I was told by Darth Vader to report to you.
boolean hasResponse0 = false;
if (captain_piett_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_29");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 15);
npcStartConversation (player, npc, "captain_piett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition_hasDeletedLiveConversion (player, npc))
{
//-- NPC: Uh, hello. You look like you might be lost. Would you like to know what is going on here?
string_id message = new string_id (c_stringFile, "s_199");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (captain_piett_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_200");
utils.setScriptVar (player, "conversation.captain_piett.branchId", 50);
npcStartConversation (player, npc, "captain_piett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (captain_piett_condition__defaultCondition (player, npc))
{
//-- NPC: I suggest you evacuate the area citizen. This is no place to be curious.
string_id message = new string_id (c_stringFile, "s_204");
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 != "captain_piett")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.captain_piett.branchId");
if (branchId == 1 && captain_piett_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && captain_piett_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && captain_piett_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && captain_piett_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && captain_piett_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && captain_piett_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && captain_piett_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && captain_piett_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && captain_piett_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && captain_piett_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && captain_piett_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && captain_piett_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && captain_piett_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && captain_piett_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && captain_piett_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && captain_piett_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && captain_piett_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 27 && captain_piett_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && captain_piett_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 29 && captain_piett_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 30 && captain_piett_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && captain_piett_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && captain_piett_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 33 && captain_piett_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 34 && captain_piett_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 35 && captain_piett_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 36 && captain_piett_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 37 && captain_piett_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 38 && captain_piett_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 39 && captain_piett_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 41 && captain_piett_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 42 && captain_piett_handleBranch42 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 43 && captain_piett_handleBranch43 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 44 && captain_piett_handleBranch44 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 45 && captain_piett_handleBranch45 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 46 && captain_piett_handleBranch46 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 48 && captain_piett_handleBranch48 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 49 && captain_piett_handleBranch49 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 50 && captain_piett_handleBranch50 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.captain_piett.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================