Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/naboo_boss_nass.script
T

1276 lines
43 KiB
Plaintext

// ======================================================================
//
// naboo_boss_nass.script
//
//
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/naboo_boss_nass";
// ======================================================================
// Script Conditions
// ======================================================================
boolean naboo_boss_nass_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onArtifactMauler (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_artifacts_mauler");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_sentToBossNass (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "legacy_naboo_droid_module_4") ||
groundquests.hasCompletedQuest(player, "legacy_naboo_droid_module_4");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedArtifactMauler (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_artifacts_mauler", "boss_nass_mauler_06") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_artifacts_mauler");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onArtifactSkaak (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_artifacts_skaak");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedArtifactSkaak (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_artifacts_skaak", "boss_nass_artifacts_skaak_07") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_artifacts_skaak");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onArtifactMuskeg (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_artifacts_muskeg");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedArtifactMuskeg (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_artifacts_muskeg", "boss_nass_artifacts_muskeg_05") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_artifacts_muskeg");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onArtifactDarkwalker (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_artifacts_darkwalker");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedArtifactDarkwalker (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_artifacts_darkwalker", "boss_nass_artifacts_darkwalker_04") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_artifacts_darkwalker");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onArtifactScattered (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_artifacts_scattered");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedArtifactScattered (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_artifacts_scattered", "boss_nass_artifacts_scattered_02") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_artifacts_scattered");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onPasscodeRecon (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_password_recon");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedPasscodeRecon (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_password_recon", "boss_nass_password_recon_04") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_password_recon");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_finishedPasscodeCode (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "naboo_boss_nass_password_code", "boss_nass_password_code_06") ||
groundquests.hasCompletedQuest(player, "naboo_boss_nass_password_code");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_onPasscodeCode (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "naboo_boss_nass_password_code");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_gettingDroidPart (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "legacy_naboo_droid_module_4", "findDroidPart4_03");
}
// ----------------------------------------------------------------------
boolean naboo_boss_nass_condition_hasDroidPart (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "legacy_naboo_droid_module_4", "findDroidPart4_04") ||
groundquests.isTaskActive(player, "legacy_naboo_droid_module_4", "findDroidPart4_05") ||
groundquests.isTaskActive(player, "legacy_naboo_droid_module_4", "findDroidPart4_06") ||
groundquests.hasCompletedQuest(player, "legacy_naboo_droid_module_4");
}
// ======================================================================
// Script Actions
// ======================================================================
void naboo_boss_nass_action_grantArtifactMauler (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "findDroidPart4_01");
groundquests.requestGrantQuest(player, "naboo_boss_nass_artifacts_mauler");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantArtifactSkaak (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_artifacts_skaak");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantArtifactMuskeg (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_artifacts_muskeg");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantArtifactDarkwalker (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_artifacts_darkwalker");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantArtifactScattered (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_artifacts_scattered");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_signal_scattered_02 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_artifacts_scattered_02");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endArtifactDarkwalker (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_artifacts_darkwalker_04");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endArtifactMuskeg (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_artifacts_muskeg_05");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endArtifactSkaak (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_artifacts_skaak_07");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endArtifactMauler (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_mauler_06");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantPasscodeRecon (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_password_recon");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endPasscodeRecon (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_password_recon_04");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_grantPasscodeCode (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "naboo_boss_nass_password_code");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_endPasscodeCode (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "boss_nass_password_code_06");
groundquests.sendSignal(player, "findDroidPart4_01");
}
// ----------------------------------------------------------------------
void naboo_boss_nass_action_codeForDroidPart (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "findDroidPart4_02");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int naboo_boss_nass_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Good, you brought the droidtech tools?
//-- NPC: Good, yousa brought da droidtech tools?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, here they are.
if (response == "s_70")
{
//-- [NOTE] Very good. Let me see. Ah, yes. As I suspected, the password is encoded into the toolkit. A major oversight, to be honest, but it works to our advantage. You should now be able to extract the module you want from the Old Republic battle droid without worry.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_codeForDroidPart (player, npc);
//-- NPC: Awful good. Let mesa see. Ah, yin'. As mesa suspectin', da password bein' encodin' into da toolkit. A major oversight, to be honest, but it works to our advantage. Yousa should now be able to extract da module yousa want from da Old Republic battle droid widout worry.
string_id message = new string_id (c_stringFile, "s_71");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] The droids themselves didn't reveal anything. Perhaps an Ultragungan foot soldier can enlighten us.
//-- NPC: Da droids demselvin' didn't reveal anydin'. Perhaps an Ultragungan foot soldier can enlighten ossen.
//-- [RESPONSE NOTE]
//-- PLAYER: You want me to attack Ultragungan foot soldiers?
if (response == "s_32")
{
//-- [NOTE] Yes, that's right. Off you go.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantPasscodeCode (player, npc);
//-- NPC: Yin', dat's right. Off yousa go.
string_id message = new string_id (c_stringFile, "s_67");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] You have done it! All five artifacts have been recovered. Well done.
//-- NPC: Yousa have done it! Wid all six pieces of artifact number five I now has all five artifacts recovered. okiday done.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you. Any luck with the battle droid security?
if (response == "s_58")
{
//-- [NOTE] Ah, directly to business. Good. Unfortunately, the Ultragungan Militia has been very careful. I do not yet know how to bypass the security on their droids. But I have an idea where to start looking.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
//-- NPC: Ah, directly to business. Good. Unfortunately, da Ultragungan Militia has been awful careful. Mesa no yet know how to bypass da security on deir droids. But mesa have an idea where to start lookin'.
string_id message = new string_id (c_stringFile, "s_59");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Great. What's your idea?
boolean hasResponse0 = false;
if (naboo_boss_nass_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_33");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Ah, directly to business. Good. Unfortunately, the Ultragungan Militia has been very careful. I do not yet know how to bypass the security on their droids. But I have an idea where to start looking.
//-- NPC: Ah, directly to business. Good. Unfortunately, da Ultragungan Militia has been awful careful. Mesa no yet know how to bypass da security on deir droids. But mesa have an idea where to start lookin'.
//-- [RESPONSE NOTE]
//-- PLAYER: Great. What's your idea?
if (response == "s_33")
{
//-- [NOTE] You'll start by destroying some flawed battle droids in neaby Ultragungan camps. We might learn something directly from the droids.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
//-- NPC: Yousa'll start by destroyin' some flawin' battle droids in nearby Ultragungan camps. Wesa might learn somedin' directly from da droids.
string_id message = new string_id (c_stringFile, "s_34");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll get right on that.
boolean hasResponse0 = false;
if (naboo_boss_nass_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_64");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] You'll start by destroying some flawed battle droids in neaby Ultragungan camps. We might learn something directly from the droids.
//-- NPC: Yousa'll start by destroyin' some flawin' battle droids in nearby Ultragungan camps. Wesa might learn somedin' directly from da droids.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll get right on that.
if (response == "s_64")
{
//-- [NOTE] Good. I'll be in touch if I learn anything.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantPasscodeRecon (player, npc);
//-- NPC: Good. Mesa'll be in touch if mesa learn anydin'.
string_id message = new string_id (c_stringFile, "s_65");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Four of the five artifacts are now safely back in my custody. Thank you. There is but one left. It was separated into 6 pieces by the Ultra-Gungan Militia and scattered to different parts of the planet. Retrieve all 6 pieces of this last artifact.
//-- NPC: Four of da five artifacts are now safely back in mesa custody. dank yousa. Dere bein' but one left. It was separatin' into 6 piecin' by da Ultra-Gungan Militia and scatterin' to different parts of da planet. Retrieve all 6 piecin' of dissen last artifact.
//-- [RESPONSE NOTE]
//-- PLAYER: Where are the six pieces?
if (response == "s_55")
{
//-- [NOTE] One is in the Skaak Tipper hideout near Kadaara. The second is in the Mauler stronghold. The third is in the Mummer bunker near Theed. The fourth is in the Darkwalker cave near Dee'ja Peak. The fifth is somewhere in Keren. And the sixth is somewhere in Moenia. Return to me with all of them.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantArtifactScattered (player, npc);
//-- NPC: One bein' in da Skaak Tipper hideout near Kaadara. Da second bein' in da Mauler stronghold. Da third bein' in da Mummer bunker near dein'. Da fourth bein' in da Darkwalker cave near Dee'ja Peak. Da fifth bein' somewhere in Keren. And da sixth bein' somewhere in Moenia. Return to mesa wid all of dem.
string_id message = new string_id (c_stringFile, "s_57");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Yet again you are successful, and the third artifact has been returned. The Darkwalkers have the next artifacts.
//-- NPC: Yet again yousa are successful, and da third artifact has been returnin'. Da Darkwalkers have da next artifacts.
//-- [RESPONSE NOTE]
//-- PLAYER: Darkwalkers. Nearby, I presume?
if (response == "s_53")
{
//-- [NOTE] Yes, they have a camp nearby. That is the place to start.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantArtifactDarkwalker (player, npc);
//-- NPC: Yin', dey have a camp nearby. Dat bein' da place to start.
string_id message = new string_id (c_stringFile, "s_54");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Now the second artifact is safe. You are doing well. The third artifact is with the Muskegs.
//-- NPC: Now da second artifact bein' safe. Yousa are doin' okiday. Da third artifact bein' wid da Muskegs.
//-- [RESPONSE NOTE]
//-- PLAYER: The Muskegs. I've dealt with them before.
if (response == "s_51")
{
//-- [NOTE] Then you should have no trouble doing so again.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantArtifactMuskeg (player, npc);
//-- NPC: Den yousa should have no trouble doin' so again.
string_id message = new string_id (c_stringFile, "s_52");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] You found the first artifact. Well done. The next one is with the Skaak Tippers. They have a base not far from here?
//-- NPC: Yousa found da first artifact. okiday done. Da next one bein' wid da Skaak Tippers. Dey have a base no far from here?
//-- [RESPONSE NOTE]
//-- PLAYER: More Skaak Tippers. Ugh.
if (response == "s_39")
{
//-- [NOTE] Yes, I'm afraid so.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantArtifactSkaak (player, npc);
//-- NPC: Yin', mesa afraid so.
string_id message = new string_id (c_stringFile, "s_50");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] I was told to expect you, and I need your assistance. Some Gungan artifacts were stolen. I need you to get them back. In exchange, while you're recovering those artifacts, I'll figure out a way to get past the security on Ultragungan battle droids, which includes the one you seek.
//-- NPC: Mesa was told to expect yousa, and mesa nein' yousa assistance. Some Gungan artifacts were stolen. Mesa nein' yousa to get dem back. In exchange, while yousa recoverin' dose artifacts, Mesa'll figure out a way to get past da security on Ultragungan battle droids, which includin' da one yousa seek.
//-- [RESPONSE NOTE]
//-- PLAYER: Where do I start?
if (response == "s_74")
{
//-- [NOTE] According to my sources, the first one is with the Maulers. They have a camp nearby.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
//-- NPC: Accordin' to mesa sourcin', da first one bein' wid da Maulers. Dey have a camp nearby.
string_id message = new string_id (c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Maulers. On my way.
boolean hasResponse0 = false;
if (naboo_boss_nass_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_78");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not interested.
if (response == "s_82")
{
//-- [NOTE] Well, then why did you come to me?
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
//-- NPC: Okiday, den why did yousa come to mesa?
string_id message = new string_id (c_stringFile, "s_84");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int naboo_boss_nass_handleBranch27 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] According to my sources, the first one is with the Maulers. They have a camp nearby.
//-- NPC: Accordin' to mesa sourcin', da first one bein' wid da Maulers. Dey have a camp nearby.
//-- [RESPONSE NOTE]
//-- PLAYER: Maulers. On my way.
if (response == "s_78")
{
//-- [NOTE] Excellent. Return when you have the artifact.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
naboo_boss_nass_action_grantArtifactMauler (player, npc);
//-- NPC: Excellent. Return when yousa have da artifact.
string_id message = new string_id (c_stringFile, "s_80");
utils.removeScriptVar (player, "conversation.naboo_boss_nass.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.naboo_boss_nass");
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);
faceTo( self, player );
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.naboo_boss_nass");
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] So you found the dorid module? Very good. And hopefully you killed a great number of Ultragungan Militia soldiers along the way.
if (naboo_boss_nass_condition_hasDroidPart (player, npc))
{
//-- NPC: So yousa found da dorid module? Awful good. And hopefully yousa killin' a great number of Ultragungan Militia soldiers along da way.
string_id message = new string_id (c_stringFile, "s_72");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Go to the Ultragungan Militia bunker to find the Old Republic battle droid with the module you seek. Be careful, the Ultragungan Militia will not welcome you.
if (naboo_boss_nass_condition_gettingDroidPart (player, npc))
{
//-- NPC: Go to da Ultragungan Militia bunker to find da Old Republic battle droid wid da module yousa seek. Be careful, da Ultragungan Militia will no welcome yousa.
string_id message = new string_id (c_stringFile, "s_73");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Good, you brought the droidtech tools?
if (naboo_boss_nass_condition_finishedPasscodeCode (player, npc))
{
naboo_boss_nass_action_endPasscodeCode (player, npc);
//-- NPC: Good, yousa brought da droidtech tools?
string_id message = new string_id (c_stringFile, "s_69");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, here they are.
boolean hasResponse0 = false;
if (naboo_boss_nass_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_boss_nass.branchId", 3);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] We'll get one of the Ultragungan soldier's to talk. They can't keep it secret forever.
if (naboo_boss_nass_condition_onPasscodeCode (player, npc))
{
//-- NPC: Wesa'll get one of da Ultragungan soldier's to talk. dey can't keep it secret forever.
string_id message = new string_id (c_stringFile, "s_68");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] The droids themselves didn't reveal anything. Perhaps an Ultragungan foot soldier can enlighten us.
if (naboo_boss_nass_condition_finishedPasscodeRecon (player, npc))
{
naboo_boss_nass_action_endPasscodeRecon (player, npc);
//-- NPC: Da droids demselvin' didn't reveal anydin'. Perhaps an Ultragungan foot soldier can enlighten ossen.
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You want me to attack Ultragungan foot soldiers?
boolean hasResponse0 = false;
if (naboo_boss_nass_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_32");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 6);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] Don't worry, we'll figure out their security measures one way or another.
if (naboo_boss_nass_condition_onPasscodeRecon (player, npc))
{
//-- NPC: No worry, wesa'll figure out deir security measurin' one way or anoder.
string_id message = new string_id (c_stringFile, "s_66");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] You have done it! All five artifacts have been recovered. Well done.
if (naboo_boss_nass_condition_finishedArtifactScattered (player, npc))
{
naboo_boss_nass_action_signal_scattered_02 (player, npc);
//-- NPC: Yousa have done it! Wid all six pieces of artifact number five I now has all five artifacts recovered. okiday done.
string_id message = new string_id (c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you. Any luck with the battle droid security?
boolean hasResponse0 = false;
if (naboo_boss_nass_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_boss_nass.branchId", 9);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] Return to me with all six pieces of the last artifact.
if (naboo_boss_nass_condition_onArtifactScattered (player, npc))
{
//-- NPC: Return to mesa wid all six piecin' of da last artifact.
string_id message = new string_id (c_stringFile, "s_42");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Four of the five artifacts are now safely back in my custody. Thank you. There is but one left. It was separated into 6 pieces by the Ultra-Gungan Militia and scattered to different parts of the planet. Retrieve all 6 pieces of this last artifact.
if (naboo_boss_nass_condition_finishedArtifactDarkwalker (player, npc))
{
naboo_boss_nass_action_endArtifactDarkwalker (player, npc);
//-- NPC: Four of da five artifacts are now safely back in mesa custody. dank yousa. Dere bein' but one left. It was separatin' into 6 piecin' by da Ultra-Gungan Militia and scatterin' to different parts of da planet. Retrieve all 6 piecin' of dissen last artifact.
string_id message = new string_id (c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where are the six pieces?
boolean hasResponse0 = false;
if (naboo_boss_nass_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_55");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 14);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] The fourth artifact is with the Darkwalkers.
if (naboo_boss_nass_condition_onArtifactDarkwalker (player, npc))
{
//-- NPC: Da fourth artifact bein' wid da Darkwalkers.
string_id message = new string_id (c_stringFile, "s_46");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Yet again you are successful, and the third artifact has been returned. The Darkwalkers have the next artifacts.
if (naboo_boss_nass_condition_finishedArtifactMuskeg (player, npc))
{
naboo_boss_nass_action_endArtifactMuskeg (player, npc);
//-- NPC: Yet again yousa are successful, and da third artifact has been returnin'. Da Darkwalkers have da next artifacts.
string_id message = new string_id (c_stringFile, "s_43");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Darkwalkers. Nearby, I presume?
boolean hasResponse0 = false;
if (naboo_boss_nass_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_53");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 17);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] The Muskeg have the third artifact.
if (naboo_boss_nass_condition_onArtifactMuskeg (player, npc))
{
//-- NPC: Da Muskeg have da third artifact.
string_id message = new string_id (c_stringFile, "s_47");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Now the second artifact is safe. You are doing well. The third artifact is with the Muskegs.
if (naboo_boss_nass_condition_finishedArtifactSkaak (player, npc))
{
naboo_boss_nass_action_endArtifactSkaak (player, npc);
//-- NPC: Now da second artifact bein' safe. Yousa are doin' okiday. Da third artifact bein' wid da Muskegs.
string_id message = new string_id (c_stringFile, "s_48");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Muskegs. I've dealt with them before.
boolean hasResponse0 = false;
if (naboo_boss_nass_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_51");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 20);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] The Skaak Tippers have the second artifact.
if (naboo_boss_nass_condition_onArtifactSkaak (player, npc))
{
//-- NPC: Da Skaak Tippers have da second artifact.
string_id message = new string_id (c_stringFile, "s_49");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] You found the first artifact. Well done. The next one is with the Skaak Tippers. They have a base not far from here?
if (naboo_boss_nass_condition_finishedArtifactMauler (player, npc))
{
naboo_boss_nass_action_endArtifactMauler (player, npc);
//-- NPC: Yousa found da first artifact. okiday done. Da next one bein' wid da Skaak Tippers. Dey have a base no far from here?
string_id message = new string_id (c_stringFile, "s_37");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: More Skaak Tippers. Ugh.
boolean hasResponse0 = false;
if (naboo_boss_nass_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_39");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 23);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] The Maulers have the first artifact.
if (naboo_boss_nass_condition_onArtifactMauler (player, npc))
{
//-- NPC: Da Maulers have da first artifact.
string_id message = new string_id (c_stringFile, "s_60");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] I was told to expect you, and I need your assistance. Some Gungan artifacts were stolen. I need you to get them back. In exchange, while you're recovering those artifacts, I'll figure out a way to get past the security on Ultragungan battle droids, which includes the one you seek.
if (naboo_boss_nass_condition_sentToBossNass (player, npc))
{
//-- NPC: Mesa was told to expect yousa, and mesa nein' yousa assistance. Some Gungan artifacts were stolen. Mesa nein' yousa to get dem back. In exchange, while yousa recoverin' dose artifacts, Mesa'll figure out a way to get past da security on Ultragungan battle droids, which includin' da one yousa seek.
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do I start?
boolean hasResponse0 = false;
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not interested.
boolean hasResponse1 = false;
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_82");
utils.setScriptVar (player, "conversation.naboo_boss_nass.branchId", 26);
npcStartConversation (player, npc, "naboo_boss_nass", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] We Gungans have peace with the Naboo. We do not want that peace to be shattered.
if (naboo_boss_nass_condition__defaultCondition (player, npc))
{
//-- NPC: Wesa Gungans have peace wid da Naboo. Wesa no want dat peace to be shatterin'.
string_id message = new string_id (c_stringFile, "s_86");
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_boss_nass")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.naboo_boss_nass.branchId");
if (branchId == 3 && naboo_boss_nass_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && naboo_boss_nass_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && naboo_boss_nass_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && naboo_boss_nass_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && naboo_boss_nass_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && naboo_boss_nass_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && naboo_boss_nass_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && naboo_boss_nass_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && naboo_boss_nass_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && naboo_boss_nass_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 27 && naboo_boss_nass_handleBranch27 (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_boss_nass.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================