mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2434 lines
72 KiB
Plaintext
2434 lines
72 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// vana_sage.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.collection;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/vana_sage";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean vana_sage_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasInitialQuestTask (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return (groundquests.hasCompletedQuest(player, "u16_nym_themepark_pointer_01")
|
|
|| groundquests.hasCompletedQuest(player, "u16_nym_themepark_pointer_02")
|
|
&& !groundquests.isQuestActive(player, "u16_nym_themepark_interview_choster"))
|
|
|| (groundquests.isTaskActive(player, "u16_nym_themepark_pointer_01", "findVanaSage")
|
|
|| groundquests.isTaskActive(player, "u16_nym_themepark_pointer_02", "findVanaSage"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasntSpokenChosterHasQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return (groundquests.hasCompletedQuest(player, "u16_nym_themepark_pointer_01")
|
|
|| groundquests.hasCompletedQuest(player, "u16_nym_themepark_pointer_02"))
|
|
&& (groundquests.isQuestActive(player, "u16_nym_themepark_interview_choster"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasNotCompletedChoster (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_interview_choster");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_playerIsHighLvl (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return getLevel(player) >= 56;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasMetChoster (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_interview_choster", "tellVanaChosterMsg");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_metChosterNoPirateQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_interview_choster")
|
|
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasntCompletedPirate (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasReturnedWithDroid (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_hideout", "returnPirateComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasCompletedPirate (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_allQuestsComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_vana_to_jinkins");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean vana_sage_condition_hasCompletedThemePark (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_shuttle_ambush");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void vana_sage_action_giveChosterQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_interview_choster");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void vana_sage_action_finishInitialQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasFoundVanaSage");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void vana_sage_action_givePirateQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_pirate_hideout");
|
|
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_sulfur_lake_pirate_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_sulfur_lake_pirate_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void vana_sage_action_finishChoster (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasToldVanaChosterMsg");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void vana_sage_action_finishPirateQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedPirate");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void vana_sage_action_gotoJinkins (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_vana_to_jinkins");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int vana_sage_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: One of our operatives, a slicer who has infiltrated the Sulfur Pirate lair, said that he worked with you to slice the back room. Did you retrieve the module?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I have it right here.
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumb_up");
|
|
|
|
vana_sage_action_finishPirateQuest (player, npc);
|
|
|
|
//-- NPC: Securing that memory module proves that you have the makings of a true pirate. I'm sure you'll go far with the Lok Revenants. Return to me when you are ready for more work.
|
|
string_id message = new string_id (c_stringFile, "s_91");
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What happened? Looks like you don't have your next mission.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What was I supposed to do again?
|
|
if (response == "s_101")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Our scouts learned that the Sulfur Lake Pirates have already taken the cargo - including the droid - from the crashed starship, so you won't need to look through the wreckage. Just head to the pirates' lair, locate the droid, and grab the memory module. Oh, and watch out for the pirates' 'bridge troll.' I'm not sure what that is, but it sounds dangerous. I've placed a new waypoint in your datapad.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_95");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: How was your meeting with Choster?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do you know...?
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: I'm the head of security. You'll be glad to know that my intuition was correct and you didn't waste your time speaking with Choster.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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.vana_sage.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm the head of security. You'll be glad to know that my intuition was correct and you didn't waste your time speaking with Choster.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh?
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Our scouts learned that the Sulfur Lake Pirates have already taken the cargo - including the droid - from the crashed starship, so you won't need to look through the wreckage. Just head to the pirates' lair, locate the droid, and grab the memory module. Oh, and watch out for the pirates' 'bridge troll.' I'm not sure what that is, but it sounds dangerous. I've placed a new waypoint in your datapad.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_95");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Our scouts learned that the Sulfur Lake Pirates have already taken the cargo - including the droid - from the crashed starship, so you won't need to look through the wreckage. Just head to the pirates' lair, locate the droid, and grab the memory module. Oh, and watch out for the pirates' 'bridge troll.' I'm not sure what that is, but it sounds dangerous. I've placed a new waypoint in your datapad.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on my way.
|
|
if (response == "s_95")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
vana_sage_action_givePirateQuest (player, npc);
|
|
|
|
//-- NPC: Good. Before you go you might try asking around to see if anyone else has business with the Sulfur Lake Pirates.
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What was I supposed to do again?
|
|
if (response == "s_33")
|
|
{
|
|
doAnimationAction (player, "embarrassed");
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasntSpokenChosterHasQuest (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_away");
|
|
|
|
vana_sage_action_giveChosterQuest (player, npc);
|
|
|
|
//-- NPC: I sent you to meet Choster in the Stronghold Cantina.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
vana_sage_action_giveChosterQuest (player, npc);
|
|
|
|
//-- NPC: What happened? I sent you to meet Choster in the Stronghold Cantina.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for coming, %TU. The Lok Revenants are always in need of competent individuals.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You have a job?
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You intercepted a distress call?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse2 = false;
|
|
if (vana_sage_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_79");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who is Nym?
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: You must be joking... Nym is the most feared pirate in the Maramere system. He routed the Trade Federation from Lok and its neighboring planets right around the start of the Clone Wars, and he's maintained complete control over the spacelanes in this region ever since. There's nobody with more power on Lok. And except for Jabba the Hutt, he's probably the most powerful alien in the Outer Rim.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You have a job?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_26");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You must be joking... Nym is the most feared pirate in the Maramere system. He routed the Trade Federation from Lok and its neighboring planets right around the start of the Clone Wars, and he's maintained complete control over the spacelanes in this region ever since. There's nobody with more power on Lok. And except for Jabba the Hutt, he's probably the most powerful alien in the Outer Rim.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You have a job?
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You intercepted a distress call?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse2 = false;
|
|
if (vana_sage_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_79");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You intercepted a distress call?
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: Yes. As part of my duties, I monitor comlink and transceiver activity around the system. We don't want a Star Destroyer sneaking up on us, do we? Anyway, this particular starship interests me because it was carrying Imperial cargo. A droid, in fact, that was once owned by General Otto at an Imperial base here on Lok.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What's so special about this droid?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_46");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You have a job?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_26");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes. As part of my duties, I monitor comlink and transceiver activity around the system. We don't want a Star Destroyer sneaking up on us, do we? Anyway, this particular starship interests me because it was carrying Imperial cargo. A droid, in fact, that was once owned by General Otto at an Imperial base here on Lok.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What's so special about this droid?
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
//-- NPC: Probably nothing, but as an Imperial droid, it might be carrying some very interesting data. Shipping schedules, guard rosters, prisoner transfer information, schematics for some terrifying super weapon... Anything the droid knows could be sold on the black market or traded back to Otto for a favor down the road. It might also tell us something about that Imperial mining facility, which we haven't been able to infiltrate.
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And the reward?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_50");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Probably nothing, but as an Imperial droid, it might be carrying some very interesting data. Shipping schedules, guard rosters, prisoner transfer information, schematics for some terrifying super weapon... Anything the droid knows could be sold on the black market or traded back to Otto for a favor down the road. It might also tell us something about that Imperial mining facility, which we haven't been able to infiltrate.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And the reward?
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You'd be rewarded a fair rate if you could secure that droid's memory module.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll recover the module. Where can I find this droid?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_54");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You'd be rewarded a fair rate if you could secure that droid's memory module.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll recover the module. Where can I find this droid?
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have scouts out now. I have a feeling the Sulfur Lake Pirates may get their hands on the droid before us. If so, this easy scavenge job will turn into an infiltration of their hideout. Still interested?
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_58");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I have scouts out now. I have a feeling the Sulfur Lake Pirates may get their hands on the droid before us. If so, this easy scavenge job will turn into an infiltration of their hideout. Still interested?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_58")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am sending you to meet with a person who used to work with the pirates. See if you can glean any inside information.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where to?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_62");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_58");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am sending you to meet with a person who used to work with the pirates. See if you can glean any inside information.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where to?
|
|
if (response == "s_62")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_away");
|
|
|
|
vana_sage_action_giveChosterQuest (player, npc);
|
|
|
|
//-- NPC: Not too far. Meet Choster at the Stronghold Cantina. In case you haven't been there, I've placed a waypoint in your datapad.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_58")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am sending you to meet with a person who used to work with the pirates. See if you can glean any inside information.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where to?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_62");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_58");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You have a job?
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You intercepted a distress call?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse2 = false;
|
|
if (vana_sage_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_79");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Do I know you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, but I am looking for work.
|
|
if (response == "s_85")
|
|
{
|
|
doAnimationAction (player, "shake_head_no");
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, you look like you can handle yourself and I just happen to have something...
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is it?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Wait, who are you?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_92");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, you look like you can handle yourself and I just happen to have something...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is it?
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You intercepted a distress call?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
boolean hasResponse2 = false;
|
|
if (vana_sage_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_79");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Wait, who are you?
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int vana_sage_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is something I'd like you to look into, if you can. I recently intercepted a distress call from a starship that crashed-landed on Lok. Ships nose-dive into the planet all the time, but this one took off from an Imperial mining installation on Lok and never made it into the atmosphere. I think it slammed down near the hideout of the Sulfur Lake Pirates. I'm very interested in this vessel...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You intercepted a distress call?
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: Yes. As part of my duties, I monitor comlink and transceiver activity around the system. We don't want a Star Destroyer sneaking up on us, do we? Anyway, this particular starship interests me because it was carrying Imperial cargo. A droid, in fact, that was once owned by General Otto at an Imperial base here on Lok.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What's so special about this droid?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_46");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "salute1");
|
|
|
|
//-- NPC: I'm Vana Sage, I work for Nym as his Head of Security.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Nym?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are the Sulfur Lake Pirates?
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Probably the most bloodthirsty, least-intelligent pirates on Lok. Like all the other pirate bands, they are constantly trying to dethrone Nym as Lok's reigning pirate king. They hate Nym for taking control of all the nearby hyperspace routes and claim that he's working with the Imperials. The gravel maggots have been looking for an excuse to go to war with us for years...
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You have a job?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_26");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.vana_sage");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
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.vana_sage");
|
|
|
|
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 (vana_sage_condition_hasCompletedThemePark (player, npc))
|
|
{
|
|
//-- NPC: What a fight, %TU! We really showed those Sulfur Lake Pirates didn't we?! That was just like old times, except we had a new face. Hope you stick around.
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_allQuestsComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "handshake_tandem");
|
|
|
|
//-- NPC: Great job with the Sulfur Lake Pirates. I look forward to working with you again in the future.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasCompletedPirate (player, npc))
|
|
{
|
|
vana_sage_action_gotoJinkins (player, npc);
|
|
|
|
//-- NPC: Welcome back, %TU. Jinkins has something for you. Speak with him about your next assignment.
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasReturnedWithDroid (player, npc))
|
|
{
|
|
doAnimationAction (npc, "expect_tip");
|
|
|
|
//-- NPC: One of our operatives, a slicer who has infiltrated the Sulfur Pirate lair, said that he worked with you to slice the back room. Did you retrieve the module?
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I have it right here.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_90");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasntCompletedPirate (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_away");
|
|
|
|
//-- NPC: Was something not clear? Get to the Sulfur Lake Pirate Hideout.
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_metChosterNoPirateQuest (player, npc))
|
|
{
|
|
//-- NPC: What happened? Looks like you don't have your next mission.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What was I supposed to do again?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_101");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasMetChoster (player, npc))
|
|
{
|
|
vana_sage_action_finishChoster (player, npc);
|
|
|
|
//-- NPC: How was your meeting with Choster?
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do you know...?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_68");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasNotCompletedChoster (player, npc))
|
|
{
|
|
//-- NPC: Yes?
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What was I supposed to do again?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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.vana_sage.branchId", 12);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_hasInitialQuestTask (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
vana_sage_action_finishInitialQuest (player, npc);
|
|
|
|
//-- NPC: Thanks for coming, %TU. The Lok Revenants are always in need of competent individuals.
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You have a job?
|
|
boolean hasResponse1 = false;
|
|
if (vana_sage_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_26");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 15);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition_playerIsHighLvl (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: Do I know you?
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, but I am looking for work.
|
|
boolean hasResponse0 = false;
|
|
if (vana_sage_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_85");
|
|
|
|
utils.setScriptVar (player, "conversation.vana_sage.branchId", 27);
|
|
|
|
npcStartConversation (player, npc, "vana_sage", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!vana_sage_condition_playerIsHighLvl (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: Sorry, we have work to do here. You seem a little green to be on Lok anyway. Come back when you have experience.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (vana_sage_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: Sorry, we have work to do here. Not interested.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
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 != "vana_sage")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
if (branchId == 4 && vana_sage_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && vana_sage_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && vana_sage_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && vana_sage_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && vana_sage_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && vana_sage_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && vana_sage_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && vana_sage_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && vana_sage_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && vana_sage_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && vana_sage_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && vana_sage_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && vana_sage_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && vana_sage_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && vana_sage_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && vana_sage_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && vana_sage_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && vana_sage_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && vana_sage_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && vana_sage_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.vana_sage.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|