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

1380 lines
40 KiB
Plaintext

// ======================================================================
//
// heraldnaboo.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/heraldnaboo";
// ======================================================================
// Script Conditions
// ======================================================================
boolean heraldnaboo_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ======================================================================
// Script Actions
// ======================================================================
void heraldnaboo_action_waypoint1 (obj_id player, obj_id npc)
{
location weapon = new location(-6396, 0, -3196);
obj_id waypoint = createWaypointInDatapad(player, weapon);
setWaypointName(waypoint, "Research Facility");
setWaypointColor( waypoint, "blue" );
setWaypointVisible( waypoint, true );
setWaypointActive( waypoint, true );
}
// ----------------------------------------------------------------------
void heraldnaboo_action_waypoint2 (obj_id player, obj_id npc)
{
location mauler = new location(2982, 0, 1113);
obj_id waypoint = createWaypointInDatapad(player, mauler);
setWaypointName(waypoint, "Mauler Encampment");
setWaypointColor( waypoint, "blue" );
setWaypointVisible( waypoint, true );
setWaypointActive( waypoint, true );
doAnimationAction(npc, "cover_mouth");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_waypoint3 (obj_id player, obj_id npc)
{
location gungan = new location(4759, 0, -3896);
obj_id waypoint = createWaypointInDatapad(player, gungan);
setWaypointName(waypoint, "Recent Battle Site");
setWaypointColor( waypoint, "blue" );
setWaypointVisible( waypoint, true );
setWaypointActive( waypoint, true );
doAnimationAction(npc, "slump_head");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_no (obj_id player, obj_id npc)
{
doAnimationAction(npc, "shake_head_no");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_nod (obj_id player, obj_id npc)
{
doAnimationAction(npc, "nod_head_once");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_implore (obj_id player, obj_id npc)
{
doAnimationAction(npc, "implore");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_wave (obj_id player, obj_id npc)
{
doAnimationAction(npc, "wave1");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_curtsey (obj_id player, obj_id npc)
{
doAnimationAction(npc, "curtsey1");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_dismiss (obj_id player, obj_id npc)
{
doAnimationAction(npc, "wave_on_dismissing");
}
// ----------------------------------------------------------------------
void heraldnaboo_action_shush (obj_id player, obj_id npc)
{
doAnimationAction(npc, "shush");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int heraldnaboo_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You carry yourself well, my friend. Are you of nobility? No? Then, you must be an adventurer! I have information regarding certain points of interest here on Naboo. Do you wish to hear what I know?
//-- [RESPONSE NOTE]
//-- PLAYER: No, I have to go!
if (response == "s_3243aa0a")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_curtsey (player, npc);
//-- NPC: Oh! I'm so sorry to disturb you. Please, return when you have the time.
string_id message = new string_id (c_stringFile, "s_68fd1f22");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, what do you know?
if (response == "s_7fc11314")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: I only know what my employer requires me to know. Particularly, about the war between the Gungans and Imperials, the Mauler Camp, and the new Weapon Research Facility that the Empire has established.
string_id message = new string_id (c_stringFile, "s_99e4afa");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How did you come across this information?
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'd like some more information.
boolean hasResponse1 = false;
if (heraldnaboo_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_fd9053a8");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_d65aab98");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I only know what my employer requires me to know. Particularly, about the war between the Gungans and Imperials, the Mauler Camp, and the new Weapon Research Facility that the Empire has established.
//-- [RESPONSE NOTE]
//-- PLAYER: How did you come across this information?
if (response == "s_fd9053a8")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_dismiss (player, npc);
//-- NPC: Well... That's a long story, my friend. I wouldn't even know where to begin. Surely, if I told you the reason, my employer would get rid of me. He's a ruthless man.
string_id message = new string_id (c_stringFile, "s_726bbe64");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Okay, I guess I'll leave it alone, then.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: You've made me curious. Tell me.
boolean hasResponse1 = false;
if (heraldnaboo_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_385b2f92");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_bdc2cc97");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'd like some more information.
if (response == "s_d65aab98")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: About what would you like more information?
string_id message = new string_id (c_stringFile, "s_84b85cd6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Imperial Weapons Research Facility.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Mauler Encampment
boolean hasResponse1 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The Gungans and Imperials.
boolean hasResponse2 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_63");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_67");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_71");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well... That's a long story, my friend. I wouldn't even know where to begin. Surely, if I told you the reason, my employer would get rid of me. He's a ruthless man.
//-- [RESPONSE NOTE]
//-- PLAYER: Okay, I guess I'll leave it alone, then.
if (response == "s_385b2f92")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: Do you want more information about a particular area I've spoken about?
string_id message = new string_id (c_stringFile, "s_ec04baa6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No, I'm out of here.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes, actually, I do.
boolean hasResponse1 = false;
if (heraldnaboo_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_c213fa93");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_87b9da1d");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You've made me curious. Tell me.
if (response == "s_bdc2cc97")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_shush (player, npc);
//-- NPC: Keep your voice down! I can only tell you this; there is something larger than us out there. An indescribable evil that makes even the most generous of nobility turn sour. Be careful, young one. Don't be pulled into their plans, their evil. I can't tell you anything else.
string_id message = new string_id (c_stringFile, "s_fa7e3331");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll keep a lookout.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want more information.
boolean hasResponse1 = false;
if (heraldnaboo_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_83237923");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_8858a3fe");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Do you want more information about a particular area I've spoken about?
//-- [RESPONSE NOTE]
//-- PLAYER: No, I'm out of here.
if (response == "s_c213fa93")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: I wish you well, my friend. Have a wonderous day!
string_id message = new string_id (c_stringFile, "s_4b942e33");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, actually, I do.
if (response == "s_87b9da1d")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: What would you like to know about?
string_id message = new string_id (c_stringFile, "s_261bbc0d");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Imperial Weapons Research Facility.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Mauler Encampment.
boolean hasResponse1 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The Gungans and Imperials.
boolean hasResponse2 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_7431a8fb");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_d3bd15da");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_7ad7fe8f");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What would you like to know about?
//-- [RESPONSE NOTE]
//-- PLAYER: The Imperial Weapons Research Facility.
if (response == "s_7431a8fb")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint1 (player, npc);
//-- NPC: An interesting place, that is. I have the general location of the establishment and can download it into your datapad. Just give me a moment--Ah! There we go. As I said, it won't be exact. You may have to do some searching.
string_id message = new string_id (c_stringFile, "s_37c26930");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Mauler Encampment.
if (response == "s_d3bd15da")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint2 (player, npc);
//-- NPC: They are a vile sort. Roric V`lia, Noble of the Naboo family, whom is my employer, doesn't like to deal with them much. But, I guess--uh. I wasn't suppose to tell you that. Um--here's the location.
string_id message = new string_id (c_stringFile, "s_36d2fdef");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The Gungans and Imperials.
if (response == "s_7ad7fe8f")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint3 (player, npc);
//-- NPC: It is such a tragedy. The Gungans are so peaceful, so cute and kind. Well, Jar Jar--I met him once. He's a bit annoying. Anyway! You can find the site of their most recent battle at the location I downloaded in your datapad. It's an exact location, a bit far away, however.
string_id message = new string_id (c_stringFile, "s_ba21d00c");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Keep your voice down! I can only tell you this; there is something larger than us out there. An indescribable evil that makes even the most generous of nobility turn sour. Be careful, young one. Don't be pulled into their plans, their evil. I can't tell you anything else.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll keep a lookout.
if (response == "s_83237923")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_nod (player, npc);
//-- NPC: That is wise of you. Do you wish to hear about the information I can give you?
string_id message = new string_id (c_stringFile, "s_2ca149bc");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No. Good bye.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes, what information do you have?
boolean hasResponse1 = false;
if (heraldnaboo_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_d241258b");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_ce76e0f");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I want more information.
if (response == "s_8858a3fe")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_implore (player, npc);
//-- NPC: I told you! I can't tell you anything else. Please... do you wish to hear information about the places I've mentioned? You may be able to find out more there.
string_id message = new string_id (c_stringFile, "s_7c64e921");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No, I must go.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes, give me the information.
boolean hasResponse1 = false;
if (heraldnaboo_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_9575185c");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_c029271f");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That is wise of you. Do you wish to hear about the information I can give you?
//-- [RESPONSE NOTE]
//-- PLAYER: No. Good bye.
if (response == "s_d241258b")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_wave (player, npc);
//-- NPC: I wish you well. Please be careful. Heed my words!
string_id message = new string_id (c_stringFile, "s_a96ea3c0");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, what information do you have?
if (response == "s_ce76e0f")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: What would you like to know about?
string_id message = new string_id (c_stringFile, "s_29");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Imperial Weapons Research Facility.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Mauler Encampment
boolean hasResponse1 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The Gungans and Imperials.
boolean hasResponse2 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_31");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_b7659e9e");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What would you like to know about?
//-- [RESPONSE NOTE]
//-- PLAYER: The Imperial Weapons Research Facility.
if (response == "s_31")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint1 (player, npc);
//-- NPC: An interesting place, that is. I have the general location of the establishment and can download it into your datapad. Just give me a moment--Ah! There we go. As I said, it won't be exact. You may have to do some searching.
string_id message = new string_id (c_stringFile, "s_33");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Mauler Encampment
if (response == "s_b7659e9e")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint2 (player, npc);
//-- NPC: They are a vile sort. Roric V`lia, Noble of the Naboo family, whom is my employer, doesn't like to deal with them much. But, I guess--uh. I wasn't suppose to tell you that. Um--here's the location.
string_id message = new string_id (c_stringFile, "s_36");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The Gungans and Imperials.
if (response == "s_38")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint3 (player, npc);
//-- NPC: It is such a tragedy. The Gungans are so peaceful, so cute and kind. Well, Jar Jar--I met him once. He's a bit annoying. Anyway! You can find the site of their most recent battle at the location I downloaded in your datapad. It's an exact location, a bit far away, however.
string_id message = new string_id (c_stringFile, "s_40");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I told you! I can't tell you anything else. Please... do you wish to hear information about the places I've mentioned? You may be able to find out more there.
//-- [RESPONSE NOTE]
//-- PLAYER: No, I must go.
if (response == "s_9575185c")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: I wish you well. Keep silent about what we talked about.
string_id message = new string_id (c_stringFile, "s_7cd8dc9");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, give me the information.
if (response == "s_c029271f")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: What would you like to know about?
string_id message = new string_id (c_stringFile, "s_47");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The Imperial Weapons Research Facility.
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Mauler Encampment
boolean hasResponse1 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The Gungans and Imperials.
boolean hasResponse2 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_53");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_57");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What would you like to know about?
//-- [RESPONSE NOTE]
//-- PLAYER: The Imperial Weapons Research Facility.
if (response == "s_49")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint1 (player, npc);
//-- NPC: An interesting place, that is. I have the general location of the establishment and can download it into your datapad. Just give me a moment--Ah! There we go. As I said, it won't be exact. You may have to do some searching.
string_id message = new string_id (c_stringFile, "s_51");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Mauler Encampment
if (response == "s_53")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint2 (player, npc);
//-- NPC: They are a vile sort. Roric V`lia, Noble of the Naboo family, whom is my employer, doesn't like to deal with them much. But, I guess--uh. I wasn't suppose to tell you that. Um--here's the location.
string_id message = new string_id (c_stringFile, "s_55");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The Gungans and Imperials.
if (response == "s_57")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint3 (player, npc);
//-- NPC: It is such a tragedy. The Gungans are so peaceful, so cute and kind. Well, Jar Jar--I met him once. He's a bit annoying. Anyway! You can find the site of their most recent battle at the location I downloaded in your datapad. It's an exact location, a bit far away, however.
string_id message = new string_id (c_stringFile, "s_59");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int heraldnaboo_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: About what would you like more information?
//-- [RESPONSE NOTE]
//-- PLAYER: The Imperial Weapons Research Facility.
if (response == "s_63")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint1 (player, npc);
//-- NPC: An interesting place, that is. I have the general location of the establishment and can download it into your datapad. Just give me a moment--Ah! There we go. As I said, it won't be exact. You may have to do some searching.
string_id message = new string_id (c_stringFile, "s_65");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Mauler Encampment
if (response == "s_67")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint2 (player, npc);
//-- NPC: They are a vile sort. Roric V`lia, Noble of the Naboo family, whom is my employer, doesn't like to deal with them much. But, I guess--uh. I wasn't suppose to tell you that. Um--here's the location.
string_id message = new string_id (c_stringFile, "s_69");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The Gungans and Imperials.
if (response == "s_71")
{
//-- [NOTE]
if (heraldnaboo_condition__defaultCondition (player, npc))
{
heraldnaboo_action_waypoint3 (player, npc);
//-- NPC: It is such a tragedy. The Gungans are so peaceful, so cute and kind. Well, Jar Jar--I met him once. He's a bit annoying. Anyway! You can find the site of their most recent battle at the location I downloaded in your datapad. It's an exact location, a bit far away, however.
string_id message = new string_id (c_stringFile, "s_73");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isTangible (self)) || (isPlayer (self)))
detachScript(self, "conversation.heraldnaboo");
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.heraldnaboo");
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 (heraldnaboo_condition__defaultCondition (player, npc))
{
//-- NPC: You carry yourself well, my friend. Are you of nobility? No? Then, you must be an adventurer! I have information regarding certain points of interest here on Naboo. Do you wish to hear what I know?
string_id message = new string_id (c_stringFile, "s_df58f20");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No, I have to go!
boolean hasResponse0 = false;
if (heraldnaboo_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes, what do you know?
boolean hasResponse1 = false;
if (heraldnaboo_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_3243aa0a");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_7fc11314");
utils.setScriptVar (player, "conversation.heraldnaboo.branchId", 1);
npcStartConversation (player, npc, "heraldnaboo", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "heraldnaboo")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.heraldnaboo.branchId");
if (branchId == 1 && heraldnaboo_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && heraldnaboo_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && heraldnaboo_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && heraldnaboo_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && heraldnaboo_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && heraldnaboo_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && heraldnaboo_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && heraldnaboo_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && heraldnaboo_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && heraldnaboo_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && heraldnaboo_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.heraldnaboo.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================