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

1992 lines
62 KiB
Plaintext

// ======================================================================
//
// ep3_gursan_bryes.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.badge;
include library.chat;
include library.conversation;
include library.groundquests;
include library.space_dungeon;
include library.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/ep3_gursan_bryes";
// ======================================================================
// Script Conditions
// ======================================================================
boolean ep3_gursan_bryes_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_hasWonHsskasSpaceQuest (obj_id player, obj_id npc)
{
return space_quest.hasWonQuest(player, "space_battle", "ep3_slaver_hsskas_space_battle");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_isReadyForHsskasReward (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "ep3_gursan_slay_hsskas", "taskReturnHsskasVictorious");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_hasCompletedHsskasQuest (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "ep3_gursan_slay_hsskas");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_isSignalQuestActive (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "ep3_kymayrr_send_cyssc_signal");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_readyForSlaveCamp (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "ep3_talk_to_gursan"));
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_hasRescuedRroot (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "ep3_kymayrr_rescue_rroot");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_canCompleteSignalQuest (obj_id player, obj_id npc)
{
return (groundquests.isTaskActive(player, "ep3_kymayrr_send_cyssc_signal", "taskReturnToGursan") ||
groundquests.hasCompletedQuest(player, "ep3_kymayrr_send_cyssc_signal"));
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_hasCysscSpaceSeries (obj_id player, obj_id npc)
{
return (space_quest.hasQuest(player, "space_battle", "ep3_slaver_khrask_space_battle") ||
space_quest.hasQuest(player, "assassinate", "ep3_slaver_lord_cyssc_final"));
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_hasDefeatedCysscSpace (obj_id player, obj_id npc)
{
return space_quest.hasWonQuest(player, "assassinate", "ep3_slaver_lord_cyssc_final");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_canRepeatCyssc (obj_id player, obj_id npc)
{
int currentTime = getCalendarTime();
int cysscTimer = getIntObjVar(player, "ep3.cysscTimer");
if(cysscTimer > currentTime)
{
return false;
}
if(badge.hasBadge(player, "bdg_kash_wookiee_rage") && !space_quest.hasQuest(player, "space_battle", "ep3_slaver_khrask_space_battle_alt") && !space_quest.hasQuest(player, "assassinate", "ep3_slaver_lord_cyssc_alt"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_haveRepatCysscQuest (obj_id player, obj_id npc)
{
if(space_quest.hasQuest(player, "space_battle", "ep3_slaver_khrask_space_battle_alt")
&& !space_quest.hasQuest(player, "assassinate", "ep3_slaver_lord_cyssc_alt"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_haveWonRepeatCyssc (obj_id player, obj_id npc)
{
return space_quest.hasWonQuest(player, "assassinate", "ep3_slaver_lord_cyssc_alt");
}
// ----------------------------------------------------------------------
boolean ep3_gursan_bryes_condition_cysscTimerActive (obj_id player, obj_id npc)
{
int currentTime = getCalendarTime();
int cysscTimer = getIntObjVar(player, "ep3.cysscTimer");
if(cysscTimer > currentTime)
{
return true;
}
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void ep3_gursan_bryes_action_grantSequencerQuestAndTicket (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_gursan_capture_sequencer_codes");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantTrandoFighterQuest (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "assassinate", "ep3_slaver_trando_reinforcement_intercept");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantSlayHsskasQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_gursan_slay_hsskas");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantSlayHsskasReward (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "signalReturnHsskasVictorious");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantKymayrrBrief (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_gursan_kyamyrr_brief");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantEntryQuest (obj_id player, obj_id npc)
{
if (!groundquests.hasCompletedQuest(player, "ep3_slaver_gursan_entry_quest"))
groundquests.grantQuest(player, "ep3_slaver_gursan_entry_quest");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_finishSignalQeust (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "signalReturnToGursan");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantCysscSpaceSeries (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "space_battle", "ep3_slaver_khrask_space_battle");
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_grantRepeatCyssc (obj_id player, obj_id npc)
{
space_quest.grantQuest(player, "space_battle", "ep3_slaver_khrask_space_battle_alt") ;
int currentTime = getCalendarTime();
int timeUntilReset = secondsUntilNextDailyTime(8, 0, 0);
int nextReset = timeUntilReset + currentTime;
setObjVar(player, "ep3.cysscTimer", nextReset);
}
// ----------------------------------------------------------------------
void ep3_gursan_bryes_action_giveRepeatCysscReward (obj_id player, obj_id npc)
{
if(space_quest.hasWonQuest(player, "space_battle", "ep3_slaver_khrask_space_battle_alt"))
{
space_quest.clearQuestFlags(player, "space_battle", "ep3_slaver_khrask_space_battle_alt");
}
if(space_quest.hasWonQuest(player, "assassinate", "ep3_slaver_lord_cyssc_alt"))
{
space_quest.clearQuestFlags(player, "assassinate", "ep3_slaver_lord_cyssc_alt" );
}
obj_id pInv = utils.getInventoryContainer(player);
int reward = rand(1, 4);
string rewardString = "object/tangible/ship/components/weapon/wpn_ionic_pulse_weapon.iff";
if(reward == 1)
{
createObject(rewardString, pInv, "");
sendSystemMessage(player, "You have received an Ionic Pulse Weapon", null);
}
if(reward == 2)
{
rewardString = "object/tangible/ship/components/weapon/wpn_vengeance_ion_cannon.iff";
createObject(rewardString, pInv, "");
sendSystemMessage(player, "You have received a Vengeance Ion Cannon", null);
}
if(reward == 3)
{
rewardString = "object/tangible/ship/components/weapon/wpn_vulcan_cannon.iff";
createObject(rewardString, pInv, "");
sendSystemMessage(player, "You have received an Incom 'Trandoshan Special' Repeater Cannon", null);
}
if(reward == 4)
{
rewardString = "object/tangible/ship/components/weapon/wpn_heavy_ionic_pulse_weapon.iff";
createObject(rewardString, pInv, "");
sendSystemMessage(player, "You have received a Heavy Ionic Pulse Weapon", null);
}
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
string ep3_gursan_bryes_tokenTO_timeLeft (obj_id player, obj_id npc)
{
int cysscTimer = getIntObjVar(player, "ep3.cysscTimer");
int currentTime = getCalendarTime();
string ep3_gursan_bryes_tokenTO_timeLeft = "return in " + utils.formatTimeVerbose(cysscTimer - currentTime);
return ep3_gursan_bryes_tokenTO_timeLeft;
}
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int ep3_gursan_bryes_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You have done it again. The Blackscales have lost another leader. Again we are in your debt.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you Gursan.
if (response == "s_44")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_giveRepeatCysscReward (player, npc);
//-- NPC: Here's an item I came across recently. It's not much but it might be useful to you.
string_id message = new string_id (c_stringFile, "s_45");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: %NU, It's good to see you. It looks like you are not the only one returning to Kashyyyk. The Blackscales are sending a new leader to Kashyyyk. If you are willing, your help could save many lives.
//-- [RESPONSE NOTE]
//-- PLAYER: Very well, we will stop the Blackscales again.
if (response == "s_39")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_grantRepeatCyssc (player, npc);
//-- NPC: The fight will begin any minute. Good luck and may the force be with you.
string_id message = new string_id (c_stringFile, "s_40");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm sorry, this time I cannot help you.
if (response == "s_41")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: I'm sorry to hear that. Good luck to you.
string_id message = new string_id (c_stringFile, "s_42");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The force be praised, lord Cyssc is dead. You have won a grand victory for the alliance here on Kashyyyk, and for freedom everywhere. If you have not done so, Kymayrr would have a word with you.
//-- [RESPONSE NOTE]
//-- PLAYER: I will see her at once.
if (response == "s_804")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Please do, friend.
string_id message = new string_id (c_stringFile, "s_806");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We haven't a moment to lose. Lord Cyssc is already on the move and our forces have been sent to intercept. I have a trophy for you though. Captain Beshk won't need his staff anymore.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll be off right away.
if (response == "s_812")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_grantCysscSpaceSeries (player, npc);
//-- NPC: Cyssc will be flying in shortly, get up there and prepare your welcome. Be at your best %NU, your target is a modified heavy cruiser. He will definitely have his Scaleguard present.
string_id message = new string_id (c_stringFile, "s_814");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.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 ep3_gursan_bryes_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The Blackscale Compound is a fortress, designed to keep us out more than to keep any prisoners in. You need to know that none that have entered there have returned, so our information is sketchy at best. But we do have one important piece of information. The Compound was build on top of the first forward Imperial base placed in this region. The communications station is there for certain.
//-- [RESPONSE NOTE]
//-- PLAYER: Will it be guarded?
if (response == "s_818")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Heavily guarded. Tosk has pulled in all of his patrols. You will be facing a small army so if you have companions, bring them.
string_id message = new string_id (c_stringFile, "s_820");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How do I get in?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_822");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Heavily guarded. Tosk has pulled in all of his patrols. You will be facing a small army so if you have companions, bring them.
//-- [RESPONSE NOTE]
//-- PLAYER: How do I get in?
if (response == "s_822")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Approach the gate from here in Kachirho; it is on the north side not far from Etyyy. Be watchful for Captain Beshk, he is the Captain of the Guard and will likely be on duty. I warn you, he is not one to be taken lightly. Once inside you will have to make it through a heavily fortified gauntlet of Blackscale troops before you reach the compound. Be certain, the path to victory goes through Warden Tosk.
string_id message = new string_id (c_stringFile, "s_824");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am ready.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_826");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Approach the gate from here in Kachirho; it is on the north side not far from Etyyy. Be watchful for Captain Beshk, he is the Captain of the Guard and will likely be on duty. I warn you, he is not one to be taken lightly. Once inside you will have to make it through a heavily fortified gauntlet of Blackscale troops before you reach the compound. Be certain, the path to victory goes through Warden Tosk.
//-- [RESPONSE NOTE]
//-- PLAYER: I am ready.
if (response == "s_826")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_grantEntryQuest (player, npc);
//-- NPC: Then be off. And may the Force be with you %NU.
string_id message = new string_id (c_stringFile, "s_828");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.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 ep3_gursan_bryes_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: With both Rhosk and Hss'kas gone Warden Tosk is sure to know something is up. Now is our chance to finish it. Lord Cyssc sits secure in his Citadel, but there will be a way to rouse him. To call for aid would be a sign of weakness for Tosk, one he will not show. But Cyssc would be most pleased to answer such a call.
//-- [RESPONSE NOTE]
//-- PLAYER: How will this help?
if (response == "s_832")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: In the Blackscale Compound, you will find the one communications device that Lord Cyssc will believe is a legitimate source. You need to break into the camp, overcome its guard and send a call pleading for Lord Cyssc to come and put down this insurrection personally.
string_id message = new string_id (c_stringFile, "s_834");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: And he will believe this?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_836");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: In the Blackscale Compound, you will find the one communications device that Lord Cyssc will believe is a legitimate source. You need to break into the camp, overcome its guard and send a call pleading for Lord Cyssc to come and put down this insurrection personally.
//-- [RESPONSE NOTE]
//-- PLAYER: And he will believe this?
if (response == "s_836")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: I am counting on his pride not letting him resist. Go speak with Kymayrr again, she wishes to have some words with you about this operation before you go in.
string_id message = new string_id (c_stringFile, "s_838");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will do so.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_840");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am counting on his pride not letting him resist. Go speak with Kymayrr again, she wishes to have some words with you about this operation before you go in.
//-- [RESPONSE NOTE]
//-- PLAYER: I will do so.
if (response == "s_840")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Do not delay %NU, time is not on our side.
string_id message = new string_id (c_stringFile, "s_842");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.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 ep3_gursan_bryes_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I have something for you. One of our rangers recovered this at Hss'kas's escape pod, and I believe it will come to good use when pitted against the Trandoshans.
//-- [RESPONSE NOTE]
//-- PLAYER: What is it?
if (response == "s_846")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Hss'kas's sword, a Sith blade to be precise. Relic of days long gone, but that is not important.
string_id message = new string_id (c_stringFile, "s_848");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: And what is important?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_850");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hss'kas's sword, a Sith blade to be precise. Relic of days long gone, but that is not important.
//-- [RESPONSE NOTE]
//-- PLAYER: And what is important?
if (response == "s_850")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition_haveWonRepeatCyssc (player, npc))
{
//-- NPC: You have done it again. The Blackscales have lost another leader. Again we are in your debt.
string_id message = new string_id (c_stringFile, "s_43");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you Gursan.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_44");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 1);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_cysscTimerActive (player, npc))
{
//-- NPC: It's a pleasuer to see you again. The Blackscales are silent, at least for now. If you wish to test your strength against the Blackscales again, %TO
string_id message = new string_id (c_stringFile, "s_54");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (ep3_gursan_bryes_tokenTO_timeLeft (player, npc));
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_canRepeatCyssc (player, npc))
{
//-- NPC: %NU, It's good to see you. It looks like you are not the only one returning to Kashyyyk. The Blackscales are sending a new leader to Kashyyyk. If you are willing, your help could save many lives.
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Very well, we will stop the Blackscales again.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm sorry, this time I cannot help you.
boolean hasResponse1 = false;
if (ep3_gursan_bryes_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_39");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 4);
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.ep3_gursan_bryes.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 (ep3_gursan_bryes_condition_hasDefeatedCysscSpace (player, npc))
{
//-- NPC: The force be praised, lord Cyssc is dead. You have won a grand victory for the alliance here on Kashyyyk, and for freedom everywhere. If you have not done so, Kymayrr would have a word with you.
string_id message = new string_id (c_stringFile, "s_802");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will see her at once.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_804");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasCysscSpaceSeries (player, npc))
{
//-- NPC: What are you waiting for %NU, your destiny awaits you up there?
string_id message = new string_id (c_stringFile, "s_808");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.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 (ep3_gursan_bryes_condition_canCompleteSignalQuest (player, npc))
{
ep3_gursan_bryes_action_finishSignalQeust (player, npc);
//-- NPC: We haven't a moment to lose. Lord Cyssc is already on the move and our forces have been sent to intercept. I have a trophy for you though. Captain Beshk won't need his staff anymore.
string_id message = new string_id (c_stringFile, "s_810");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll be off right away.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_812");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_isSignalQuestActive (player, npc))
{
//-- NPC: The Blackscale Compound is a fortress, designed to keep us out more than to keep any prisoners in. You need to know that none that have entered there have returned, so our information is sketchy at best. But we do have one important piece of information. The Compound was build on top of the first forward Imperial base placed in this region. The communications station is there for certain.
string_id message = new string_id (c_stringFile, "s_816");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Will it be guarded?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_818");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasCompletedHsskasQuest (player, npc))
{
//-- NPC: With both Rhosk and Hss'kas gone Warden Tosk is sure to know something is up. Now is our chance to finish it. Lord Cyssc sits secure in his Citadel, but there will be a way to rouse him. To call for aid would be a sign of weakness for Tosk, one he will not show. But Cyssc would be most pleased to answer such a call.
string_id message = new string_id (c_stringFile, "s_830");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How will this help?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_832");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_isReadyForHsskasReward (player, npc))
{
ep3_gursan_bryes_action_grantSlayHsskasReward (player, npc);
//-- NPC: I have something for you. One of our rangers recovered this at Hss'kas's escape pod, and I believe it will come to good use when pitted against the Trandoshans.
string_id message = new string_id (c_stringFile, "s_844");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is it?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_846");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasWonHsskasSpaceQuest (player, npc))
{
//-- NPC: We must act and act quickly. Sensors picked up an escape pod leaving the area. One of our fighters tried to pursue but was cut off by the mine turrets. The escape pod appears to have set down in the eastern edge of Etyyy. If this is Hss'kas, we cannot let him reach any allies. Make haste to Etyyy and destroy him.
string_id message = new string_id (c_stringFile, "s_852");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am on my way.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_854");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasRescuedRroot (player, npc))
{
//-- NPC: Welcome %NU, it is good to have you working with us. I'll need to cut straight to business as our window of opportunity is short. With the loss of Adjutant Rhosk, Avatar Platform has been shaken up. Resistance forces are preparing to strike the platform proper and the rival Zssik clan is seeing this as a good opportunity to displace the Blackscale. Hopefully they will destroy each other if that conflict ever erupts.
string_id message = new string_id (c_stringFile, "s_858");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is our first move?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_860");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 24);
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.ep3_gursan_bryes.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 (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Move along, I have important matters to attend.
string_id message = new string_id (c_stringFile, "s_872");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We must act and act quickly. Sensors picked up an escape pod leaving the area. One of our fighters tried to pursue but was cut off by the mine turrets. The escape pod appears to have set down in the eastern edge of Etyyy. If this is Hss'kas, we cannot let him reach any allies. Make haste to Etyyy and destroy him.
//-- [RESPONSE NOTE]
//-- PLAYER: I am on my way.
if (response == "s_854")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_grantSlayHsskasQuest (player, npc);
//-- NPC: I only hope that we are fast enough.
string_id message = new string_id (c_stringFile, "s_856");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Welcome %NU, it is good to have you working with us. I'll need to cut straight to business as our window of opportunity is short. With the loss of Adjutant Rhosk, Avatar Platform has been shaken up. Resistance forces are preparing to strike the platform proper and the rival Zssik clan is seeing this as a good opportunity to displace the Blackscale. Hopefully they will destroy each other if that conflict ever erupts.
//-- [RESPONSE NOTE]
//-- PLAYER: What is our first move?
if (response == "s_860")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: A wing of fighters will be dispatched from an allied clan on Tatooine to bolster the defense of the Avatar. There is also a report that Broodmaster Hss'kas is on his way to oversee the Avatar Platform. The Broodmaster is a fanatic and would only make our situation worse. But this was expected and we are watching his movements closely. When he comes, we will be ready.
string_id message = new string_id (c_stringFile, "s_862");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The fighters are top priority then?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_864");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A wing of fighters will be dispatched from an allied clan on Tatooine to bolster the defense of the Avatar. There is also a report that Broodmaster Hss'kas is on his way to oversee the Avatar Platform. The Broodmaster is a fanatic and would only make our situation worse. But this was expected and we are watching his movements closely. When he comes, we will be ready.
//-- [RESPONSE NOTE]
//-- PLAYER: The fighters are top priority then?
if (response == "s_864")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
ep3_gursan_bryes_action_grantTrandoFighterQuest (player, npc);
//-- NPC: There are no top priorities, just targets of opportunity. Be prepared for recall if Hss'kas shows himself, but for now intercept those fighters before they clear the Tatoo System.
string_id message = new string_id (c_stringFile, "s_866");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will return shortly.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_868");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_gursan_bryes_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There are no top priorities, just targets of opportunity. Be prepared for recall if Hss'kas shows himself, but for now intercept those fighters before they clear the Tatoo System.
//-- [RESPONSE NOTE]
//-- PLAYER: I will return shortly.
if (response == "s_868")
{
//-- [NOTE]
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Stay alert and be ready. We are counting on you %NU
string_id message = new string_id (c_stringFile, "s_870");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.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;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.ep3_gursan_bryes");
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
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.ep3_gursan_bryes");
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 (ep3_gursan_bryes_condition_haveWonRepeatCyssc (player, npc))
{
//-- NPC: You have done it again. The Blackscales have lost another leader. Again we are in your debt.
string_id message = new string_id (c_stringFile, "s_43");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you Gursan.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_44");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 1);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_cysscTimerActive (player, npc))
{
//-- NPC: It's a pleasuer to see you again. The Blackscales are silent, at least for now. If you wish to test your strength against the Blackscales again, %TO
string_id message = new string_id (c_stringFile, "s_54");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (ep3_gursan_bryes_tokenTO_timeLeft (player, npc));
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_canRepeatCyssc (player, npc))
{
//-- NPC: %NU, It's good to see you. It looks like you are not the only one returning to Kashyyyk. The Blackscales are sending a new leader to Kashyyyk. If you are willing, your help could save many lives.
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Very well, we will stop the Blackscales again.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm sorry, this time I cannot help you.
boolean hasResponse1 = false;
if (ep3_gursan_bryes_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_39");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 4);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "ep3_gursan_bryes", 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 (ep3_gursan_bryes_condition_hasDefeatedCysscSpace (player, npc))
{
//-- NPC: The force be praised, lord Cyssc is dead. You have won a grand victory for the alliance here on Kashyyyk, and for freedom everywhere. If you have not done so, Kymayrr would have a word with you.
string_id message = new string_id (c_stringFile, "s_802");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will see her at once.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_804");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 7);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasCysscSpaceSeries (player, npc))
{
//-- NPC: What are you waiting for %NU, your destiny awaits you up there?
string_id message = new string_id (c_stringFile, "s_808");
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 (ep3_gursan_bryes_condition_canCompleteSignalQuest (player, npc))
{
ep3_gursan_bryes_action_finishSignalQeust (player, npc);
//-- NPC: We haven't a moment to lose. Lord Cyssc is already on the move and our forces have been sent to intercept. I have a trophy for you though. Captain Beshk won't need his staff anymore.
string_id message = new string_id (c_stringFile, "s_810");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll be off right away.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_812");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 10);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_isSignalQuestActive (player, npc))
{
//-- NPC: The Blackscale Compound is a fortress, designed to keep us out more than to keep any prisoners in. You need to know that none that have entered there have returned, so our information is sketchy at best. But we do have one important piece of information. The Compound was build on top of the first forward Imperial base placed in this region. The communications station is there for certain.
string_id message = new string_id (c_stringFile, "s_816");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Will it be guarded?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_818");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 12);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasCompletedHsskasQuest (player, npc))
{
//-- NPC: With both Rhosk and Hss'kas gone Warden Tosk is sure to know something is up. Now is our chance to finish it. Lord Cyssc sits secure in his Citadel, but there will be a way to rouse him. To call for aid would be a sign of weakness for Tosk, one he will not show. But Cyssc would be most pleased to answer such a call.
string_id message = new string_id (c_stringFile, "s_830");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How will this help?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_832");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 16);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_isReadyForHsskasReward (player, npc))
{
ep3_gursan_bryes_action_grantSlayHsskasReward (player, npc);
//-- NPC: I have something for you. One of our rangers recovered this at Hss'kas's escape pod, and I believe it will come to good use when pitted against the Trandoshans.
string_id message = new string_id (c_stringFile, "s_844");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is it?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_846");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 20);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasWonHsskasSpaceQuest (player, npc))
{
//-- NPC: We must act and act quickly. Sensors picked up an escape pod leaving the area. One of our fighters tried to pursue but was cut off by the mine turrets. The escape pod appears to have set down in the eastern edge of Etyyy. If this is Hss'kas, we cannot let him reach any allies. Make haste to Etyyy and destroy him.
string_id message = new string_id (c_stringFile, "s_852");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am on my way.
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_854");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 22);
npcStartConversation (player, npc, "ep3_gursan_bryes", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_gursan_bryes_condition_hasRescuedRroot (player, npc))
{
//-- NPC: Welcome %NU, it is good to have you working with us. I'll need to cut straight to business as our window of opportunity is short. With the loss of Adjutant Rhosk, Avatar Platform has been shaken up. Resistance forces are preparing to strike the platform proper and the rival Zssik clan is seeing this as a good opportunity to displace the Blackscale. Hopefully they will destroy each other if that conflict ever erupts.
string_id message = new string_id (c_stringFile, "s_858");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is our first move?
boolean hasResponse0 = false;
if (ep3_gursan_bryes_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_860");
utils.setScriptVar (player, "conversation.ep3_gursan_bryes.branchId", 24);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "ep3_gursan_bryes", 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 (ep3_gursan_bryes_condition__defaultCondition (player, npc))
{
//-- NPC: Move along, I have important matters to attend.
string_id message = new string_id (c_stringFile, "s_872");
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 != "ep3_gursan_bryes")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
if (branchId == 1 && ep3_gursan_bryes_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && ep3_gursan_bryes_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && ep3_gursan_bryes_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && ep3_gursan_bryes_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && ep3_gursan_bryes_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && ep3_gursan_bryes_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && ep3_gursan_bryes_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && ep3_gursan_bryes_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && ep3_gursan_bryes_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && ep3_gursan_bryes_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && ep3_gursan_bryes_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && ep3_gursan_bryes_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && ep3_gursan_bryes_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && ep3_gursan_bryes_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && ep3_gursan_bryes_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && ep3_gursan_bryes_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.ep3_gursan_bryes.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================