Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/station_kashyyyk.script
T
2013-09-10 23:17:15 -07:00

8599 lines
233 KiB
Plaintext

// ======================================================================
//
// station_kashyyyk.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.badge;
include library.chat;
include library.groundquests;
include library.space_battlefield;
include library.space_combat;
include library.space_content;
include library.space_crafting;
include library.space_flags;
include library.space_quest;
include library.space_transition;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/station_kashyyyk";
// ======================================================================
// Script Conditions
// ======================================================================
boolean station_kashyyyk_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_canAfford50 (obj_id player, obj_id npc)
{
return space_crafting.canAffordShipRepairs(player, npc, .50f);
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_canAfford25 (obj_id player, obj_id npc)
{
return ( space_crafting.canAffordShipRepairs(player, npc, .25f) && space_crafting.isDamaged( player ) );
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_canAfford75 (obj_id player, obj_id npc)
{
return space_crafting.canAffordShipRepairs(player, npc, .75f);
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_canAfford100 (obj_id player, obj_id npc)
{
return space_crafting.canAffordShipRepairs(player, npc, 1.0f);
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWonQuest_01 (obj_id player, obj_id npc)
{
// Has finished the first escort but not the second...
return ( space_quest.hasWonQuest( player, "escort", "ep3_kash_station_escort_alpha"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWonQuest_02 (obj_id player, obj_id npc)
{
return ( space_quest.hasWonQuest( player, "escort", "ep3_kash_station_escort_bravo") );
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWonQuest_03 (obj_id player, obj_id npc)
{
return ( space_quest.hasWonQuest(player, "rescue", "ep3_kash_station_rescue_alpha") );
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWonQuest_04 (obj_id player, obj_id npc)
{
return ( space_quest.hasWonQuest(player, "rescue", "ep3_kash_station_rescue_bravo") );
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_escort_alpha (obj_id player, obj_id npc)
{
return ( space_quest.hasQuest( player, "escort", "ep3_kash_station_escort_alpha"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasFailedQuest_01 (obj_id player, obj_id npc)
{
return ( space_quest.hasFailedQuest( player, "escort", "ep3_kash_station_escort_alpha") ||
space_quest.hasAbortedQuest( player, "escort", "ep3_kash_station_escort_alpha"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasBeenRewarded_01 (obj_id player, obj_id npc)
{
return space_quest.hasReceivedReward( player, "escort", "ep3_kash_station_escort_alpha");
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasFailedQuest_02 (obj_id player, obj_id npc)
{
return ( space_quest.hasFailedQuest( player, "escort", "ep3_kash_station_escort_bravo") ||
space_quest.hasAbortedQuest( player, "escort", "ep3_kash_station_escort_bravo"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasBeenRewarded_02 (obj_id player, obj_id npc)
{
return space_quest.hasReceivedReward( player, "escort", "ep3_kash_station_escort_bravo");
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWon01_not02yet (obj_id player, obj_id npc)
{
// Has finished the first escort but not the second...
return ( space_quest.hasWonQuest( player, "escort", "ep3_kash_station_escort_alpha") &&
(!space_quest.hasWonQuest(player, "escort", "ep3_kash_station_escort_bravo") ));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWon02_not03yet (obj_id player, obj_id npc)
{
// Has finished the second escort but not the first rescue...
return ( space_quest.hasWonQuest( player, "escort", "ep3_kash_station_escort_bravo") &&
(!space_quest.hasWonQuest(player, "rescue", "ep3_kash_station_rescue_alpha") ));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWon03_not04yet (obj_id player, obj_id npc)
{
// Has finished the first rescue but not the second rescue...
return ( space_quest.hasWonQuest( player, "rescue", "ep3_kash_station_rescue_alpha") &&
(!space_quest.hasWonQuest(player, "rescue", "ep3_kash_station_rescue_bravo") ));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasDoneGround_01 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "ep3_kash_station_contact_eyma_01"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWon_assassinations (obj_id player, obj_id npc)
{
// Has the player won any of the three ASSASSINATION missions he can take at this point?
return ( space_quest.hasReceivedReward(player, "assassinate", "ep3_kash_station_assassinate_neutral") ||
space_quest.hasReceivedReward(player, "assassinate", "ep3_kash_station_assassinate_rebel") ||
space_quest.hasReceivedReward(player, "assassinate", "ep3_kash_station_assassinate_imperial"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_ground_01 (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "ep3_kash_station_contact_eyma_01"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_AMBUSH (obj_id player, obj_id npc)
{
return ( space_quest.hasQuest( player, "destroy_surpriseattack", "ep3_kash_station_ghrag_ambush") ||
space_quest.hasQuest( player, "destroy_surpriseattack", "ep3_kash_station_ghrag_ambush_strong"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasFailedQuest_03 (obj_id player, obj_id npc)
{
return ( space_quest.hasFailedQuest( player, "rescue", "ep3_kash_station_rescue_alpha") ||
space_quest.hasAbortedQuest( player, "rescue", "ep3_kash_station_rescue_alpha"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_ground_00 (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "ep3_kash_station_contact_eyma_00"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_rescue_alpha (obj_id player, obj_id npc)
{
return ( space_quest.hasQuest( player, "rescue", "ep3_kash_station_rescue_alpha"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isOnQuest_escort_bravo (obj_id player, obj_id npc)
{
return ( space_quest.hasQuest( player, "escort", "ep3_kash_station_escort_bravo"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_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_kashyyyk_condition_hasBadge_visited_Kachirho (obj_id player, obj_id npc)
{
return badge.hasBadge(player, "exp_kash_kachirho_found");
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasBeenRewarded_blacksun_heavy (obj_id player, obj_id npc)
{
return space_quest.hasReceivedReward( player, "recovery", "ep3_blacksun_heavy_recovery");
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_hasWon_blacksun_heavy_recovery (obj_id player, obj_id npc)
{
return (space_quest.hasWonQuest(player, "recovery", "ep3_blacksun_heavy_recovery") &&
!space_quest.hasReceivedReward(player, "recovery", "ep3_blacksun_heavy_recovery"));
}
// ----------------------------------------------------------------------
boolean station_kashyyyk_condition_isNeutralPilot (obj_id player, obj_id npc)
{
return ( space_battlefield.isInNeutralShip(player) || pvpGetAlignedFaction( player ) == ##"neutral" );
}
// ======================================================================
// Script Actions
// ======================================================================
void station_kashyyyk_action_land_kashyyyk (obj_id player, obj_id npc)
{
space_content.landPlayer(player, npc, "Kachirho Starport");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_fix25 (obj_id player, obj_id npc)
{
space_crafting.doStationToShipRepairs(player, npc, .25f);
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_fix50 (obj_id player, obj_id npc)
{
space_crafting.doStationToShipRepairs(player, npc, .50f);
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_fix75 (obj_id player, obj_id npc)
{
space_crafting.doStationToShipRepairs(player, npc, .75f);
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_fix100 (obj_id player, obj_id npc)
{
space_crafting.doStationToShipRepairs(player, npc, 1.0f);
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantQuest_01 (obj_id player, obj_id npc)
{
// Player doesn't even know the station operator's name.
// There is trouble. An automated distress signal has reached the station. Nobody will help. How 'bout you?
space_quest.grantQuest(player, "escort", "ep3_kash_station_escort_alpha");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantQuest_02 (obj_id player, obj_id npc)
{
// Having proved trustworthy, the player is asked to help another distressed traveler.
// This time a civilian transport has been disabled by pirates.
space_quest.grantQuest(player, "escort", "ep3_kash_station_escort_bravo");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantQuest_03 (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "rescue", "ep3_kash_station_rescue_alpha");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantQuest_04 (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "rescue", "ep3_kash_station_rescue_bravo");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_rewardQuest_01 (obj_id player, obj_id npc)
{
if (!space_quest.hasReceivedReward( player, "escort", "ep3_kash_station_escort_alpha") )
{
space_quest.giveReward( player, "escort", "ep3_kash_station_escort_alpha", 400 );
}
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_rewardQuest_02 (obj_id player, obj_id npc)
{
if (!space_quest.hasReceivedReward( player, "escort", "ep3_kash_station_escort_bravo") )
{
space_quest.giveReward( player, "escort", "ep3_kash_station_escort_bravo", 500 );
}
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantDuty_escort (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "escort_duty", "ep3_kash_station_escort_duty");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_giveGroundQuest_01 (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_kash_station_contact_eyma_01");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantDuty_destroy (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "destroy_duty", "ep3_kash_station_destroy_duty_neutral");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_giveGroundQuest_00 (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_kash_station_contact_eyma_00");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_Land_and_GrantBadge_visited_Kachirho (obj_id player, obj_id npc)
{
badge.grantBadge (player, "exp_kash_kachirho_found");
space_content.landPlayer(player, npc, "Kachirho Starport");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_grantQuest_blacksun_heavy_recovery (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "recovery", "ep3_blacksun_heavy_recovery");
}
// ----------------------------------------------------------------------
void station_kashyyyk_action_giveReward_blacksun_heavy (obj_id player, obj_id npc)
{
badge.grantBadge (player, "bdg_kash_neutral_blacksun_heavy"); // Badge for 'can fly' blacksun Vaksai starship chassis
space_quest.giveReward( player, "recovery", "ep3_blacksun_heavy_recovery", 15000, "object/tangible/ship/crafted/chassis/blacksun_vaksai_reward_deed.iff" );
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
int station_kashyyyk_tokenDI_getStationRepairCost25 (obj_id player, obj_id npc)
{
return space_crafting.getStationRepairCost(player, npc, .25f);
}
// ----------------------------------------------------------------------
int station_kashyyyk_tokenDI_getStationRepairCost50 (obj_id player, obj_id npc)
{
return space_crafting.getStationRepairCost(player, npc, .50f);
}
// ----------------------------------------------------------------------
int station_kashyyyk_tokenDI_getStationRepairCost75 (obj_id player, obj_id npc)
{
return space_crafting.getStationRepairCost(player, npc, .75f);
}
// ----------------------------------------------------------------------
int station_kashyyyk_tokenDI_getStationRepairCost100 (obj_id player, obj_id npc)
{
return space_crafting.getStationRepairCost(player, npc, 1.0f);
}
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int station_kashyyyk_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great - just what we needed: another mercenary killer. What do you want here anyway?
//-- [RESPONSE NOTE]
//-- PLAYER: I would like to land.
if (response == "s_208")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Sure. Anything to get you mercs out of my hair! I'll let you land at the Kachirho starport.
string_id message = new string_id (c_stringFile, "s_210");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks. (LAND)
boolean hasResponse0 = false;
if (station_kashyyyk_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_214");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'd like repairs.
if (response == "s_222")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Why? So you can blast us all to bits? Sorry. I don't trust you yet.
string_id message = new string_id (c_stringFile, "s_226");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What will make you trust me?
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Fine! Just clear me for landing. (LAND)
boolean hasResponse1 = false;
if (station_kashyyyk_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_394");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_418");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Uh... nevermind.
if (response == "s_247")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Kashyyyk station out.
string_id message = new string_id (c_stringFile, "s_249");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Sure. Anything to get you mercs out of my hair! I'll let you land at the Kachirho starport.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks. (LAND)
if (response == "s_214")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_Land_and_GrantBadge_visited_Kachirho (player, npc);
//-- NPC: Stay healthy... (you murdering mercenary!)
string_id message = new string_id (c_stringFile, "s_218");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Why? So you can blast us all to bits? Sorry. I don't trust you yet.
//-- [RESPONSE NOTE]
//-- PLAYER: What will make you trust me?
if (response == "s_394")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Why don't you drop in to Kachirho? Take a look around? Try not to kill anybody for a while... how about that?
string_id message = new string_id (c_stringFile, "s_396");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It's a deal. (LAND)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: You got me all wrong, lady.
boolean hasResponse1 = false;
if (station_kashyyyk_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_398");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_402");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Fine! Just clear me for landing. (LAND)
if (response == "s_418")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_Land_and_GrantBadge_visited_Kachirho (player, npc);
//-- NPC: Confirmed... (filthy mercenary sithspawn!)
string_id message = new string_id (c_stringFile, "s_245");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Why don't you drop in to Kachirho? Take a look around? Try not to kill anybody for a while... how about that?
//-- [RESPONSE NOTE]
//-- PLAYER: It's a deal. (LAND)
if (response == "s_398")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_Land_and_GrantBadge_visited_Kachirho (player, npc);
//-- NPC: Confirmed. Landing at Kachirho starport.
string_id message = new string_id (c_stringFile, "s_400");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You got me all wrong, lady.
if (response == "s_402")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Oh of course! You're the ONE pilot in all of Kashyyyk space who's not out to steal every last credit from these hard-working civilians, right? Sure.
string_id message = new string_id (c_stringFile, "s_404");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Can I have clearance to land?
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Nevermind.
boolean hasResponse1 = false;
if (station_kashyyyk_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_406");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_414");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh of course! You're the ONE pilot in all of Kashyyyk space who's not out to steal every last credit from these hard-working civilians, right? Sure.
//-- [RESPONSE NOTE]
//-- PLAYER: Can I have clearance to land?
if (response == "s_406")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Oh. You want to visit Kachirho? Well - maybe that's different. Most of the mercs around here stay clear of the planet surface... for a variety of reasons. You sure you want to land?
string_id message = new string_id (c_stringFile, "s_408");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. (LAND)
boolean hasResponse0 = false;
if (station_kashyyyk_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_410");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nevermind.
if (response == "s_414")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Kashyyyk station out!
string_id message = new string_id (c_stringFile, "s_416");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh. You want to visit Kachirho? Well - maybe that's different. Most of the mercs around here stay clear of the planet surface... for a variety of reasons. You sure you want to land?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. (LAND)
if (response == "s_410")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_Land_and_GrantBadge_visited_Kachirho (player, npc);
//-- NPC: Confirmed.
string_id message = new string_id (c_stringFile, "s_412");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Eyma said you were going to rescue a civilian transport lost in the Tyyyn nebula. You'd better get to it!
//-- [RESPONSE NOTE]
//-- PLAYER: Roger that.
if (response == "s_432")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Good luck!
string_id message = new string_id (c_stringFile, "s_434");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew you wouldn't let us down, %NU! That was one in a million! Would you like the Blacksun Vaksai chassis, now?
//-- [RESPONSE NOTE]
//-- PLAYER: You bet!
if (response == "s_440")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_giveReward_blacksun_heavy (player, npc);
//-- NPC: Congratulations! Happy flying!
string_id message = new string_id (c_stringFile, "s_442");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: How's it going, %TU? You are cleared for two different contracts on behalf of the Civilian Protection Guild. Are you interested?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I would like a mission.
if (response == "s_446")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Great to hear! You know the contracts, don't you? What would you like to do today?
string_id message = new string_id (c_stringFile, "s_448");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let's hunt down the Ghrag!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Let me protect our civilian friends.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What else is there to do?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_450");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_454");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm looking for a challenge!
if (response == "s_269")
{
//-- [NOTE]
if (!station_kashyyyk_condition_isNeutralPilot (player, npc))
{
//-- NPC: You might check in with the CPG Veteran pilot that patrols the asteroid belt. Look for a friendly YT-1300 vessel protecting the civilian traffic near the station.
string_id message = new string_id (c_stringFile, "s_273");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks! I will.
boolean hasResponse0 = false;
if (station_kashyyyk_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_277");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 32);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Yes, there is something else I have for you. It's very dangerous. Would you like details?
string_id message = new string_id (c_stringFile, "s_460");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, please.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: On second thought, I'll skip it.
boolean hasResponse1 = false;
if (station_kashyyyk_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_285");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_486");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 34);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need to land.
if (response == "s_490")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need to repair my ship.
if (response == "s_492")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great to hear! You know the contracts, don't you? What would you like to do today?
//-- [RESPONSE NOTE]
//-- PLAYER: Let's hunt down the Ghrag!
if (response == "s_450")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_destroy (player, npc);
//-- NPC: You got it! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_452");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Let me protect our civilian friends.
if (response == "s_454")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: You are quite the hero, %TU!
string_id message = new string_id (c_stringFile, "s_456");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What else is there to do?
if (response == "s_180")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Have you contacted the Rodians? Two of their warlords operate space stations in Kashyyyk. Both of them have powerful enemies... and both will pay pilots like you to fight for them.
string_id message = new string_id (c_stringFile, "s_181");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That sounds interesting!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Anything else?
boolean hasResponse1 = false;
if (station_kashyyyk_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_182");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_183");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Have you contacted the Rodians? Two of their warlords operate space stations in Kashyyyk. Both of them have powerful enemies... and both will pay pilots like you to fight for them.
//-- [RESPONSE NOTE]
//-- PLAYER: That sounds interesting!
if (response == "s_182")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You'll find them on the far side of the asteroid belt. Check your navicomputer for directions to either of the Rodian warlord bases.
string_id message = new string_id (c_stringFile, "s_184");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Anything else?
if (response == "s_183")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Nothing I would recommend. I know that there is a group of freelance slavers operating in Kashyyyk. Given how tightly the Trandoshans control this sort of commerce, I can only imagine that these 'Independent Slavers' want a piece.
string_id message = new string_id (c_stringFile, "s_185");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do I find them?
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not interested in that.
boolean hasResponse1 = false;
if (station_kashyyyk_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_186");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_187");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch27 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Nothing I would recommend. I know that there is a group of freelance slavers operating in Kashyyyk. Given how tightly the Trandoshans control this sort of commerce, I can only imagine that these 'Independent Slavers' want a piece.
//-- [RESPONSE NOTE]
//-- PLAYER: Where do I find them?
if (response == "s_186")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Oh, I don't know. Even if I did know, I don't think I would tell you. It's horrible what they do. Just horrible!
string_id message = new string_id (c_stringFile, "s_189");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Tell me anyway!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I understand.
boolean hasResponse1 = false;
if (station_kashyyyk_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_190");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_191");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 28);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not interested in that.
if (response == "s_187")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: I knew you weren't a villain! At least... not that sort of villain. How about doing something for the CPG today instead?
string_id message = new string_id (c_stringFile, "s_188");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let's hunt down the Ghrag!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Let me protect our civilian friends.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What else is there to do?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_450");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_454");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh, I don't know. Even if I did know, I don't think I would tell you. It's horrible what they do. Just horrible!
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me anyway!
if (response == "s_190")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Forget it! You don't push me around!
string_id message = new string_id (c_stringFile, "s_193");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I understand.
if (response == "s_191")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Yeah. Just forget about slaving and stick to saving the galaxy. Sound good? Now let's talk about some CPG contracts!
string_id message = new string_id (c_stringFile, "s_192");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let's hunt down the Ghrag!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Let me protect our civilian friends.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What else is there to do?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_450");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_454");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_180");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch30 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yeah. Just forget about slaving and stick to saving the galaxy. Sound good? Now let's talk about some CPG contracts!
//-- [RESPONSE NOTE]
//-- PLAYER: Let's hunt down the Ghrag!
if (response == "s_450")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_destroy (player, npc);
//-- NPC: You got it! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_452");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Let me protect our civilian friends.
if (response == "s_454")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: You are quite the hero, %TU!
string_id message = new string_id (c_stringFile, "s_456");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What else is there to do?
if (response == "s_180")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Have you contacted the Rodians? Two of their warlords operate space stations in Kashyyyk. Both of them have powerful enemies... and both will pay pilots like you to fight for them.
string_id message = new string_id (c_stringFile, "s_181");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That sounds interesting!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Anything else?
boolean hasResponse1 = false;
if (station_kashyyyk_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_182");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_183");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew you weren't a villain! At least... not that sort of villain. How about doing something for the CPG today instead?
//-- [RESPONSE NOTE]
//-- PLAYER: Let's hunt down the Ghrag!
if (response == "s_450")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_destroy (player, npc);
//-- NPC: You got it! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_452");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Let me protect our civilian friends.
if (response == "s_454")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: You are quite the hero, %TU!
string_id message = new string_id (c_stringFile, "s_456");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What else is there to do?
if (response == "s_180")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Have you contacted the Rodians? Two of their warlords operate space stations in Kashyyyk. Both of them have powerful enemies... and both will pay pilots like you to fight for them.
string_id message = new string_id (c_stringFile, "s_181");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That sounds interesting!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Anything else?
boolean hasResponse1 = false;
if (station_kashyyyk_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_182");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_183");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You might check in with the CPG Veteran pilot that patrols the asteroid belt. Look for a friendly YT-1300 vessel protecting the civilian traffic near the station.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks! I will.
if (response == "s_277")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger that!
string_id message = new string_id (c_stringFile, "s_281");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch34 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, there is something else I have for you. It's very dangerous. Would you like details?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, please.
if (response == "s_285")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: There has been some trouble at a remote Rebel Alliance shipyard. I know. I know. We're not the Alliance - but apparently one of their engineers has turned traitor and is planning to deliver a Corellian Corvette warship to the Ghrag mercenaries!
string_id message = new string_id (c_stringFile, "s_464");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: On second thought, I'll skip it.
if (response == "s_486")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: No problem! Take care, %TU!
string_id message = new string_id (c_stringFile, "s_488");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch35 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There has been some trouble at a remote Rebel Alliance shipyard. I know. I know. We're not the Alliance - but apparently one of their engineers has turned traitor and is planning to deliver a Corellian Corvette warship to the Ghrag mercenaries!
//-- [RESPONSE NOTE]
//-- PLAYER: I'll stop them! Let's go!
if (response == "s_288")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_blacksun_heavy_recovery (player, npc);
//-- NPC: I knew I could count on you, %NU! I will upload the mission data to you right now!
string_id message = new string_id (c_stringFile, "s_468");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_291");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 36);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Why did this engineer turn traitor?
if (response == "s_294")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Seems that the Alliance has been unable to compensate their starship engineers lately. This engineer contacted the Ghrag Mercenaries and offered to sell them an Alliance warship. They jumped at the chance... as you can imagine.
string_id message = new string_id (c_stringFile, "s_476");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to help the Rebels!
if (response == "s_478")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You won't really be helping the Rebellion. If that starship falls into Ghrag Mercenary hands, all the peace and security you have fought to win here in Kashyyyk will be thrown to the wind.
string_id message = new string_id (c_stringFile, "s_480");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What will I get for this?
if (response == "s_482")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Are you familiar with the Blacksun Vaksai prototype? It's a new starship chassis that's as small as a standard light fighter but totally re-designed on the inside. It has a much higher mass capacity than the standard! I can give you one if you recover the enemy ship!
string_id message = new string_id (c_stringFile, "s_484");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew I could count on you, %NU! I will upload the mission data to you right now!
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks!
if (response == "s_291")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Good luck!
string_id message = new string_id (c_stringFile, "s_472");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch38 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Seems that the Alliance has been unable to compensate their starship engineers lately. This engineer contacted the Ghrag Mercenaries and offered to sell them an Alliance warship. They jumped at the chance... as you can imagine.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll stop them! Let's go!
if (response == "s_288")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_blacksun_heavy_recovery (player, npc);
//-- NPC: I knew I could count on you, %NU! I will upload the mission data to you right now!
string_id message = new string_id (c_stringFile, "s_468");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_291");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 36);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Why did this engineer turn traitor?
if (response == "s_294")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Seems that the Alliance has been unable to compensate their starship engineers lately. This engineer contacted the Ghrag Mercenaries and offered to sell them an Alliance warship. They jumped at the chance... as you can imagine.
string_id message = new string_id (c_stringFile, "s_476");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to help the Rebels!
if (response == "s_478")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You won't really be helping the Rebellion. If that starship falls into Ghrag Mercenary hands, all the peace and security you have fought to win here in Kashyyyk will be thrown to the wind.
string_id message = new string_id (c_stringFile, "s_480");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What will I get for this?
if (response == "s_482")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Are you familiar with the Blacksun Vaksai prototype? It's a new starship chassis that's as small as a standard light fighter but totally re-designed on the inside. It has a much higher mass capacity than the standard! I can give you one if you recover the enemy ship!
string_id message = new string_id (c_stringFile, "s_484");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch39 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You won't really be helping the Rebellion. If that starship falls into Ghrag Mercenary hands, all the peace and security you have fought to win here in Kashyyyk will be thrown to the wind.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll stop them! Let's go!
if (response == "s_288")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_blacksun_heavy_recovery (player, npc);
//-- NPC: I knew I could count on you, %NU! I will upload the mission data to you right now!
string_id message = new string_id (c_stringFile, "s_468");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_291");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 36);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Why did this engineer turn traitor?
if (response == "s_294")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Seems that the Alliance has been unable to compensate their starship engineers lately. This engineer contacted the Ghrag Mercenaries and offered to sell them an Alliance warship. They jumped at the chance... as you can imagine.
string_id message = new string_id (c_stringFile, "s_476");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to help the Rebels!
if (response == "s_478")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You won't really be helping the Rebellion. If that starship falls into Ghrag Mercenary hands, all the peace and security you have fought to win here in Kashyyyk will be thrown to the wind.
string_id message = new string_id (c_stringFile, "s_480");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What will I get for this?
if (response == "s_482")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Are you familiar with the Blacksun Vaksai prototype? It's a new starship chassis that's as small as a standard light fighter but totally re-designed on the inside. It has a much higher mass capacity than the standard! I can give you one if you recover the enemy ship!
string_id message = new string_id (c_stringFile, "s_484");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch40 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you familiar with the Blacksun Vaksai prototype? It's a new starship chassis that's as small as a standard light fighter but totally re-designed on the inside. It has a much higher mass capacity than the standard! I can give you one if you recover the enemy ship!
//-- [RESPONSE NOTE]
//-- PLAYER: I'll stop them! Let's go!
if (response == "s_288")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_blacksun_heavy_recovery (player, npc);
//-- NPC: I knew I could count on you, %NU! I will upload the mission data to you right now!
string_id message = new string_id (c_stringFile, "s_468");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_291");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 36);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Why did this engineer turn traitor?
if (response == "s_294")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Seems that the Alliance has been unable to compensate their starship engineers lately. This engineer contacted the Ghrag Mercenaries and offered to sell them an Alliance warship. They jumped at the chance... as you can imagine.
string_id message = new string_id (c_stringFile, "s_476");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to help the Rebels!
if (response == "s_478")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You won't really be helping the Rebellion. If that starship falls into Ghrag Mercenary hands, all the peace and security you have fought to win here in Kashyyyk will be thrown to the wind.
string_id message = new string_id (c_stringFile, "s_480");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What will I get for this?
if (response == "s_482")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Are you familiar with the Blacksun Vaksai prototype? It's a new starship chassis that's as small as a standard light fighter but totally re-designed on the inside. It has a much higher mass capacity than the standard! I can give you one if you recover the enemy ship!
string_id message = new string_id (c_stringFile, "s_484");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll stop them! Let's go!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why did this engineer turn traitor?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I don't want to help the Rebels!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: What will I get for this?
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_288");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_294");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 35);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch42 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Looks like these Ghrag mercenaries mean business. Good job putting them back in their place!
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks! I'd like to land please.
if (response == "s_496")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Can I repair my ship, Rian?
if (response == "s_498")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What's next?
if (response == "s_500")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Well, I don't think they're ready to give up just yet. We're hearing all sorts of noise coming from the Tyyyn nebula. I worry that another transport has come under fire. Interested in saving the day again?
string_id message = new string_id (c_stringFile, "s_502");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You bet!
boolean hasResponse0 = false;
if (station_kashyyyk_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_504");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 43);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch43 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, I don't think they're ready to give up just yet. We're hearing all sorts of noise coming from the Tyyyn nebula. I worry that another transport has come under fire. Interested in saving the day again?
//-- [RESPONSE NOTE]
//-- PLAYER: You bet!
if (response == "s_504")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_04 (player, npc);
//-- NPC: Great! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_506");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch45 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The civilians were lost! So many lives... it's such a shame! I'm hoping that you want a chance to redeem yourself right away. Am I right?
//-- [RESPONSE NOTE]
//-- PLAYER: No. Land me.
if (response == "s_510")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No. Repair me.
if (response == "s_512")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I want to try again!
if (response == "s_514")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_03 (player, npc);
//-- NPC: That's the spirit! Let's go!
string_id message = new string_id (c_stringFile, "s_516");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch47 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So you lost that civilian transport. So many lives... it's such a shame! I'm hoping that you want a chance to redeem yourself right away. Am I right?
//-- [RESPONSE NOTE]
//-- PLAYER: No. Land me.
if (response == "s_520")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No. Repair me.
if (response == "s_522")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I want to try again!
if (response == "s_524")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_02 (player, npc);
//-- NPC: That's the spirit! Let's go!
string_id message = new string_id (c_stringFile, "s_526");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch49 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Nice to see you again, %TU! Good work dusting those Gotal bandits! The CPG is impressed. And, honestly... so am I!
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks! I'd like to land please.
if (response == "s_530")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Can I repair my ship, Rian?
if (response == "s_532")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Is there anything CPG needs done today?
if (response == "s_534")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Absolutely! Our surface commander, Eyma, has requested a meeting with you to discuss a threat we have received. Will you agree to meet with him?
string_id message = new string_id (c_stringFile, "s_536");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No. (Don't land)
boolean hasResponse1 = false;
if (station_kashyyyk_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_538");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_542");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 50);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch50 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Absolutely! Our surface commander, Eyma, has requested a meeting with you to discuss a threat we have received. Will you agree to meet with him?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. (Land)
if (response == "s_538")
{
station_kashyyyk_action_giveGroundQuest_00 (player, npc);
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: Glad to hear it! See you soon...
string_id message = new string_id (c_stringFile, "s_350");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No. (Don't land)
if (response == "s_542")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Well, I hope you change your mind.
string_id message = new string_id (c_stringFile, "s_364");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch53 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well that last escort didn't go as planned, did it? So I'm wondering now. Do you want another chance or are you done being a hero for the moment?
//-- [RESPONSE NOTE]
//-- PLAYER: I really just want to land.
if (response == "s_370")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I just want to repair my ship.
if (response == "s_550")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Give me another chance!
if (response == "s_376")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_01 (player, npc);
//-- NPC: You got it!
string_id message = new string_id (c_stringFile, "s_554");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch55 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey! Great job protecting that droid pilot. I thought he would be destroyed for sure! Listen... sorry if we got off on the wrong foot earlier. My name is Rian Ry. I am a representative of the Civilian Protection guild, and commander of this space station.
//-- [RESPONSE NOTE]
//-- PLAYER: Nice to meet you. Can I land now?
if (response == "s_558")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: That's nice. Can I repair my ship, please?
if (response == "s_388")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What's the Civilian Protection guild?
if (response == "s_562")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: It's a group of merchants and civilian interests that try to protect one another in lawless regions of space like Kashyyyk. CPG offers limited contracts to honest pilots such as yourself.
string_id message = new string_id (c_stringFile, "s_473");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Any thing CPG needs done right now?
boolean hasResponse0 = false;
if (station_kashyyyk_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_566");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 56);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch56 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: It's a group of merchants and civilian interests that try to protect one another in lawless regions of space like Kashyyyk. CPG offers limited contracts to honest pilots such as yourself.
//-- [RESPONSE NOTE]
//-- PLAYER: Any thing CPG needs done right now?
if (response == "s_566")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Well, yeah... we just received a distress call from another transport. This one also seems to have run afoul of the Gotal bandits. Most people know to avoid the Gotal base... but not everyone, obviously. Do you want to investigate?
string_id message = new string_id (c_stringFile, "s_521");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Actually, I should land right now.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not now. I need repairs at the moment.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: You got it!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_570");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_539");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_574");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 57);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch57 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, yeah... we just received a distress call from another transport. This one also seems to have run afoul of the Gotal bandits. Most people know to avoid the Gotal base... but not everyone, obviously. Do you want to investigate?
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, I should land right now.
if (response == "s_570")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not now. I need repairs at the moment.
if (response == "s_539")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You got it!
if (response == "s_574")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_02 (player, npc);
//-- NPC: Excellent! Good luck, my friend.
string_id message = new string_id (c_stringFile, "s_545");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch59 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: This is Kashyyyk station. State your business.
//-- [RESPONSE NOTE]
//-- PLAYER: I would like to land
if (response == "s_551")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: (Request Repairs)
if (response == "s_602")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What's going on around here?
if (response == "s_666")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: The usual mercenary mischief! We have received yet another distress call from a damaged freighter coming through the asteroid field. You want to be a hero? There's a few credits in it for you.
string_id message = new string_id (c_stringFile, "s_669");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I think I prefer to land.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'll need repairs first.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What sort of credits are we talking about?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Yes. I will help.
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_672");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_674");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_677");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_698");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 81);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How's it going, Rian?
if (response == "s_709")
{
//-- [NOTE]
if (!station_kashyyyk_condition_hasDoneGround_01 (player, npc))
{
//-- NPC: Hey there, %TU! I just got another message from Eyma on Kashyyyk. He would like to meet with you again. What do you say?
string_id message = new string_id (c_stringFile, "s_712");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I can't do this right now.
boolean hasResponse1 = false;
if (station_kashyyyk_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_714");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_726");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 88);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Hi there, %TU! Since Eyma gave the go-ahead, I'm cleared to offer transport protection contracts to you whenever you want them. You interested?
string_id message = new string_id (c_stringFile, "s_730");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Is there anything else to do?
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me about these contracts.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_732");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_736");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_748");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 92);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch60 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks!
if (response == "s_557")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: See you soon, %TU!
string_id message = new string_id (c_stringFile, "s_586");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch62 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You can land at Kachirho starport. Confirm!
//-- [RESPONSE NOTE]
//-- PLAYER: Confirm (Land)
if (response == "s_590")
{
//-- [NOTE]
if (station_kashyyyk_condition_hasWonQuest_02 (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: Be safe, %TU. See you soon.
string_id message = new string_id (c_stringFile, "s_569");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: Cleared for landing. Kashyyyk space station out!
string_id message = new string_id (c_stringFile, "s_594");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Disregard.
if (response == "s_575")
{
//-- [NOTE]
if (station_kashyyyk_condition_hasWonQuest_02 (player, npc))
{
//-- NPC: No problem. Take care, %TU.
string_id message = new string_id (c_stringFile, "s_598");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Fine. Clear the area so the rest of us can get back to work.
string_id message = new string_id (c_stringFile, "s_581");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch67 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Roger, %TU. Please indicate your status.
//-- [RESPONSE NOTE]
//-- PLAYER: Repair a little of the damage
if (response == "s_606")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. For a fee of %DI credits we'll repair just enough to get you underway. Please confirm.
string_id message = new string_id (c_stringFile, "s_593");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Do it
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No
boolean hasResponse1 = false;
if (station_kashyyyk_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_610");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_614");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 68);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost25 (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost25 (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Repair half the damage
if (response == "s_618")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Affirmative, %TU. Repairing half your current damage will cost %DI credits. Are you ready to transfer the funds?
string_id message = new string_id (c_stringFile, "s_611");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No
boolean hasResponse1 = false;
if (station_kashyyyk_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_622");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_626");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 71);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost50 (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost50 (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Repair most of the damage
if (response == "s_630")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger that, %TU. We can repair three-fourths of your ship's damage at a fee of %DI credits. Are you ready to transfer the funds?
string_id message = new string_id (c_stringFile, "s_629");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No
boolean hasResponse1 = false;
if (station_kashyyyk_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_634");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_638");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 74);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost75 (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost75 (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Repair all of the damage
if (response == "s_643")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: A complete repair of your ship will cost %DI credits, %TU. Are you sure?
string_id message = new string_id (c_stringFile, "s_646");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No
boolean hasResponse1 = false;
if (station_kashyyyk_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_649");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_655");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 77);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost100 (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.digitInteger = station_kashyyyk_tokenDI_getStationRepairCost100 (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nevermind
if (response == "s_661")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Copy that, %TU.
string_id message = new string_id (c_stringFile, "s_664");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch68 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Roger, %TU. For a fee of %DI credits we'll repair just enough to get you underway. Please confirm.
//-- [RESPONSE NOTE]
//-- PLAYER: Do it
if (response == "s_610")
{
station_kashyyyk_action_fix25 (player, npc);
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: 25% of your ship damage has been fixed. Please clear the area for other traffic.
string_id message = new string_id (c_stringFile, "s_599");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No
if (response == "s_614")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: As you wish, %TU. Please clear the area for other traffic.
string_id message = new string_id (c_stringFile, "s_605");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch71 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Affirmative, %TU. Repairing half your current damage will cost %DI credits. Are you ready to transfer the funds?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes
if (response == "s_622")
{
station_kashyyyk_action_fix50 (player, npc);
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Received, %TU. Half of your ship damage has been fixed. You are clear to leave the area.
string_id message = new string_id (c_stringFile, "s_617");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No
if (response == "s_626")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: As you wish, %TU. Please clear the area for other traffic.
string_id message = new string_id (c_stringFile, "s_623");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch74 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Roger that, %TU. We can repair three-fourths of your ship's damage at a fee of %DI credits. Are you ready to transfer the funds?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes
if (response == "s_634")
{
station_kashyyyk_action_fix75 (player, npc);
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Funds received, %TU... Repairs complete. You are clear to leave the station.
string_id message = new string_id (c_stringFile, "s_635");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No
if (response == "s_638")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Bye
string_id message = new string_id (c_stringFile, "s_641");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch77 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A complete repair of your ship will cost %DI credits, %TU. Are you sure?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes
if (response == "s_649")
{
station_kashyyyk_action_fix100 (player, npc);
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Repairs complete!
string_id message = new string_id (c_stringFile, "s_651");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No
if (response == "s_655")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: As you wish, %TU. Please leave the area to make room for incoming traffic. Out.
string_id message = new string_id (c_stringFile, "s_658");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch81 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The usual mercenary mischief! We have received yet another distress call from a damaged freighter coming through the asteroid field. You want to be a hero? There's a few credits in it for you.
//-- [RESPONSE NOTE]
//-- PLAYER: I think I prefer to land.
if (response == "s_672")
{
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_ground_01 (player, npc))
{
//-- NPC: Ah! Good. Eyma is looking forward to seeing you!
string_id message = new string_id (c_stringFile, "s_582");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks!
boolean hasResponse0 = false;
if (station_kashyyyk_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_557");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: You can land at Kachirho starport. Confirm!
string_id message = new string_id (c_stringFile, "s_563");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Confirm (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Disregard.
boolean hasResponse1 = false;
if (station_kashyyyk_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_590");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_575");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 62);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'll need repairs first.
if (response == "s_674")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Roger, %TU. Please indicate your status.
string_id message = new string_id (c_stringFile, "s_587");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Repair a little of the damage
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Repair half the damage
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford50 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Repair most of the damage
boolean hasResponse2 = false;
if (station_kashyyyk_condition_canAfford75 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Repair all of the damage
boolean hasResponse3 = false;
if (station_kashyyyk_condition_canAfford100 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Nevermind
boolean hasResponse4 = false;
if (station_kashyyyk_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_606");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_618");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_630");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_643");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_661");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 67);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What sort of credits are we talking about?
if (response == "s_677")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: The distress call bears the mark of the Civilian Protection Guild. They guarantee payment of a thousand credits for this sort of escort job. How does that sound?
string_id message = new string_id (c_stringFile, "s_680");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll take it!
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'll pass on this offer.
boolean hasResponse1 = false;
if (station_kashyyyk_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_682");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_693");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 82);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I will help.
if (response == "s_698")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Good. The distress call is an automated signal. It's coming from the other side of the asteroid belt. The pilot is a droid. I think something or someone damaged the droid's navigation system.
string_id message = new string_id (c_stringFile, "s_701");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can lead the droid pilot back here.
boolean hasResponse0 = false;
if (station_kashyyyk_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_704");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 86);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch82 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The distress call bears the mark of the Civilian Protection Guild. They guarantee payment of a thousand credits for this sort of escort job. How does that sound?
//-- [RESPONSE NOTE]
//-- PLAYER: I'll take it!
if (response == "s_682")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Okay. Maybe you're not so bad after all? The signal is coming from the other side of the asteroid belt. I am pretty certain that the pilot is a droid. Some roving bandits probably damaged the droid's navigation system.
string_id message = new string_id (c_stringFile, "s_685");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can lead the droid pilot back here.
boolean hasResponse0 = false;
if (station_kashyyyk_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_688");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 83);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'll pass on this offer.
if (response == "s_693")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_696");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch83 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Okay. Maybe you're not so bad after all? The signal is coming from the other side of the asteroid belt. I am pretty certain that the pilot is a droid. Some roving bandits probably damaged the droid's navigation system.
//-- [RESPONSE NOTE]
//-- PLAYER: I can lead the droid pilot back here.
if (response == "s_688")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_01 (player, npc);
//-- NPC: Good luck! I look forward to seeing you soon!
string_id message = new string_id (c_stringFile, "s_690");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch86 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good. The distress call is an automated signal. It's coming from the other side of the asteroid belt. The pilot is a droid. I think something or someone damaged the droid's navigation system.
//-- [RESPONSE NOTE]
//-- PLAYER: I can lead the droid pilot back here.
if (response == "s_704")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantQuest_01 (player, npc);
//-- NPC: Good luck! I look forward to seeing you soon!
string_id message = new string_id (c_stringFile, "s_706");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch88 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey there, %TU! I just got another message from Eyma on Kashyyyk. He would like to meet with you again. What do you say?
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds good.
if (response == "s_714")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_giveGroundQuest_01 (player, npc);
//-- NPC: Excellent! I look forward to hearing from you when you get back.
string_id message = new string_id (c_stringFile, "s_717");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: See you later! (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_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_720");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 89);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I can't do this right now.
if (response == "s_726")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Sorry for that. Hope you can soon!
string_id message = new string_id (c_stringFile, "s_728");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch89 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Excellent! I look forward to hearing from you when you get back.
//-- [RESPONSE NOTE]
//-- PLAYER: See you later! (Land)
if (response == "s_720")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: Bye!
string_id message = new string_id (c_stringFile, "s_722");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch92 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hi there, %TU! Since Eyma gave the go-ahead, I'm cleared to offer transport protection contracts to you whenever you want them. You interested?
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds good.
if (response == "s_732")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: Exellent! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_734");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Is there anything else to do?
if (response == "s_736")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Why don't you check in with Eyma again. I know he's been hard at work pulling in favors from civilian contacts all over the Kashyyyk system. He may have uncovered more information about the Ghrag mercenaries.
string_id message = new string_id (c_stringFile, "s_738");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll go see him now! (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Maybe later.
boolean hasResponse1 = false;
if (station_kashyyyk_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_740");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_744");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 94);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me about these contracts.
if (response == "s_748")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: We have a large number of civilian transports headed through the Kashyyyk system at any given time. The CPG escorts the transports and protects them from pirates, the Gotal bandits and our new friends: the Ghrag mercenaries!
string_id message = new string_id (c_stringFile, "s_750");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Is there anything else to do?
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me about these contracts.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_732");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_736");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_748");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 92);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch94 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Why don't you check in with Eyma again. I know he's been hard at work pulling in favors from civilian contacts all over the Kashyyyk system. He may have uncovered more information about the Ghrag mercenaries.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll go see him now! (Land)
if (response == "s_740")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_land_kashyyyk (player, npc);
//-- NPC: You got it, %TU!
string_id message = new string_id (c_stringFile, "s_742");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Maybe later.
if (response == "s_744")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: No problem. Would you like to take up one of our civilian protection contracts right now, then?
string_id message = new string_id (c_stringFile, "s_746");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Is there anything else to do?
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me about these contracts.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_732");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_736");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_748");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 92);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch96 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No problem. Would you like to take up one of our civilian protection contracts right now, then?
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds good.
if (response == "s_732")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: Exellent! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_734");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Is there anything else to do?
if (response == "s_736")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Why don't you check in with Eyma again. I know he's been hard at work pulling in favors from civilian contacts all over the Kashyyyk system. He may have uncovered more information about the Ghrag mercenaries.
string_id message = new string_id (c_stringFile, "s_738");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll go see him now! (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Maybe later.
boolean hasResponse1 = false;
if (station_kashyyyk_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_740");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_744");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 94);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me about these contracts.
if (response == "s_748")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: We have a large number of civilian transports headed through the Kashyyyk system at any given time. The CPG escorts the transports and protects them from pirates, the Gotal bandits and our new friends: the Ghrag mercenaries!
string_id message = new string_id (c_stringFile, "s_750");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Is there anything else to do?
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me about these contracts.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_732");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_736");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_748");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 92);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int station_kashyyyk_handleBranch97 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We have a large number of civilian transports headed through the Kashyyyk system at any given time. The CPG escorts the transports and protects them from pirates, the Gotal bandits and our new friends: the Ghrag mercenaries!
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds good.
if (response == "s_732")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
station_kashyyyk_action_grantDuty_escort (player, npc);
//-- NPC: Exellent! Good luck, %TU!
string_id message = new string_id (c_stringFile, "s_734");
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Is there anything else to do?
if (response == "s_736")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: Why don't you check in with Eyma again. I know he's been hard at work pulling in favors from civilian contacts all over the Kashyyyk system. He may have uncovered more information about the Ghrag mercenaries.
string_id message = new string_id (c_stringFile, "s_738");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll go see him now! (Land)
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Maybe later.
boolean hasResponse1 = false;
if (station_kashyyyk_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_740");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_744");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 94);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me about these contracts.
if (response == "s_748")
{
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: We have a large number of civilian transports headed through the Kashyyyk system at any given time. The CPG escorts the transports and protects them from pirates, the Gotal bandits and our new friends: the Ghrag mercenaries!
string_id message = new string_id (c_stringFile, "s_750");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Is there anything else to do?
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me about these contracts.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_732");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_736");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_748");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 92);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.station_kashyyyk.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_rian_ry.iff" );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setObjVar(self, "convo.appearance", "object/mobile/space_comm_rian_ry.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_kashyyyk");
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_kashyyyk_condition_isTooFar (player, npc))
{
//-- NPC: Your communication stream is breaking up! Fly closer to the station so I can get a fix on your transmission.
string_id message = new string_id (c_stringFile, "s_204");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!station_kashyyyk_condition_hasBadge_visited_Kachirho (player, npc))
{
//-- NPC: Great - just what we needed: another mercenary killer. What do you want here anyway?
string_id message = new string_id (c_stringFile, "s_206");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I would like to land.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'd like repairs.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Uh... nevermind.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_208");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_222");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_247");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 2);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_escort_alpha (player, npc))
{
//-- NPC: That droid pilot needs your help! Escort him to this station so that we can tune his navigation system and get him on his way.
string_id message = new string_id (c_stringFile, "s_251");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_escort_bravo (player, npc))
{
//-- NPC: That Civilian Transport needs your help, %TU! Guide them to this station and keep them out of harm's way!
string_id message = new string_id (c_stringFile, "s_428");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_rescue_alpha (player, npc))
{
//-- NPC: Eyma said you were going to rescue a civilian transport lost in the Tyyyn nebula. You'd better get to it!
string_id message = new string_id (c_stringFile, "s_430");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Roger that.
boolean hasResponse0 = false;
if (station_kashyyyk_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_432");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 16);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_isOnQuest_AMBUSH (player, npc))
{
//-- NPC: Look out, %TU! The Ghrag are here to destroy you!
string_id message = new string_id (c_stringFile, "s_436");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasWon_blacksun_heavy_recovery (player, npc))
{
//-- NPC: I knew you wouldn't let us down, %NU! That was one in a million! Would you like the Blacksun Vaksai chassis, now?
string_id message = new string_id (c_stringFile, "s_438");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You bet!
boolean hasResponse0 = false;
if (station_kashyyyk_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_440");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 19);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "station_kashyyyk", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasWon_assassinations (player, npc))
{
//-- NPC: How's it going, %TU? You are cleared for two different contracts on behalf of the Civilian Protection Guild. Are you interested?
string_id message = new string_id (c_stringFile, "s_444");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I would like a mission.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm looking for a challenge!
boolean hasResponse1 = false;
if (!station_kashyyyk_condition_hasBeenRewarded_blacksun_heavy (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I need to land.
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I need to repair my ship.
boolean hasResponse3 = false;
if (station_kashyyyk_condition__defaultCondition (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_446");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_269");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_490");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_492");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 21);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "station_kashyyyk", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasWon03_not04yet (player, npc))
{
//-- NPC: Looks like these Ghrag mercenaries mean business. Good job putting them back in their place!
string_id message = new string_id (c_stringFile, "s_494");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks! I'd like to land please.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Can I repair my ship, Rian?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What's next?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_496");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_498");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_500");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 42);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasFailedQuest_03 (player, npc))
{
//-- NPC: The civilians were lost! So many lives... it's such a shame! I'm hoping that you want a chance to redeem yourself right away. Am I right?
string_id message = new string_id (c_stringFile, "s_508");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No. Land me.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No. Repair me.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Yes. I want to try again!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_510");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_512");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_514");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 45);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasFailedQuest_02 (player, npc))
{
//-- NPC: So you lost that civilian transport. So many lives... it's such a shame! I'm hoping that you want a chance to redeem yourself right away. Am I right?
string_id message = new string_id (c_stringFile, "s_518");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No. Land me.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No. Repair me.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Yes. I want to try again!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_520");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_522");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_524");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 47);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasWon02_not03yet (player, npc))
{
//-- NPC: Nice to see you again, %TU! Good work dusting those Gotal bandits! The CPG is impressed. And, honestly... so am I!
string_id message = new string_id (c_stringFile, "s_528");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks! I'd like to land please.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Can I repair my ship, Rian?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Is there anything CPG needs done today?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_530");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_532");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_534");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 49);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "station_kashyyyk", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasFailedQuest_01 (player, npc))
{
//-- NPC: Well that last escort didn't go as planned, did it? So I'm wondering now. Do you want another chance or are you done being a hero for the moment?
string_id message = new string_id (c_stringFile, "s_546");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I really just want to land.
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I just want to repair my ship.
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Give me another chance!
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_370");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_550");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_376");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 53);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition_hasWon01_not02yet (player, npc))
{
station_kashyyyk_action_rewardQuest_01 (player, npc);
//-- NPC: Hey! Great job protecting that droid pilot. I thought he would be destroyed for sure! Listen... sorry if we got off on the wrong foot earlier. My name is Rian Ry. I am a representative of the Civilian Protection guild, and commander of this space station.
string_id message = new string_id (c_stringFile, "s_382");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Nice to meet you. Can I land now?
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: That's nice. Can I repair my ship, please?
boolean hasResponse1 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What's the Civilian Protection guild?
boolean hasResponse2 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_558");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_388");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_562");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 55);
npcStartConversation (player, npc, "station_kashyyyk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
//-- NPC: This is Kashyyyk station. State your business.
string_id message = new string_id (c_stringFile, "s_578");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I would like to land
boolean hasResponse0 = false;
if (station_kashyyyk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: (Request Repairs)
boolean hasResponse1 = false;
if (station_kashyyyk_condition_canAfford25 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What's going on around here?
boolean hasResponse2 = false;
if (!station_kashyyyk_condition_hasWonQuest_01 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How's it going, Rian?
boolean hasResponse3 = false;
if (station_kashyyyk_condition_hasWonQuest_04 (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_551");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_602");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_666");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_709");
utils.setScriptVar (player, "conversation.station_kashyyyk.branchId", 59);
npcStartConversation (player, npc, "station_kashyyyk", 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_kashyyyk")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.station_kashyyyk.branchId");
if (branchId == 2 && station_kashyyyk_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && station_kashyyyk_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && station_kashyyyk_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && station_kashyyyk_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && station_kashyyyk_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && station_kashyyyk_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && station_kashyyyk_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && station_kashyyyk_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && station_kashyyyk_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && station_kashyyyk_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && station_kashyyyk_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 27 && station_kashyyyk_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && station_kashyyyk_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 30 && station_kashyyyk_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && station_kashyyyk_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && station_kashyyyk_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 34 && station_kashyyyk_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 35 && station_kashyyyk_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 36 && station_kashyyyk_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 38 && station_kashyyyk_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 39 && station_kashyyyk_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 40 && station_kashyyyk_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 42 && station_kashyyyk_handleBranch42 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 43 && station_kashyyyk_handleBranch43 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 45 && station_kashyyyk_handleBranch45 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 47 && station_kashyyyk_handleBranch47 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 49 && station_kashyyyk_handleBranch49 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 50 && station_kashyyyk_handleBranch50 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 53 && station_kashyyyk_handleBranch53 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 55 && station_kashyyyk_handleBranch55 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 56 && station_kashyyyk_handleBranch56 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 57 && station_kashyyyk_handleBranch57 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 59 && station_kashyyyk_handleBranch59 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 60 && station_kashyyyk_handleBranch60 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 62 && station_kashyyyk_handleBranch62 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 67 && station_kashyyyk_handleBranch67 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 68 && station_kashyyyk_handleBranch68 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 71 && station_kashyyyk_handleBranch71 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 74 && station_kashyyyk_handleBranch74 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 77 && station_kashyyyk_handleBranch77 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 81 && station_kashyyyk_handleBranch81 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 82 && station_kashyyyk_handleBranch82 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 83 && station_kashyyyk_handleBranch83 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 86 && station_kashyyyk_handleBranch86 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 88 && station_kashyyyk_handleBranch88 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 89 && station_kashyyyk_handleBranch89 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 92 && station_kashyyyk_handleBranch92 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 94 && station_kashyyyk_handleBranch94 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 96 && station_kashyyyk_handleBranch96 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 97 && station_kashyyyk_handleBranch97 (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_kashyyyk.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================