mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
3540 lines
103 KiB
Plaintext
3540 lines
103 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// outbreak_han_solo.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/outbreak_han_solo";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean outbreak_han_solo_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_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 outbreak_han_solo_condition_hasFirstQuestImperial (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "outbreak_quest_01_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_hasSecondQuestImperial (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "outbreak_quest_02_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_hasFoundStormtroopers (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "outbreak_quest_02_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_hasCompletedMissions (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "outbreak_quest_facility_05_rebel", "speakPietteDebrief");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_hasCompletedAll (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "outbreak_quest_final_rebel")
|
|
&& groundquests.hasCompletedQuest(player, "outbreak_quest_final_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_isLiveConversation (obj_id player, obj_id npc)
|
|
{
|
|
return outbreak_han_solo_condition_hasNotStartedQuestLine(player,npc)
|
|
&&
|
|
(groundquests.isTaskActive(player, "outbreak_live_conversion_rebel", "speakSolo")
|
|
|| groundquests.hasCompletedQuest(player, "outbreak_live_conversion_rebel"))
|
|
||
|
|
(groundquests.isTaskActive(player, "outbreak_switch_to_rebel", "speakSolo")
|
|
|| groundquests.hasCompletedQuest(player, "outbreak_switch_to_rebel"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_isPlayerImperial (obj_id player, obj_id npc)
|
|
{
|
|
return outbreak_han_solo_condition_isLiveConversation(player, npc) && factions.isImperial(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_condition_isPlayerNeutral (obj_id player, obj_id npc)
|
|
{
|
|
return outbreak_han_solo_condition_isLiveConversation(player, npc) && !factions.isImperial(player) && !factions.isRebel(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean outbreak_han_solo_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 outbreak_han_solo_action_grantMissionOne (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
groundquests.grantQuest(player, "quest/outbreak_quest_01_rebel");
|
|
outbreak_han_solo_action_makeChewieGoodLuck(player,npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_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 outbreak_han_solo_action_makeChewieSayRight (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
string_id wookSpeak = new string_id(STRINGFILE, "chewie_hrrrrrnnnn");
|
|
chat.chat(myChewie, wookSpeak);
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "scratch_head");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieCheer (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
string_id wookSpeak = new string_id(STRINGFILE, "chewie_huwaa_muaa_mumwa");
|
|
chat.chat(myChewie, wookSpeak);
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "celebrate1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieImplore (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
string_id wookSpeak = new string_id(STRINGFILE, "chewie_wwrcahwowhwa");
|
|
chat.chat(myChewie, wookSpeak);
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "force_strength");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieGoodLuck (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
string_id wookSpeak = new string_id(STRINGFILE, "chewie_ur_oh");
|
|
chat.chat(myChewie, wookSpeak);
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "fc_yawn");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieCheer2 (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
string_id wookSpeak = new string_id(STRINGFILE, "chewie_huwaa_muaa_mumwa");
|
|
chat.chat(myChewie, wookSpeak);
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "celebrate");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieSalute (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "salute1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieWave (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "wave1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_makeChewieDirect (obj_id player, obj_id npc)
|
|
{
|
|
if(!hasObjVar(npc, "myChewie")) //in the triggers section
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has no Chewie objvar. Self: "+npc);
|
|
return;
|
|
}
|
|
|
|
obj_id myChewie = getObjIdObjVar(npc, "myChewie");
|
|
if(!isValidId(myChewie) || !exists(myChewie))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han has a Chewie objvar that is invalid. Self: "+ npc);
|
|
return;
|
|
}
|
|
|
|
faceTo(myChewie, player);
|
|
playClientEffectObj(player, "sound/voc_shyriiwook_blurt_rnd.snd", player, "");
|
|
doAnimationAction(myChewie, "wave_on_directing");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_clearLiveConversion (obj_id player, obj_id npc)
|
|
{
|
|
if(!groundquests.isTaskActive(player, "outbreak_live_conversion_rebel", "speakSolo")
|
|
&& !groundquests.isTaskActive(player, "outbreak_switch_to_rebel", "speakSolo"))
|
|
return;
|
|
|
|
groundquests.sendSignal(player, "liveConversionSpokeSolo");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_revokeRebGrantNeu (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_rebel"))
|
|
{
|
|
groundquests.clearQuest(player, "outbreak_live_conversion_rebel");
|
|
groundquests.grantQuest(player, "outbreak_switch_to_neutral");
|
|
}
|
|
if(groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_rebel"))
|
|
{
|
|
groundquests.clearQuest(player, "outbreak_switch_to_rebel");
|
|
groundquests.grantQuest(player, "outbreak_switch_to_neutral");
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_revokeRebGrantImp (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isQuestActiveOrComplete(player, "outbreak_live_conversion_rebel"))
|
|
{
|
|
groundquests.clearQuest(player, "outbreak_live_conversion_rebel");
|
|
groundquests.grantQuest(player, "outbreak_switch_to_imperial");
|
|
}
|
|
if(groundquests.isQuestActiveOrComplete(player, "outbreak_switch_to_rebel"))
|
|
{
|
|
groundquests.clearQuest(player, "outbreak_switch_to_rebel");
|
|
groundquests.grantQuest(player, "outbreak_switch_to_imperial");
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_revokeEntireRebQuestLine (obj_id player, obj_id npc)
|
|
{
|
|
holiday.removeAllCompletedQuestsForDeathTroopers(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_grantRebQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "outbreak_switch_to_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_action_grantImpQuest (obj_id player, obj_id npc)
|
|
{
|
|
|
|
groundquests.grantQuest(player, "outbreak_switch_to_imperial");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void outbreak_han_solo_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 outbreak_han_solo_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm going to stick around and make sure Doctor Cody has everything she needs. See you around, kid.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to do it all again.
|
|
if (response == "s_97")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excuse me?
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to do all the quests again.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_99");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_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_99")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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_100");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_101");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.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.outbreak_han_solo.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 outbreak_han_solo_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_101")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_revokeEntireRebQuestLine (player, npc);
|
|
|
|
//-- NPC: Okay then, you are all set. Which version of the story would you like?
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rebel again.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Imperial.
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Neutral.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_103");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_105");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Okay then, you are all set. Which version of the story would you like?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rebel again.
|
|
if (response == "s_103")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantRebQuest (player, npc);
|
|
|
|
//-- NPC: Done.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Imperial.
|
|
if (response == "s_104")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantImpQuest (player, npc);
|
|
|
|
//-- NPC: Done.
|
|
string_id message = new string_id (c_stringFile, "s_107");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Neutral.
|
|
if (response == "s_105")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantNeutQuest (player, npc);
|
|
|
|
//-- NPC: Done.
|
|
string_id message = new string_id (c_stringFile, "s_108");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well done, kid...I mean...Well done, %TU. You saving the scientists and diminishing the virus were a nice touch. Don't be surprised if the Alliance contacts you to do something else. And if they do, make sure to pack a coat.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can you take this Blackwing sample?
|
|
if (response == "s_124")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "handshake_tandem");
|
|
|
|
doAnimationAction (player, "handshake_tandem");
|
|
|
|
//-- NPC: Sure, kid. I don't know if I'm happy to have it but I'll take it off your hands.
|
|
string_id message = new string_id (c_stringFile, "s_125");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need off this planet. Can I catch a ride with you?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sure, kid. I don't know if I'm happy to have it but I'll take it off your hands.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need off this planet. Can I catch a ride with you?
|
|
if (response == "s_126")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, kid. I don't take on passengers anymore. It's bad for my health. But if it makes you feel any better, you earned a lot of credits. You can probably have a pleasure barge pick you up.
|
|
string_id message = new string_id (c_stringFile, "s_127");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Right.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sorry, kid. I don't take on passengers anymore. It's bad for my health. But if it makes you feel any better, you earned a lot of credits. You can probably have a pleasure barge pick you up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Right.
|
|
if (response == "s_128")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: It was good working with you, %TU. I have a feeling we'll be seeing each other again soon.
|
|
string_id message = new string_id (c_stringFile, "s_129");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Call me if you need some back up.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 11);
|
|
|
|
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.outbreak_han_solo.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 outbreak_han_solo_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It was good working with you, %TU. I have a feeling we'll be seeing each other again soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Call me if you need some back up.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave1");
|
|
|
|
outbreak_han_solo_action_completeQuest5 (player, npc);
|
|
|
|
//-- NPC: I may just need some soon. And hey, may the Force be with you.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, originally we contacted you because we thought you supported the Alliance. I see you are a freelancer.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I think they need my help.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No I want to help you.
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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_91");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_94");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_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_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_revokeRebGrantNeu (player, npc);
|
|
|
|
//-- NPC: Well then...see you around...probably dead.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_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_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, in that case, %TU, thanks for showing up.
|
|
string_id message = new string_id (c_stringFile, "s_95");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why is this area walled in?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_49");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.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.outbreak_han_solo.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 outbreak_han_solo_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, in that case, %TU, thanks for showing up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why is this area walled in?
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is the handy work of the Empire. Apparently there was an 'accident' with a virus and anyone that happened to be nearby was...infected.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Virus? Do we know anything about it?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, originally we contacted you because we thought you supported the Alliance. I see you've joined the Empire.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I think they need my help.
|
|
if (response == "s_63")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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_66");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No I want to help you.
|
|
if (response == "s_89")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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_92");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_93");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_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_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_revokeRebGrantImp (player, npc);
|
|
|
|
//-- NPC: Well then...see you around...probably dead.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_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_93")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, in that case, %TU, thanks for showing up.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why is this area walled in?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_49");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.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.outbreak_han_solo.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 outbreak_han_solo_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, in that case, %TU, thanks for showing up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why is this area walled in?
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is the handy work of the Empire. Apparently there was an 'accident' with a virus and anyone that happened to be nearby was...infected.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Virus? Do we know anything about it?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for showing up, %TU.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why is this area walled in?
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is the handy work of the Empire. Apparently there was an 'accident' with a virus and anyone that happened to be nearby was...infected.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Virus? Do we know anything about it?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This is the handy work of the Empire. Apparently there was an 'accident' with a virus and anyone that happened to be nearby was...infected.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Virus? Do we know anything about it?
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieSayRight (player, npc);
|
|
|
|
//-- NPC: Well yes actually. I know about it first hand. Chewie and I had an 'experience' with this virus before. It was called Blackwing. The virus wiped out a star destroyer as well as a prison ship. Nasty stuff.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So it is a deadly airborne virus that kills?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_144");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well yes actually. I know about it first hand. Chewie and I had an 'experience' with this virus before. It was called Blackwing. The virus wiped out a star destroyer as well as a prison ship. Nasty stuff.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So it is a deadly airborne virus that kills?
|
|
if (response == "s_144")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Airborne most likely, but the killing part gets a little complicated, kid. You see, it does kill the victim but then the virus takes over the victims body. And then things get violent.
|
|
string_id message = new string_id (c_stringFile, "s_146");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So wait...you mean the virus makes the dead walk.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_148");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Airborne most likely, but the killing part gets a little complicated, kid. You see, it does kill the victim but then the virus takes over the victims body. And then things get violent.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So wait...you mean the virus makes the dead walk.
|
|
if (response == "s_148")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: Walk, run, bite...even pick up a blaster and shoot at you. Unnerving isn't it? Its even worse if it catches someone...I guess reanimating the dead makes the infected hungry.
|
|
string_id message = new string_id (c_stringFile, "s_150");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What? They eat people?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Walk, run, bite...even pick up a blaster and shoot at you. Unnerving isn't it? Its even worse if it catches someone...I guess reanimating the dead makes the infected hungry.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What? They eat people?
|
|
if (response == "s_152")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah, kid...I ain't gonna candy coat it. They eat anything moving that isn't one of them.
|
|
string_id message = new string_id (c_stringFile, "s_154");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Um great, sounds like a nice place to avoid.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_156");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yeah, kid...I ain't gonna candy coat it. They eat anything moving that isn't one of them.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Um great, sounds like a nice place to avoid.
|
|
if (response == "s_156")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, I was hoping you'd actually volunteer for a mission for the Alliance. Pay is pretty good. I'd do it myself if I wasn't already tasked with dropping supplies.
|
|
string_id message = new string_id (c_stringFile, "s_242");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Wait...what? I'm not going in there.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_243");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, I was hoping you'd actually volunteer for a mission for the Alliance. Pay is pretty good. I'd do it myself if I wasn't already tasked with dropping supplies.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait...what? I'm not going in there.
|
|
if (response == "s_243")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I told Mon Mothma it was a hard sell, Chewie. I don't know who else to call for this, kid. You came highly recommended.
|
|
string_id message = new string_id (c_stringFile, "s_244");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why me?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_245");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I told Mon Mothma it was a hard sell, Chewie. I don't know who else to call for this, kid. You came highly recommended.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why me?
|
|
if (response == "s_245")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieImplore (player, npc);
|
|
|
|
//-- NPC: We contacted you because you have already done some fact finding on the subject. Remember something Jabba had you looking into? Something about a Super Soldier? You actually obtained the scientific data on the virus genome without the Empire knowing. You're resourceful, discreet and you managed to stay alive.
|
|
string_id message = new string_id (c_stringFile, "s_247");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: But not stupid. I'm not putting myself in the middle of a deadly virus.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_249");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 34);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We contacted you because you have already done some fact finding on the subject. Remember something Jabba had you looking into? Something about a Super Soldier? You actually obtained the scientific data on the virus genome without the Empire knowing. You're resourceful, discreet and you managed to stay alive.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: But not stupid. I'm not putting myself in the middle of a deadly virus.
|
|
if (response == "s_249")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh right. I keep forgetting to tell everyone about the anti-virus. I'm with you, kid. Me and Chewie wouldn't be within a parsec of this system if we didn't have the anti-virus.
|
|
string_id message = new string_id (c_stringFile, "s_260");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Educate me.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_261");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 35);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh right. I keep forgetting to tell everyone about the anti-virus. I'm with you, kid. Me and Chewie wouldn't be within a parsec of this system if we didn't have the anti-virus.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Educate me.
|
|
if (response == "s_261")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Doctor Cody administers the anti-virus. She's just inside the walls tending to survivors.
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So there are survivors in there? Why haven't they been evacuated?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_85");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 36);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch36 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, Doctor Cody administers the anti-virus. She's just inside the walls tending to survivors.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So there are survivors in there? Why haven't they been evacuated?
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Look, anyone that lands in there risks becoming lunch, or worse. Evacuations have been tried and failed. The best we can do is fly over and drop supplies.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So, what is so valuable in there that you need someone like me?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_109");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Look, anyone that lands in there risks becoming lunch, or worse. Evacuations have been tried and failed. The best we can do is fly over and drop supplies.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So, what is so valuable in there that you need someone like me?
|
|
if (response == "s_109")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Empire has sent in several of its own volunteers to retrieve an unmutated sample of the Blackwing virus.
|
|
string_id message = new string_id (c_stringFile, "s_111");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why would they be that stupid?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_113");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Empire has sent in several of its own volunteers to retrieve an unmutated sample of the Blackwing virus.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why would they be that stupid?
|
|
if (response == "s_113")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Empire isn't one to invest millions of credits only to lose it on an accident. It is likely that the Emperor or Vader want the virus to restart research in a new location.
|
|
string_id message = new string_id (c_stringFile, "s_115");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And you need me to get to it first?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_117");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Empire isn't one to invest millions of credits only to lose it on an accident. It is likely that the Emperor or Vader want the virus to restart research in a new location.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And you need me to get to it first?
|
|
if (response == "s_117")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exactly, kid. Get in there, meet with Cody, get the anti-virus and find the main research facility where the virus was released. Infiltrate the facility and retrieve the sample before anyone else. I'd say it was easy, but it won't be.
|
|
string_id message = new string_id (c_stringFile, "s_119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't know. Sounds like a suicide mission.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_131");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Exactly, kid. Get in there, meet with Cody, get the anti-virus and find the main research facility where the virus was released. Infiltrate the facility and retrieve the sample before anyone else. I'd say it was easy, but it won't be.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't know. Sounds like a suicide mission.
|
|
if (response == "s_131")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It just might be, kid, so you should think it over real good. The only reason the Alliance would ask someone to volunteer for this operation is to help avoid the death of innocents down the road. If the Empire is allowed to make a virus that kills entire planets, only to bring them back to life and attack others...well, you can imagine what type of problems that might create.
|
|
string_id message = new string_id (c_stringFile, "s_133");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And if I succeed?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_135");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 41);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It just might be, kid, so you should think it over real good. The only reason the Alliance would ask someone to volunteer for this operation is to help avoid the death of innocents down the road. If the Empire is allowed to make a virus that kills entire planets, only to bring them back to life and attack others...well, you can imagine what type of problems that might create.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And if I succeed?
|
|
if (response == "s_135")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well if you succeed, Mon Mothma herself will probably reward you. She'll probably pin a nice medal on you or something. Honestly, kid...I don't blame you if you don't think it's worth it...I'd be on my way as well if...
|
|
string_id message = new string_id (c_stringFile, "s_137");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay, I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_139");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 42);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch42 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well if you succeed, Mon Mothma herself will probably reward you. She'll probably pin a nice medal on you or something. Honestly, kid...I don't blame you if you don't think it's worth it...I'd be on my way as well if...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay, I'll do it.
|
|
if (response == "s_139")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieCheer (player, npc);
|
|
|
|
//-- NPC: ...it weren't...What? You'll do it? Fantastic, kid. You got guts! You remind me of someone else I hang out with. Can't wait to tell him he has some competition. Heheha! Do you have any questions before you get started?
|
|
string_id message = new string_id (c_stringFile, "s_143");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch43 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: ...it weren't...What? You'll do it? Fantastic, kid. You got guts! You remind me of someone else I hang out with. Can't wait to tell him he has some competition. Heheha! Do you have any questions before you get started?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No, kid, we got you Imperial authorization. It will be as if you were working for Vader himself. Pretty snazzy, huh? Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_151");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
if (response == "s_155")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, if you listen to Darth Vader, the Alliance is behind the outbreak. In reality it was likely a research accident. Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I'm ready.
|
|
if (response == "s_160")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantMissionOne (player, npc);
|
|
|
|
//-- NPC: I have uploaded the details to your datapad. We have procured a stolen Imperial authorization code that shows you are working as an Imperial volunteer. Anyone who examines the authorization will think you are working for Vader himself.
|
|
string_id message = new string_id (c_stringFile, "s_162");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch44 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No, kid, we got you Imperial authorization. It will be as if you were working for Vader himself. Pretty snazzy, huh? Anything else?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No, kid, we got you Imperial authorization. It will be as if you were working for Vader himself. Pretty snazzy, huh? Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_151");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
if (response == "s_155")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, if you listen to Darth Vader, the Alliance is behind the outbreak. In reality it was likely a research accident. Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I'm ready.
|
|
if (response == "s_160")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantMissionOne (player, npc);
|
|
|
|
//-- NPC: I have uploaded the details to your datapad. We have procured a stolen Imperial authorization code that shows you are working as an Imperial volunteer. Anyone who examines the authorization will think you are working for Vader himself.
|
|
string_id message = new string_id (c_stringFile, "s_162");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch45 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, if you listen to Darth Vader, the Alliance is behind the outbreak. In reality it was likely a research accident. Anything else?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No, kid, we got you Imperial authorization. It will be as if you were working for Vader himself. Pretty snazzy, huh? Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_151");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
if (response == "s_155")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, if you listen to Darth Vader, the Alliance is behind the outbreak. In reality it was likely a research accident. Anything else?
|
|
string_id message = new string_id (c_stringFile, "s_158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How will I get in? Air Drop?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: How did the virus escape in the first place?
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I'm ready.
|
|
boolean hasResponse2 = false;
|
|
if (outbreak_han_solo_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_147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_155");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I'm ready.
|
|
if (response == "s_160")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantMissionOne (player, npc);
|
|
|
|
//-- NPC: I have uploaded the details to your datapad. We have procured a stolen Imperial authorization code that shows you are working as an Imperial volunteer. Anyone who examines the authorization will think you are working for Vader himself.
|
|
string_id message = new string_id (c_stringFile, "s_162");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int outbreak_han_solo_handleBranch47 (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_166")
|
|
{
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_grantRebQuest (player, npc);
|
|
|
|
//-- NPC: Okay...uh, let me contact you via comm after I check with Mon Mothma.
|
|
string_id message = new string_id (c_stringFile, "s_168");
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
|
|
const string STRINGFILE = "theme_park/outbreak/outbreak";
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.outbreak_han_solo");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
messageTo(self, "findChewie", null, 2, false);
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han is looking for Chewie. Self: "+self);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
messageTo(self, "findChewie", null, 2, false);
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo conversation: Han is looking for Chewie. Self: "+self);
|
|
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.outbreak_han_solo");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler findChewie()
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo findChewie(): Initialized");
|
|
obj_id[] chewieList = getAllObjectsWithObjVar(getLocation(self), 3.f, "chewie");
|
|
//getAllObjectsWithTemplate(getLocation(self), 60.f, "object/mobile/chewbacca.iff");
|
|
if(chewieList == null || chewieList.length <= 0)
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo findChewie(): Failed to find chewie var on any objects within range.");
|
|
messageTo(self, "findChewie", null, 60, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
CustomerServiceLog("outbreak_themepark", "outbreak_han_solo findChewie(): Found Chewie within range.");
|
|
setObjVar(self, "myChewie", chewieList[0]);
|
|
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 (outbreak_han_solo_condition_hasCompletedAll (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieWave (player, npc);
|
|
|
|
//-- NPC: I'm going to stick around and make sure Doctor Cody has everything she needs. See you around, kid.
|
|
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 (outbreak_han_solo_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_97");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition_hasCompletedMissions (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumbs_up");
|
|
|
|
outbreak_han_solo_action_makeChewieCheer2 (player, npc);
|
|
|
|
//-- NPC: Well done, kid...I mean...Well done, %TU. You saving the scientists and diminishing the virus were a nice touch. Don't be surprised if the Alliance contacts you to do something else. And if they do, make sure to pack a coat.
|
|
string_id message = new string_id (c_stringFile, "s_123");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Can you take this Blackwing sample?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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.outbreak_han_solo.branchId", 8);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", 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 (outbreak_han_solo_condition_hasFoundStormtroopers (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieSayRight (player, npc);
|
|
|
|
//-- NPC: Great job finding the Stormtrooper contingent, kid. I know it is exhausting but you need to get back in there and recover the sample.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_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 (outbreak_han_solo_condition_hasFirstQuestImperial (player, npc))
|
|
{
|
|
//-- NPC: And remember, %TU, the Empire already has operatives inside the quarantine zone. The faster you get in there the better.
|
|
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 (outbreak_han_solo_condition_isPlayerNeutral (player, npc))
|
|
{
|
|
//-- NPC: Well, originally we contacted you because we thought you supported the Alliance. I see you are a freelancer.
|
|
string_id message = new string_id (c_stringFile, "s_61");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I think they need my help.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No I want to help you.
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_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_64");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_90");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition_isPlayerImperial (player, npc))
|
|
{
|
|
//-- NPC: Well, originally we contacted you because we thought you supported the Alliance. I see you've joined the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I think they need my help.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No I want to help you.
|
|
boolean hasResponse1 = false;
|
|
if (outbreak_han_solo_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_63");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_89");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 21);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition_isLiveConversation (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
outbreak_han_solo_action_clearLiveConversion (player, npc);
|
|
|
|
//-- NPC: Thanks for showing up, %TU.
|
|
string_id message = new string_id (c_stringFile, "s_47");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why is this area walled in?
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_49");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 26);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", 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 (outbreak_han_solo_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_165");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (outbreak_han_solo_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_166");
|
|
|
|
utils.setScriptVar (player, "conversation.outbreak_han_solo.branchId", 47);
|
|
|
|
npcStartConversation (player, npc, "outbreak_han_solo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (outbreak_han_solo_condition__defaultCondition (player, npc))
|
|
{
|
|
outbreak_han_solo_action_makeChewieDirect (player, npc);
|
|
|
|
//-- NPC: This isn't a place for just anyone. You might want to find the next shuttle out of here.
|
|
string_id message = new string_id (c_stringFile, "s_170");
|
|
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 != "outbreak_han_solo")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
if (branchId == 1 && outbreak_han_solo_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && outbreak_han_solo_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && outbreak_han_solo_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && outbreak_han_solo_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && outbreak_han_solo_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && outbreak_han_solo_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && outbreak_han_solo_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && outbreak_han_solo_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && outbreak_han_solo_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && outbreak_han_solo_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && outbreak_han_solo_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && outbreak_han_solo_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && outbreak_han_solo_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && outbreak_han_solo_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && outbreak_han_solo_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && outbreak_han_solo_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && outbreak_han_solo_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && outbreak_han_solo_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && outbreak_han_solo_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && outbreak_han_solo_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && outbreak_han_solo_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && outbreak_han_solo_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && outbreak_han_solo_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && outbreak_han_solo_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && outbreak_han_solo_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && outbreak_han_solo_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 36 && outbreak_han_solo_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && outbreak_han_solo_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && outbreak_han_solo_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && outbreak_han_solo_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && outbreak_han_solo_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && outbreak_han_solo_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 42 && outbreak_han_solo_handleBranch42 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 43 && outbreak_han_solo_handleBranch43 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 44 && outbreak_han_solo_handleBranch44 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 45 && outbreak_han_solo_handleBranch45 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 47 && outbreak_han_solo_handleBranch47 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.outbreak_han_solo.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|