mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-04 04:15:52 -04:00
1349 lines
41 KiB
Plaintext
1349 lines
41 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// naboo_kadaara_panaka.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.content;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/naboo_kadaara_panaka";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean naboo_kadaara_panaka_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_skaak_tipping__3 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_skaak_tipping_10 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_10") ||
|
|
groundquests.hasCompletedQuest(player, "naboo_kadaraa_tipping_the_balance_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_skaak_tipping_4_to_9 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_4") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_5") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_6") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_7") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_8") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_1", "skaak_tipping_9");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_skaak_tipping_11_to_12 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_2", "skaak_tipping_11") ||
|
|
groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_2", "skaak_tipping_12");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_shaak_tipping_13 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "naboo_kadaraa_tipping_the_balance_2", "skaak_tipping_13");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_needsTypho (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActive(player, "naboo_keren_goto_typho") &&
|
|
!groundquests.isQuestActive(player, "typho_marine_one") &&
|
|
!groundquests.hasCompletedQuest(player, "typho_marine_one") &&
|
|
!groundquests.isQuestActive(player, "typho_pilot_one") &&
|
|
!groundquests.hasCompletedQuest(player, "typho_pilot_one") &&
|
|
!groundquests.isQuestActive(player, "typho_police_one") &&
|
|
!groundquests.hasCompletedQuest(player, "typho_police_one");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean naboo_kadaara_panaka_condition_finishedKadaara (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "naboo_kadaraa_tipping_the_balance_2");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void naboo_kadaara_panaka_action_signal_skaak_tipping_10 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "naboo_kadaraa_tipping_the_balance_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void naboo_kadaara_panaka_action_signal_skaak_tipping_3 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "skaak_tipping_3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void naboo_kadaara_panaka_action_send_to_typho (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player,"naboo_keren_goto_typho");
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void naboo_kadaara_panaka_action_complete_skaak_tipping (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "skaak_tipping_13");
|
|
content.grantRsfSecurityClearance (player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void naboo_kadaara_panaka_action_endTippingPart1 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "skaak_tipping_10");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string naboo_kadaara_panaka_tokenTO_playerName (obj_id player, obj_id npc)
|
|
{
|
|
string surname = "";
|
|
string name = getName(player);
|
|
if ( name != null )
|
|
{
|
|
java.util.StringTokenizer tok = new java.util.StringTokenizer(name);
|
|
|
|
if ( tok.hasMoreTokens() )
|
|
{
|
|
string firstName = tok.nextToken();
|
|
if ( tok.hasMoreTokens() )
|
|
{
|
|
surname = tok.nextToken();
|
|
}
|
|
else
|
|
{
|
|
surname = firstName;
|
|
}
|
|
}
|
|
}
|
|
return surname;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int naboo_kadaara_panaka_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The job you did against the Skaak Tippers here in Kaadara is worthy of my highest praise. Well done.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Remind me how to raise my security clearance, please.
|
|
if (response == "s_156")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: Right. You'll need to have a higher level of security clearance to access the RSF mainframe in Theed.
|
|
string_id message = new string_id (c_stringFile, "s_144");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Is there anywhere else I could get an RSF assignment?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_147");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You did well. Very well. I think it will be a while before the Skaak Tippers try anything in Kaadara again. Well, until someone else comes along anyway.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: About joining the RSF?
|
|
if (response == "s_139")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
naboo_kadaara_panaka_action_complete_skaak_tipping (player, npc);
|
|
|
|
//-- NPC: Yes, of course. I like your eagerness. As promised, I now make you an official member of the Royal Security Forces of Naboo. You are now a private in the Royal Security Force. Welcome aboard, Private %TO.
|
|
string_id message = new string_id (c_stringFile, "s_140");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do I raise my security clearance level?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_142");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 3);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (naboo_kadaara_panaka_tokenTO_playerName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (naboo_kadaara_panaka_tokenTO_playerName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, of course. I like your eagerness. As promised, I now make you an official member of the Royal Security Forces of Naboo. You are now a private in the Royal Security Force. Welcome aboard, Private %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do I raise my security clearance level?
|
|
if (response == "s_142")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: Right. You'll need to have a higher level of security clearance to access the RSF mainframe in Theed.
|
|
string_id message = new string_id (c_stringFile, "s_144");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Is there anywhere else I could get an RSF assignment?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_147");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Right. You'll need to have a higher level of security clearance to access the RSF mainframe in Theed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is there anywhere else I could get an RSF assignment?
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I suggest you speak with Captain Typho in Keren. I'll let him know to expect you.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll report to Captain Typho in Keren.
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_condition_needsTypho (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_152");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I suggest you speak with Captain Typho in Keren. I'll let him know to expect you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll report to Captain Typho in Keren.
|
|
if (response == "s_152")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
naboo_kadaara_panaka_action_send_to_typho (player, npc);
|
|
|
|
//-- NPC: Excellent. Captain Typho is my nephew, and I'm proud to say that he has acquitted himself quite well. He will be able to help you rise within the RSF.
|
|
string_id message = new string_id (c_stringFile, "s_154");
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Skaak Tippers are smuggling in weapons? This sounds bad, but you did well in recovering some of the weapon crates.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any idea why they need the weapons?
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmmm, maybe. One of the last communications from Sgt. Willoc regarded a plan to steal the bank terminals from Kaadara.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Stealing the bank terminals!
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_65");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hmmm, maybe. One of the last communications from Sgt. Willoc regarded a plan to steal the bank terminals from Kaadara.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Stealing the bank terminals!
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's right. They plan to hack into them and gain access to the bank accounts of everyone in Kaadara. Not that I believe they could actually pull it off, but we cannot let them get that far. I'm sending you to assault their hideout.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where is their hideout?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_80");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's right. They plan to hack into them and gain access to the bank accounts of everyone in Kaadara. Not that I believe they could actually pull it off, but we cannot let them get that far. I'm sending you to assault their hideout.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where is their hideout?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It's on a small island east of Kaadara. Follow the beach to the east and you shouldn't have any trouble finding it. Take out as many of them as you can. Then find their leader, Jonni Skaak, and take him down as well. If you succeed, they won't be planning an attack on Kaadara again any time soon.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take care of it.
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I cannot do that right now. Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (naboo_kadaara_panaka_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_87");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's on a small island east of Kaadara. Follow the beach to the east and you shouldn't have any trouble finding it. Take out as many of them as you can. Then find their leader, Jonni Skaak, and take him down as well. If you succeed, they won't be planning an attack on Kaadara again any time soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take care of it.
|
|
if (response == "s_87")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
naboo_kadaara_panaka_action_signal_skaak_tipping_10 (player, npc);
|
|
|
|
//-- NPC: Good luck to you.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I cannot do that right now. Maybe later.
|
|
if (response == "s_91")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Time is not on our side in this. Please return soon.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good, there you are. I was beginning to worry you wouldn't be coming.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What can you tell me about that old war bunker?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmmm, okay. That was a research bunker. Naboo officers examined Trade Federation droids there. The better we knew what made them tick, the better we were able to stop them.
|
|
string_id message = new string_id (c_stringFile, "s_68");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Are there any relics left from that war in the bunker?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_70");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hmmm, okay. That was a research bunker. Naboo officers examined Trade Federation droids there. The better we knew what made them tick, the better we were able to stop them.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Are there any relics left from that war in the bunker?
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In the bunker? No. It was stripped of all important equipment and such a long time ago. Any old republic technology has long since moved to other research facilities.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do I find those facilities?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: In the bunker? No. It was stripped of all important equipment and such a long time ago. Any old republic technology has long since moved to other research facilities.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do I find those facilities?
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You don't. You would need to be able to access classified information in the RSF mainframe in Theed, and you lack the required security clearance. But, I might be able to help you. Or get you started, anyway.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'd appreciate your help.
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_73");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You don't. You would need to be able to access classified information in the RSF mainframe in Theed, and you lack the required security clearance. But, I might be able to help you. Or get you started, anyway.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd appreciate your help.
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As it happens, I'm always in need of good, capable recruits for the Royal Security Force. If you're interested, you can start right away. The Skaak Tippers are brewing up some trouble, and your first assignment would be to find out what.
|
|
string_id message = new string_id (c_stringFile, "s_55");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What would you need me to do?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_57");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: As it happens, I'm always in need of good, capable recruits for the Royal Security Force. If you're interested, you can start right away. The Skaak Tippers are brewing up some trouble, and your first assignment would be to find out what.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What would you need me to do?
|
|
if (response == "s_57")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: First, we need to find out what they are planning. Go out around the city and surrounding area and fight some Skaak Tippers. If you find any information or a clue, follow up on it. Report back to me if you find anything significant.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thank you.
|
|
boolean hasResponse1 = false;
|
|
if (naboo_kadaara_panaka_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_108");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int naboo_kadaara_panaka_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: First, we need to find out what they are planning. Go out around the city and surrounding area and fight some Skaak Tippers. If you find any information or a clue, follow up on it. Report back to me if you find anything significant.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on my way.
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
naboo_kadaara_panaka_action_signal_skaak_tipping_3 (player, npc);
|
|
|
|
//-- NPC: Good. Fight Skaak Tippers until you learn something. And be sure to pursue any clues you find.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thank you.
|
|
if (response == "s_112")
|
|
{
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well, but there's no other way to access the information in the RSF mainframe. I'll be here if you change your mind.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.naboo_kadaara_panaka");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
|
|
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);
|
|
|
|
faceTo( self, player );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.naboo_kadaara_panaka");
|
|
|
|
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 (naboo_kadaara_panaka_condition_finishedKadaara (player, npc))
|
|
{
|
|
//-- NPC: The job you did against the Skaak Tippers here in Kaadara is worthy of my highest praise. Well done.
|
|
string_id message = new string_id (c_stringFile, "s_155");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Remind me how to raise my security clearance, please.
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_156");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "naboo_kadaara_panaka", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition_shaak_tipping_13 (player, npc))
|
|
{
|
|
//-- NPC: You did well. Very well. I think it will be a while before the Skaak Tippers try anything in Kaadara again. Well, until someone else comes along anyway.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: About joining the RSF?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_139");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "naboo_kadaara_panaka", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition_skaak_tipping_11_to_12 (player, npc))
|
|
{
|
|
//-- NPC: We must take the fight to the Skaak Tippers. And by we, I mean you. Go to their hideout and put a serious dent in their membership. And when that's done, take out their leader, Jonni Skaak.
|
|
string_id message = new string_id (c_stringFile, "s_20");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition_skaak_tipping_10 (player, npc))
|
|
{
|
|
naboo_kadaara_panaka_action_endTippingPart1 (player, npc);
|
|
|
|
//-- NPC: The Skaak Tippers are smuggling in weapons? This sounds bad, but you did well in recovering some of the weapon crates.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Any idea why they need the weapons?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_58");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "naboo_kadaara_panaka", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition_skaak_tipping_4_to_9 (player, npc))
|
|
{
|
|
//-- NPC: Attack Skaak Tippers until you learn something. Pursue any clues you find while doing so. Report back to me if you find anything conclusive.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition_skaak_tipping__3 (player, npc))
|
|
{
|
|
//-- NPC: Good, there you are. I was beginning to worry you wouldn't be coming.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What can you tell me about that old war bunker?
|
|
boolean hasResponse0 = false;
|
|
if (naboo_kadaara_panaka_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_66");
|
|
|
|
utils.setScriptVar (player, "conversation.naboo_kadaara_panaka.branchId", 15);
|
|
|
|
npcStartConversation (player, npc, "naboo_kadaara_panaka", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (naboo_kadaara_panaka_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good day citizen. Nowhere on Naboo is more beautiful than Kaadara this time of year, am I right? Of course I am.
|
|
string_id message = new string_id (c_stringFile, "s_93");
|
|
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 != "naboo_kadaara_panaka")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
if (branchId == 1 && naboo_kadaara_panaka_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && naboo_kadaara_panaka_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && naboo_kadaara_panaka_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && naboo_kadaara_panaka_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && naboo_kadaara_panaka_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && naboo_kadaara_panaka_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && naboo_kadaara_panaka_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && naboo_kadaara_panaka_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && naboo_kadaara_panaka_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && naboo_kadaara_panaka_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && naboo_kadaara_panaka_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && naboo_kadaara_panaka_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && naboo_kadaara_panaka_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && naboo_kadaara_panaka_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && naboo_kadaara_panaka_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.naboo_kadaara_panaka.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|