mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
2779 lines
80 KiB
Plaintext
2779 lines
80 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_rebel_outpost.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.30 - 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_rebel_outpost";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_rebel_outpost_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_hasFailed_rebel_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasFailedQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_isPlayerImperial (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_battlefield.isInImperialShip(player) || pvpGetAlignedFaction( player ) == ##"imperial" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_isRebelFactionWithMission (obj_id player, obj_id npc)
|
|
{
|
|
if (space_battlefield.isInNeutralShip(player))
|
|
return ( ( pvpGetAlignedFaction( player ) == ##"rebel" ) && space_quest.hasQuest(player ) );
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_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_rebel_outpost_condition_isPlayerNeutral (obj_id player, obj_id npc)
|
|
{
|
|
if(space_battlefield.isInNeutralShip(player))
|
|
{
|
|
if ( pvpGetAlignedFaction( player ) == ##"rebel" )
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_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_rebel_outpost_condition_hasWon_rebel_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return (space_quest.hasWonQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_hasBeenRewarded_rebel_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasReceivedReward(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_isReady_for_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
// Player has won the assassinate (Rebel branch) quest
|
|
// Player has NOT won the escort story mission
|
|
return ( space_quest.hasWonQuest(player, "assassinate", "ep3_kash_station_assassinate_rebel") &&
|
|
!space_quest.hasWonQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_hasBeenRewarded_heavy_xwing (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasReceivedReward(player, "recovery", "ep3_heavy_xwing_recovery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_rebel_outpost_condition_hasWon_heavy_xwing_recovery (obj_id player, obj_id npc)
|
|
{
|
|
return (space_quest.hasWonQuest(player, "recovery", "ep3_heavy_xwing_recovery") &&
|
|
!space_quest.hasReceivedReward(player, "recovery", "ep3_heavy_xwing_recovery"));
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_rebel_outpost_action_grant_duty_destroy (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "ep3_kash_station_destroy_duty_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_grant_duty_escort (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "escort_duty", "ep3_kash_station_escort_duty_rebel");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_grant_escort_alpha (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "escort", "ep3_kash_station_rebel_escort_alpha");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_setPlayerToOvertStatus (obj_id player, obj_id npc)
|
|
{
|
|
space_transition.setPlayerOvert( player, ##"rebel" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_giveReward_rebel_hologram (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.giveReward( player, "escort", "ep3_kash_station_rebel_escort_alpha", 5000, "object/tangible/furniture/ep3_rewards/hologram_insignia_rebel_01.iff" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_grantMission_heavy_xwing_recovery (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "recovery", "ep3_heavy_xwing_recovery");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_rebel_outpost_action_giveReward_heavy_xwing (obj_id player, obj_id npc)
|
|
{
|
|
badge.grantBadge (player, "bdg_kash_rebel_heavy_xwing"); // Badge for 'can fly' Rebel Heavy X-wing chassis
|
|
space_quest.giveReward( player, "recovery", "ep3_heavy_xwing_recovery", 15000, "object/tangible/ship/crafted/chassis/advanced_xwing_reward_deed.iff" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_rebel_outpost_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What's up, %TU? You look busy...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's because I am on a mission.
|
|
if (response == "s_719")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_721");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Good-bye.
|
|
if (response == "s_835")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Roger, %TU! Out!
|
|
string_id message = new string_id (c_stringFile, "s_836");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_rebel_outpost_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Congratulations! Excellent work bringing down that traitor and saving our engineers! I would like to reward you with the prototype Heavy X-wing chassis. Would you like it now?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, please!
|
|
if (response == "s_1110")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_giveReward_heavy_xwing (player, npc);
|
|
|
|
//-- NPC: You deserve it! The Force be with you!
|
|
string_id message = new string_id (c_stringFile, "s_1111");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Perhaps your reputation isn't so well-deserved. The Alliance commands you to protect our transports!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let me try again.
|
|
if (response == "s_731")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grant_escort_alpha (player, npc);
|
|
|
|
//-- NPC: Better luck, this time!
|
|
string_id message = new string_id (c_stringFile, "s_733");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nice to finally meet you, %TU. We've been hearing a lot about your exploits. Seems you've single-handedly brought down a Ghrag mercenary plot to destroy this station. Excellent work! I have something else for you to do... if you're interested.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure, I'm interested.
|
|
if (response == "s_737")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grant_escort_alpha (player, npc);
|
|
|
|
//-- NPC: Good. We've been trying to get several transports out of this area for operations in classified regions of deep space. I need you to escort one of these transports and report back when you are done.
|
|
string_id message = new string_id (c_stringFile, "s_739");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What are they carrying?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get for this?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_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_741");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_749");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good. We've been trying to get several transports out of this area for operations in classified regions of deep space. I need you to escort one of these transports and report back when you are done.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What are they carrying?
|
|
if (response == "s_741")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Awards, personal effects, decorations, hand-written messages to the troops. Nothing too special. But the Ghrag have been pounding the transports since they know that most of our fighter screen is deployed to other areas.
|
|
string_id message = new string_id (c_stringFile, "s_743");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Roger that.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_745");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I get for this?
|
|
if (response == "s_749")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, considering how you've protected us from the Ghrag mercenaries - I think you deserve a special ornament that indicates your loyalty to the Alliance.
|
|
string_id message = new string_id (c_stringFile, "s_751");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you have in-mind?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_753");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Awards, personal effects, decorations, hand-written messages to the troops. Nothing too special. But the Ghrag have been pounding the transports since they know that most of our fighter screen is deployed to other areas.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Roger that.
|
|
if (response == "s_745")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good luck.
|
|
string_id message = new string_id (c_stringFile, "s_747");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, considering how you've protected us from the Ghrag mercenaries - I think you deserve a special ornament that indicates your loyalty to the Alliance.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you have in-mind?
|
|
if (response == "s_753")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A limited-edition holographic projection of the Alliance symbol. You could place it in your home if you wish. I'd recommend keeping it away from Imperial eyes, of course.
|
|
string_id message = new string_id (c_stringFile, "s_755");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_757");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A limited-edition holographic projection of the Alliance symbol. You could place it in your home if you wish. I'd recommend keeping it away from Imperial eyes, of course.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks!
|
|
if (response == "s_757")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No problem. Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_759");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well hello there, %TU! Is there anything we can do for you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like a mission.
|
|
if (response == "s_763")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: But of course, my friend! There are two different classes of ongoing duty missions that I can offer. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_765");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nevermind.
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_767");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_777");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_787");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_791")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Rebel Alliance affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Rebel Alliance Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_831");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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: I am looking for a challenge!
|
|
if (response == "s_793")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, you've come to the right place. I just got word from Alliance Command that one of our Corvette starships has been stolen! We need it back, of course... are you ready to help?
|
|
string_id message = new string_id (c_stringFile, "s_795");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's go!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_797");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_805");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_813");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks!
|
|
if (response == "s_817")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Roger that.
|
|
string_id message = new string_id (c_stringFile, "s_819");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: But of course, my friend! There are two different classes of ongoing duty missions that I can offer. Which would you like?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Destroy duty.
|
|
if (response == "s_767")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good choice. As you may know, the Ghrag mercenaries used to be our allies here in Kashyyyk space. Now, all of that has changed. The Ghrag have announced that they are going to sell us out to the Empire. We need you to hunt down their pilots and prevent them from interfering with our operations here.
|
|
string_id message = new string_id (c_stringFile, "s_769");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take it!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like something else.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_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_771");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_775");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Escort duty.
|
|
if (response == "s_777")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very good choice, my friend. Our operations in the Kashyyyk system are very sensitive - and the Ghrag mercenaries have become a real problem. It's hard enough to liberate our Wookiee allies with the Empire breathing down our necks all the time. Now we have Ghrag pilots threatening to disrupt our transport lines!
|
|
string_id message = new string_id (c_stringFile, "s_779");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take it.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like something else.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_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_781");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_785");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nevermind.
|
|
if (response == "s_787")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Roger that, %TU.
|
|
string_id message = new string_id (c_stringFile, "s_789");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_rebel_outpost_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good choice. As you may know, the Ghrag mercenaries used to be our allies here in Kashyyyk space. Now, all of that has changed. The Ghrag have announced that they are going to sell us out to the Empire. We need you to hunt down their pilots and prevent them from interfering with our operations here.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take it!
|
|
if (response == "s_771")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grant_duty_destroy (player, npc);
|
|
|
|
//-- NPC: Grant mission: Destroy Duty
|
|
string_id message = new string_id (c_stringFile, "s_773");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like something else.
|
|
if (response == "s_775")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: But of course, my friend! There are two different classes of ongoing duty missions that I can offer. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_765");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nevermind.
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_767");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_777");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_787");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Very good choice, my friend. Our operations in the Kashyyyk system are very sensitive - and the Ghrag mercenaries have become a real problem. It's hard enough to liberate our Wookiee allies with the Empire breathing down our necks all the time. Now we have Ghrag pilots threatening to disrupt our transport lines!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take it.
|
|
if (response == "s_781")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grant_duty_escort (player, npc);
|
|
|
|
//-- NPC: Grant mission: Escort duty.
|
|
string_id message = new string_id (c_stringFile, "s_783");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like something else.
|
|
if (response == "s_785")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: But of course, my friend! There are two different classes of ongoing duty missions that I can offer. Which would you like?
|
|
string_id message = new string_id (c_stringFile, "s_765");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroy duty.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Escort duty.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nevermind.
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_767");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_777");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_787");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, you've come to the right place. I just got word from Alliance Command that one of our Corvette starships has been stolen! We need it back, of course... are you ready to help?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's go!
|
|
if (response == "s_797")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grantMission_heavy_xwing_recovery (player, npc);
|
|
|
|
//-- NPC: Excellent! I will upload the mission package right now!
|
|
string_id message = new string_id (c_stringFile, "s_799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_801");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
if (response == "s_805")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Apparently, due to constant Imperial attacks, we have been unable to provide adequate payment to contractors working at a secret Rebel shipyard. One of the engineers has turned traitor...
|
|
string_id message = new string_id (c_stringFile, "s_807");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_809");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I get?
|
|
if (response == "s_813")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alliance High Command has authorized me to give you an experimental starship chassis. It is a heavy version of the X-wing fighter. It has much greater mass capacity than the standard one!
|
|
string_id message = new string_id (c_stringFile, "s_815");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's go!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_797");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_805");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_813");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent! I will upload the mission package right now!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you!
|
|
if (response == "s_801")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: For the Alliance!
|
|
string_id message = new string_id (c_stringFile, "s_803");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Apparently, due to constant Imperial attacks, we have been unable to provide adequate payment to contractors working at a secret Rebel shipyard. One of the engineers has turned traitor...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And?
|
|
if (response == "s_809")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This engineer is planning to sell the Corellian corvette to the Ghrag Mercenary Clan! Fortunately - the remaining engineers on-board the vessel are loyal to the Alliance and will re-take the bridge if you can disable the starship.
|
|
string_id message = new string_id (c_stringFile, "s_811");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's go!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_797");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_805");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_813");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This engineer is planning to sell the Corellian corvette to the Ghrag Mercenary Clan! Fortunately - the remaining engineers on-board the vessel are loyal to the Alliance and will re-take the bridge if you can disable the starship.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's go!
|
|
if (response == "s_797")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grantMission_heavy_xwing_recovery (player, npc);
|
|
|
|
//-- NPC: Excellent! I will upload the mission package right now!
|
|
string_id message = new string_id (c_stringFile, "s_799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_801");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
if (response == "s_805")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Apparently, due to constant Imperial attacks, we have been unable to provide adequate payment to contractors working at a secret Rebel shipyard. One of the engineers has turned traitor...
|
|
string_id message = new string_id (c_stringFile, "s_807");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_809");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I get?
|
|
if (response == "s_813")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alliance High Command has authorized me to give you an experimental starship chassis. It is a heavy version of the X-wing fighter. It has much greater mass capacity than the standard one!
|
|
string_id message = new string_id (c_stringFile, "s_815");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's go!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_797");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_805");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_813");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alliance High Command has authorized me to give you an experimental starship chassis. It is a heavy version of the X-wing fighter. It has much greater mass capacity than the standard one!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's go!
|
|
if (response == "s_797")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_grantMission_heavy_xwing_recovery (player, npc);
|
|
|
|
//-- NPC: Excellent! I will upload the mission package right now!
|
|
string_id message = new string_id (c_stringFile, "s_799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_801");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
if (response == "s_805")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Apparently, due to constant Imperial attacks, we have been unable to provide adequate payment to contractors working at a secret Rebel shipyard. One of the engineers has turned traitor...
|
|
string_id message = new string_id (c_stringFile, "s_807");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_809");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I get?
|
|
if (response == "s_813")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alliance High Command has authorized me to give you an experimental starship chassis. It is a heavy version of the X-wing fighter. It has much greater mass capacity than the standard one!
|
|
string_id message = new string_id (c_stringFile, "s_815");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's go!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Stolen? How did that happen?
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do I get?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_797");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_805");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_813");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Alliance thanks you, my friend. In payment, I would like to award you with the Alliance Symbol Hologram.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks!
|
|
if (response == "s_823")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_giveReward_rebel_hologram (player, npc);
|
|
|
|
//-- NPC: You deserve it!
|
|
string_id message = new string_id (c_stringFile, "s_825");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Rebel Alliance Space Station, %TU. Would you like to declare your affiliation with the Rebel Alliance?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes
|
|
if (response == "s_829")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Rebel Alliance affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Rebel Alliance Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_831");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_833")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station.
|
|
string_id message = new string_id (c_stringFile, "s_837");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_839")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are a Rebel Alliance Pilot by profession, you have not Declared your factional affiliation. Many Imperial ships [players] will hold fire in the event you are not really affiliated with the Rebel Alliance. You may declare your affiliation with the Alliance to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_841");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_843");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Although you are a Rebel Alliance Pilot by profession, you have not Declared your factional affiliation. Many Imperial ships [players] will hold fire in the event you are not really affiliated with the Rebel Alliance. You may declare your affiliation with the Alliance to make it clear that you are willing to respond to their attacks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How long does this last?
|
|
if (response == "s_843")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You will be a Declared Rebel until you land your ship. The next time you launch, if you want to be a Declared Rebel again, you must speak to a Rebel Alliance Station again.
|
|
string_id message = new string_id (c_stringFile, "s_845");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: All Imperial Pilots will be able to attack me?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_847");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_rebel_outpost_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You will be a Declared Rebel until you land your ship. The next time you launch, if you want to be a Declared Rebel again, you must speak to a Rebel Alliance Station again.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: All Imperial Pilots will be able to attack me?
|
|
if (response == "s_847")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not all of them, %TU. Just the ones that have Declared their affiliation with the Empire. 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_849");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_829");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_833");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_839");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 35);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_rebel_outpost_handleBranch40 (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 Empire. 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_829")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
station_rebel_outpost_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Rebel Alliance affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Rebel Alliance Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_831");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_833")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station.
|
|
string_id message = new string_id (c_stringFile, "s_837");
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_839")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are a Rebel Alliance Pilot by profession, you have not Declared your factional affiliation. Many Imperial ships [players] will hold fire in the event you are not really affiliated with the Rebel Alliance. You may declare your affiliation with the Alliance to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_841");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_843");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_rebel_outpost.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_reb_base.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_kash_reb_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);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.station_rebel_outpost");
|
|
|
|
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_rebel_outpost_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_713");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_isPlayerImperial (player, npc))
|
|
{
|
|
//-- NPC: You are not welcome at this station!
|
|
string_id message = new string_id (c_stringFile, "s_715");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_isRebelFactionWithMission (player, npc))
|
|
{
|
|
//-- NPC: What's up, %TU? You look busy...
|
|
string_id message = new string_id (c_stringFile, "s_717");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's because I am on a mission.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Good-bye.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_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_719");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_835");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 3);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", 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_rebel_outpost_condition_isPlayerNeutral (player, npc))
|
|
{
|
|
//-- NPC: Sign up with the Rebel Alliance and we'll talk.
|
|
string_id message = new string_id (c_stringFile, "s_725");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: You need to move closer to this station.
|
|
string_id message = new string_id (c_stringFile, "s_727");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_hasWon_heavy_xwing_recovery (player, npc))
|
|
{
|
|
//-- NPC: Congratulations! Excellent work bringing down that traitor and saving our engineers! I would like to reward you with the prototype Heavy X-wing chassis. Would you like it now?
|
|
string_id message = new string_id (c_stringFile, "s_850");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, please!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_1110");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_hasFailed_rebel_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: Perhaps your reputation isn't so well-deserved. The Alliance commands you to protect our transports!
|
|
string_id message = new string_id (c_stringFile, "s_729");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let me try again.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_731");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition_isReady_for_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: Nice to finally meet you, %TU. We've been hearing a lot about your exploits. Seems you've single-handedly brought down a Ghrag mercenary plot to destroy this station. Excellent work! I have something else for you to do... if you're interested.
|
|
string_id message = new string_id (c_stringFile, "s_735");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure, I'm interested.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_737");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 12);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", 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_rebel_outpost_condition_hasBeenRewarded_rebel_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: Well hello there, %TU! Is there anything we can do for you?
|
|
string_id message = new string_id (c_stringFile, "s_761");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like a mission.
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to declare my faction affiliation.
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking for a challenge!
|
|
boolean hasResponse2 = false;
|
|
if (!station_rebel_outpost_condition_hasBeenRewarded_heavy_xwing (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks!
|
|
boolean hasResponse3 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_763");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_791");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_793");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_817");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 19);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", 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_rebel_outpost_condition_hasWon_rebel_escort_alpha (player, npc))
|
|
{
|
|
//-- NPC: The Alliance thanks you, my friend. In payment, I would like to award you with the Alliance Symbol Hologram.
|
|
string_id message = new string_id (c_stringFile, "s_821");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks!
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_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_823");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 33);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the Rebel Alliance Space Station, %TU. Would you like to declare your affiliation with the Rebel Alliance?
|
|
string_id message = new string_id (c_stringFile, "s_827");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (station_rebel_outpost_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (station_rebel_outpost_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_829");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_833");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_839");
|
|
|
|
utils.setScriptVar (player, "conversation.station_rebel_outpost.branchId", 35);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_rebel_outpost", 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_rebel_outpost")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_rebel_outpost.branchId");
|
|
|
|
if (branchId == 3 && station_rebel_outpost_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && station_rebel_outpost_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_rebel_outpost_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && station_rebel_outpost_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && station_rebel_outpost_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && station_rebel_outpost_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && station_rebel_outpost_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && station_rebel_outpost_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && station_rebel_outpost_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && station_rebel_outpost_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && station_rebel_outpost_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && station_rebel_outpost_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && station_rebel_outpost_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && station_rebel_outpost_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && station_rebel_outpost_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && station_rebel_outpost_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && station_rebel_outpost_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && station_rebel_outpost_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && station_rebel_outpost_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_rebel_outpost_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && station_rebel_outpost_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && station_rebel_outpost_handleBranch40 (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_rebel_outpost.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|