mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
3790 lines
102 KiB
Plaintext
3790 lines
102 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// station_tatooine.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.factions;
|
|
include library.space_combat;
|
|
include library.space_content;
|
|
include library.space_crafting;
|
|
include library.space_flags;
|
|
include library.space_quest;
|
|
include library.space_skill;
|
|
include library.space_transition;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/station_tatooine";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean station_tatooine_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAfford50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAfford25 (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged( player ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAfford75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAfford100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_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_tatooine_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_tatooine_condition_isFirstTierTatooinePrivateer (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.PRIVATEER_TATOOINE ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_isFirstTierTatooineRebel (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.REBEL_TATOOINE ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_isFirstTierTatooineImperial (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_flags.isInTierOne( player ) &&
|
|
space_flags.isSpaceTrack( player, space_flags.IMPERIAL_TATOOINE ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canDoJabbaAccess (obj_id player, obj_id npc)
|
|
{
|
|
if (space_quest.hasWonQuest( player, "assassinate", "tatooine_station_hutt_palace_access_quest_4" ))
|
|
return false;
|
|
|
|
if (space_quest.hasQuest(player))
|
|
return false;
|
|
|
|
if (space_transition.getPlayerSpaceFaction(player) == ##"valarian" )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canGetTier1RecoveryDuty (obj_id player, obj_id npc)
|
|
{
|
|
if (space_flags.hasCompletedTierOne (player))
|
|
return false;
|
|
|
|
if (space_quest.hasQuest (player, "recovery_duty", "tatooine_station_hutt_recovery_duty_tier1_1" ))
|
|
return false;
|
|
|
|
if (hasSkill( player, "pilot_rebel_navy_novice" ))
|
|
return true;
|
|
|
|
if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_TATOOINE))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canLandAtJabbas (obj_id player, obj_id npc)
|
|
{
|
|
//Anyone working for Jabba can land at the palace, when working for Lady Valaria you walk.
|
|
if (space_flags.isSpaceTrack(player, space_flags.PRIVATEER_TATOOINE) && !space_flags.isInTierTwo(player))
|
|
return true;
|
|
|
|
//Jabba makes exceptions for Bounty Hunters and Smugglers
|
|
if (utils.isProfession (player, utils.SMUGGLER) || utils.isProfession(player, utils.BOUNTY_HUNTER))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canLandAtHouse (obj_id player, obj_id npc)
|
|
{
|
|
if (hasObjVar (player, "homingBeacon.planet"))
|
|
{
|
|
string homePlanet = getStringObjVar (player, "homingBeacon.planet");
|
|
|
|
return (homePlanet.endsWith ("tatooine"));
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canTakeQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(space_quest.hasQuest(player))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAttackImperial (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canAttackRebel (obj_id player, obj_id npc)
|
|
{
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canTakeTier5ImperialDuty (obj_id player, obj_id npc)
|
|
{
|
|
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if(space_flags.isImperialPilot(player) || space_flags.isImperialHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean station_tatooine_condition_canTakeTier5RebelDuty (obj_id player, obj_id npc)
|
|
{
|
|
if(!space_skill.isMasterPilot(player))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if(space_flags.isRebelPilot(player) || space_flags.isRebelHelperPilot(player))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void station_tatooine_action_landStation3 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Espa Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_fix25 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .25f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_fix50 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .50f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_fix75 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_fix100 (obj_id player, obj_id npc)
|
|
{
|
|
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_landStation1 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Bestine Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_landStation2 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Eisley Starport");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_landStation4 (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Mos Entha Spaceport");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_giveJabbaAccessQuest (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "rescue", "tatooine_station_hutt_palace_access_quest_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantTier1RecoveryDuty (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "recovery_duty", "tatooine_station_hutt_recovery_duty_tier1_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_landJabba (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayer(player, npc, "Jabba's Palace");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_landHoming (obj_id player, obj_id npc)
|
|
{
|
|
space_content.landPlayerHoming(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantImperialDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_imperial_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantImperialDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_imperial_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantRebelDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_rebel_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantRebelDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_rebel_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantHiddenDaggerDuty2 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_hidden_dagger_tier2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantHiddenDaggerDuty1 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_hidden_dagger_tier1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantImperialDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_imperial_tier5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void station_tatooine_action_grantRebelDuty5 (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "destroy_duty", "tatooine_rebel_tier5");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string station_tatooine_tokenTO_tokenTO0001 (obj_id player, obj_id npc)
|
|
{
|
|
return new string();
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int station_tatooine_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .25f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .50f);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, .75f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
|
|
{
|
|
return space_crafting.getStationRepairCost(player, npc, 1.0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int station_tatooine_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That name, I recognize that name. Oh, that's right, you're on my list to be offered some sensitive work if you're interested.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I just want to land on Tatooine.
|
|
if (response == "s_375a3c20")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah? Anywhere in particular or were you just gonna set down in the desert?
|
|
string_id message = new string_id (c_stringFile, "s_83bace61");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Bestine Starport (Imperial Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooineImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Eisley Starport (Freelance Pilot Trainer).
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooinePrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Espa Starport (Rebel Pilot Trainer).
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooineRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Bestine Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooineImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Eisley Starport.
|
|
boolean hasResponse4 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooinePrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Espa Starport.
|
|
boolean hasResponse5 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooineRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Entha Starport.
|
|
boolean hasResponse6 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Jabba's Palace.
|
|
boolean hasResponse7 = false;
|
|
if (station_tatooine_condition_canLandAtJabbas (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Homing Beacon.
|
|
boolean hasResponse8 = false;
|
|
if (station_tatooine_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_dbc1c043");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4fd56d4d");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3cdf6820");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_43d2bcbe");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ccbc6cf4");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_75ba8830");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69ffeefe");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ce4621b5");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_133");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I just need repairs.
|
|
if (response == "s_96bea28d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: So I noticed. Looks like you bit off a little more than you could chew. So what do want: a complete overhaul or just enough repairs to put you back on your way?
|
|
string_id message = new string_id (c_stringFile, "s_35221afe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Minor repairs.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair half the damage.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of the damage.
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all the damage.
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nevermind.
|
|
boolean hasResponse4 = false;
|
|
if (station_tatooine_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_696719e4");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6aea6f34");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5cf3921");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d1076b9d");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_da196589");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of sensitive work?
|
|
if (response == "s_f2b8a1d8")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Lady Valarian has placed a bounty on one of Jabba's smugglers and is looking for competent pilots to collect it. Interested?
|
|
string_id message = new string_id (c_stringFile, "s_462a718b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No I don't have time.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sounds interesting, how do I get started?
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_a5254f36");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3147a9c7");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_217")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_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_195");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_tatooine_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Hidden Dagger Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Hidden Dagger Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_197");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_201");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_203");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_164");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_205");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_207");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_214");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 58);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Lady Valarian has placed a bounty on one of Jabba's smugglers and is looking for competent pilots to collect it. Interested?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No I don't have time.
|
|
if (response == "s_a5254f36")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Suit yourself, you were probably not the right person for the job anyway.
|
|
string_id message = new string_id (c_stringFile, "s_39076454");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds interesting, how do I get started?
|
|
if (response == "s_3147a9c7")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Keep in mind, the target is pretty dangerous. Looking at you, you may need some help in completing this. Anyway, if you are ready now, I will patch you up to the contact Lady Valarian gave me.
|
|
string_id message = new string_id (c_stringFile, "s_3cbb3f38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will come back later.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Let's do it!
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_2f2188d5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dd4bb16d");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Keep in mind, the target is pretty dangerous. Looking at you, you may need some help in completing this. Anyway, if you are ready now, I will patch you up to the contact Lady Valarian gave me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will come back later.
|
|
if (response == "s_2f2188d5")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I thought so.
|
|
string_id message = new string_id (c_stringFile, "s_66b68768");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's do it!
|
|
if (response == "s_dd4bb16d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_giveJabbaAccessQuest (player, npc);
|
|
|
|
//-- NPC: Very well, good luck. Oh, and this target you're going after, he's a clever guy. Make sure to search the cargo of his ship if you get him. He's bound to have something interesting.
|
|
string_id message = new string_id (c_stringFile, "s_12b89c7f");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey, you! What do you want?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to land on Tatooine.
|
|
if (response == "s_5984746e")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah? Anywhere in particular or were you just gonna set down in the desert?
|
|
string_id message = new string_id (c_stringFile, "s_83bace61");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Bestine Starport (Imperial Pilot Trainer).
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooineImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Eisley Starport (Freelance Pilot Trainer).
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooinePrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Espa Starport (Rebel Pilot Trainer).
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_isFirstTierTatooineRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Bestine Starport.
|
|
boolean hasResponse3 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooineImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Eisley Starport.
|
|
boolean hasResponse4 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooinePrivateer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Espa Starport.
|
|
boolean hasResponse5 = false;
|
|
if (!station_tatooine_condition_isFirstTierTatooineRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: Mos Entha Starport.
|
|
boolean hasResponse6 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: Jabba's Palace.
|
|
boolean hasResponse7 = false;
|
|
if (station_tatooine_condition_canLandAtJabbas (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Homing Beacon.
|
|
boolean hasResponse8 = false;
|
|
if (station_tatooine_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_dbc1c043");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4fd56d4d");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3cdf6820");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_43d2bcbe");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ccbc6cf4");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_75ba8830");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69ffeefe");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ce4621b5");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_133");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need repairs.
|
|
if (response == "s_6c8ffad8")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: So I noticed. Looks like you bit off a little more than you could chew. So what do want: a complete overhaul or just enough repairs to put you back on your way?
|
|
string_id message = new string_id (c_stringFile, "s_35221afe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Minor repairs.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair half the damage.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAfford50 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair most of the damage.
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_canAfford75 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Repair all the damage.
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_condition_canAfford100 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nevermind.
|
|
boolean hasResponse4 = false;
|
|
if (station_tatooine_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_696719e4");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6aea6f34");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5cf3921");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d1076b9d");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_da196589");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have any special work for me?
|
|
if (response == "s_4360fc64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition_canGetTier1RecoveryDuty (player, npc))
|
|
{
|
|
//-- NPC: Well, if you don't mind helping the Hutts, I might have something.
|
|
string_id message = new string_id (c_stringFile, "s_165");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Hutts?! I don't think so.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Of course not.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_167");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_171");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 51);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition_canTakeQuest (player, npc))
|
|
{
|
|
//-- NPC: What does this look like, an unemployment agency? Try one of the mercenary tasks.
|
|
string_id message = new string_id (c_stringFile, "s_121c3b6");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Well, what mercenary work do you have?
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_218");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 56);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What does this look like, an unemployment agency?
|
|
string_id message = new string_id (c_stringFile, "s_216");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
if (response == "s_193")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_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_195");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_tatooine_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Hidden Dagger Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Hidden Dagger Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_197");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_201");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_203");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_164");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_205");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_207");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_214");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 58);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yeah? Anywhere in particular or were you just gonna set down in the desert?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Bestine Starport (Imperial Pilot Trainer).
|
|
if (response == "s_dbc1c043")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_ea06a410");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks!
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, I changed my mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_c4682ea6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4dc4840b");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Mos Eisley Starport (Freelance Pilot Trainer).
|
|
if (response == "s_4fd56d4d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Go ahead and land. No one there cares who comes or goes.
|
|
string_id message = new string_id (c_stringFile, "s_6ff46cdd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait! I changed my mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_b9b27823");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d195782");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Mos Espa Starport (Rebel Pilot Trainer).
|
|
if (response == "s_3cdf6820")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_895d093");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e1ef9209");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Bestine Starport.
|
|
if (response == "s_43d2bcbe")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thanks!
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, I changed my mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_tatooine.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Mos Eisley Starport.
|
|
if (response == "s_ccbc6cf4")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Go ahead and land. No one there cares who comes or goes.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait! I changed my mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_53");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_57");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Mos Espa Starport.
|
|
if (response == "s_75ba8830")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_68");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Mos Entha Starport.
|
|
if (response == "s_69ffeefe")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Jabba's Palace.
|
|
if (response == "s_ce4621b5")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Let me see if you're welcome there. I guess you are.
|
|
string_id message = new string_id (c_stringFile, "s_1d21e3c0");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Of course.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I don't want to land there.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_52917b0d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e76d5278");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Homing Beacon.
|
|
if (response == "s_133")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alright, you're clear to land.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hold on, I changed my mind.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_135");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_136");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 34);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks!
|
|
if (response == "s_c4682ea6")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Whatever.
|
|
string_id message = new string_id (c_stringFile, "s_c1013aa7");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, I changed my mind.
|
|
if (response == "s_4dc4840b")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well hail me when you figure out what it is you need.
|
|
string_id message = new string_id (c_stringFile, "s_1dbd74da");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Go ahead and land. No one there cares who comes or goes.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_b9b27823")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Yeah, yeah. Tatooine station, out!
|
|
string_id message = new string_id (c_stringFile, "s_333ffc01");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait! I changed my mind.
|
|
if (response == "s_d195782")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm too busy to wait. Let me know when you figure out what it is you want.
|
|
string_id message = new string_id (c_stringFile, "s_43b6dcb9");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_895d093")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation3 (player, npc);
|
|
|
|
//-- NPC: Watch your back.
|
|
string_id message = new string_id (c_stringFile, "s_4650b19f");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
if (response == "s_e1ef9209")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Land in the Dune Sea for all I care. Tatooine Station, out!
|
|
string_id message = new string_id (c_stringFile, "s_b729c637");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thanks!
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation1 (player, npc);
|
|
|
|
//-- NPC: Whatever.
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, I changed my mind.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, hail me when you figure out what it is you need.
|
|
string_id message = new string_id (c_stringFile, "s_2a7858d1");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Go ahead and land. No one there cares who comes or goes.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_53")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation2 (player, npc);
|
|
|
|
//-- NPC: Yeah, yeah. Tatooine station, out!
|
|
string_id message = new string_id (c_stringFile, "s_55");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait! I changed my mind.
|
|
if (response == "s_57")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm too busy to wait. Let me know when you figure out what it is you want.
|
|
string_id message = new string_id (c_stringFile, "s_59");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation3 (player, npc);
|
|
|
|
//-- NPC: Watch your back.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Land in the Dune Sea for all I care. Tatooine Station, out!
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landStation4 (player, npc);
|
|
|
|
//-- NPC: Good riddance!
|
|
string_id message = new string_id (c_stringFile, "s_b26eb03c");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, I don't want to land there.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Stay in orbit and rot. Tatooine Station, out!
|
|
string_id message = new string_id (c_stringFile, "s_1ba81e14");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Let me see if you're welcome there. I guess you are.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Of course.
|
|
if (response == "s_52917b0d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landJabba (player, npc);
|
|
|
|
//-- NPC: Whatever.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: On second thought, I don't want to land there.
|
|
if (response == "s_e76d5278")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have time for this, come back when you have made up your mind.
|
|
string_id message = new string_id (c_stringFile, "s_82f403b1");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alright, you're clear to land.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_135")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_landHoming (player, npc);
|
|
|
|
//-- NPC: What ever.
|
|
string_id message = new string_id (c_stringFile, "s_138");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hold on, I changed my mind.
|
|
if (response == "s_136")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Do you think this is a game? Don't pester me until you know what you want.
|
|
string_id message = new string_id (c_stringFile, "s_137");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So I noticed. Looks like you bit off a little more than you could chew. So what do want: a complete overhaul or just enough repairs to put you back on your way?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Minor repairs.
|
|
if (response == "s_696719e4")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can touch up the paint for %DI credits. How's that sound?
|
|
string_id message = new string_id (c_stringFile, "s_eecfecc1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_98");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4c695dbd");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 38);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost25 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair half the damage.
|
|
if (response == "s_6aea6f34")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sure, we can do that. Does %DI credits sound fair?
|
|
string_id message = new string_id (c_stringFile, "s_c130a6b8");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_107");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 41);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost50 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair most of the damage.
|
|
if (response == "s_5cf3921")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, how does %DI credits in exchange for repairing three-fourths of the damage sound to ya?
|
|
string_id message = new string_id (c_stringFile, "s_42648804");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds good.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_5e2a2bb1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d6695e83");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 44);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost75 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Repair all the damage.
|
|
if (response == "s_d1076b9d")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We can repair all the damage on your ship for a mere %DI credits. Good luck finding another offer like that around here.
|
|
string_id message = new string_id (c_stringFile, "s_7a45c683");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take it.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_d0fd857b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_122");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 47);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.digitInteger = station_tatooine_tokenDI_getStationRepairCost100 (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nevermind.
|
|
if (response == "s_da196589")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Repair it yourself.
|
|
string_id message = new string_id (c_stringFile, "s_127");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can touch up the paint for %DI credits. How's that sound?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_98")
|
|
{
|
|
station_tatooine_action_fix25 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, there you go. We fixed just enough to get you out of my face. See you next time. Ha!
|
|
string_id message = new string_id (c_stringFile, "s_4d9fae53");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Repair it yourself.
|
|
string_id message = new string_id (c_stringFile, "s_b086bdca");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sure, we can do that. Does %DI credits sound fair?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
station_tatooine_action_fix50 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete! See you soon! Ha!
|
|
string_id message = new string_id (c_stringFile, "s_c5b42136");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_107")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Repair it yourself.
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch44 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ok, how does %DI credits in exchange for repairing three-fourths of the damage sound to ya?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds good.
|
|
if (response == "s_5e2a2bb1")
|
|
{
|
|
station_tatooine_action_fix75 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Repairs complete. You're almost as good as new. Good as you probably need to be, anyway.
|
|
string_id message = new string_id (c_stringFile, "s_b6e0e78d");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_d6695e83")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Repair it yourself.
|
|
string_id message = new string_id (c_stringFile, "s_116");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch47 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We can repair all the damage on your ship for a mere %DI credits. Good luck finding another offer like that around here.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take it.
|
|
if (response == "s_d0fd857b")
|
|
{
|
|
station_tatooine_action_fix100 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your ship has been completely fixed. No doubt I'll be seeing you again real soon. Ha!
|
|
string_id message = new string_id (c_stringFile, "s_27445295");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_122")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine by me. Repair it yourself.
|
|
string_id message = new string_id (c_stringFile, "s_124");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch51 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, if you don't mind helping the Hutts, I might have something.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hutts?! I don't think so.
|
|
if (response == "s_167")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: These are not times to be picky, but suit yourself.
|
|
string_id message = new string_id (c_stringFile, "s_169");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Of course not.
|
|
if (response == "s_171")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alright. The Hutts are hiring pilots to assist them in capturing freighters around the Tatooine system. If that sounds like something you want to do, I can connect you to one of them right now.
|
|
string_id message = new string_id (c_stringFile, "s_173");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Hook me up!
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I don't think so, maybe another time.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_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_175");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_179");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 53);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch53 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alright. The Hutts are hiring pilots to assist them in capturing freighters around the Tatooine system. If that sounds like something you want to do, I can connect you to one of them right now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hook me up!
|
|
if (response == "s_175")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantTier1RecoveryDuty (player, npc);
|
|
|
|
//-- NPC: Very well, give me a second.
|
|
string_id message = new string_id (c_stringFile, "s_177");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't think so, maybe another time.
|
|
if (response == "s_179")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whatever.
|
|
string_id message = new string_id (c_stringFile, "s_181");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_handleBranch56 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What does this look like, an unemployment agency? Try one of the mercenary tasks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Well, what mercenary work do you have?
|
|
if (response == "s_218")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_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_195");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Imperial patrols
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAttackImperial (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition_canTakeTier5RebelDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
boolean hasResponse4 = false;
|
|
if (station_tatooine_condition_canAttackRebel (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
boolean hasResponse5 = false;
|
|
if (station_tatooine_condition_canTakeTier5ImperialDuty (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 1 Hidden Dagger Pirates
|
|
boolean hasResponse6 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll hunt down tier 2 Hidden Dagger Pirates
|
|
boolean hasResponse7 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse7 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing here for me
|
|
boolean hasResponse8 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse8 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_197");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_163");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_201");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_203");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_164");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_205");
|
|
|
|
if (hasResponse7)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_207");
|
|
|
|
if (hasResponse8)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_214");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 58);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int station_tatooine_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_197")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantRebelDuty1 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_208");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Imperial patrols
|
|
if (response == "s_199")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantRebelDuty2 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_209");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Imperial patrols
|
|
if (response == "s_163")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantRebelDuty5 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_166");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Rebel patrols
|
|
if (response == "s_201")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantImperialDuty1 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_210");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Rebel patrols
|
|
if (response == "s_203")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantImperialDuty2 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_211");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 5 Rebel patrols
|
|
if (response == "s_164")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantImperialDuty5 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_168");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 1 Hidden Dagger Pirates
|
|
if (response == "s_205")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantHiddenDaggerDuty1 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_212");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll hunt down tier 2 Hidden Dagger Pirates
|
|
if (response == "s_207")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
station_tatooine_action_grantHiddenDaggerDuty2 (player, npc);
|
|
|
|
//-- NPC: Very well, transmitting data.
|
|
string_id message = new string_id (c_stringFile, "s_213");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing here for me
|
|
if (response == "s_214")
|
|
{
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Then stop waisting my time.
|
|
string_id message = new string_id (c_stringFile, "s_215");
|
|
utils.removeScriptVar (player, "conversation.station_tatooine.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_tatooine.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_station_tatooine.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_tatooine");
|
|
|
|
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_tatooine_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: Hey, what do you expect me to do for you when you're so far away? Come closer before you bother me.
|
|
string_id message = new string_id (c_stringFile, "s_a9ce7ad3");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition_canDoJabbaAccess (player, npc))
|
|
{
|
|
//-- NPC: That name, I recognize that name. Oh, that's right, you're on my list to be offered some sensitive work if you're interested.
|
|
string_id message = new string_id (c_stringFile, "s_e2190b5d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I just want to land on Tatooine.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I just need repairs.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What kind of sensitive work?
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_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_375a3c20");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96bea28d");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_f2b8a1d8");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_217");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "station_tatooine", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hey, you! What do you want?
|
|
string_id message = new string_id (c_stringFile, "s_a9152d31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to land on Tatooine.
|
|
boolean hasResponse0 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need repairs.
|
|
boolean hasResponse1 = false;
|
|
if (station_tatooine_condition_canAfford25 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you have any special work for me?
|
|
boolean hasResponse2 = false;
|
|
if (station_tatooine_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Any mercenary assignments available?
|
|
boolean hasResponse3 = false;
|
|
if (station_tatooine_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_5984746e");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6c8ffad8");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4360fc64");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_193");
|
|
|
|
utils.setScriptVar (player, "conversation.station_tatooine.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "station_tatooine", 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_tatooine")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.station_tatooine.branchId");
|
|
|
|
if (branchId == 2 && station_tatooine_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && station_tatooine_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && station_tatooine_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && station_tatooine_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && station_tatooine_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && station_tatooine_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && station_tatooine_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && station_tatooine_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && station_tatooine_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && station_tatooine_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && station_tatooine_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && station_tatooine_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && station_tatooine_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && station_tatooine_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && station_tatooine_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && station_tatooine_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && station_tatooine_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 44 && station_tatooine_handleBranch44 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 47 && station_tatooine_handleBranch47 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 51 && station_tatooine_handleBranch51 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 53 && station_tatooine_handleBranch53 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 56 && station_tatooine_handleBranch56 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 58 && station_tatooine_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_tatooine.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|