mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-10 01:12:58 -04:00
1652 lines
50 KiB
Plaintext
1652 lines
50 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_myyydril_chief.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_myyydril_chief";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_myyydril_chief_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_isActiveQuestInitial (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive (player, "ep3_myyydril_kallaarac_talkto_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedQuestInitial (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "ep3_myyydril_kivvaaa_talkto_1", 0) ||
|
|
groundquests.hasCompletedTask(player, "ep3_myyydril_kivvaaa_talkto_1", 0))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasNotFinishedQuestSeries (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "ep3_myyydril_kivvaaa_talkto_1") &&
|
|
!groundquests.hasCompletedQuest(player, "ep3_myyydril_nawika_escort_1"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedQuestSeries (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_myyydril_nawika_talkto_5");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedQuestOne (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_destroy_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedQuestTwo (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_retrieve_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasLanguage (obj_id player, obj_id npc)
|
|
{
|
|
return utils.canSpeakWookiee(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_isactiveNawikaTalk (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "ep3_myyydril_nawika_talkto_5", 0) ||
|
|
groundquests.hasCompletedTask(player, "ep3_myyydril_nawika_talkto_5", 0))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_needsQuestCorrection (obj_id player, obj_id npc)
|
|
{
|
|
|
|
if (groundquests.hasCompletedQuest(player, "ep3_myyydril_kivvaaa_talkto_1"))
|
|
{
|
|
if (!groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_talkto_2") &&
|
|
!groundquests.isQuestActive(player, "ep3_myyydril_kallaarac_talkto_2"))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_isActiveTaskOne (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "ep3_myyydril_kallaarac_destroy_2", 0) ||
|
|
groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_destroy_2", 0))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedTaskOne (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_destroy_2", 0) &&
|
|
!groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_destroy_2"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_isActiveTaskTwo (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "ep3_myyydril_kallaarac_retrieve_1", 0) ||
|
|
groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_retrieve_1", 0))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedTaskTwo (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_retrieve_1", 0) &&
|
|
!groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_retrieve_1"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_isActiveTaskThree (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "ep3_myyydril_kallaarac_destroy_3", 0) ||
|
|
groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_destroy_3", 0))
|
|
|
|
return true;
|
|
else
|
|
return false;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedTaskThree (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_myyydril_kallaarac_destroy_3", 0) &&
|
|
!groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_destroy_3"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_myyydril_chief_condition_hasCompletedQuestThree (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_myyydril_kallaarac_destroy_3");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_myyydril_chief_action_giveQuestInitial (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the first quest to the player here
|
|
groundquests.grantQuest(player, "ep3_myyydril_kallaarac_talkto_2");
|
|
groundquests.sendSignal(player, "talktokallaarac");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_giveQuestOne (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the first quest to the player here
|
|
groundquests.grantQuest(player, "ep3_myyydril_kallaarac_destroy_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_sendSignal1 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "giveStuff");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_doSignal2 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "talktokallaarac");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_giveQuestTwo (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the first quest to the player here
|
|
groundquests.grantQuest(player, "ep3_myyydril_kallaarac_retrieve_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_giveQuestThree (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the first quest to the player here
|
|
groundquests.grantQuest(player, "ep3_myyydril_kallaarac_destroy_3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_doSingal3 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "talktochief");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_myyydril_chief_action_Language (obj_id player, obj_id npc)
|
|
{
|
|
utils.emoteWookieeConfusion (player, npc);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_myyydril_chief_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: [nods] Welcome home, Hero. Our patrols have been quiet as of late and no other terrible situations have come up. I will keep you updated if there's anything we need your help with.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm glad to hear that everything has settled.
|
|
if (response == "s_3744")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [Kallaarac nods.] And we owe it all to you, hero.
|
|
string_id message = new string_id (c_stringFile, "s_3746");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No words can express how much our community is thankful for all that you've done for us. You've defeated the Mother Brain... a remarkable feat! Please accept our deepest thanks and humility.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It was my pleasure.
|
|
if (response == "s_3750")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_doSingal3 (player, npc);
|
|
|
|
//-- NPC: You are a hero in our eyes. I wish there were more for you to help us with. But alas, it is not so. Please enjoy the rest our community has to offer. Additionally, please take this. It is all we can offer.
|
|
string_id message = new string_id (c_stringFile, "s_3752");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3754");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are a hero in our eyes. I wish there were more for you to help us with. But alas, it is not so. Please enjoy the rest our community has to offer. Additionally, please take this. It is all we can offer.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_3754")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome home, Hero.
|
|
string_id message = new string_id (c_stringFile, "s_3756");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You wished to know of the new threat looming before us... The Urnsor'is operate around a central nervous system. We only know her as the Mother Brain. She is the key to the Urnsor'is functionality and we must stop her! I need your help on this...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This sounds dangerous.
|
|
if (response == "s_3762")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is. I suggest bringing several friends. We cannot offer you help in this matter. Our soldiers, what little we have, are helping our people elsewhere. It is solely up to you. We do not know where the Mother Brain makes her rest. But you must find her, and soon.
|
|
string_id message = new string_id (c_stringFile, "s_3764");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm going to pass... for now.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_myyydril_chief_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_3766");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3770");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is. I suggest bringing several friends. We cannot offer you help in this matter. Our soldiers, what little we have, are helping our people elsewhere. It is solely up to you. We do not know where the Mother Brain makes her rest. But you must find her, and soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_3766")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_giveQuestThree (player, npc);
|
|
|
|
//-- NPC: You're a brave soul indeed. Go then. You'll find her in the Deep Depths. I hope you'll return safely.
|
|
string_id message = new string_id (c_stringFile, "s_3768");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm going to pass... for now.
|
|
if (response == "s_3770")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Completely understood. Just... make a decision quickly. If she is not destroyed, our village will never be safe.
|
|
string_id message = new string_id (c_stringFile, "s_3772");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I've heard news of your success! Soon, we will see dwindling numbers in the ranks of the Urnsor'is thanks to your continued efforts. But still.. a greater threat looms on the horizon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What new threat?
|
|
if (response == "s_3776")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_doSignal2 (player, npc);
|
|
|
|
//-- NPC: We'll speak of this soon. For now, I suggest taking a long-needed breath of air before throwing yourself deeper into our caverns. A big battle looms ahead.. Take this, you'll need it.
|
|
string_id message = new string_id (c_stringFile, "s_3778");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3780");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We'll speak of this soon. For now, I suggest taking a long-needed breath of air before throwing yourself deeper into our caverns. A big battle looms ahead.. Take this, you'll need it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_3780")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Come speak with me again when you're ready.
|
|
string_id message = new string_id (c_stringFile, "s_3782");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We find ourselves in a constant unease in regards to the Urnsor'is, however. And we must strike them at the base. This time, I need you to collect 20 eggs from the Urnsor'is eggsacks littered about this vast cavern.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Very dangerous, but just my style. I'll do it.
|
|
if (response == "s_3788")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_giveQuestTwo (player, npc);
|
|
|
|
//-- NPC: Your eagerness is refreshing and a little reckless. You're a great warrior in our eyes, however. Please go and come back safely.
|
|
string_id message = new string_id (c_stringFile, "s_3790");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This is not my thing.
|
|
if (response == "s_3792")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I understand. I do not hold it against you.
|
|
string_id message = new string_id (c_stringFile, "s_3794");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Remarkable. I've heard of your success, my friend, against the Urnsor'is. Our people have calmed more and are going about their normal lives again. We thank you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm glad to have helped.
|
|
if (response == "s_3798")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_sendSignal1 (player, npc);
|
|
|
|
//-- NPC: You deserve a token of our gratitude. Please accept this.
|
|
string_id message = new string_id (c_stringFile, "s_3800");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3802");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You deserve a token of our gratitude. Please accept this.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_3802")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I must speak with my advisors. I do have other tasks for you. Please speak with me in a moment.
|
|
string_id message = new string_id (c_stringFile, "s_3804");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You've returned so quickly. I don't understand. You've not yet completed your task. Please, hurry. I fear the Urnsor'is infestation will spread if we do not quell their numbers now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on it, but it's quite the task.
|
|
if (response == "s_3808")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [Kallaarac nods.] I know you'll come out successful, my friend. Worry not.
|
|
string_id message = new string_id (c_stringFile, "s_3810");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I've decided to trust you and I have tasks only set for the most willing and noble of our people. So far, you have proven yourself. We often find ourselves in unfortunate situations. Recently, it seems we have an influx of Urnsor'is infestation in the halls beyond this village. I need you to kill 15 of them.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's quite a task. But I'm willing.
|
|
if (response == "s_1115")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_giveQuestOne (player, npc);
|
|
|
|
//-- NPC: Good. Go forth and slaughter them so that we may live in continued peace.
|
|
string_id message = new string_id (c_stringFile, "s_1117");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This sounds too much for me right now.
|
|
if (response == "s_1119")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Understood. Return when you are willing.
|
|
string_id message = new string_id (c_stringFile, "s_1121");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I've heard about the great many accomplishments you are contributing to our village. You are an honorable addition to our community.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_3814")
|
|
{
|
|
ep3_myyydril_chief_action_doSingal3 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have more tests for you. Please talk with me in a few moments. I have much to think about regarding your role in our village.
|
|
string_id message = new string_id (c_stringFile, "s_3816");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I see you have returned. Unfortunately, a little too prematurely. There are others than Tala'oree who need help. Please return when you have completed other tasks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you for the heads up.
|
|
if (response == "s_3828")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [Kallaarac nods.] Indeed...
|
|
string_id message = new string_id (c_stringFile, "s_3830");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Huh? I think you have mistaken me for someone else.
|
|
if (response == "s_363")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [Kallaarac nods.] I care very strongly for my people. Therefore, my problems and issues come second. I want you to speak with the individuals in this settlement. They may have tasks for you to do. Complete them, and come back to me. I hear Tala'oree, member of Kivvaaa's patrol, has something that needs to be done.
|
|
string_id message = new string_id (c_stringFile, "s_3836");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will go speak with her.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3838");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You've spoken with Kivvaaa? I see. She must trust you, then. [Kallaarac nods.] We only request help from those we trust. Perhaps you're the exact individual we need to help us. We'll find out soon enough.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready to help the Myyydril.
|
|
if (response == "s_3834")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [Kallaarac nods.] I care very strongly for my people. Therefore, my problems and issues come second. I want you to speak with the individuals in this settlement. They may have tasks for you to do. Complete them, and come back to me. I hear Tala'oree, member of Kivvaaa's patrol, has something that needs to be done.
|
|
string_id message = new string_id (c_stringFile, "s_3836");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will go speak with her.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3838");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm going to look around a little bit longer.
|
|
if (response == "s_3842")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: [nod]
|
|
string_id message = new string_id (c_stringFile, "s_3844");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_myyydril_chief_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: [Kallaarac nods.] I care very strongly for my people. Therefore, my problems and issues come second. I want you to speak with the individuals in this settlement. They may have tasks for you to do. Complete them, and come back to me. I hear Tala'oree, member of Kivvaaa's patrol, has something that needs to be done.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will go speak with her.
|
|
if (response == "s_3838")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_giveQuestInitial (player, npc);
|
|
|
|
//-- NPC: [Kallaraac nods.] Good. Go speak with her and follow her direction.
|
|
string_id message = new string_id (c_stringFile, "s_3840");
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_myyydril_chief");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setName (self, new string_id( "ep3/npc_names", "kallaarac" ));
|
|
setInvulnerable(self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setName (self, new string_id( "ep3/npc_names", "kallaarac" ));
|
|
setInvulnerable(self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_myyydril_chief");
|
|
|
|
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 (ep3_myyydril_chief_condition_hasLanguage (player, npc))
|
|
{
|
|
ep3_myyydril_chief_action_Language (player, npc);
|
|
|
|
//-- NPC: Rrwowrr!
|
|
string_id message = new string_id (c_stringFile, "s_1076");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedQuestThree (player, npc))
|
|
{
|
|
//-- NPC: [nods] Welcome home, Hero. Our patrols have been quiet as of late and no other terrible situations have come up. I will keep you updated if there's anything we need your help with.
|
|
string_id message = new string_id (c_stringFile, "s_3742");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm glad to hear that everything has settled.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3744");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedTaskThree (player, npc))
|
|
{
|
|
//-- NPC: No words can express how much our community is thankful for all that you've done for us. You've defeated the Mother Brain... a remarkable feat! Please accept our deepest thanks and humility.
|
|
string_id message = new string_id (c_stringFile, "s_3748");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It was my pleasure.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3750");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_isActiveTaskThree (player, npc))
|
|
{
|
|
//-- NPC: You've returned... and empty handed. I am not disappointed. I realize your task is very daunting. But, we the Myyydril, have faith in your efforts. Please return to your task when you can.
|
|
string_id message = new string_id (c_stringFile, "s_3758");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedQuestTwo (player, npc))
|
|
{
|
|
//-- NPC: You wished to know of the new threat looming before us... The Urnsor'is operate around a central nervous system. We only know her as the Mother Brain. She is the key to the Urnsor'is functionality and we must stop her! I need your help on this...
|
|
string_id message = new string_id (c_stringFile, "s_3760");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This sounds dangerous.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3762");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedTaskTwo (player, npc))
|
|
{
|
|
//-- NPC: I've heard news of your success! Soon, we will see dwindling numbers in the ranks of the Urnsor'is thanks to your continued efforts. But still.. a greater threat looms on the horizon.
|
|
string_id message = new string_id (c_stringFile, "s_3774");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What new threat?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3776");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 12);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_isActiveTaskTwo (player, npc))
|
|
{
|
|
//-- NPC: I see you have returned, my friend. The more we wait, the more eggs that are produced. We need to hurry. Please, continue your objectives.
|
|
string_id message = new string_id (c_stringFile, "s_3784");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedQuestOne (player, npc))
|
|
{
|
|
//-- NPC: We find ourselves in a constant unease in regards to the Urnsor'is, however. And we must strike them at the base. This time, I need you to collect 20 eggs from the Urnsor'is eggsacks littered about this vast cavern.
|
|
string_id message = new string_id (c_stringFile, "s_3786");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very dangerous, but just my style. I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: This is not my thing.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_myyydril_chief_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_3788");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3792");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedTaskOne (player, npc))
|
|
{
|
|
//-- NPC: Remarkable. I've heard of your success, my friend, against the Urnsor'is. Our people have calmed more and are going about their normal lives again. We thank you.
|
|
string_id message = new string_id (c_stringFile, "s_3796");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm glad to have helped.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3798");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 19);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_isActiveTaskOne (player, npc))
|
|
{
|
|
//-- NPC: You've returned so quickly. I don't understand. You've not yet completed your task. Please, hurry. I fear the Urnsor'is infestation will spread if we do not quell their numbers now.
|
|
string_id message = new string_id (c_stringFile, "s_3806");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on it, but it's quite the task.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3808");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 22);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedQuestSeries (player, npc))
|
|
{
|
|
//-- NPC: I've decided to trust you and I have tasks only set for the most willing and noble of our people. So far, you have proven yourself. We often find ourselves in unfortunate situations. Recently, it seems we have an influx of Urnsor'is infestation in the halls beyond this village. I need you to kill 15 of them.
|
|
string_id message = new string_id (c_stringFile, "s_1113");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's quite a task. But I'm willing.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: This sounds too much for me right now.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_myyydril_chief_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_1115");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1119");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 24);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_isactiveNawikaTalk (player, npc))
|
|
{
|
|
//-- NPC: I've heard about the great many accomplishments you are contributing to our village. You are an honorable addition to our community.
|
|
string_id message = new string_id (c_stringFile, "s_3812");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_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_3814");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 27);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasNotFinishedQuestSeries (player, npc))
|
|
{
|
|
//-- NPC: I see you have returned. Unfortunately, a little too prematurely. There are others than Tala'oree who need help. Please return when you have completed other tasks.
|
|
string_id message = new string_id (c_stringFile, "s_3826");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you for the heads up.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Huh? I think you have mistaken me for someone else.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_myyydril_chief_condition_needsQuestCorrection (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_3828");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_363");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 29);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition_hasCompletedQuestInitial (player, npc))
|
|
{
|
|
//-- NPC: You've spoken with Kivvaaa? I see. She must trust you, then. [Kallaarac nods.] We only request help from those we trust. Perhaps you're the exact individual we need to help us. We'll find out soon enough.
|
|
string_id message = new string_id (c_stringFile, "s_3832");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm ready to help the Myyydril.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm going to look around a little bit longer.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_myyydril_chief_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_3834");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3842");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_myyydril_chief.branchId", 31);
|
|
|
|
npcStartConversation (player, npc, "ep3_myyydril_chief", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_myyydril_chief_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You dare approach me without an audience? I will not speak with you unless you've gained our trust. Go away.
|
|
string_id message = new string_id (c_stringFile, "s_3846");
|
|
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 != "ep3_myyydril_chief")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
if (branchId == 2 && ep3_myyydril_chief_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && ep3_myyydril_chief_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_myyydril_chief_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && ep3_myyydril_chief_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && ep3_myyydril_chief_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && ep3_myyydril_chief_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && ep3_myyydril_chief_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && ep3_myyydril_chief_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && ep3_myyydril_chief_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && ep3_myyydril_chief_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && ep3_myyydril_chief_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && ep3_myyydril_chief_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && ep3_myyydril_chief_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && ep3_myyydril_chief_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && ep3_myyydril_chief_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && ep3_myyydril_chief_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_myyydril_chief.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|