mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
836 lines
25 KiB
Plaintext
836 lines
25 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// aurilia_rohak.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.groundquests;
|
|
include library.prose;
|
|
include library.static_item;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/aurilia_rohak";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean aurilia_rohak_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean aurilia_rohak_condition_axkva_min_intro_01 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "axkva_min_intro", "axkva_min_intro_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean aurilia_rohak_condition_axkva_min_intro_02 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "axkva_min_intro", "axkva_min_intro_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean aurilia_rohak_condition_axkva_min_intro_04 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "axkva_min_intro", "axkva_min_intro_04");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean aurilia_rohak_condition_axkva_min_intro_06 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "axkva_min_intro", "axkva_min_intro_06");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean aurilia_rohak_condition_notCompletedTokenBox (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActiveOrComplete(player, "rohak_token_box");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void aurilia_rohak_action_axkva_min_intro_02_signal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "axkva_min_intro_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void aurilia_rohak_action_axkva_min_intro_04_signal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "axkva_min_intro_04");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void aurilia_rohak_action_axkva_min_intro_06_signal (obj_id player, obj_id npc)
|
|
{
|
|
string axkvaMinShardsString = "item_axkva_min_shards_04_01";
|
|
obj_id inv = getObjectInSlot(player, "inventory");
|
|
if( isIdValid(inv) )
|
|
{
|
|
obj_id axkvaMinShard = static_item.createNewItemFunction(axkvaMinShardsString, inv);
|
|
|
|
string_id message = new string_id( "quest/ground/system_message", "placed_in_inventory_plural" );
|
|
string_id name = getNameStringId(axkvaMinShard);
|
|
|
|
prose_package pp = prose.getPackage(message, player, player);
|
|
prose.setTO(pp, name);
|
|
sendSystemMessageProse(player, pp);
|
|
|
|
groundquests.sendSignal(player, "axkva_min_intro_06");
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void aurilia_rohak_action_giveTokenBoxQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "rohak_token_box");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int aurilia_rohak_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent, you have gathered all of the shards. You must now fuse them together to form the key.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do I fuse them together?
|
|
if (response == "s_25")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Go to Mount Chaolt on Lok. At the very top is a large crater filled with lava. Using the heat of the volcano's lava, you will fuse the shards into the key.
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah, very interesting. That headdress apparently belonged to a follower of Axkva Min.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who is Axkva Min?
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Axkva Min was a Nightsister Elder who discovered the art of draining the life force of her enemies to enhance her own power. She became a threat to her own people and was struck down by Gethzerion herself when the full scope of her atrocities was brought to light. Axkva Min was then banished along with her most loyal followers.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What does that mean for us?
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_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_36");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Axkva Min was a Nightsister Elder who discovered the art of draining the life force of her enemies to enhance her own power. She became a threat to her own people and was struck down by Gethzerion herself when the full scope of her atrocities was brought to light. Axkva Min was then banished along with her most loyal followers.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean for us?
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The energy surging through the headdress is a signal to her followers. It means that Axkva Min has discovered a way to free herself from her banishment, and she is contacting her followers so that they will assist in her escape. Axkva Min is a dangerous being that will threaten the entire planet...possibly even the entire galaxy. We must help stop her.
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do we do that?
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_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_40");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The energy surging through the headdress is a signal to her followers. It means that Axkva Min has discovered a way to free herself from her banishment, and she is contacting her followers so that they will assist in her escape. Axkva Min is a dangerous being that will threaten the entire planet...possibly even the entire galaxy. We must help stop her.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do we do that?
|
|
if (response == "s_40")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
aurilia_rohak_action_axkva_min_intro_04_signal (player, npc);
|
|
|
|
//-- NPC: You must go to the Chamber of Banishment in which she is imprisoned and defeat her. To enter that chamber, according to this scroll, you will need the Nightsister Key of Exile. Obtaining that is your next task. I'll update your journal with the details.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the township of Aurilia, friend. Forgive me, but could I ask a favor of you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would be happy to help you.
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
aurilia_rohak_action_giveTokenBoxQuest (player, npc);
|
|
|
|
//-- NPC: Ah, how excellent. The favor is as such: I have misplaced some figurines throughout the area. Please locate them for me.
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I do not have time for favors.
|
|
if (response == "s_41")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah yes, I understand. Please forgive me, and enjoy your stay here in Aurilia.
|
|
string_id message = new string_id (c_stringFile, "s_43");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I asked the Nightsister prisoner about the headdress in the guildhall.
|
|
if (response == "s_35")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Did you? And what did she say?
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Axkva Min. That's it. Nothing else. And she looked scared.
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_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_31");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
|
|
if (response == "s_37")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It's a fairly typical headdress as worn by Nightsister witches, as far as I know. The one in the guildhall was taken from a Nightsister that Captain Sarguillo apprehended.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the township of Aurilia, friend. I trust that your stay will be a hospitable one and that you shall find whatever it is that you seek.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I asked the Nightsister prisoner about the headdress in the guildhall.
|
|
if (response == "s_28")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Did you? And what did she say?
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Axkva Min. That's it. Nothing else. And she looked scared.
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_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_31");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It's a fairly typical headdress as worn by Nightsister witches, as far as I know. The one in the guildhall was taken from a Nightsister that Captain Sarguillo apprehended.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int aurilia_rohak_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Did you? And what did she say?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Axkva Min. That's it. Nothing else. And she looked scared.
|
|
if (response == "s_31")
|
|
{
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
aurilia_rohak_action_axkva_min_intro_02_signal (player, npc);
|
|
|
|
//-- NPC: Axkva Min? Hmm...that name sounds familiar. I recommend that you go to the Nightsister Stronghold and check their scrolls for that name. Return to me if you find anything.
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.aurilia_rohak");
|
|
|
|
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.aurilia_rohak");
|
|
|
|
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 (aurilia_rohak_condition_axkva_min_intro_06 (player, npc))
|
|
{
|
|
aurilia_rohak_action_axkva_min_intro_06_signal (player, npc);
|
|
|
|
//-- NPC: Excellent, you have gathered all of the shards. You must now fuse them together to form the key.
|
|
string_id message = new string_id (c_stringFile, "s_9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do I fuse them together?
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_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_25");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "aurilia_rohak", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition_axkva_min_intro_04 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Ah, very interesting. That headdress apparently belonged to a follower of Axkva Min.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who is Axkva Min?
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_32");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "aurilia_rohak", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition_notCompletedTokenBox (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the township of Aurilia, friend. Forgive me, but could I ask a favor of you?
|
|
string_id message = new string_id (c_stringFile, "s_23");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would be happy to help you.
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I do not have time for favors.
|
|
boolean hasResponse1 = false;
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I asked the Nightsister prisoner about the headdress in the guildhall.
|
|
boolean hasResponse2 = false;
|
|
if (aurilia_rohak_condition_axkva_min_intro_02 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
|
|
boolean hasResponse3 = false;
|
|
if (aurilia_rohak_condition_axkva_min_intro_01 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = 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_41");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_35");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_37");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "aurilia_rohak", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (aurilia_rohak_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the township of Aurilia, friend. I trust that your stay will be a hospitable one and that you shall find whatever it is that you seek.
|
|
string_id message = new string_id (c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I asked the Nightsister prisoner about the headdress in the guildhall.
|
|
boolean hasResponse0 = false;
|
|
if (aurilia_rohak_condition_axkva_min_intro_02 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
|
|
boolean hasResponse1 = false;
|
|
if (aurilia_rohak_condition_axkva_min_intro_01 (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_28");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_24");
|
|
|
|
utils.setScriptVar (player, "conversation.aurilia_rohak.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "aurilia_rohak", 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 != "aurilia_rohak")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
if (branchId == 1 && aurilia_rohak_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && aurilia_rohak_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && aurilia_rohak_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && aurilia_rohak_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && aurilia_rohak_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && aurilia_rohak_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && aurilia_rohak_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.aurilia_rohak.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|