mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
974 lines
28 KiB
Plaintext
974 lines
28 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_achonnko.script
|
|
//
|
|
//
|
|
//
|
|
// 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_achonnko";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_achonnko_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_firstTimeUser (obj_id player, obj_id npc)
|
|
{
|
|
|
|
if (!groundquests.hasCompletedQuest(player, "ep3_rryatt_trail_mastery"))
|
|
{
|
|
if (!groundquests.isQuestActive(player, "ep3_rryatt_trail_mastery"))
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_hasLevelOne (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_rryatt_trail_mastery", "levelOne") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_rryatt_trail_mastery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_hasLevelTwo (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_rryatt_trail_mastery", "levelTwo") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_rryatt_trail_mastery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_hasLevelThree (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_rryatt_trail_mastery", "levelThree") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_rryatt_trail_mastery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_hasLevelFour (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedTask(player, "ep3_rryatt_trail_mastery", "levelFour") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_rryatt_trail_mastery"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_wookieeNoob (obj_id player, obj_id npc)
|
|
{
|
|
return utils.canSpeakWookiee(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_canTakeCamoKitQuest (obj_id player, obj_id npc)
|
|
{
|
|
return (hasSkill(player, "outdoors_ranger_movement_03") &&
|
|
!hasSchematic(player, "object/draft_schematic/scout/item_camokit_kashyyyk.iff") &&
|
|
!groundquests.isQuestActive(player, "ep3_achonnko_camo_kit"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_achonnko_condition_canCompleteCamoKitQuest (obj_id player, obj_id npc)
|
|
{
|
|
return (hasSkill(player, "outdoors_ranger_movement_03") &&
|
|
!hasSchematic(player, "object/draft_schematic/scout/item_camokit_kashyyyk.iff") &&
|
|
groundquests.isTaskActive(player, "ep3_achonnko_camo_kit", "taskReturnToAchonnko"));
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_achonnko_action_grantMasteryQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "quest/ep3_rryatt_trail_mastery");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_warpLevelTwo (obj_id player, obj_id npc)
|
|
{
|
|
string level = getStringObjVar(npc, "trailMasteryTwo");
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("destination", level);
|
|
params.put("zoneIn", true);
|
|
messageTo(npc, "handleZoneTransitionRequest", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_warpLevelThree (obj_id player, obj_id npc)
|
|
{
|
|
string level = getStringObjVar(npc, "trailMasteryThree");
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("destination", level);
|
|
params.put("zoneIn", true);
|
|
messageTo(npc, "handleZoneTransitionRequest", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_warpLevelFour (obj_id player, obj_id npc)
|
|
{
|
|
string level = getStringObjVar(npc, "trailMasteryFour");
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("destination", level);
|
|
params.put("zoneIn", true);
|
|
messageTo(npc, "handleZoneTransitionRequest", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_warpLevelFive (obj_id player, obj_id npc)
|
|
{
|
|
string level = getStringObjVar(npc, "trailMasteryFive");
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("destination", level);
|
|
params.put("zoneIn", true);
|
|
messageTo(npc, "handleZoneTransitionRequest", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_doWookieeJibberJabber (obj_id player, obj_id npc)
|
|
{
|
|
utils.emoteWookieeConfusion(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_grantKashyyykCamoKit (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "signalReturnToAchonnko");
|
|
grantSchematic(player, "object/draft_schematic/scout/item_camokit_kashyyyk.iff");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_achonnko_action_grantCamoKitQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_achonnko_camo_kit");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_achonnko_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You have returned? Successfully I trust?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have the components.
|
|
if (response == "s_29")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_grantKashyyykCamoKit (player, npc);
|
|
|
|
//-- NPC: Then I will share with you our secrets. The knowledge will serve you well %NU.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So you wish to learn the secrets of the Rryatt Trail? It is a dangerous place, perhaps too dangerous for you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing is too dangerous for me.
|
|
if (response == "s_173")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We will see about that. There are paths like the one you see before you that will get you from the safety of Kachirho to the depths of The Shadowed Lands. And there are trails known only to the trail guides.
|
|
string_id message = new string_id (c_stringFile, "s_175");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where can I find these trail guides?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_177");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What other secrets of the forest can you teach me?
|
|
if (response == "s_27")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are secrets of the trail that one can learn to walk these lands without fear of the beasts they contain. If you are skilled enough, perhaps you could learn of these secrets yourself?
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I possess the skill, and I ask that you teach me.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_34");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We will see about that. There are paths like the one you see before you that will get you from the safety of Kachirho to the depths of The Shadowed Lands. And there are trails known only to the trail guides.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where can I find these trail guides?
|
|
if (response == "s_177")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: They are throughout the trail. When you reach one, they will share with you their secret paths throughout the Rryatt. As you learn more of these lands your future travels will be faster and with less danger.
|
|
string_id message = new string_id (c_stringFile, "s_179");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Then I will seek out these guides.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_181");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They are throughout the trail. When you reach one, they will share with you their secret paths throughout the Rryatt. As you learn more of these lands your future travels will be faster and with less danger.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Then I will seek out these guides.
|
|
if (response == "s_181")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_grantMasteryQuest (player, npc);
|
|
|
|
//-- NPC: May the forest spirits guide your way.
|
|
string_id message = new string_id (c_stringFile, "s_183");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You have returned. Tell me, what secret path do you wish to travel?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will go to the High Grounds.
|
|
if (response == "s_187")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_warpLevelTwo (player, npc);
|
|
|
|
//-- NPC: A brave choice.
|
|
string_id message = new string_id (c_stringFile, "s_189");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will go to the Worshyr Canopy.
|
|
if (response == "s_191")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_warpLevelThree (player, npc);
|
|
|
|
//-- NPC: Watch your step. Many a traveler has discovered how far below is the forest floor.
|
|
string_id message = new string_id (c_stringFile, "s_193");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will travel the Web Weaver Path.
|
|
if (response == "s_195")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_warpLevelFour (player, npc);
|
|
|
|
//-- NPC: The Web Weaver is an unforgiving beast, and that is his home.
|
|
string_id message = new string_id (c_stringFile, "s_197");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will travel The Shadowed Lands.
|
|
if (response == "s_199")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_warpLevelFive (player, npc);
|
|
|
|
//-- NPC: The great dark is full of many dangers. Fight bravely, and I may yet meet again.
|
|
string_id message = new string_id (c_stringFile, "s_201");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will walk the common paths today.
|
|
if (response == "s_203")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fare well in your battles.
|
|
string_id message = new string_id (c_stringFile, "s_205");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How is it that some can walk these paths more safely than others?
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are secrets of the trail that one can learn to walk these lands without fear of the beasts they contain. If you are skilled enough, perhaps you could learn of these secrets yourself?
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I possess the skill, and I ask that you teach me.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_34");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are secrets of the trail that one can learn to walk these lands without fear of the beasts they contain. If you are skilled enough, perhaps you could learn of these secrets yourself?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I possess the skill, and I ask that you teach me.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are three things you will need: Gather the bone marrow of the Etyyy Mouf, with the proper treatment you can use it to conceal your true form. Gather the skins of the Minstyngar, so that creatures will cower from you in fear. And finally the mean of the Shadevale Stalker, whose musk glands will dull the senses of predator and prey alike allowing you to move unnoticed.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will return when I have what is needed.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_38");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_achonnko_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are three things you will need: Gather the bone marrow of the Etyyy Mouf, with the proper treatment you can use it to conceal your true form. Gather the skins of the Minstyngar, so that creatures will cower from you in fear. And finally the mean of the Shadevale Stalker, whose musk glands will dull the senses of predator and prey alike allowing you to move unnoticed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will return when I have what is needed.
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_achonnko_action_grantCamoKitQuest (player, npc);
|
|
|
|
//-- NPC: And I will then share with you secrets of the trail.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_achonnko");
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_achonnko");
|
|
|
|
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_achonnko_condition_wookieeNoob (player, npc))
|
|
{
|
|
ep3_achonnko_action_doWookieeJibberJabber (player, npc);
|
|
|
|
//-- NPC: Rrrorash
|
|
string_id message = new string_id (c_stringFile, "s_169");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition_canCompleteCamoKitQuest (player, npc))
|
|
{
|
|
//-- NPC: You have returned? Successfully I trust?
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I have the components.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_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_29");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "ep3_achonnko", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition_firstTimeUser (player, npc))
|
|
{
|
|
//-- NPC: So you wish to learn the secrets of the Rryatt Trail? It is a dangerous place, perhaps too dangerous for you.
|
|
string_id message = new string_id (c_stringFile, "s_171");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Nothing is too dangerous for me.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What other secrets of the forest can you teach me?
|
|
boolean hasResponse1 = false;
|
|
if (ep3_achonnko_condition_canTakeCamoKitQuest (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_173");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_27");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "ep3_achonnko", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You have returned. Tell me, what secret path do you wish to travel?
|
|
string_id message = new string_id (c_stringFile, "s_185");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will go to the High Grounds.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_achonnko_condition_hasLevelOne (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will go to the Worshyr Canopy.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_achonnko_condition_hasLevelTwo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will travel the Web Weaver Path.
|
|
boolean hasResponse2 = false;
|
|
if (ep3_achonnko_condition_hasLevelThree (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will travel The Shadowed Lands.
|
|
boolean hasResponse3 = false;
|
|
if (ep3_achonnko_condition_hasLevelFour (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will walk the common paths today.
|
|
boolean hasResponse4 = false;
|
|
if (ep3_achonnko_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: How is it that some can walk these paths more safely than others?
|
|
boolean hasResponse5 = false;
|
|
if (ep3_achonnko_condition_canTakeCamoKitQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_187");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_191");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_195");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_203");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_achonnko.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "ep3_achonnko", 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 != "ep3_achonnko")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_achonnko.branchId");
|
|
|
|
if (branchId == 2 && ep3_achonnko_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && ep3_achonnko_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_achonnko_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && ep3_achonnko_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && ep3_achonnko_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && ep3_achonnko_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && ep3_achonnko_handleBranch15 (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_achonnko.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|