mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2448 lines
72 KiB
Plaintext
2448 lines
72 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_imperial_base.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.34 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.badge;
|
|
include library.chat;
|
|
include library.space_battlefield;
|
|
include library.space_quest;
|
|
include library.space_transition;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/station_imperial_base";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_imperial_base_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isPlayerRebel (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_battlefield.isInRebelShip(player) || pvpGetAlignedFaction( player ) == ##"rebel" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasReceivedReward_recovery_red_tie (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasReceivedReward(player, "recovery", "ep3_red_tie_recovery");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isImperialFactionWithMission (obj_id player, obj_id npc)
|
|
{
|
|
if (space_battlefield.isInNeutralShip(player))
|
|
return ( ( pvpGetAlignedFaction( player ) == ##"imperial" ) && space_quest.hasQuest(player ) );
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isInYacht (obj_id player, obj_id npc)
|
|
{
|
|
obj_id ship = space_transition.getContainingShip(player);
|
|
if (isIdValid( ship) )
|
|
{
|
|
string template = getTemplateName(ship);
|
|
if ( template != null && template.endsWith("_yacht.iff") )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isPlayerNeutral (obj_id player, obj_id npc)
|
|
{
|
|
if(space_battlefield.isInNeutralShip(player))
|
|
{
|
|
if ( pvpGetAlignedFaction( player ) == ##"imperial" )
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isTooFar (obj_id player, obj_id npc)
|
|
{
|
|
obj_id containingShip = space_transition.getContainingShip(player);
|
|
return ( getDistance( npc, containingShip ) > space_transition.STATION_COMM_MAX_DISTANCE );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasFailed_recovery_red_tie (obj_id player, obj_id npc)
|
|
{
|
|
return (space_quest.hasFailedQuest(player, "recovery", "ep3_red_tie_recovery") ||
|
|
space_quest.hasAbortedQuest(player, "recovery", "ep3_red_tie_recovery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasFailed_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasFailedQuest(player, "escort", "ep3_kash_station_imperial_escort_alpha");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isOnQuest_escort (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest(player, "escort", "ep3_kash_station_imperial_escort_alpha");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasReceivedReward_escort_apha (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasReceivedReward(player, "escort", "ep3_kash_station_imperial_escort_alpha");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isReadyfor_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasWonQuest(player, "assassinate", "ep3_kash_station_assassinate_imperial") &&
|
|
!space_quest.hasWonQuest(player, "escort", "ep3_kash_station_imperial_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isOnQuest_recovery (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest(player, "recovery", "ep3_red_tie_recovery");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasWon_recovery_red_tie (obj_id player, obj_id npc)
|
|
{
|
|
// Player has won the recovery mission to earn the RED TIE Interceptor
|
|
// The player has NOT YET been REWARDED for this mission.
|
|
return (space_quest.hasWonQuest(player, "recovery", "ep3_red_tie_recovery") &&
|
|
!space_quest.hasReceivedReward(player, "recovery", "ep3_red_tie_recovery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_hasWon_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasWonQuest(player, "escort", "ep3_kash_station_imperial_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_imperial_base_condition_isIn_Red_TIE_Interceptor (obj_id player, obj_id npc)
|
|
{
|
|
obj_id objShip = getPilotedShip(player);
|
|
string chassis = getShipChassisType(objShip);
|
|
|
|
return (chassis.equals("player_tieinterceptor_imperial_guard"));
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_imperial_base_action_grantDuty_destroy (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "ep3_kash_station_destroy_duty_imperial");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_grantDuty_escort (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "escort_duty", "ep3_kash_station_escort_duty_imperial");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_grantMission_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "escort", "ep3_kash_station_imperial_escort_alpha");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_setPlayerToOvertStatus (obj_id player, obj_id npc)
|
|
{
|
|
space_transition.setPlayerOvert( player, ##"imperial" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_giveReward_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.giveReward( player, "escort", "ep3_kash_station_imperial_escort_alpha", 5000, "object/tangible/furniture/ep3_rewards/hologram_insignia_imperial_01.iff" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_grantMission_recovery_red_tie (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "recovery", "ep3_red_tie_recovery");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_imperial_base_action_giveReward_red_tie (obj_id player, obj_id npc)
|
|
{
|
|
badge.grantBadge (player, "bdg_kash_imperial_red_tie"); // Badge for 'can fly' Imperial Guard TIE Interceptor
|
|
space_quest.giveReward( player, "recovery", "ep3_red_tie_recovery", 15000, "object/tangible/ship/crafted/chassis/tieinterceptor_imperial_guard_reward_deed.iff" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_imperial_base_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's a fine-looking starship, %NU. Most impressive. What can I do for you today?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like a mission.
|
|
if (response == "s_262")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two to choose from. A destroy duty and an escort duty. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_314");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_316");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_326");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
if (response == "s_264")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Congratulations, pilot! The mission was a success. Our special Operative sends her regards. I am now authorized to present you with the 'Crimson Guard' TIE Interceptor. Are you ready to receive it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, sir!
|
|
if (response == "s_268")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_giveReward_red_tie (player, npc);
|
|
|
|
//-- NPC: Good hunting!
|
|
string_id message = new string_id (c_stringFile, "s_270");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
if (response == "s_272")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You failed! Fortunately our operative managed to escape the Corvette and has rejoined the Alliance in a nearby system. Apparently, the Rebels are going to try to cut through Kashyyyk space again... are you ready to stop them?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I will try again!
|
|
if (response == "s_280")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantMission_recovery_red_tie (player, npc);
|
|
|
|
//-- NPC: Outstanding!
|
|
string_id message = new string_id (c_stringFile, "s_282");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need to declare my faction affiliation.
|
|
if (response == "s_284")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This is unacceptable! The Emperor's transports must be protected. Your performance is pitiful.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Give me another chance.
|
|
if (response == "s_288")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantMission_escort_alpha (player, npc);
|
|
|
|
//-- NPC: Do not fail us again, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_290");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I recognize you, pilot. You are the one they have been talking about. The one who foiled the Ghrag mercenaries' plot to eliminate this space station. Outstanding!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_294")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Apparently, word of your victory has spread far. Imperial command has authorized a special award for your service. It is en route to this base and should be here momentarily.
|
|
string_id message = new string_id (c_stringFile, "s_296");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is it?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_298");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Apparently, word of your victory has spread far. Imperial command has authorized a special award for your service. It is en route to this base and should be here momentarily.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is it?
|
|
if (response == "s_298")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: From what I understand, you are to receive a holographic projection system that produces a proud symbol of the Empire. You are encouraged to place this award in an obvious place... and spread the good-will of the Emperor.
|
|
string_id message = new string_id (c_stringFile, "s_300");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds good.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_302");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: From what I understand, you are to receive a holographic projection system that produces a proud symbol of the Empire. You are encouraged to place this award in an obvious place... and spread the good-will of the Emperor.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds good.
|
|
if (response == "s_302")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: While we wait... I do have a favor to ask of you, though. We are short-staffed on the escort duty roster. I need someone to escort a transport through Kashyyyk space. Should not take long. By the time you are done, your award will have arrived.
|
|
string_id message = new string_id (c_stringFile, "s_304");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_306");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: While we wait... I do have a favor to ask of you, though. We are short-staffed on the escort duty roster. I need someone to escort a transport through Kashyyyk space. Should not take long. By the time you are done, your award will have arrived.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, sir.
|
|
if (response == "s_306")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantMission_escort_alpha (player, npc);
|
|
|
|
//-- NPC: Good luck, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_308");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah yes! The hero who saved this space station from the Ghrag mercenaries' plot. We have unlocked two duty missions for you. What's your pleasure?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What are my choices?
|
|
if (response == "s_312")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two to choose from. A destroy duty and an escort duty. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_314");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_316");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_326");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
if (response == "s_336")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How about a more challenging mission?
|
|
if (response == "s_338")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Amusing. So you're too good for the standard duty mission, eh? Given your history this may be true. You are a well-respected pilot, %TU. Perhaps I do have something that you would find interesting...
|
|
string_id message = new string_id (c_stringFile, "s_340");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's hear it.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_342");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.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.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are two to choose from. A destroy duty and an escort duty. Which would you like?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Destroy duty.
|
|
if (response == "s_316")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excellent. This mission requires you to punish the Ghrag mercenary clan. Patrol the Kashyyyk system and destroy all Ghrag pilots you encounter.
|
|
string_id message = new string_id (c_stringFile, "s_318");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take it!
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like something else.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_320");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Escort duty.
|
|
if (response == "s_326")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Outstanding. Protect Imperial freighters as they travel through this system. The Ghrag mercenaries will undoubtedly try to destroy them!
|
|
string_id message = new string_id (c_stringFile, "s_328");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take it!
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like something else.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_330");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_334");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent. This mission requires you to punish the Ghrag mercenary clan. Patrol the Kashyyyk system and destroy all Ghrag pilots you encounter.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take it!
|
|
if (response == "s_320")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantDuty_destroy (player, npc);
|
|
|
|
//-- NPC: Outstanding!
|
|
string_id message = new string_id (c_stringFile, "s_322");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like something else.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two to choose from. A destroy duty and an escort duty. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_314");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_316");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_326");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Outstanding. Protect Imperial freighters as they travel through this system. The Ghrag mercenaries will undoubtedly try to destroy them!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take it!
|
|
if (response == "s_330")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantDuty_escort (player, npc);
|
|
|
|
//-- NPC: Superb!
|
|
string_id message = new string_id (c_stringFile, "s_332");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like something else.
|
|
if (response == "s_334")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two to choose from. A destroy duty and an escort duty. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_314");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_316");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_326");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Amusing. So you're too good for the standard duty mission, eh? Given your history this may be true. You are a well-respected pilot, %TU. Perhaps I do have something that you would find interesting...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's hear it.
|
|
if (response == "s_342")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A special Imperial Operative has infiltrated the Rebel Alliance and is stowed away aboard a Corellian Corvette called 'The Gaaltura V.' Reports indicate that this vessel is headed through the Kashyyyk system very soon.
|
|
string_id message = new string_id (c_stringFile, "s_344");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you want me to do?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_346");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A special Imperial Operative has infiltrated the Rebel Alliance and is stowed away aboard a Corellian Corvette called 'The Gaaltura V.' Reports indicate that this vessel is headed through the Kashyyyk system very soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you want me to do?
|
|
if (response == "s_346")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We wish to activate this special Operative. Once she receives her orders, she will fight her way to the bridge and take command of the vessel. Before she can do her job, you must intercept and disable the Corvette.
|
|
string_id message = new string_id (c_stringFile, "s_348");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And then what?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_350");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We wish to activate this special Operative. Once she receives her orders, she will fight her way to the bridge and take command of the vessel. Before she can do her job, you must intercept and disable the Corvette.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And then what?
|
|
if (response == "s_350")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Operative will slice the navicomputer and allow me to take control of the ship by remote. I will fly it here. You protect it. That's it.
|
|
string_id message = new string_id (c_stringFile, "s_352");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I get for this?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_354");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Operative will slice the navicomputer and allow me to take control of the ship by remote. I will fly it here. You protect it. That's it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I get for this?
|
|
if (response == "s_354")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To accomplish this would set you firmly above the standard Imperial Navy pilot. Success in this mission qualifies you to fly the 'Crimson Guard' TIE Interceptor. Complete the mission and I will award the starship to you.
|
|
string_id message = new string_id (c_stringFile, "s_356");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: For the Emperor!
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_358");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: To accomplish this would set you firmly above the standard Imperial Navy pilot. Success in this mission qualifies you to fly the 'Crimson Guard' TIE Interceptor. Complete the mission and I will award the starship to you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: For the Emperor!
|
|
if (response == "s_358")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_grantMission_recovery_red_tie (player, npc);
|
|
|
|
//-- NPC: Affirmative. Good luck, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_360");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good job, pilot. As I expected, your award from Imperial Command arrived while you were on duty. I would like to transfer it to your starship immediately.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_364")
|
|
{
|
|
station_imperial_base_action_giveReward_escort_alpha (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are welcome, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_393");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Imperial Space Station, %TU. Would you like to declare your affiliation with the Empire?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes
|
|
if (response == "s_370822d1")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No
|
|
if (response == "s_457a7010")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station. Clear the area for official traffic.
|
|
string_id message = new string_id (c_stringFile, "s_1e8d6243");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_dd67013")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_25329880");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_626fe576");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How long does this last?
|
|
if (response == "s_626fe576")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You will be Declared Imperial until you land your ship. The next time you launch, if you want to be a Declared Imperial again, you must speak to an Imperial Station again.
|
|
string_id message = new string_id (c_stringFile, "s_41ebf230");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: All Rebel Pilots will be able to attack me?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_3a7768e6");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You will be Declared Imperial until you land your ship. The next time you launch, if you want to be a Declared Imperial again, you must speak to an Imperial Station again.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: All Rebel Pilots will be able to attack me?
|
|
if (response == "s_3a7768e6")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not all of them, %TU. Just the ones that have Declared their affiliation with the Rebel Alliance. You'll be able to attack them, and they will be able to attack you. Ready to declare?
|
|
string_id message = new string_id (c_stringFile, "s_ef2a0e9c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (station_imperial_base_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_370822d1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_457a7010");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dd67013");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 34);
|
|
|
|
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.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_imperial_base_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Not all of them, %TU. Just the ones that have Declared their affiliation with the Rebel Alliance. You'll be able to attack them, and they will be able to attack you. Ready to declare?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes
|
|
if (response == "s_370822d1")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
station_imperial_base_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No
|
|
if (response == "s_457a7010")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station. Clear the area for official traffic.
|
|
string_id message = new string_id (c_stringFile, "s_1e8d6243");
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_dd67013")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_25329880");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_626fe576");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_kash_imp_base.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_kash_imp_base.iff" );
|
|
detachScript(self, "space.content_tools.spacestation");
|
|
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);
|
|
|
|
if (space_quest.hasWonQuest(player, "recovery", "ep3_red_tie_recovery") &&
|
|
space_quest.hasReceivedReward(player, "recovery", "ep3_red_tie_recovery"))
|
|
{
|
|
if (!badge.hasBadge(player, "bdg_kash_imperial_red_tie"))
|
|
{
|
|
badge.grantBadge(player, "bdg_kash_imperial_red_tie");
|
|
}
|
|
}
|
|
|
|
if (!space_quest.hasWonQuest(player, "recovery", "ep3_heavy_xwing_recovery"))
|
|
{
|
|
if (badge.hasBadge(player, "bdg_kash_rebel_heavy_xwing"))
|
|
{
|
|
badge.revokeBadge(player, "bdg_kash_rebel_heavy_xwing", true);
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.station_imperial_base");
|
|
|
|
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 (station_imperial_base_condition_isInYacht (player, npc))
|
|
{
|
|
//-- NPC: There's nothing we can do for you while you're in that civilian ship.
|
|
string_id message = new string_id (c_stringFile, "s_358253b2");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isPlayerRebel (player, npc))
|
|
{
|
|
//-- NPC: You are not welcome at this station Rebel, SCUM!
|
|
string_id message = new string_id (c_stringFile, "s_f48e8567");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isImperialFactionWithMission (player, npc))
|
|
{
|
|
//-- NPC: We could put your ship to good use, %TU, but you seem to be busy doing something else. Finish your mission and we'll talk.
|
|
string_id message = new string_id (c_stringFile, "s_e8cb2563");
|
|
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 (station_imperial_base_condition_isPlayerNeutral (player, npc))
|
|
{
|
|
//-- NPC: Sign up with the Empire and we'll talk.
|
|
string_id message = new string_id (c_stringFile, "s_2e491159");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: You need to move closer to this station.
|
|
string_id message = new string_id (c_stringFile, "s_48f82131");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isIn_Red_TIE_Interceptor (player, npc))
|
|
{
|
|
//-- NPC: That's a fine-looking starship, %NU. Most impressive. What can I do for you today?
|
|
string_id message = new string_id (c_stringFile, "s_260");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like a mission.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_262");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_264");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", 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 (station_imperial_base_condition_hasWon_recovery_red_tie (player, npc))
|
|
{
|
|
//-- NPC: Congratulations, pilot! The mission was a success. Our special Operative sends her regards. I am now authorized to present you with the 'Crimson Guard' TIE Interceptor. Are you ready to receive it?
|
|
string_id message = new string_id (c_stringFile, "s_266");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir!
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_268");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_272");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isOnQuest_recovery (player, npc))
|
|
{
|
|
//-- NPC: You asked for the challenge... now do it!
|
|
string_id message = new string_id (c_stringFile, "s_274");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isOnQuest_escort (player, npc))
|
|
{
|
|
//-- NPC: You've got a transport to escort, pilot! Get going.
|
|
string_id message = new string_id (c_stringFile, "s_276");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_hasFailed_recovery_red_tie (player, npc))
|
|
{
|
|
//-- NPC: You failed! Fortunately our operative managed to escape the Corvette and has rejoined the Alliance in a nearby system. Apparently, the Rebels are going to try to cut through Kashyyyk space again... are you ready to stop them?
|
|
string_id message = new string_id (c_stringFile, "s_278");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I will try again!
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need to declare my faction affiliation.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_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_280");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_284");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_hasFailed_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: This is unacceptable! The Emperor's transports must be protected. Your performance is pitiful.
|
|
string_id message = new string_id (c_stringFile, "s_286");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Give me another chance.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_288");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 13);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_isReadyfor_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: I recognize you, pilot. You are the one they have been talking about. The one who foiled the Ghrag mercenaries' plot to eliminate this space station. Outstanding!
|
|
string_id message = new string_id (c_stringFile, "s_292");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_294");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 15);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_hasReceivedReward_escort_apha (player, npc))
|
|
{
|
|
//-- NPC: Ah yes! The hero who saved this space station from the Ghrag mercenaries' plot. We have unlocked two duty missions for you. What's your pleasure?
|
|
string_id message = new string_id (c_stringFile, "s_310");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What are my choices?
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: How about a more challenging mission?
|
|
boolean hasResponse2 = false;
|
|
if (!station_imperial_base_condition_hasReceivedReward_recovery_red_tie (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_312");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_336");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_338");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 20);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition_hasWon_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: Good job, pilot. As I expected, your award from Imperial Command arrived while you were on duty. I would like to transfer it to your starship immediately.
|
|
string_id message = new string_id (c_stringFile, "s_362");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_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_364");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 32);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the Imperial Space Station, %TU. Would you like to declare your affiliation with the Empire?
|
|
string_id message = new string_id (c_stringFile, "s_afe52489");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (station_imperial_base_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (station_imperial_base_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_370822d1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_457a7010");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dd67013");
|
|
|
|
utils.setScriptVar (player, "conversation.station_imperial_base.branchId", 34);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_imperial_base", 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;
|
|
}
|
|
|
|
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 != "station_imperial_base")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
if (branchId == 6 && station_imperial_base_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && station_imperial_base_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && station_imperial_base_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && station_imperial_base_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && station_imperial_base_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && station_imperial_base_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && station_imperial_base_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && station_imperial_base_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && station_imperial_base_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && station_imperial_base_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && station_imperial_base_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && station_imperial_base_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && station_imperial_base_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && station_imperial_base_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && station_imperial_base_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && station_imperial_base_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && station_imperial_base_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && station_imperial_base_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && station_imperial_base_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && station_imperial_base_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_imperial_base_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && station_imperial_base_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.station_imperial_base.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|