mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
4826 lines
130 KiB
Plaintext
4826 lines
130 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_endor.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.factions;
|
|
include library.space_combat;
|
|
include library.space_content;
|
|
include library.space_crafting;
|
|
include library.space_flags;
|
|
include library.space_quest;
|
|
include library.space_transition;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/station_endor";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_endor_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAfford50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAfford25 (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged( player ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAfford75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAfford100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_needRepairs (obj_id player, obj_id npc)
|
|
{
|
|
|
|
float fltDamage = space_crafting.getDamageTotal(player, getPilotedShip(player));
|
|
if(fltDamage>0)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_isTooFar (obj_id player, obj_id npc)
|
|
{
|
|
space_combat.playCombatTauntSound( player );
|
|
obj_id containingShip = space_transition.getContainingShip(player);
|
|
return ( getDistance( npc, containingShip ) > space_transition.STATION_COMM_MAX_DISTANCE );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_hasCompletedHalfTier3 (obj_id player, obj_id npc)
|
|
{
|
|
int skillCount = 0;
|
|
if ( hasSkill( player, "pilot_imperial_navy_starships_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_imperial_navy_weapons_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_imperial_navy_procedures_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_imperial_navy_droid_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_neutral_starships_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_neutral_weapons_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_neutral_procedures_03"))
|
|
skillCount++;
|
|
if ( hasSkill( player, "pilot_neutral_droid_03"))
|
|
skillCount++;
|
|
|
|
return (skillCount > 1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_readyForStoryOne (obj_id player, obj_id npc)
|
|
{
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_TATOOINE ) )
|
|
return false;
|
|
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_CORELLIA ) )
|
|
return false;
|
|
|
|
if ( space_quest.hasQuest(player) )
|
|
return false;
|
|
|
|
return ( station_endor_condition_hasCompletedHalfTier3(player,npc) && !station_endor_condition_hasCompletedFirstSeries(player,npc) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_hasCompletedFirstSeries (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasCompletedQuest( player, "rescue", "stn_endor_irs_imp_tier3_1a") )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_readyForStoryTwo (obj_id player, obj_id npc)
|
|
{
|
|
if ( station_endor_condition_readyForStoryOne( player, npc ) )
|
|
return false;//can't be ready for story two if you're ready for story one!
|
|
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_TATOOINE ) )
|
|
return false;
|
|
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_CORELLIA ) )
|
|
return false;
|
|
|
|
if ( space_quest.hasQuest(player) )
|
|
return false;
|
|
|
|
return ( station_endor_condition_hasCompletedHalfTier3(player,npc) && !station_endor_condition_hasCompletedSecondSeries(player,npc) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_hasCompletedSecondSeries (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasCompletedQuest( player, "escort", "stn_endor_irs_imp_tier3_2a") )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_readyForStoryThree (obj_id player, obj_id npc)
|
|
{
|
|
if ( station_endor_condition_readyForStoryOne( player, npc ) )
|
|
return false;//can't be ready for story two if you're ready for story one!
|
|
|
|
if ( station_endor_condition_readyForStoryTwo( player, npc ) )
|
|
return false;//can't be ready for story three if you're ready for story two!
|
|
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_TATOOINE ) )
|
|
return false;
|
|
|
|
if (space_flags.isSpaceTrack( player, space_flags.PRIVATEER_CORELLIA ) )
|
|
return false;
|
|
|
|
if ( space_quest.hasQuest(player) )
|
|
return false;
|
|
|
|
return ( station_endor_condition_hasCompletedHalfTier3(player,npc) && !station_endor_condition_hasCompletedThirdSeries(player,npc) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_hasCompletedThirdSeries (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasCompletedQuest( player, "patrol", "stn_endor_irs_imp_tier3_3a") )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_isReadyForDutyMissions (obj_id player, obj_id npc)
|
|
{
|
|
if (space_quest.hasQuest(player))
|
|
return false;
|
|
|
|
return ( station_endor_condition_hasCompletedThirdSeries(player,npc) && space_flags.hasCompletedTierThree(player) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canTakeQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasQuest(player))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAttackImperial (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canAttackRebel (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_endor_condition_canHandleTier4 (obj_id player, obj_id npc)
|
|
{
|
|
return space_flags.hasCompletedTierThree(player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_endor_action_landStation3 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Espa Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_fix25 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .25f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_fix50 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_fix75 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_fix100 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_landStation1 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Research Outpost");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_landStation2 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Smuggler Outpost");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantMissionOne (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "rescue", "stn_endor_irs_imp_tier3_1a");
|
|
space_quest.grantQuest( player, "destroy_surpriseattack", "stn_endor_irs_imp_tier3_1a_sa");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantMissionTwo (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "escort", "stn_endor_irs_imp_tier3_2a");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantMissionThree (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "patrol", "stn_endor_irs_imp_tier3_3a");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantDestroyDutyMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "destroy_duty", "stn_endor_irs_imp_tier4_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantEscortDutyMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "escort_duty", "stn_endor_irs_imp_tier4_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantImperialDuty4 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_imperial_tier4");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantImperialDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "kessel_imperial_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantRebelDuty4 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_rebel_tier4");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantRebelDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "kessel_rebel_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantBlackSunDuty4 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_blacksun_tier4");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantBlackSunDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_blacksun_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantImperialDuty5_2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_imperial_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_endor_action_grantRebelDuty5_2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "endor_rebel_tier5");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string station_endor_tokenTO_tokenTO0001 (obj_id player, obj_id npc)
|
|
{
|
|
return new string();
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int station_endor_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .25f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .50f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, 1.0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_endor_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greetings! Have you come to visit the Endor Research Center?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
if (response == "s_25759913")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I... see... I wasn't aware of another outpost on Endor, but...
|
|
string_id message = new string_id (c_stringFile, "s_9eae7799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll find a place.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_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_4a43e175");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
if (response == "s_2610c442")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'll notify the Research Outpost that you are on your way.
|
|
string_id message = new string_id (c_stringFile, "s_35417d09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_fc27931b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_31e68e8b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need repairs.
|
|
if (response == "s_5f4952b7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not a problem! It may surprise you to learn that our little research station is well-supplied by the Empire! How much damage do you need repaired?
|
|
string_id message = new string_id (c_stringFile, "s_2a121119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Only a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just repair half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8ae30058");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c98e000");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Need any help?
|
|
if (response == "s_c3d359f2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
//-- NPC: I'm glad you asked, %NU! An Imperial transport coming out of the Rori Weapons Research Center has had a run in with Rebel forces and are listing. If you can travel out to the Naboo system and get them under way it would be great.
|
|
string_id message = new string_id (c_stringFile, "s_24dd12a9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_90fc8440");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 24);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any work for me?
|
|
if (response == "s_4360fc64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I sure do, %NU! A friend of mine, Jenson Marsh, has been doing some freelance work for the Empire since his retirement. It would be a great help if you could check-up on him for me. Just give him an escort so that no pirates or Rebels attack him, ok?
|
|
string_id message = new string_id (c_stringFile, "s_7272cd2a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll make sure he's safe.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm a little busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_203953bd");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a115d9be");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 27);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any special assignments?
|
|
if (response == "s_8353c277")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I certainly do, %NU! I've been picking-up a lot of unauthorized activity in this system lately. I'm sure it's nothing, but would you mind terribly checking things out for me?
|
|
string_id message = new string_id (c_stringFile, "s_809da719");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly!
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_143e876a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f9e3b7b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 30);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready for work!
|
|
if (response == "s_cfc852d9")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's great, %NU! I have a couple of assignments for you to choose from. You know there are always freighters coming through that could use an escort, or you could help us kick the Pirates out of this system.
|
|
string_id message = new string_id (c_stringFile, "s_78f29efc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll escort those freighters.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I love killing Pirate scum!
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_d9c39726");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fb6681b8");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_canHandleTier4 (player, npc))
|
|
{
|
|
//-- NPC: Here's a list of open contracts.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols in Kessel
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols in Kessel
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Black Suns patrols
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Black Suns patrols
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse8 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_113");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_114");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the mercenary contracts available require more experience than you currently have.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I... see... I wasn't aware of another outpost on Endor, but...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll find a place.
|
|
if (response == "s_4a43e175")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you say so. You're cleared to land... wherever it is you're going to land.
|
|
string_id message = new string_id (c_stringFile, "s_9e0cc5c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land at the Smuggler's Outpost)
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: (Land at the Research Outpost)
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_c6f610d3");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_695e2019");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: If you say so. You're cleared to land... wherever it is you're going to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land at the Smuggler's Outpost)
|
|
if (response == "s_c6f610d3")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Be careful. The Forest Moon of Endor is not very civilized!
|
|
string_id message = new string_id (c_stringFile, "s_592038e");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land at the Research Outpost)
|
|
if (response == "s_695e2019")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Be careful. Endor is uncivilized.
|
|
string_id message = new string_id (c_stringFile, "s_75d638d8");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'll notify the Research Outpost that you are on your way.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks.
|
|
if (response == "s_fc27931b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Good Luck!
|
|
string_id message = new string_id (c_stringFile, "s_ab6892a7");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, never mind.
|
|
if (response == "s_31e68e8b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, ok. Well if you need anything, just comm me. I'm here to serve!
|
|
string_id message = new string_id (c_stringFile, "s_478bdae6");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Not a problem! It may surprise you to learn that our little research station is well-supplied by the Empire! How much damage do you need repaired?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Only a little.
|
|
if (response == "s_8ae30058")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not a problem. There will be a fee of %DI credits, however. Is that acceptable?
|
|
string_id message = new string_id (c_stringFile, "s_c0d7347d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_d70dba34");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4c695dbd");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 11);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just repair half of it.
|
|
if (response == "s_c98e000")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Will do! Repairing half of the damage on your ship will cost %DI credits. Ok?
|
|
string_id message = new string_id (c_stringFile, "s_edc85a49");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_895d093");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_31");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 14);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Most of it.
|
|
if (response == "s_14897567")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We could repair three-fourths of your ship's damage for %DI credits. Ok?
|
|
string_id message = new string_id (c_stringFile, "s_460bcfda");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It's a deal.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_ebe2e111");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 17);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: All of it.
|
|
if (response == "s_70876928")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can completely repair your ship for %DI credits. Is that acceptable?
|
|
string_id message = new string_id (c_stringFile, "s_b68693bb");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_43");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 20);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_endor_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, bye!
|
|
string_id message = new string_id (c_stringFile, "s_e8eb7684");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Not a problem. There will be a fee of %DI credits, however. Is that acceptable?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
station_endor_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete. That should get you underway, at least.
|
|
string_id message = new string_id (c_stringFile, "s_a22bada4");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh. Well... Ok... Comm me if you need anything.
|
|
string_id message = new string_id (c_stringFile, "s_9445899b");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Will do! Repairing half of the damage on your ship will cost %DI credits. Ok?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_895d093")
|
|
{
|
|
station_endor_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete! Thank you for visiting the Forest Moon of Endor Research Station!
|
|
string_id message = new string_id (c_stringFile, "s_549ada4b");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_31")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, let me know if there is anything else I can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_685bb895");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We could repair three-fourths of your ship's damage for %DI credits. Ok?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It's a deal.
|
|
if (response == "s_ebe2e111")
|
|
{
|
|
station_endor_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There you are! Come back any time!
|
|
string_id message = new string_id (c_stringFile, "s_c6b82293");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, come back any time.
|
|
string_id message = new string_id (c_stringFile, "s_eb2adf47");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can completely repair your ship for %DI credits. Is that acceptable?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_43")
|
|
{
|
|
station_endor_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your ship has been completely fixed. Thank you for coming.
|
|
string_id message = new string_id (c_stringFile, "s_7bc8f950");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I guess that is pretty expensive. Maybe you can get some cheaper repairs somewhere else.
|
|
string_id message = new string_id (c_stringFile, "s_3b68a624");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm glad you asked, %NU! An Imperial transport coming out of the Rori Weapons Research Center has had a run in with Rebel forces and are listing. If you can travel out to the Naboo system and get them under way it would be great.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_90fc8440")
|
|
{
|
|
station_endor_action_grantMissionOne (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you very much, %NU! I really appreciate this!
|
|
string_id message = new string_id (c_stringFile, "s_b40dc05e");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, ok, %NU. I guess if you're too busy. Do you just want to visit the Endor Research Center?
|
|
string_id message = new string_id (c_stringFile, "s_cc059cc2");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need repairs.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Need any help?
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any work for me?
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_readyForStoryTwo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any special assignments?
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_readyForStoryThree (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm ready for work!
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition_isReadyForDutyMissions (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition_canTakeQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25759913");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2610c442");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5f4952b7");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c3d359f2");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4360fc64");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8353c277");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_cfc852d9");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 2);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, ok, %NU. I guess if you're too busy. Do you just want to visit the Endor Research Center?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
if (response == "s_25759913")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I... see... I wasn't aware of another outpost on Endor, but...
|
|
string_id message = new string_id (c_stringFile, "s_9eae7799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll find a place.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_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_4a43e175");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
if (response == "s_2610c442")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'll notify the Research Outpost that you are on your way.
|
|
string_id message = new string_id (c_stringFile, "s_35417d09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_fc27931b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_31e68e8b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need repairs.
|
|
if (response == "s_5f4952b7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not a problem! It may surprise you to learn that our little research station is well-supplied by the Empire! How much damage do you need repaired?
|
|
string_id message = new string_id (c_stringFile, "s_2a121119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Only a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just repair half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8ae30058");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c98e000");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Need any help?
|
|
if (response == "s_c3d359f2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
//-- NPC: I'm glad you asked, %NU! An Imperial transport coming out of the Rori Weapons Research Center has had a run in with Rebel forces and are listing. If you can travel out to the Naboo system and get them under way it would be great.
|
|
string_id message = new string_id (c_stringFile, "s_24dd12a9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_90fc8440");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 24);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any work for me?
|
|
if (response == "s_4360fc64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I sure do, %NU! A friend of mine, Jenson Marsh, has been doing some freelance work for the Empire since his retirement. It would be a great help if you could check-up on him for me. Just give him an escort so that no pirates or Rebels attack him, ok?
|
|
string_id message = new string_id (c_stringFile, "s_7272cd2a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll make sure he's safe.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm a little busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_203953bd");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a115d9be");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 27);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any special assignments?
|
|
if (response == "s_8353c277")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I certainly do, %NU! I've been picking-up a lot of unauthorized activity in this system lately. I'm sure it's nothing, but would you mind terribly checking things out for me?
|
|
string_id message = new string_id (c_stringFile, "s_809da719");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly!
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_143e876a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f9e3b7b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 30);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready for work!
|
|
if (response == "s_cfc852d9")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's great, %NU! I have a couple of assignments for you to choose from. You know there are always freighters coming through that could use an escort, or you could help us kick the Pirates out of this system.
|
|
string_id message = new string_id (c_stringFile, "s_78f29efc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll escort those freighters.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I love killing Pirate scum!
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_d9c39726");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fb6681b8");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_canHandleTier4 (player, npc))
|
|
{
|
|
//-- NPC: Here's a list of open contracts.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols in Kessel
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols in Kessel
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Black Suns patrols
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Black Suns patrols
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse8 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_113");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_114");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the mercenary contracts available require more experience than you currently have.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I sure do, %NU! A friend of mine, Jenson Marsh, has been doing some freelance work for the Empire since his retirement. It would be a great help if you could check-up on him for me. Just give him an escort so that no pirates or Rebels attack him, ok?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, I'll make sure he's safe.
|
|
if (response == "s_203953bd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantMissionTwo (player, npc);
|
|
|
|
//-- NPC: I can't thank you enough, %NU! I'll comm him to let him know you are on the way!
|
|
string_id message = new string_id (c_stringFile, "s_c0da04f9");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm a little busy right now.
|
|
if (response == "s_a115d9be")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's OK, %NU. I'm sure he'll be ok on his own. I worry for no reason sometimes. So do you want to visit the Endor Research Center?
|
|
string_id message = new string_id (c_stringFile, "s_a19e12a1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need repairs.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Need any help?
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any work for me?
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_readyForStoryTwo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any special assignments?
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_readyForStoryThree (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm ready for work!
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition_isReadyForDutyMissions (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition_canTakeQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25759913");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2610c442");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5f4952b7");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c3d359f2");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4360fc64");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8353c277");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_cfc852d9");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 2);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's OK, %NU. I'm sure he'll be ok on his own. I worry for no reason sometimes. So do you want to visit the Endor Research Center?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
if (response == "s_25759913")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I... see... I wasn't aware of another outpost on Endor, but...
|
|
string_id message = new string_id (c_stringFile, "s_9eae7799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll find a place.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_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_4a43e175");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
if (response == "s_2610c442")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'll notify the Research Outpost that you are on your way.
|
|
string_id message = new string_id (c_stringFile, "s_35417d09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_fc27931b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_31e68e8b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need repairs.
|
|
if (response == "s_5f4952b7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not a problem! It may surprise you to learn that our little research station is well-supplied by the Empire! How much damage do you need repaired?
|
|
string_id message = new string_id (c_stringFile, "s_2a121119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Only a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just repair half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8ae30058");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c98e000");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Need any help?
|
|
if (response == "s_c3d359f2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
//-- NPC: I'm glad you asked, %NU! An Imperial transport coming out of the Rori Weapons Research Center has had a run in with Rebel forces and are listing. If you can travel out to the Naboo system and get them under way it would be great.
|
|
string_id message = new string_id (c_stringFile, "s_24dd12a9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_90fc8440");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 24);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any work for me?
|
|
if (response == "s_4360fc64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I sure do, %NU! A friend of mine, Jenson Marsh, has been doing some freelance work for the Empire since his retirement. It would be a great help if you could check-up on him for me. Just give him an escort so that no pirates or Rebels attack him, ok?
|
|
string_id message = new string_id (c_stringFile, "s_7272cd2a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll make sure he's safe.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm a little busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_203953bd");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a115d9be");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 27);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any special assignments?
|
|
if (response == "s_8353c277")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I certainly do, %NU! I've been picking-up a lot of unauthorized activity in this system lately. I'm sure it's nothing, but would you mind terribly checking things out for me?
|
|
string_id message = new string_id (c_stringFile, "s_809da719");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly!
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_143e876a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f9e3b7b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 30);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready for work!
|
|
if (response == "s_cfc852d9")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's great, %NU! I have a couple of assignments for you to choose from. You know there are always freighters coming through that could use an escort, or you could help us kick the Pirates out of this system.
|
|
string_id message = new string_id (c_stringFile, "s_78f29efc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll escort those freighters.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I love killing Pirate scum!
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_d9c39726");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fb6681b8");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_canHandleTier4 (player, npc))
|
|
{
|
|
//-- NPC: Here's a list of open contracts.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols in Kessel
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols in Kessel
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Black Suns patrols
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Black Suns patrols
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse8 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_113");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_114");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the mercenary contracts available require more experience than you currently have.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I certainly do, %NU! I've been picking-up a lot of unauthorized activity in this system lately. I'm sure it's nothing, but would you mind terribly checking things out for me?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Certainly!
|
|
if (response == "s_143e876a")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantMissionThree (player, npc);
|
|
|
|
//-- NPC: That's great, %NU! You are always so helpful! I'll give you the coordinates to check-out for me. Thank you very much for doing this for me!
|
|
string_id message = new string_id (c_stringFile, "s_2d9d1ee4");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later.
|
|
if (response == "s_2f9e3b7b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, %NU. Do you want to visit the Endor Research Center?
|
|
string_id message = new string_id (c_stringFile, "s_a9d26781");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need repairs.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Need any help?
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any work for me?
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_readyForStoryTwo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any special assignments?
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_readyForStoryThree (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm ready for work!
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition_isReadyForDutyMissions (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition_canTakeQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25759913");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2610c442");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5f4952b7");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c3d359f2");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4360fc64");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8353c277");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_cfc852d9");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 2);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, %NU. Do you want to visit the Endor Research Center?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
if (response == "s_25759913")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I... see... I wasn't aware of another outpost on Endor, but...
|
|
string_id message = new string_id (c_stringFile, "s_9eae7799");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll find a place.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_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_4a43e175");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
if (response == "s_2610c442")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'll notify the Research Outpost that you are on your way.
|
|
string_id message = new string_id (c_stringFile, "s_35417d09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_fc27931b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_31e68e8b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need repairs.
|
|
if (response == "s_5f4952b7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not a problem! It may surprise you to learn that our little research station is well-supplied by the Empire! How much damage do you need repaired?
|
|
string_id message = new string_id (c_stringFile, "s_2a121119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Only a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just repair half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8ae30058");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c98e000");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Need any help?
|
|
if (response == "s_c3d359f2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
//-- NPC: I'm glad you asked, %NU! An Imperial transport coming out of the Rori Weapons Research Center has had a run in with Rebel forces and are listing. If you can travel out to the Naboo system and get them under way it would be great.
|
|
string_id message = new string_id (c_stringFile, "s_24dd12a9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_90fc8440");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 24);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any work for me?
|
|
if (response == "s_4360fc64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I sure do, %NU! A friend of mine, Jenson Marsh, has been doing some freelance work for the Empire since his retirement. It would be a great help if you could check-up on him for me. Just give him an escort so that no pirates or Rebels attack him, ok?
|
|
string_id message = new string_id (c_stringFile, "s_7272cd2a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll make sure he's safe.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm a little busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_203953bd");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a115d9be");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 27);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any special assignments?
|
|
if (response == "s_8353c277")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I certainly do, %NU! I've been picking-up a lot of unauthorized activity in this system lately. I'm sure it's nothing, but would you mind terribly checking things out for me?
|
|
string_id message = new string_id (c_stringFile, "s_809da719");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly!
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_143e876a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f9e3b7b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 30);
|
|
|
|
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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready for work!
|
|
if (response == "s_cfc852d9")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's great, %NU! I have a couple of assignments for you to choose from. You know there are always freighters coming through that could use an escort, or you could help us kick the Pirates out of this system.
|
|
string_id message = new string_id (c_stringFile, "s_78f29efc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll escort those freighters.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I love killing Pirate scum!
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_d9c39726");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fb6681b8");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition_canHandleTier4 (player, npc))
|
|
{
|
|
//-- NPC: Here's a list of open contracts.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols in Kessel
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols in Kessel
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 4 Black Suns patrols
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Black Suns patrols
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse8 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_113");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_114");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the mercenary contracts available require more experience than you currently have.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's great, %NU! I have a couple of assignments for you to choose from. You know there are always freighters coming through that could use an escort, or you could help us kick the Pirates out of this system.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll escort those freighters.
|
|
if (response == "s_d9c39726")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantEscortDutyMission (player, npc);
|
|
|
|
//-- NPC: Would you? Oh that's fantastic! Thanks so much for your help, %NU!
|
|
string_id message = new string_id (c_stringFile, "s_1572cf8");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I love killing Pirate scum!
|
|
if (response == "s_fb6681b8")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantDestroyDutyMission (player, npc);
|
|
|
|
//-- NPC: Ha ha! I know that you do, %NU! But this is serious business. You be careful! I'd hate for anything bad to happen to you.
|
|
string_id message = new string_id (c_stringFile, "s_1110e057");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll be careful.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You worry too much.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_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_96ff1c97");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26dfa294");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.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_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ha ha! I know that you do, %NU! But this is serious business. You be careful! I'd hate for anything bad to happen to you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll be careful.
|
|
if (response == "s_96ff1c97")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You'd better be!
|
|
string_id message = new string_id (c_stringFile, "s_a168a94b");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You worry too much.
|
|
if (response == "s_26dfa294")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, I know, %NU. I just can't help it.
|
|
string_id message = new string_id (c_stringFile, "s_2944ab48");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_endor_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Here's a list of open contracts.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 4 Imperial patrols
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantRebelDuty4 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
if (response == "s_113")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantRebelDuty5_2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_115");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols in Kessel
|
|
if (response == "s_87")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantRebelDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 4 Rebel patrols
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantImperialDuty4 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
if (response == "s_114")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantImperialDuty5_2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_116");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols in Kessel
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantImperialDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 4 Black Suns patrols
|
|
if (response == "s_100")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantBlackSunDuty4 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Black Suns patrols
|
|
if (response == "s_104")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
station_endor_action_grantBlackSunDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Safe travels.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
utils.removeScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_endor.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_endor.iff" );
|
|
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_endor");
|
|
|
|
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_endor_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: Greetings! If you require emergency repairs or clearing to land at our research station, you'll need to fly closer to the station. I'll be happy to help you then!
|
|
string_id message = new string_id (c_stringFile, "s_e1c14e1d");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Greetings! Have you come to visit the Endor Research Center?
|
|
string_id message = new string_id (c_stringFile, "s_de3168cf");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, but I do want to land on Endor.
|
|
boolean hasResponse0 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes! I want to land at the Research Outpost.
|
|
boolean hasResponse1 = false;
|
|
if (station_endor_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need repairs.
|
|
boolean hasResponse2 = false;
|
|
if (station_endor_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Need any help?
|
|
boolean hasResponse3 = false;
|
|
if (station_endor_condition_readyForStoryOne (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any work for me?
|
|
boolean hasResponse4 = false;
|
|
if (station_endor_condition_readyForStoryTwo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any special assignments?
|
|
boolean hasResponse5 = false;
|
|
if (station_endor_condition_readyForStoryThree (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm ready for work!
|
|
boolean hasResponse6 = false;
|
|
if (station_endor_condition_isReadyForDutyMissions (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse7 = false;
|
|
if (station_endor_condition_canTakeQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25759913");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2610c442");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5f4952b7");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c3d359f2");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4360fc64");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8353c277");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_cfc852d9");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.station_endor.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "station_endor", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "station_endor")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_endor.branchId");
|
|
|
|
if (branchId == 2 && station_endor_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && station_endor_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && station_endor_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && station_endor_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_endor_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && station_endor_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && station_endor_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && station_endor_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && station_endor_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && station_endor_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && station_endor_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && station_endor_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && station_endor_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && station_endor_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && station_endor_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && station_endor_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && station_endor_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_endor_handleBranch38 (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_endor.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|