mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
2863 lines
78 KiB
Plaintext
2863 lines
78 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_lok.script
|
|
//
|
|
//
|
|
//
|
|
// 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_skill;
|
|
include library.space_transition;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/station_lok";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_lok_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAfford50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAfford25 (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged( player ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAfford75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAfford100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_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_lok_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_lok_condition_canDoWorkForNym (obj_id player, obj_id npc)
|
|
{
|
|
if (space_quest.hasQuest(player))
|
|
return false;//you're busy
|
|
|
|
if ( space_flags.isImperialPilot(player))
|
|
return false;//imperials cannot do these missions
|
|
|
|
if ( space_flags.isSpaceTrack( player, space_flags.PRIVATEER_NABOO ) )
|
|
return false;//these are allied with Imperials
|
|
|
|
if (!space_flags.hasCompletedTierOne( player ))
|
|
return false;//you're too young
|
|
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_isReadyForMissionOne (obj_id player, obj_id npc)
|
|
{
|
|
if (!station_lok_condition_canDoWorkForNym(player,npc))
|
|
return false;
|
|
|
|
if ( station_lok_condition_hasCompletedMissionOne(player,npc))
|
|
return false;//You've already done it.
|
|
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_hasCompletedMissionOne (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasCompletedQuest(player,"recovery","stn_lok_nym_reb_tier2_1a") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_hasCompletedMissionTwo (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasCompletedQuest(player,"escort","stn_lok_nym_reb_tier2_2a") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_isReadyForMissionTwo (obj_id player, obj_id npc)
|
|
{
|
|
if (!station_lok_condition_canDoWorkForNym(player,npc))
|
|
return false;
|
|
|
|
if (!station_lok_condition_hasCompletedMissionOne(player,npc))
|
|
return false;//You haven't done mission one yet
|
|
|
|
if (station_lok_condition_hasCompletedMissionTwo(player,npc))
|
|
return false;//You have already done this
|
|
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_isReadyForMissionThree (obj_id player, obj_id npc)
|
|
{
|
|
if (!station_lok_condition_canDoWorkForNym(player,npc))
|
|
return false;
|
|
|
|
if (!station_lok_condition_hasCompletedMissionOne(player,npc))
|
|
return false;//You haven't done mission one yet
|
|
|
|
if (!station_lok_condition_hasCompletedMissionTwo(player,npc))
|
|
return false;//You haven't done mission one yet
|
|
|
|
if (station_lok_condition_hasCompletedMissionThree(player,npc))
|
|
return false;//You have already done this
|
|
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_hasCompletedMissionThree (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasCompletedQuest(player,"assassinate","stn_lok_nym_reb_tier2_3a") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canLandAtHouse (obj_id player, obj_id npc)
|
|
{
|
|
if (hasObjVar (player, "homingBeacon.planet"))
|
|
{
|
|
string homePlanet = getStringObjVar (player, "homingBeacon.planet");
|
|
|
|
return (homePlanet.endsWith ("lok"));
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canTakeQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasQuest(player))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canHandleTier3 (obj_id player, obj_id npc)
|
|
{
|
|
return space_flags.hasCompletedTierTwo(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAttackImperial (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canAttackRebel (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canTakeRebel5Duty (obj_id player, obj_id npc)
|
|
{
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_lok_condition_canTakeImperial5Duty (obj_id player, obj_id npc)
|
|
{
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_lok_action_landStation3 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Espa Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_fix25 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .25f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_fix50 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_fix75 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_fix100 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_landStation1 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Nym's Stronghold");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_landStation2 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Eisley Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantDestroyDutyMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "destroy_duty", "stn_lok_nym_reb_tier2_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantEscortDutyMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "escort_duty", "stn_lok_nym_reb_tier2_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantMissionOne (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "recovery","stn_lok_nym_reb_tier2_1a");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantMissionTwo (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "escort","stn_lok_nym_reb_tier2_2a" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantMissionThree (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "assassinate","stn_lok_nym_reb_tier2_3a" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_landHoming (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayerHoming(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantImperialDuty3 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_imperial_tier3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantRebelDuty3 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_rebel_tier3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantHiddenDaggerDuty3 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_hidden_dagger_tier3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantDroidDuty3 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_rogue_droid_tier3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantImperialDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_imperial_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_lok_action_grantRebelDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "lok_rebel_tier5");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string station_lok_tokenTO_tokenTO0001 (obj_id player, obj_id npc)
|
|
{
|
|
return new string();
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int station_lok_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .25f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .50f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, 1.0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_lok_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greets to you! And welcome to the Lok Station. What are you needing today?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to land.
|
|
if (response == "s_305434ff")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, there's only one starport on Lok that can handle that ship of yours... So will it be Nym's Stronghold for you then?
|
|
string_id message = new string_id (c_stringFile, "s_35f718b7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What about my homing beacon?
|
|
boolean hasResponse2 = false;
|
|
if (station_lok_condition_canLandAtHouse (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d70dba34");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4c695dbd");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_95");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need repairs.
|
|
if (response == "s_6c8ffad8")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I can see that! I mean, I wasn't going to say anything, but since you mentioned it... Anyway, we've got all the necessary equipment to fix you right up! Want a complete repair job?
|
|
string_id message = new string_id (c_stringFile, "s_3538339");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, just fix a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just fix half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_lok_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_lok_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_lok_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_bf151ca2");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c80840ca");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2d1962b");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_445607d0");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm looking for work.
|
|
if (response == "s_1b3d0b9e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition_isReadyForMissionOne (player, npc))
|
|
{
|
|
//-- NPC: I've got something for you. So... we had acquired some Imperial 'guests' in the compound and needed to get them to a safe place.
|
|
string_id message = new string_id (c_stringFile, "s_6cc25feb");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You say, 'had'. I take it something came up.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm too busy.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_77685adb");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_20fce91c");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition_isReadyForMissionTwo (player, npc))
|
|
{
|
|
//-- NPC: Something new has come up.
|
|
string_id message = new string_id (c_stringFile, "s_bb83a046");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm interested in some work, start talking.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_474141fe");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition_isReadyForMissionThree (player, npc))
|
|
{
|
|
//-- NPC: I have a job for you, if you are interested.
|
|
string_id message = new string_id (c_stringFile, "s_40a7b30f");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am interested in your credits. So what little thing is keeping the two of us apart?
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_b1729740");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_93");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hey, you know we've always got something special for you to do, %NU! Those Storm Squadron thugs are always hassling us around here. If you're not in the mood for that sort of rumble, maybe you could get our gunships through to upgrade their reactors.
|
|
string_id message = new string_id (c_stringFile, "s_63942640");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take on Storm Squadron.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll get our gunships through.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_ad7b177d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e5ce7fcb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 44);
|
|
|
|
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_lok.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 contracts available?
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition_canHandleTier3 (player, npc))
|
|
{
|
|
//-- NPC: Here's a list of contracts offered for the Lok system.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 3 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_condition_canTakeRebel5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 3 Rebel patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_lok_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_lok_condition_canTakeImperial5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 3 Rogue Droids
|
|
boolean hasResponse4 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 3 Hidden Dagger Pirates
|
|
boolean hasResponse5 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse6 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_133");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_115");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_120");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_124");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_128");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 47);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are not yet experienced enough to handle any of the contracts available here.
|
|
string_id message = new string_id (c_stringFile, "s_132");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, there's only one starport on Lok that can handle that ship of yours... So will it be Nym's Stronghold for you then?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
station_lok_action_landStation1 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: I would alert the authorities of your arrival... if there were any!
|
|
string_id message = new string_id (c_stringFile, "s_94d99aa4");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It seems there's nothing I can do for you then. Off you go!
|
|
string_id message = new string_id (c_stringFile, "s_96576ff4");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What about my homing beacon?
|
|
if (response == "s_95")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh you're right. Welcome back home %TU.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Actually, I have to do something first.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_97");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 6);
|
|
|
|
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_lok.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_lok_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh you're right. Welcome back home %TU.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_97")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_landHoming (player, npc);
|
|
|
|
//-- NPC: Have a good one.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Actually, I have to do something first.
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alrighty, you come back when you're good to go then.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I can see that! I mean, I wasn't going to say anything, but since you mentioned it... Anyway, we've got all the necessary equipment to fix you right up! Want a complete repair job?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, just fix a little.
|
|
if (response == "s_bf151ca2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right! Money's a bit tight, isn't it? How about we get you running for %DI credits?
|
|
string_id message = new string_id (c_stringFile, "s_d38dd40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It's a deal.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_d6695e83");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 10);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just fix half of it.
|
|
if (response == "s_c80840ca")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Easy to say, easy to do! And a bargain at %DI credits, don't you agree?
|
|
string_id message = new string_id (c_stringFile, "s_360058b6");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_27");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_30");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 13);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair most of it.
|
|
if (response == "s_2d1962b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: How does this sound? We'll take care of three-fourths of the damage, and you take care of us to the tune of... say... %DI credits. Sounds good?
|
|
string_id message = new string_id (c_stringFile, "s_d47aa2c4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_35");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_39");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 16);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair all of it.
|
|
if (response == "s_445607d0")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ha ha! That's the spirit! No sense limping around in a damaged heap, right! This will only cost you %DI credits, and a better price you'll never find!
|
|
string_id message = new string_id (c_stringFile, "s_3e88ac8b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Do it.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_fef28268");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_47");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 19);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_lok_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah, you're not so badly damaged after all, I s'pose. If you're on your way, then I'll be getting back to work.
|
|
string_id message = new string_id (c_stringFile, "s_f33a826f");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Right! Money's a bit tight, isn't it? How about we get you running for %DI credits?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It's a deal.
|
|
if (response == "s_ebe2e111")
|
|
{
|
|
station_lok_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: And here's your repairs! That ought to allow you to limp back home, anyway.
|
|
string_id message = new string_id (c_stringFile, "s_60460c5");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_d6695e83")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok. I guess I'd better get back to work.
|
|
string_id message = new string_id (c_stringFile, "s_bc1b6f03");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Easy to say, easy to do! And a bargain at %DI credits, don't you agree?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_27")
|
|
{
|
|
station_lok_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete! How's that for quick work? Stop by again if you need anything else!
|
|
string_id message = new string_id (c_stringFile, "s_a6054d56");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, what do you know about the cost of repairing a ship as damaged as yours, anyway? Ask around and you'll see that was a fair price. Then you'll be back, won't you?
|
|
string_id message = new string_id (c_stringFile, "s_8a98e9e7");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: How does this sound? We'll take care of three-fourths of the damage, and you take care of us to the tune of... say... %DI credits. Sounds good?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_35")
|
|
{
|
|
station_lok_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete! How's that for quick work? Stop by again if you need anything else!
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_39")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, what do you know about the cost of repairing a ship as damaged as yours, anyway? Ask around and you'll see that was a fair price. Then you'll be back, won't you?
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ha ha! That's the spirit! No sense limping around in a damaged heap, right! This will only cost you %DI credits, and a better price you'll never find!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do it.
|
|
if (response == "s_fef28268")
|
|
{
|
|
station_lok_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your ship has been completely fixed! And that work is guaranteed for life... barring any sort of combat-related damage, or normal wear and tear, or acts of the Force and the like. Come see us again if you have problems at all!
|
|
string_id message = new string_id (c_stringFile, "s_ce3f3ff6");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok. I guess I'd better get back to work.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I've got something for you. So... we had acquired some Imperial 'guests' in the compound and needed to get them to a safe place.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You say, 'had'. I take it something came up.
|
|
if (response == "s_77685adb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Doesn't it always? Some Storm Squadron operatives captured our transport, and the 'guests'.
|
|
string_id message = new string_id (c_stringFile, "s_10c4c33b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I can see where I come in. You want me to get them back?
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_e998576d");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm too busy.
|
|
if (response == "s_20fce91c")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Lazy? Did you say you're too lazy? Ha ha! Fine, %NU. You go be lazy then.
|
|
string_id message = new string_id (c_stringFile, "s_5e3dd46f");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Doesn't it always? Some Storm Squadron operatives captured our transport, and the 'guests'.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can see where I come in. You want me to get them back?
|
|
if (response == "s_e998576d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Bingo. Are you up to the task?
|
|
string_id message = new string_id (c_stringFile, "s_b69f3131");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You bet.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm much too busy for that.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_eb2cfdac");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e39c0a00");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Bingo. Are you up to the task?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You bet.
|
|
if (response == "s_eb2cfdac")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantMissionOne (player, npc);
|
|
|
|
//-- NPC: I will transfer you to our special operations guy, he can handle the mission details.
|
|
string_id message = new string_id (c_stringFile, "s_d34f2ea4");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm much too busy for that.
|
|
if (response == "s_e39c0a00")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Lazy? Did you say you're too lazy? Ha ha! Fine, %NU. You go be lazy then... and let our boys rot in some Imperial prison.
|
|
string_id message = new string_id (c_stringFile, "s_ea7d0b42");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Something new has come up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in some work, start talking.
|
|
if (response == "s_474141fe")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: My contacts in the stronghold tell me that a transport carrying some very important people will be traveling out of the system soon and they need an escort.
|
|
string_id message = new string_id (c_stringFile, "s_c6280dee");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds dangerous.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_8d68ee17");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Bah! Later, later. Maybe I'll just get someone else.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: My contacts in the stronghold tell me that a transport carrying some very important people will be traveling out of the system soon and they need an escort.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds dangerous.
|
|
if (response == "s_8d68ee17")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It will be. Every time we take out a mole, some other information leak opens up around here. I am constantly amazed at how efficient Imperial Intelligence is.
|
|
string_id message = new string_id (c_stringFile, "s_f17c177b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So what are the details?
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_a7ea491f");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It will be. Every time we take out a mole, some other information leak opens up around here. I am constantly amazed at how efficient Imperial Intelligence is.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So what are the details?
|
|
if (response == "s_a7ea491f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Kimogila's Claw will be making their departure soon and you will fly with them to their hyperspace jump point.
|
|
string_id message = new string_id (c_stringFile, "s_7488284");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's it?
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_14a79f3e");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Kimogila's Claw will be making their departure soon and you will fly with them to their hyperspace jump point.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's it?
|
|
if (response == "s_14a79f3e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Imperial attack is expected, this won't be a snooze assignment.
|
|
string_id message = new string_id (c_stringFile, "s_a77bdd74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm ready for anything. Let the Kimogila's Claw know to expect me.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_bbfa316b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f9e3b7b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Imperial attack is expected, this won't be a snooze assignment.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready for anything. Let the Kimogila's Claw know to expect me.
|
|
if (response == "s_bbfa316b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantMissionTwo (player, npc);
|
|
|
|
//-- NPC: I've notified Vestil Kwass to expect you. I trust you enjoyed working with him before.
|
|
string_id message = new string_id (c_stringFile, "s_c408ae1e");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later.
|
|
if (response == "s_2f9e3b7b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Bah! Later, later. Maybe I'll just get someone else.
|
|
string_id message = new string_id (c_stringFile, "s_185ada38");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I have a job for you, if you are interested.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am interested in your credits. So what little thing is keeping the two of us apart?
|
|
if (response == "s_b1729740")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hey, around here a love of money is a virtue.
|
|
string_id message = new string_id (c_stringFile, "s_e99611e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Right, so Storm Squadron has you in a fit again.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_fc6171f1");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_93")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not now %NU, perhaps not ever.
|
|
string_id message = new string_id (c_stringFile, "s_101");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey, around here a love of money is a virtue.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Right, so Storm Squadron has you in a fit again.
|
|
if (response == "s_fc6171f1")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not yet. And we would like to keep it that way. They are flying an Imperial Scan Freighter through the system soon.
|
|
string_id message = new string_id (c_stringFile, "s_676e1e17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Capture?
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_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_5adb5e96");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Not yet. And we would like to keep it that way. They are flying an Imperial Scan Freighter through the system soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Capture?
|
|
if (response == "s_5adb5e96")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Destroy. We already know all that they hope to learn, so what use are they to us? We want them to be blind to our actions. Enough chatter, are you up for it?
|
|
string_id message = new string_id (c_stringFile, "s_716b5194");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Destroying a helpless freighter, sounds like easy money.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_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_59b2e836");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_cac4df9f");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_lok_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Destroy. We already know all that they hope to learn, so what use are they to us? We want them to be blind to our actions. Enough chatter, are you up for it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Destroying a helpless freighter, sounds like easy money.
|
|
if (response == "s_59b2e836")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantMissionThree (player, npc);
|
|
|
|
//-- NPC: Don't expect them to be alone. The Imperials can be wasteful, but never count on them being stupid.
|
|
string_id message = new string_id (c_stringFile, "s_a6a8081b");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_cac4df9f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not now %NU, perhaps not ever.
|
|
string_id message = new string_id (c_stringFile, "s_c23916c6");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok_handleBranch44 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey, you know we've always got something special for you to do, %NU! Those Storm Squadron thugs are always hassling us around here. If you're not in the mood for that sort of rumble, maybe you could get our gunships through to upgrade their reactors.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take on Storm Squadron.
|
|
if (response == "s_ad7b177d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantDestroyDutyMission (player, npc);
|
|
|
|
//-- NPC: Ho-yeah! They won't know what hit them! Good luck, %NU!
|
|
string_id message = new string_id (c_stringFile, "s_720fe84e");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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'll get our gunships through.
|
|
if (response == "s_e5ce7fcb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantEscortDutyMission (player, npc);
|
|
|
|
//-- NPC: Go to it, %NU! Our gunships demand respect from the enemies of Nym, but the factory models never really cut it.
|
|
string_id message = new string_id (c_stringFile, "s_daa54d2");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok_handleBranch47 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Here's a list of contracts offered for the Lok system.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 3 Imperial patrols
|
|
if (response == "s_112")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantRebelDuty3 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
if (response == "s_133")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantRebelDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_135");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 3 Rebel patrols
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantImperialDuty3 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_119");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
if (response == "s_134")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantImperialDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_136");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 3 Rogue Droids
|
|
if (response == "s_120")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantDroidDuty3 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 3 Hidden Dagger Pirates
|
|
if (response == "s_124")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
station_lok_action_grantHiddenDaggerDuty3 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing here for me
|
|
if (response == "s_128")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well.
|
|
string_id message = new string_id (c_stringFile, "s_130");
|
|
utils.removeScriptVar (player, "conversation.station_lok.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_lok.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_lok.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_lok");
|
|
|
|
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_lok_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: Hey hey! Welcome to the Lok system! I can't do anything for you at this distance, but give a shout when you're a little closer, ok?
|
|
string_id message = new string_id (c_stringFile, "s_5d8ae855");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Greets to you! And welcome to the Lok Station. What are you needing today?
|
|
string_id message = new string_id (c_stringFile, "s_bc62d0fb");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to land.
|
|
boolean hasResponse0 = false;
|
|
if (station_lok_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need repairs.
|
|
boolean hasResponse1 = false;
|
|
if (station_lok_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm looking for work.
|
|
boolean hasResponse2 = false;
|
|
if (station_lok_condition_canDoWorkForNym (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary contracts available?
|
|
boolean hasResponse3 = false;
|
|
if (station_lok_condition_canTakeQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_305434ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6c8ffad8");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1b3d0b9e");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.station_lok.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "station_lok", 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_lok")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
if (branchId == 2 && station_lok_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && station_lok_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && station_lok_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && station_lok_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_lok_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && station_lok_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && station_lok_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && station_lok_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && station_lok_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && station_lok_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && station_lok_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && station_lok_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && station_lok_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && station_lok_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && station_lok_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && station_lok_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && station_lok_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_lok_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && station_lok_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && station_lok_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 44 && station_lok_handleBranch44 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 47 && station_lok_handleBranch47 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.station_lok.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|