mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
5139 lines
134 KiB
Plaintext
5139 lines
134 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_talus.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_talus";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_talus_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAfford50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAfford25 (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged(player) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAfford75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAfford100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_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_talus_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_talus_condition_isSmuggler (obj_id player, obj_id npc)
|
|
{
|
|
return hasSkill( player, "combat_smuggler_underworld_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_isSmugglerTooFar (obj_id player, obj_id npc)
|
|
{
|
|
return ( station_talus_condition_isSmuggler(player,npc) && station_talus_condition_isTooFar(player,npc) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_isTalusSmuggler (obj_id player, obj_id npc)
|
|
{
|
|
return hasObjVar( player, "talus_station.smuggler" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_isTier1CorelliaImperial (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.IMPERIAL_CORELLIA ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_isImperialCondition (obj_id player, obj_id npc)
|
|
{
|
|
return space_flags.isImperialPilot(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_failedStoryQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasFailedQuestRecursive(player, "delivery", "talus_station_mission1_1") ||
|
|
space_quest.hasAbortedQuestRecursive(player, "delivery", "talus_station_mission1_1"))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_wonStoryQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(hasSkill( player, "combat_smuggler_underworld_01") && space_quest.hasWonQuest(player, "delivery", "talus_station_mission4_2")) {
|
|
|
|
int flag = space_flags.getIntSpaceFlag(player, "talus_station");
|
|
|
|
if(flag == 1)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_readyForRun (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.hasSpaceFlag(player, "talus_station")) {
|
|
|
|
int flag = space_flags.getIntSpaceFlag(player, "talus_station");
|
|
|
|
if(flag == 2)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_hasAQuest (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canLandAtHouse (obj_id player, obj_id npc)
|
|
{
|
|
if (hasObjVar (player, "homingBeacon.planet"))
|
|
{
|
|
string homePlanet = getStringObjVar (player, "homingBeacon.planet");
|
|
|
|
return (homePlanet.endsWith ("talus"));
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canTakeQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasQuest(player))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAttackImperial (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canAttackRebel (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canTakeTier5ImperialDuty (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;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_talus_condition_canTakeTier5RebelDuty (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;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_talus_action_landStation3 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Daoba Guerfel Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_fix25 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .25f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_fix50 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_fix75 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_fix100 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_landStation1 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Dearic Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_landStation2 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Nashal Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_landStation4 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Talus Imperial Outpost");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_flagTalusSmuggler (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar( player, "talus_station.smuggler", true );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantStoryQuest (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "delivery", "talus_station_mission1_1");
|
|
space_flags.setSpaceFlag(player, "talus_station", 1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_giveStoryReward (obj_id player, obj_id npc)
|
|
{
|
|
space_flags.setSpaceFlag(player, "talus_station", 2);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantTuskCatRun (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "delivery", "talus_station_mission5_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_landHoming (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayerHoming(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantImperialDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_imperial_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantImperialDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_imperial_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantRebelDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_rebel_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantRebelDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_rebel_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantBlackSunDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_blacksun_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantBlackSunDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_blacksun_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantRebelDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_rebel_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_talus_action_grantImperialDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "corellia_imperial_tier5");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string station_talus_tokenTO_tokenTO0001 (obj_id player, obj_id npc)
|
|
{
|
|
return new string();
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int station_talus_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .25f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .50f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, 1.0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_talus_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Your range is too great for this station to assist you in any way, %TU. In order to request landing clearance or emergency repairs, you must decrease your range.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, I'll fly closer.
|
|
if (response == "s_f3dea437")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you, %NU. Please comm the station again when you are within range. I look forward to talking to you.
|
|
string_id message = new string_id (c_stringFile, "s_3eaa38fc");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well, %NU. Talus Station is at your disposal should the need arise.
|
|
string_id message = new string_id (c_stringFile, "s_c8613339");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: N'rynma, Pa! Range?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, I'll fly closer.
|
|
if (response == "s_9")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_c245bae");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_12")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_14");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Say, you ARE a pretty good delivery person. Stop by again the next time you're around. We might have a little something for you to try out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks. I'd like to land now, please.
|
|
if (response == "s_38ddef56")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No problem, %NU, you're welcome to land anywhere on Talus, at any time. What is your destination?
|
|
string_id message = new string_id (c_stringFile, "s_ff85dbce");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Imperial Outpost (Imperial Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_isTier1CorelliaImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Dearic Starport.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nashal Starport.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Imperial Outpost Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_talus_condition_isTier1CorelliaImperial (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_f7c832f1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9b8f2142");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_16015565");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2902ab38");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 10);
|
|
|
|
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_talus.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: Thanks. I need repairs now, please.
|
|
if (response == "s_c36f297f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %TU. We can offer a variety of services with a fair and balanced fee for the amount of damage you wish to be repaired. Please indicate the degree to which you wish your ship to be repaired.
|
|
string_id message = new string_id (c_stringFile, "s_808845f3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Repair a little of the damage.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair half of the damage.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of the damage.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all of the damage.
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_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_d082abf0");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38572429");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5cf3921");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ba2af981");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 23);
|
|
|
|
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_talus.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: Thanks. Good-bye.
|
|
if (response == "s_b1f89988")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good luck to you, pilot!
|
|
string_id message = new string_id (c_stringFile, "s_536fb215");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_262")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We do have a list of mercenary assignments. For a pilot with your.... associations. I can offer the following duty missions:
|
|
string_id message = new string_id (c_stringFile, "s_251");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_talus_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Black Sun Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Black Sun Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_talus_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_253");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_257");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_282");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_261");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_267");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_284");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_271");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_275");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_279");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 86);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to Talus Station, %TU. How may we be of service to you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to land.
|
|
if (response == "s_305434ff")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No problem, %NU, you're welcome to land anywhere on Talus, at any time. What is your destination?
|
|
string_id message = new string_id (c_stringFile, "s_ff85dbce");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Imperial Outpost (Imperial Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_isTier1CorelliaImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Dearic Starport.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nashal Starport.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Imperial Outpost Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_talus_condition_isTier1CorelliaImperial (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_f7c832f1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9b8f2142");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_16015565");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2902ab38");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 10);
|
|
|
|
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_talus.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 need repairs.
|
|
if (response == "s_6c8ffad8")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %TU. We can offer a variety of services with a fair and balanced fee for the amount of damage you wish to be repaired. Please indicate the degree to which you wish your ship to be repaired.
|
|
string_id message = new string_id (c_stringFile, "s_808845f3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Repair a little of the damage.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair half of the damage.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of the damage.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all of the damage.
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_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_d082abf0");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38572429");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5cf3921");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ba2af981");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 23);
|
|
|
|
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_talus.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 looking for work.
|
|
if (response == "s_1b3d0b9e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition_hasAQuest (player, npc))
|
|
{
|
|
//-- NPC: Looks like you're a little busy right now. Why don't you finish up what you're doing and come back later.
|
|
string_id message = new string_id (c_stringFile, "s_39ecf00a");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition_readyForRun (player, npc))
|
|
{
|
|
//-- NPC: Oh, sure. You've proven yourself to be a pretty decent smuggler. Why don't you try out the Tusk Cat Run?
|
|
string_id message = new string_id (c_stringFile, "s_a9bcbfea");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure, sounds like fun!
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Tusk Cat Run?
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe some other time.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_b27ab51e");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c2a24c7f");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_be61c03c");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition_failedStoryQuest (player, npc))
|
|
{
|
|
//-- NPC: Well, it doesn't look like you did too well on your last job. Are you sure you'd like to try again?
|
|
string_id message = new string_id (c_stringFile, "s_918c1120");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, of course I'm sure.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Eh, you're right. Maybe some other time.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_e03a2006");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_40163a4");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 45);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I... see... Well, what sort of work do you do?
|
|
string_id message = new string_id (c_stringFile, "s_20df8d79");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You might say I'm sort of a delivery-person.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_998a06e6");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 48);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_263")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We do have a list of mercenary assignments. For a pilot with your.... associations. I can offer the following duty missions:
|
|
string_id message = new string_id (c_stringFile, "s_251");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_talus_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Black Sun Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Black Sun Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_talus_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_253");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_257");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_282");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_261");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_267");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_284");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_271");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_275");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_279");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 86);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No problem, %NU, you're welcome to land anywhere on Talus, at any time. What is your destination?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Imperial Outpost (Imperial Pilot Trainer).
|
|
if (response == "s_f7c832f1")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are cleared for landing at the Talus Imperial Outpost. Please confirm.
|
|
string_id message = new string_id (c_stringFile, "s_22f23540");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Negative, cancel that.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_67820697");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_13cd465");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Dearic Starport.
|
|
if (response == "s_9b8f2142")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are cleared for landing at Dearic Starport. Please confirm.
|
|
string_id message = new string_id (c_stringFile, "s_103ebe2f");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Negative, cancel that.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_33");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_37");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nashal Starport.
|
|
if (response == "s_16015565")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are cleared for landing at Nashall Starport. Please confirm.
|
|
string_id message = new string_id (c_stringFile, "s_16dacacf");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Negative, cancel that.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_47");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Imperial Outpost Starport.
|
|
if (response == "s_2902ab38")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are cleared for landing at the Talus Imperial Outpost. Please confirm.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Negative, cancel that.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_54");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are cleared for landing at the Talus Imperial Outpost. Please confirm.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
if (response == "s_67820697")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Very well, %NU. Enjoy your stay on Talus.
|
|
string_id message = new string_id (c_stringFile, "s_234498b9");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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: Negative, cancel that.
|
|
if (response == "s_13cd465")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %NU. Please comm Talus Station again if we may be of any service to you.
|
|
string_id message = new string_id (c_stringFile, "s_ec207c14");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are cleared for landing at Dearic Starport. Please confirm.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Very well, %NU. Enjoy your stay on Talus.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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: Negative, cancel that.
|
|
if (response == "s_37")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %NU. Please comm Talus Station again if we may be of any service to you.
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are cleared for landing at Nashall Starport. Please confirm.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Very well, %NU. Enjoy your stay on Talus.
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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: Negative, cancel that.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %NU. Please comm Talus Station again if we may be of any service to you.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are cleared for landing at the Talus Imperial Outpost. Please confirm.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Affirmative. I'm landing now.
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Very well, %NU. Enjoy your stay on Talus.
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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: Negative, cancel that.
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish, %NU. Please comm Talus Station again if we may be of any service to you.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: As you wish, %TU. We can offer a variety of services with a fair and balanced fee for the amount of damage you wish to be repaired. Please indicate the degree to which you wish your ship to be repaired.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair a little of the damage.
|
|
if (response == "s_d082abf0")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can repair a little of the damage for %DI credits. Is that acceptable, %NU?
|
|
string_id message = new string_id (c_stringFile, "s_afed720c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_talus.branchId", 24);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair half of the damage.
|
|
if (response == "s_38572429")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can repair a half of the damage for %DI credits. Is that acceptable, %NU?
|
|
string_id message = new string_id (c_stringFile, "s_69e2af52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_72");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 27);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair most of the damage.
|
|
if (response == "s_5cf3921")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can repair most of the damage for %DI credits. Is that acceptable, %NU?
|
|
string_id message = new string_id (c_stringFile, "s_b2f28d35");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_82");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 30);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair all of the damage.
|
|
if (response == "s_ba2af981")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can repair all of the damage for %DI credits. Is that acceptable, %NU?
|
|
string_id message = new string_id (c_stringFile, "s_5e5b02dc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_92");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_100")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, %TU. Perhaps we may be of service in the future. Please comm Talus Station again if there is anything we can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can repair a little of the damage for %DI credits. Is that acceptable, %NU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
station_talus_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Repairs complete. Thank you for allowing Talus station to be of service.
|
|
string_id message = new string_id (c_stringFile, "s_460e892f");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, %TU. Perhaps we may be of service in the future. Please comm Talus Station again if there is anything we can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_494f7626");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can repair a half of the damage for %DI credits. Is that acceptable, %NU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_72")
|
|
{
|
|
station_talus_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Repairs complete. Thank you for allowing Talus station to be of service.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_76")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, %TU. Perhaps we may be of service in the future. Please comm Talus Station again if there is anything we can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can repair most of the damage for %DI credits. Is that acceptable, %NU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_82")
|
|
{
|
|
station_talus_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Repairs complete. Thank you for allowing Talus station to be of service.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, %TU. Perhaps we may be of service in the future. Please comm Talus Station again if there is anything we can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can repair all of the damage for %DI credits. Is that acceptable, %NU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_92")
|
|
{
|
|
station_talus_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Repairs complete. Thank you for allowing Talus station to be of service.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sorry, %TU. Perhaps we may be of service in the future. Please comm Talus Station again if there is anything we can do for you.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, sure. You've proven yourself to be a pretty decent smuggler. Why don't you try out the Tusk Cat Run?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure, sounds like fun!
|
|
if (response == "s_b27ab51e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantTuskCatRun (player, npc);
|
|
|
|
//-- NPC: Alright. I'll upload the program to your ship. Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_278cd19d");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Tusk Cat Run?
|
|
if (response == "s_c2a24c7f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It's a series of fake smuggling jobs to and from droid controlled drone ships. Some pilots make the run to hone their smuggling skills. But it's all just for fun really.
|
|
string_id message = new string_id (c_stringFile, "s_2b17557d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Is it dangerous?
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_ab77f60d");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe some other time.
|
|
if (response == "s_be61c03c")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whatever you say, captain.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's a series of fake smuggling jobs to and from droid controlled drone ships. Some pilots make the run to hone their smuggling skills. But it's all just for fun really.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is it dangerous?
|
|
if (response == "s_ab77f60d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are droid controlled attack drones along the way, but hey, what fun is a smuggling job without a little challenge, huh?
|
|
string_id message = new string_id (c_stringFile, "s_86511be7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: OK, I'll try it.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe another time.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_8c4754ed");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55ea041");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 41);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are droid controlled attack drones along the way, but hey, what fun is a smuggling job without a little challenge, huh?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: OK, I'll try it.
|
|
if (response == "s_8c4754ed")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantTuskCatRun (player, npc);
|
|
|
|
//-- NPC: Alright, I'll upload the program to your ship. Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_91f9c80");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe another time.
|
|
if (response == "s_55ea041")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whatever you say, captain.
|
|
string_id message = new string_id (c_stringFile, "s_8bc61a14");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch45 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, it doesn't look like you did too well on your last job. Are you sure you'd like to try again?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, of course I'm sure.
|
|
if (response == "s_e03a2006")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantStoryQuest (player, npc);
|
|
|
|
//-- NPC: Well, if you say so. Here's the information for your first delivery run. We'll contact you with more information when that's finished.
|
|
string_id message = new string_id (c_stringFile, "s_5360ec3f");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Eh, you're right. Maybe some other time.
|
|
if (response == "s_40163a4")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whatever you say, captain.
|
|
string_id message = new string_id (c_stringFile, "s_124");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch48 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I... see... Well, what sort of work do you do?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You might say I'm sort of a delivery-person.
|
|
if (response == "s_998a06e6")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A very discreet delivery person?
|
|
string_id message = new string_id (c_stringFile, "s_608c1c86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You know it.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_fe3902e2");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 49);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch49 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A very discreet delivery person?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You know it.
|
|
if (response == "s_fe3902e2")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh! Oh! Please switch to encrypted holochannel p278-98-alpha.
|
|
string_id message = new string_id (c_stringFile, "s_ec7d72e3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (switch to encrypted channel)
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_b3c0bdbd");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 50);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch50 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh! Oh! Please switch to encrypted holochannel p278-98-alpha.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (switch to encrypted channel)
|
|
if (response == "s_b3c0bdbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You know, %TU, there is an IMPERIAL OUTPOST right here on Talus! They could be monitoring ALL of our comms!
|
|
string_id message = new string_id (c_stringFile, "s_80d1bac3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Understood. Got work for me, or not?
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_7b41cc12");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 51);
|
|
|
|
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_talus.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_talus_handleBranch51 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You know, %TU, there is an IMPERIAL OUTPOST right here on Talus! They could be monitoring ALL of our comms!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Understood. Got work for me, or not?
|
|
if (response == "s_7b41cc12")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition_isImperialCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, wait... uh. No sir. Not right now. Have a pleasant day, sir.
|
|
string_id message = new string_id (c_stringFile, "s_6997c76");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantStoryQuest (player, npc);
|
|
|
|
//-- NPC: Oh.... alright. As a matter of fact, yes. I do have a couple of deliveries that you could make. The first one is here in the Corellia system. If that goes ok, then we will contact you with more. Too risky to be seen talking with you here, you see?
|
|
string_id message = new string_id (c_stringFile, "s_622304ca");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I understand.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_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_9288900f");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 53);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch53 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh.... alright. As a matter of fact, yes. I do have a couple of deliveries that you could make. The first one is here in the Corellia system. If that goes ok, then we will contact you with more. Too risky to be seen talking with you here, you see?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I understand.
|
|
if (response == "s_9288900f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Stand by.
|
|
string_id message = new string_id (c_stringFile, "s_7dbb29de");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch55 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Neeshter syish freg'n Talus Station. Meesta krand't fnyor, %TU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Request Landing Permission)
|
|
if (response == "s_f34bcf78")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fnyenk, b'dor, %TU?
|
|
string_id message = new string_id (c_stringFile, "s_3ee404d7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Imperial Outpost (Imperial Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_isTier1CorelliaImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Dearic Starport.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nashal Starport.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Imperial Outpost Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_talus_condition_isTier1CorelliaImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Homing Beacon.
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_condition_canLandAtHouse (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_142");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_152");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_234");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 56);
|
|
|
|
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_talus.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: (Request Repairs)
|
|
if (response == "s_c358d041")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Mag'n fweroba, %NU! Eshka b'lor ka pa?
|
|
string_id message = new string_id (c_stringFile, "s_335e1e3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Repair a little of the damage.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair half of the damage.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of the damage.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all of the damage.
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_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_194");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_204");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_216");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_228");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_245");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 72);
|
|
|
|
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_talus.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_249")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We do have a list of mercenary assignments. For a pilot with your.... associations. I can offer the following duty missions:
|
|
string_id message = new string_id (c_stringFile, "s_251");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_talus_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_talus_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Black Sun Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Black Sun Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_talus_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_253");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_257");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_282");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_261");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_267");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_284");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_271");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_275");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_279");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 86);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch56 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Fnyenk, b'dor, %TU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Imperial Outpost (Imperial Pilot Trainer).
|
|
if (response == "s_142")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nyard'msh k'rall deeba Talus Imperial Outpost?
|
|
string_id message = new string_id (c_stringFile, "s_cd4fd870");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_145");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_148");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 57);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Dearic Starport.
|
|
if (response == "s_152")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nyard'msh k'rall deeba Dearic Starport?
|
|
string_id message = new string_id (c_stringFile, "s_5e3d8b95");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_155");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_159");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 60);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nashal Starport.
|
|
if (response == "s_163")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nyard'msh k'rall deeba Nashal Starport?
|
|
string_id message = new string_id (c_stringFile, "s_d3b3ffb2");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_166");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_170");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 63);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Imperial Outpost Starport.
|
|
if (response == "s_174")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nyard'msh k'rall deeba Talus Imperial Outpost?
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_178");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_182");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 66);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Homing Beacon.
|
|
if (response == "s_234")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nyard'msh k'rall deeba?
|
|
string_id message = new string_id (c_stringFile, "s_235");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_236");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_237");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 69);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch57 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nyard'msh k'rall deeba Talus Imperial Outpost?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_145")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Fnyorgin p'shhis!
|
|
string_id message = new string_id (c_stringFile, "s_672b2c6f");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_148")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_150");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch60 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nyard'msh k'rall deeba Dearic Starport?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_155")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Fnyorgin p'shhis!
|
|
string_id message = new string_id (c_stringFile, "s_157");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_159")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_161");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch63 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nyard'msh k'rall deeba Nashal Starport?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_166")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Fnyorgin p'shhis!
|
|
string_id message = new string_id (c_stringFile, "s_168");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_170")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_172");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch66 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nyard'msh k'rall deeba Talus Imperial Outpost?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_178")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Fnyorgin p'shhis!
|
|
string_id message = new string_id (c_stringFile, "s_180");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_182")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_184");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch69 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nyard'msh k'rall deeba?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_236")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_landHoming (player, npc);
|
|
|
|
//-- NPC: Fnyorgin p'shhis!
|
|
string_id message = new string_id (c_stringFile, "s_238");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_237")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_239");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch72 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Mag'n fweroba, %NU! Eshka b'lor ka pa?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair a little of the damage.
|
|
if (response == "s_194")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
string_id message = new string_id (c_stringFile, "s_3adc835a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_197");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_200");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 73);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair half of the damage.
|
|
if (response == "s_204")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
string_id message = new string_id (c_stringFile, "s_206");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_208");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_212");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 76);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair most of the damage.
|
|
if (response == "s_216")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
string_id message = new string_id (c_stringFile, "s_218");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_220");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_224");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 79);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair all of the damage.
|
|
if (response == "s_228")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
string_id message = new string_id (c_stringFile, "s_230");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_232");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_241");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 82);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_talus_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_245")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_247");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch73 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_197")
|
|
{
|
|
station_talus_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Kan'dest ka nir zint! Pa!
|
|
string_id message = new string_id (c_stringFile, "s_f895eb69");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_200")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_202");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch76 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_208")
|
|
{
|
|
station_talus_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Kan'dest ka nir zint! Pa!
|
|
string_id message = new string_id (c_stringFile, "s_210");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_212")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_214");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch79 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_220")
|
|
{
|
|
station_talus_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Kan'dest ka nir zint! Pa!
|
|
string_id message = new string_id (c_stringFile, "s_222");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_224")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_226");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch82 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: T'cost din miska %DI credits. Ka dir pa?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_232")
|
|
{
|
|
station_talus_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Kan'dest ka nir zan da zint! Pa!
|
|
string_id message = new string_id (c_stringFile, "s_fd46b8d9");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_241")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Pa!
|
|
string_id message = new string_id (c_stringFile, "s_243");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_talus_handleBranch86 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We do have a list of mercenary assignments. For a pilot with your.... associations. I can offer the following duty missions:
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
if (response == "s_253")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantRebelDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_255");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
if (response == "s_257")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantRebelDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_259");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
if (response == "s_282")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantRebelDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_283");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
if (response == "s_261")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantImperialDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_265");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
if (response == "s_267")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantImperialDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_269");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
if (response == "s_284")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantImperialDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_285");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Black Sun Pirates
|
|
if (response == "s_271")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantBlackSunDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_273");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Black Sun Pirates
|
|
if (response == "s_275")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
station_talus_action_grantBlackSunDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_277");
|
|
utils.removeScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing here for me
|
|
if (response == "s_279")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Stay Safe.
|
|
string_id message = new string_id (c_stringFile, "s_281");
|
|
utils.removeScriptVar (player, "conversation.station_talus.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_talus.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_talus.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_talus");
|
|
|
|
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_talus_condition_isSmugglerTooFar (player, npc))
|
|
{
|
|
//-- NPC: Your range is too great for this station to assist you in any way, %TU. In order to request landing clearance or emergency repairs, you must decrease your range.
|
|
string_id message = new string_id (c_stringFile, "s_90ab9704");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll fly closer.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_f3dea437");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 1);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_talus", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: N'rynma, Pa! Range?
|
|
string_id message = new string_id (c_stringFile, "s_3a99c5fa");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I'll fly closer.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_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_9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_12");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "station_talus", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition_wonStoryQuest (player, npc))
|
|
{
|
|
station_talus_action_giveStoryReward (player, npc);
|
|
|
|
//-- NPC: Say, you ARE a pretty good delivery person. Stop by again the next time you're around. We might have a little something for you to try out.
|
|
string_id message = new string_id (c_stringFile, "s_ab4e2dfb");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks. I'd like to land now, please.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Thanks. I need repairs now, please.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Thanks. Good-bye.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_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_38ddef56");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c36f297f");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_b1f89988");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_262");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "station_talus", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition_isSmuggler (player, npc))
|
|
{
|
|
//-- NPC: Welcome to Talus Station, %TU. How may we be of service to you?
|
|
string_id message = new string_id (c_stringFile, "s_8633b901");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to land.
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need repairs.
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm looking for work.
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse3 = false;
|
|
if (station_talus_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_263");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 9);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_talus", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Neeshter syish freg'n Talus Station. Meesta krand't fnyor, %TU?
|
|
string_id message = new string_id (c_stringFile, "s_a830645d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Request Landing Permission)
|
|
boolean hasResponse0 = false;
|
|
if (station_talus_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: (Request Repairs)
|
|
boolean hasResponse1 = false;
|
|
if (station_talus_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse2 = false;
|
|
if (station_talus_condition_canTakeQuest (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_f34bcf78");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c358d041");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_249");
|
|
|
|
utils.setScriptVar (player, "conversation.station_talus.branchId", 55);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "station_talus", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "station_talus")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_talus.branchId");
|
|
|
|
if (branchId == 1 && station_talus_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && station_talus_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && station_talus_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && station_talus_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_talus_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && station_talus_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && station_talus_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && station_talus_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && station_talus_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && station_talus_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && station_talus_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && station_talus_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && station_talus_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && station_talus_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_talus_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && station_talus_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && station_talus_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 45 && station_talus_handleBranch45 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 48 && station_talus_handleBranch48 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 49 && station_talus_handleBranch49 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 50 && station_talus_handleBranch50 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 51 && station_talus_handleBranch51 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 53 && station_talus_handleBranch53 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 55 && station_talus_handleBranch55 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 56 && station_talus_handleBranch56 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 57 && station_talus_handleBranch57 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 60 && station_talus_handleBranch60 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 63 && station_talus_handleBranch63 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 66 && station_talus_handleBranch66 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 69 && station_talus_handleBranch69 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 72 && station_talus_handleBranch72 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 73 && station_talus_handleBranch73 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 76 && station_talus_handleBranch76 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 79 && station_talus_handleBranch79 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 82 && station_talus_handleBranch82 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 86 && station_talus_handleBranch86 (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_talus.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|