mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
4003 lines
107 KiB
Plaintext
4003 lines
107 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_naboo.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_naboo";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_naboo_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAfford50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAfford25 (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged( player ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAfford75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAfford100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_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_naboo_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_naboo_condition_isTier1NabooRebel (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.REBEL_NABOO ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_isTier1NabooImperial (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.IMPERIAL_NABOO ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_isTier1NabooPrivateer (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.PRIVATEER_NABOO ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canDoImperialAccess (obj_id player, obj_id npc)
|
|
{
|
|
if (!space_flags.hasCompletedTierOne(player))
|
|
return false;
|
|
|
|
if (space_quest.hasWonQuest(player, "destroy_surpriseattack", "naboo_station_emperors_access_quest_6" ))
|
|
return false;
|
|
|
|
if (space_quest.hasQuest(player))
|
|
return false;
|
|
|
|
if (space_flags.isSpaceTrack(player, space_flags.IMPERIAL_NABOO))
|
|
return true;
|
|
|
|
if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_NABOO))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canLandAtRetreat (obj_id player, obj_id npc)
|
|
{
|
|
if (( space_flags.isSpaceTrack(player, space_flags.PRIVATEER_NABOO) ||
|
|
space_flags.isSpaceTrack(player, space_flags.IMPERIAL_NABOO)) &&
|
|
space_flags.hasCompletedTierOne(player) &&
|
|
space_quest.hasWonQuest(player, "destroy_surpriseattack", "naboo_station_emperors_access_quest_6" ))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canGetTier2DestroyDuty (obj_id player, obj_id npc)
|
|
{
|
|
if (!space_flags.hasCompletedTierOne (player))
|
|
return false;
|
|
|
|
if (space_quest.hasQuest(player))
|
|
return false;
|
|
|
|
if (hasSkill( player, "pilot_imperial_navy_novice" ))
|
|
return true;
|
|
|
|
if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_NABOO))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canLandAtHouse (obj_id player, obj_id npc)
|
|
{
|
|
if (hasObjVar (player, "homingBeacon.planet"))
|
|
{
|
|
string homePlanet = getStringObjVar (player, "homingBeacon.planet");
|
|
|
|
return (homePlanet.endsWith ("naboo"));
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAttackImperial (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canAttackRebel (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canTakeQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasQuest(player))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canDoRebelTier5Duty (obj_id player, obj_id npc)
|
|
{
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_naboo_condition_canDoImperialTier5Duty (obj_id player, obj_id npc)
|
|
{
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_naboo_action_landStation3 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Keren Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_fix25 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .25f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_fix50 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_fix75 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_fix100 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_landStation1 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Theed Spaceport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_landStation2 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Kaadara Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_landStation4 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Moenia");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_landEmperor (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "The Emperor's Retreat");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_giveEmperorAccessQuest (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "space_battle", "naboo_station_emperors_access_quest_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantImperialDestroyDutyTier2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "destroy_duty", "naboo_station_imperial_destroy_duty_tier2_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_landHoming (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayerHoming(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantImperialDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_imperial_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantImperialDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_imperial_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantRebelDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_rebel_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantRebelDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_rebel_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantDroidDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_rogue_droid_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantDroidDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_rogue_droid_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantVoidDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_void_wing_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantVoidDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_void_wing_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantImperialDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_imperial_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_naboo_action_grantRebelDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "naboo_rebel_tier5");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string station_naboo_tokenTO_tokenTO0001 (obj_id player, obj_id npc)
|
|
{
|
|
return new string();
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int station_naboo_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .25f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .50f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, 1.0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_naboo_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A loyal pilot...and just in time too! We need your help, stat, pilot!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry, I need to land on Naboo right away.
|
|
if (response == "s_e4c8ff17")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Please transmit your destination for flight clearance.
|
|
string_id message = new string_id (c_stringFile, "s_4bb1f207");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Theed Starport (Freelance Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition_isTier1NabooPrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Moenia Starport (Rebel Pilot Trainer).
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_isTier1NabooRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Kaadara Starport (Imperial Pilot Trainer).
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_isTier1NabooImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Theed Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_naboo_condition_isTier1NabooPrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Kaadara Starport.
|
|
boolean hasResponse4 = false;
|
|
if (!station_naboo_condition_isTier1NabooImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Keren Starport.
|
|
boolean hasResponse5 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: Moenia Starport.
|
|
boolean hasResponse6 = false;
|
|
if (!station_naboo_condition_isTier1NabooRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Emperor's Retreat.
|
|
boolean hasResponse7 = false;
|
|
if (station_naboo_condition_canLandAtRetreat (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Private Homing Beacon.
|
|
boolean hasResponse8 = false;
|
|
if (station_naboo_condition_canLandAtHouse (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_e809e957");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_612d9759");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6bbe88b4");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c42b6203");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8845528b");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a716a9c7");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f99890c");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ce98dec5");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_143");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Before I do anything, I need repairs.
|
|
if (response == "s_8460cdcf")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. How much of the damage to your ship do you want to be repaired at this time?
|
|
string_id message = new string_id (c_stringFile, "s_4b9c311");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_naboo_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_naboo_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_90ee7f5d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4468336c");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 34);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: What's the emergency?
|
|
if (response == "s_3bf3c89f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: An Imperial freighter is under attack by the Rebel filth and needs help right away, but I can't seem to get in touch with the Imperial space station.
|
|
string_id message = new string_id (c_stringFile, "s_c1ae5dd1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll save that freighter!
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not my cup of tea. Any mercenary work?
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_1a18a604");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3466611d");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: An Imperial freighter is under attack by the Rebel filth and needs help right away, but I can't seem to get in touch with the Imperial space station.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll save that freighter!
|
|
if (response == "s_1a18a604")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_giveEmperorAccessQuest (player, npc);
|
|
|
|
//-- NPC: I knew I could count on you! Let me patch you through to the freighter's emergency broadcast. Good luck, pilot!
|
|
string_id message = new string_id (c_stringFile, "s_e331a0a5");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not my cup of tea. Any mercenary work?
|
|
if (response == "s_3466611d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_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_158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_canDoRebelTier5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_naboo_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_naboo_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_naboo_condition_canDoImperialTier5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rogue Droids
|
|
boolean hasResponse6 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rogue Droids
|
|
boolean hasResponse7 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Void Wing Pirates
|
|
boolean hasResponse8 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Void Wing Pirates
|
|
boolean hasResponse9 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse9 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse10 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse10 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_195");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_166");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_196");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_176");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_184");
|
|
|
|
if (hasResponse9)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_188");
|
|
|
|
if (hasResponse10)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_192");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 58);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You have entered Naboo space, under the protection of the Royal Security Forces. Please identify yourself and your reason for visiting Naboo.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Request Permission to Land)
|
|
if (response == "s_cebd107d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Please transmit your destination for flight clearance.
|
|
string_id message = new string_id (c_stringFile, "s_4bb1f207");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Theed Starport (Freelance Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition_isTier1NabooPrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Moenia Starport (Rebel Pilot Trainer).
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_isTier1NabooRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Kaadara Starport (Imperial Pilot Trainer).
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_isTier1NabooImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Theed Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_naboo_condition_isTier1NabooPrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Kaadara Starport.
|
|
boolean hasResponse4 = false;
|
|
if (!station_naboo_condition_isTier1NabooImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Keren Starport.
|
|
boolean hasResponse5 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: Moenia Starport.
|
|
boolean hasResponse6 = false;
|
|
if (!station_naboo_condition_isTier1NabooRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Emperor's Retreat.
|
|
boolean hasResponse7 = false;
|
|
if (station_naboo_condition_canLandAtRetreat (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Private Homing Beacon.
|
|
boolean hasResponse8 = false;
|
|
if (station_naboo_condition_canLandAtHouse (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_e809e957");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_612d9759");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6bbe88b4");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c42b6203");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8845528b");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a716a9c7");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2f99890c");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ce98dec5");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_143");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. How much of the damage to your ship do you want to be repaired at this time?
|
|
string_id message = new string_id (c_stringFile, "s_4b9c311");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just a little.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Half of it.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Most of it.
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: All of it.
|
|
boolean hasResponse3 = false;
|
|
if (station_naboo_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse4 = false;
|
|
if (station_naboo_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_90ee7f5d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4468336c");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_14897567");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70876928");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 34);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you need assistance with anything special?
|
|
if (response == "s_98f3774d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition_canGetTier2DestroyDuty (player, npc))
|
|
{
|
|
//-- NPC: Yes in fact I do. The Imperial station has informed us that they are looking for some loyal and able pilots to travel to Lok and disrupt some of the Rebel operations there.
|
|
string_id message = new string_id (c_stringFile, "s_2ebb5be7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sounds like my kind of work.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_d6695e83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d392ae0b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 48);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nothing at the moment, pilot. I will let you know if anything shows up.
|
|
string_id message = new string_id (c_stringFile, "s_fadd1b3c");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_157")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_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_158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition_canDoRebelTier5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_naboo_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_naboo_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_naboo_condition_canDoImperialTier5Duty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rogue Droids
|
|
boolean hasResponse6 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rogue Droids
|
|
boolean hasResponse7 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Void Wing Pirates
|
|
boolean hasResponse8 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Void Wing Pirates
|
|
boolean hasResponse9 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse9 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse10 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse10 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_160");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_195");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_166");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_196");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_176");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_184");
|
|
|
|
if (hasResponse9)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_188");
|
|
|
|
if (hasResponse10)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_192");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 58);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Please transmit your destination for flight clearance.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Theed Starport (Freelance Pilot Trainer).
|
|
if (response == "s_e809e957")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Theed Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_8e61aac7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_2dc4697a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_f148786f");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 7);
|
|
|
|
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_naboo.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: Moenia Starport (Rebel Pilot Trainer).
|
|
if (response == "s_612d9759")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Moenia Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_7cffc9b4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_24");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_27");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.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_naboo.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: Kaadara Starport (Imperial Pilot Trainer).
|
|
if (response == "s_6bbe88b4")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Kaadara Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_14ed557a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_36");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 13);
|
|
|
|
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_naboo.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: Theed Starport.
|
|
if (response == "s_c42b6203")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Theed Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_naboo.branchId", 16);
|
|
|
|
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_naboo.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: Kaadara Starport.
|
|
if (response == "s_8845528b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Kaadara Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_naboo.branchId", 19);
|
|
|
|
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_naboo.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: Keren Starport.
|
|
if (response == "s_a716a9c7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Keren Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_cfbc1584");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_64");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_67");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 22);
|
|
|
|
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_naboo.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: Moenia Starport.
|
|
if (response == "s_2f99890c")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Moenia Starport is awaiting your arrival.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_74");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 25);
|
|
|
|
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_naboo.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: Emperor's Retreat.
|
|
if (response == "s_ce98dec5")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmm, yes it does indeed seem that you have the correct permissions. You're clear to land, Sir.
|
|
string_id message = new string_id (c_stringFile, "s_f3b40ad6");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Of course I'm allowed to land there!
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind. I'll be back.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_72a90512");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_917c9894");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Private Homing Beacon.
|
|
if (response == "s_143")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged %TU. Welcome back home.
|
|
string_id message = new string_id (c_stringFile, "s_144");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Cancel request to land.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_146");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 31);
|
|
|
|
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_naboo.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_naboo_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Theed Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_2dc4697a")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Theed, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_390e6f9a");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_f148786f")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_be07ed49");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Moenia Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Moenia, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_41f82cf5");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_27")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Kaadara Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Kaadara, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_c9361653");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Theed Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Theed, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Kaadara Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Kaadara, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Keren Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation3 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Keren, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_13eddc62");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. Moenia Starport is awaiting your arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay in Moenia, %NU.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hmm, yes it does indeed seem that you have the correct permissions. You're clear to land, Sir.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Of course I'm allowed to land there!
|
|
if (response == "s_72a90512")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landEmperor (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay at our beloved Emperor's Retreat, Sir!
|
|
string_id message = new string_id (c_stringFile, "s_9c3ac80a");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've changed my mind. I'll be back.
|
|
if (response == "s_917c9894")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course, Sir! Let me know when you are ready.
|
|
string_id message = new string_id (c_stringFile, "s_c6aaa6b3");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged %TU. Welcome back home.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Land)
|
|
if (response == "s_145")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_landHoming (player, npc);
|
|
|
|
//-- NPC: Enjoy your stay on Naboo %NU.
|
|
string_id message = new string_id (c_stringFile, "s_147");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: Cancel request to land.
|
|
if (response == "s_146")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %TU. Your clearance to land has been revoked.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Acknowledged, %TU. How much of the damage to your ship do you want to be repaired at this time?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just a little.
|
|
if (response == "s_90ee7f5d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This station will charge a fee of %DI credits to make only the most basic repairs to your ship. Are you ready to transfer the funds?
|
|
string_id message = new string_id (c_stringFile, "s_cb44587c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_naboo.branchId", 35);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Half of it.
|
|
if (response == "s_4468336c")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This station will charge a fee of %DI credits to fix half of your ship's damage. Are you ready to transfer the funds?
|
|
string_id message = new string_id (c_stringFile, "s_7f991ab5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_104");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_107");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 38);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Most of it.
|
|
if (response == "s_14897567")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This station will charge a fee of %DI credits to repairs most of the damage to your ship. Are you ready to transfer the funds?
|
|
string_id message = new string_id (c_stringFile, "s_a0434258");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_113");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 41);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: All of it.
|
|
if (response == "s_70876928")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This station will charge a fee of %DI credits to repair all of the damage to your ship. Are you ready to transfer the funds?
|
|
string_id message = new string_id (c_stringFile, "s_67f72920");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_122");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_125");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 44);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_naboo_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, %NU. Please comm us if this station can be of service.
|
|
string_id message = new string_id (c_stringFile, "s_43af1e95");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This station will charge a fee of %DI credits to make only the most basic repairs to your ship. Are you ready to transfer the funds?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
station_naboo_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete, %TU. 25% of your ship's damage has been fixed. Thank you for visiting the Royal Security Forces Naboo Station.
|
|
string_id message = new string_id (c_stringFile, "s_f478139");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %NU. Please comm us when we can be of further service.
|
|
string_id message = new string_id (c_stringFile, "s_f918e086");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This station will charge a fee of %DI credits to fix half of your ship's damage. Are you ready to transfer the funds?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_104")
|
|
{
|
|
station_naboo_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete, %TU. 50% of your ship's damage has been fixed. Thank you for visiting the Royal Security Forces Naboo Station.
|
|
string_id message = new string_id (c_stringFile, "s_3b9f150e");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: No.
|
|
if (response == "s_107")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %NU. Please comm us when we can be of further service.
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This station will charge a fee of %DI credits to repairs most of the damage to your ship. Are you ready to transfer the funds?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_113")
|
|
{
|
|
station_naboo_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete, %TU. 75% of your ship's damage has been fixed. Thank you for visiting the Royal Security Forces Naboo Station.
|
|
string_id message = new string_id (c_stringFile, "s_ca5ee405");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: No.
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %NU. Please comm us when we can be of further service.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch44 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This station will charge a fee of %DI credits to repair all of the damage to your ship. Are you ready to transfer the funds?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_122")
|
|
{
|
|
station_naboo_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete, %TU. All of your ship's damage has been fixed. Thank you for visiting the Royal Security Forces Naboo Station.
|
|
string_id message = new string_id (c_stringFile, "s_5cc333f9");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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: No.
|
|
if (response == "s_125")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Acknowledged, %NU. Please comm us when we can be of further service.
|
|
string_id message = new string_id (c_stringFile, "s_127");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo_handleBranch48 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes in fact I do. The Imperial station has informed us that they are looking for some loyal and able pilots to travel to Lok and disrupt some of the Rebel operations there.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_d6695e83")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well.
|
|
string_id message = new string_id (c_stringFile, "s_28586fd5");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds like my kind of work.
|
|
if (response == "s_d392ae0b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excellent, pilot. The Rebels think they are safe in the Karthakk system since they have a fragile alliance with the space pirate Nym. The Empire doesn't want to risk a full out assault on the system. Nym is quite powerful for a pirate and they have enough trouble fighting the Rebels right now.
|
|
string_id message = new string_id (c_stringFile, "s_c295eda3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't want to mess with Nym.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not afraid of a pirate!
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_f98be94d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9daa68de");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 50);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch50 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent, pilot. The Rebels think they are safe in the Karthakk system since they have a fragile alliance with the space pirate Nym. The Empire doesn't want to risk a full out assault on the system. Nym is quite powerful for a pirate and they have enough trouble fighting the Rebels right now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't want to mess with Nym.
|
|
if (response == "s_f98be94d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Might be wise. Carry on then, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_2c7bc9c5");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not afraid of a pirate!
|
|
if (response == "s_9daa68de")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't underestimate Nym, pilot. He's got a tight crew and is clever. The Empire wants to show the Rebels that they are not untouchable anywhere though. So, they are sending in solo pilots to disrupt Rebel operations in the system.
|
|
string_id message = new string_id (c_stringFile, "s_e3843534");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This sounds too complicated.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Won't Nym be angry?
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_bece5a73");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_81db3c91");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 52);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch52 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Don't underestimate Nym, pilot. He's got a tight crew and is clever. The Empire wants to show the Rebels that they are not untouchable anywhere though. So, they are sending in solo pilots to disrupt Rebel operations in the system.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This sounds too complicated.
|
|
if (response == "s_bece5a73")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well, carry on then pilot.
|
|
string_id message = new string_id (c_stringFile, "s_96d14fea");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Won't Nym be angry?
|
|
if (response == "s_81db3c91")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Nym is an honorable man, for a pirate at least. So far he's only seen these attacks as a challenge. He seems to think that if the Rebels can't handle a single pilot, they are weak. So, if you want I can connect you with the Imperial station and you can get started.
|
|
string_id message = new string_id (c_stringFile, "s_7e7609c1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No thanks!
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Let's get started.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_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_ee26e33e");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_f190c97c");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 54);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch54 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nym is an honorable man, for a pirate at least. So far he's only seen these attacks as a challenge. He seems to think that if the Rebels can't handle a single pilot, they are weak. So, if you want I can connect you with the Imperial station and you can get started.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks!
|
|
if (response == "s_ee26e33e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What? Oh... very well. Never mind.
|
|
string_id message = new string_id (c_stringFile, "s_382e612d");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's get started.
|
|
if (response == "s_f190c97c")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantImperialDestroyDutyTier2 (player, npc);
|
|
|
|
//-- NPC: Very well. Head for the Karthakk system. An Imperial commander will contact you near Lok.
|
|
string_id message = new string_id (c_stringFile, "s_45426495");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_naboo_handleBranch58 (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_160")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantRebelDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_170");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
if (response == "s_163")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantRebelDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_171");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
if (response == "s_195")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantRebelDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_197");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
if (response == "s_166")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantImperialDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_172");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
if (response == "s_169")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantImperialDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_174");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
if (response == "s_196")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantImperialDuty5 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_198");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Rogue Droids
|
|
if (response == "s_176")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantDroidDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_178");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Rogue Droids
|
|
if (response == "s_180")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantDroidDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_182");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Void Wing Pirates
|
|
if (response == "s_184")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantVoidDuty1 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_186");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Void Wing Pirates
|
|
if (response == "s_188")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
station_naboo_action_grantVoidDuty2 (player, npc);
|
|
|
|
//-- NPC: Transmitting mission data. Good hunting.
|
|
string_id message = new string_id (c_stringFile, "s_190");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing here for me
|
|
if (response == "s_192")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Stay safe.
|
|
string_id message = new string_id (c_stringFile, "s_194");
|
|
utils.removeScriptVar (player, "conversation.station_naboo.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_naboo.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_naboo.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_naboo");
|
|
|
|
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_naboo_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: You are too far away for us to be of assistance. Please fly closer and contact us at that time. Out.
|
|
string_id message = new string_id (c_stringFile, "s_1951f1c1");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition_canDoImperialAccess (player, npc))
|
|
{
|
|
//-- NPC: A loyal pilot...and just in time too! We need your help, stat, pilot!
|
|
string_id message = new string_id (c_stringFile, "s_98fa9519");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sorry, I need to land on Naboo right away.
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Before I do anything, I need repairs.
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_needRepairs (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What's the emergency?
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_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_e4c8ff17");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8460cdcf");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3bf3c89f");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "station_naboo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You have entered Naboo space, under the protection of the Royal Security Forces. Please identify yourself and your reason for visiting Naboo.
|
|
string_id message = new string_id (c_stringFile, "s_decdd151");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Request Permission to Land)
|
|
boolean hasResponse0 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: (Request Repairs)
|
|
boolean hasResponse1 = false;
|
|
if (station_naboo_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you need assistance with anything special?
|
|
boolean hasResponse2 = false;
|
|
if (station_naboo_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse3 = false;
|
|
if (station_naboo_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_cebd107d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c358d041");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98f3774d");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_157");
|
|
|
|
utils.setScriptVar (player, "conversation.station_naboo.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "station_naboo", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "station_naboo")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_naboo.branchId");
|
|
|
|
if (branchId == 2 && station_naboo_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && station_naboo_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && station_naboo_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && station_naboo_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && station_naboo_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_naboo_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && station_naboo_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && station_naboo_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && station_naboo_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && station_naboo_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && station_naboo_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && station_naboo_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && station_naboo_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && station_naboo_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && station_naboo_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_naboo_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && station_naboo_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 44 && station_naboo_handleBranch44 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 48 && station_naboo_handleBranch48 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 50 && station_naboo_handleBranch50 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 52 && station_naboo_handleBranch52 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 54 && station_naboo_handleBranch54 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 58 && station_naboo_handleBranch58 (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_naboo.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|