mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2193 lines
64 KiB
Plaintext
2193 lines
64 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// stuvany_inglen.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/stuvany_inglen";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean stuvany_inglen_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_canDoPrisoner (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_prisoner_rescue_collection")
|
|
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01")
|
|
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasReturnedPrisoner (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_collection", "returnPrisonerRescueComplete")
|
|
|| groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01", "returnPrisonerRescueComplete")
|
|
|| groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02", "returnPrisonerRescueComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasPrisonerQuestNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_collection")
|
|
|| groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01")
|
|
|| groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_canDoStealOre (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_steal_mined_ore_collection")
|
|
&& (groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_prisoner_rescue_collection")
|
|
|| groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01")
|
|
|| groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02"))
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasStealOreQuestNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_mined_ore_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasReturnedStealOre (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_steal_mined_ore_collection", "returnStealMinedOreComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_canDoStealData (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_steal_lab_data_collection")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_steal_mined_ore_collection")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasStealDataQuestNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_lab_data_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasReturnedStealData (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_steal_lab_data_collection", "returnStealLabDataComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasntDonePrisoner (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasntDoneOre (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_prisoner_rescue_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasntDoneData (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_steal_mined_ore_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasCompletedAll (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_steal_lab_data_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasCompletedPrisonerRescueCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "nyms_rescue_prisoner")
|
|
&& (groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_collection")
|
|
|| groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01")
|
|
|| groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasCompletedMinedOreCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "nyms_steal_mined_ore")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_mined_ore_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean stuvany_inglen_condition_hasCompletedLabDataCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "nyms_steal_lab_data")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_lab_data_collection");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void stuvany_inglen_action_grantPrisonerQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_pirate_prisoner_rescue_collection");
|
|
if(!hasCompletedCollectionSlot(player, "nym_prisoner_rescue_activation"))
|
|
{
|
|
modifyCollectionSlotValue(player, "nym_prisoner_rescue_activation", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_completePrisonerQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_collection", "returnPrisonerRescueComplete")
|
|
|| groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01", "returnPrisonerRescueComplete")
|
|
|| groundquests.isTaskActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02", "returnPrisonerRescueComplete"))
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedPrisonerRescue");
|
|
}
|
|
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_2_rescue_prisoner"))
|
|
{
|
|
modifyCollectionSlotValue(player, "icon_nyms_master_collection_2_rescue_prisoner", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_completeStealOreQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isTaskActive(player, "u16_nym_themepark_pirate_steal_mined_ore_collection", "returnStealMinedOreComplete"))
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedStealMinedOre");
|
|
}
|
|
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_2_steal_ore"))
|
|
{
|
|
modifyCollectionSlotValue(player, "icon_nyms_master_collection_2_steal_ore", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_grantStealOreQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_pirate_steal_mined_ore_collection");
|
|
if(!hasCompletedCollectionSlot(player, "nym_mined_ore_activation"))
|
|
{
|
|
modifyCollectionSlotValue(player, "nym_mined_ore_activation", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_grantStealDataQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_pirate_steal_lab_data_collection");
|
|
if(!hasCompletedCollectionSlot(player, "nym_lab_data_activation"))
|
|
{
|
|
modifyCollectionSlotValue(player, "nym_lab_data_activation", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_completeStealDataQuest (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isTaskActive(player, "u16_nym_themepark_pirate_steal_lab_data_collection", "returnStealLabDataComplete"))
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedStealLabData");
|
|
}
|
|
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_2_lab_data"))
|
|
{
|
|
modifyCollectionSlotValue(player, "icon_nyms_master_collection_2_lab_data", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_BruteForceCompletePrisoner (obj_id player, obj_id npc)
|
|
{
|
|
//PPRISONER STUFF
|
|
if(stuvany_inglen_condition_hasCompletedPrisonerRescueCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_prisoner_rescue_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_prisoner_rescue_collection");
|
|
CustomerServiceLog("nyms_themepark", "Quest Id: "+questid);
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "Quest Id: "+questid);
|
|
questCompleteQuest(questid, player);
|
|
stuvany_inglen_action_completePrisonerQuest(player,npc);
|
|
}
|
|
}
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_01"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_prisoner_rescue_retry_01 for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_prisoner_rescue_retry_01");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
stuvany_inglen_action_completePrisonerQuest(player,npc);
|
|
}
|
|
}
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_prisoner_rescue_retry_02"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_prisoner_rescue_retry_02 for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_prisoner_rescue_retry_02");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
stuvany_inglen_action_completePrisonerQuest(player,npc);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_BruteForceCompleteLabData (obj_id player, obj_id npc)
|
|
{
|
|
//LAB DATA
|
|
if(stuvany_inglen_condition_hasCompletedLabDataCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_lab_data_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_steal_lab_data_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_steal_lab_data_collection");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
stuvany_inglen_action_completeStealDataQuest(player,npc);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_BruteForceCompleteMinedOre (obj_id player, obj_id npc)
|
|
{
|
|
//MINED ORE
|
|
if(stuvany_inglen_condition_hasCompletedMinedOreCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_steal_mined_ore_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_steal_mined_ore_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_steal_mined_ore_collection");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
stuvany_inglen_action_completeStealOreQuest(player,npc);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void stuvany_inglen_action_correctAllCollectionErrors (obj_id player, obj_id npc)
|
|
{
|
|
stuvany_inglen_action_completePrisonerQuest(player,npc);
|
|
stuvany_inglen_action_completeStealOreQuest(player,npc);
|
|
stuvany_inglen_action_completeStealDataQuest(player,npc);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int stuvany_inglen_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This is it! This is the final piece of the puzzle!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does it all mean?
|
|
if (response == "s_28")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Imperials were behind it alright, but not exactly how we originally thought.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_90");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Imperials were behind it alright, but not exactly how we originally thought.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh?
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We assumed the Imperials were constructing a weapon of some kind to further tighten their grip on the galaxy.
|
|
string_id message = new string_id (c_stringFile, "s_91");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: They weren't?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_92");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We assumed the Imperials were constructing a weapon of some kind to further tighten their grip on the galaxy.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: They weren't?
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: They were indeed constructing weapons, but not for the Empire. They were to be distributed here on Lok.
|
|
string_id message = new string_id (c_stringFile, "s_93");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds shady...
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_94");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They were indeed constructing weapons, but not for the Empire. They were to be distributed here on Lok.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds shady...
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The final purpose is not clear. But thankfully their efforts have been halted. Thanks to you!
|
|
string_id message = new string_id (c_stringFile, "s_95");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I did what I had to do.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_96");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The final purpose is not clear. But thankfully their efforts have been halted. Thanks to you!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I did what I had to do.
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_completeStealDataQuest (player, npc);
|
|
|
|
//-- NPC: And you have been rewarded! Thank you, %TU! Your efforts here on Lok will not be forgotten. You will be welcome in this stronghold until the end of your days.
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.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 stuvany_inglen_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Why are you still here?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Because I forgot what I was supposed to do?
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Get to the Imperial Research Facility and steal that lab data! Hurry!
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good, you're back!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've decided to see this through to the end.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'll sleep a little easier knowing that.
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How can I be of service?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_84");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'll sleep a little easier knowing that.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How can I be of service?
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The ore samples you brought us confirmed all of our fears. Someone, we don't know who, is constructing a weapon of unknown potential.
|
|
string_id message = new string_id (c_stringFile, "s_85");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This can't be good.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_86");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The ore samples you brought us confirmed all of our fears. Someone, we don't know who, is constructing a weapon of unknown potential.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This can't be good.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_grantStealDataQuest (player, npc);
|
|
|
|
//-- NPC: We need you to travel to the Imperial Research Facility, steal as much lab data as you can, and get it back to us immediately.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent work, %TU! I'll have these samples analyzed immediately!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you hope to learn from these samples?
|
|
if (response == "s_39")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_completeStealOreQuest (player, npc);
|
|
|
|
//-- NPC: Hopefully we can uncover what is really going on here.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I hope it was worth all the trouble I went through to get them.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_82");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hopefully we can uncover what is really going on here.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I hope it was worth all the trouble I went through to get them.
|
|
if (response == "s_82")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_completeStealOreQuest (player, npc);
|
|
|
|
//-- NPC: Of that I have no doubt! You are proving to be a valuable ally, %TU. Return to me when you are ready for more work.
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.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 stuvany_inglen_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Do you have the samples?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Samples? What samples?
|
|
if (response == "s_48")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You were supposed to be stealing several samples of the mined ore! I don't want to see you again until the task is completed!
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you ready to get your hands dirty?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not going to like this am I?
|
|
if (response == "s_72")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We need you to go to an Imperial mining cave not far from here.
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Did you lose another operative?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We need you to go to an Imperial mining cave not far from here.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Did you lose another operative?
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No no! Nothing like that!
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Well you've piqued my curiosity, what do you need?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_76");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No no! Nothing like that!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Well you've piqued my curiosity, what do you need?
|
|
if (response == "s_76")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The information given to us by our operative has provided evidence that the Sulfur Lake Pirates are just pawns in a much bigger plot.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What exactly am I getting in to?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_78");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The information given to us by our operative has provided evidence that the Sulfur Lake Pirates are just pawns in a much bigger plot.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What exactly am I getting in to?
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We don't quite know all of the fine details yet and we don't want to jump to conclusions.
|
|
string_id message = new string_id (c_stringFile, "s_79");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just tell me what needs to be done.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_80");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We don't quite know all of the fine details yet and we don't want to jump to conclusions.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just tell me what needs to be done.
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_grantStealOreQuest (player, npc);
|
|
|
|
//-- NPC: We need you to travel to the Imperial mining cave and steal several samples of ore. With any luck this will be a big piece to the puzzle.
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good work, %TU!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Did your operative have any useful information?
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We haven't had time to analyze all of the information she has collected, but I am sure it will prove to be invaluable.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm glad I could be of service.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We haven't had time to analyze all of the information she has collected, but I am sure it will prove to be invaluable.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm glad I could be of service.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_completePrisonerQuest (player, npc);
|
|
|
|
//-- NPC: You have our thanks for completing this task quickly and efficiently. Come see me again when you are ready. There is more work to be done.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Back already, %TU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh right, your missing operative, I'll get right on that!
|
|
if (response == "s_102")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Stop wasting time! Get to the Sulfur Lake Pirate hideout and find our missing man!
|
|
string_id message = new string_id (c_stringFile, "s_104");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TU! You are just the person I was looking for!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What can I do for you?
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have a task of great urgency, feel up to it?
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm listening...
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_112");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 36);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch36 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I have a task of great urgency, feel up to it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm listening...
|
|
if (response == "s_112")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We sent one of our operatives to the Sulfur Lake Hideout to assess the pirate threat but we have not heard from her in some time.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And you need someone to check up on her?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_116");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We sent one of our operatives to the Sulfur Lake Hideout to assess the pirate threat but we have not heard from her in some time.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And you need someone to check up on her?
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exactly! We believe she has been captured by the Sulfur Lake Pirates. She has information that could prove extremely useful to us.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll go find your missing operative.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_120");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Exactly! We believe she has been captured by the Sulfur Lake Pirates. She has information that could prove extremely useful to us.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll go find your missing operative.
|
|
if (response == "s_120")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very good. Travel to their hideout and find our operative. If she's alive, engineer an escape and get her back to us as soon as possible.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And if she's dead?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_126");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int stuvany_inglen_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Very good. Travel to their hideout and find our operative. If she's alive, engineer an escape and get her back to us as soon as possible.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And if she's dead?
|
|
if (response == "s_126")
|
|
{
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
stuvany_inglen_action_grantPrisonerQuest (player, npc);
|
|
|
|
//-- NPC: If she's dead, bring back anything in her possession that might carry the information she gathered.
|
|
string_id message = new string_id (c_stringFile, "s_128");
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.stuvany_inglen");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.stuvany_inglen");
|
|
|
|
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 (stuvany_inglen_condition_hasCompletedAll (player, npc))
|
|
{
|
|
stuvany_inglen_action_correctAllCollectionErrors (player, npc);
|
|
|
|
//-- NPC: I'll report your work to Nym during my next report. Nice working with you, %TU.
|
|
string_id message = new string_id (c_stringFile, "s_135");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasReturnedStealData (player, npc))
|
|
{
|
|
//-- NPC: This is it! This is the final piece of the puzzle!
|
|
string_id message = new string_id (c_stringFile, "s_25");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What does it all mean?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_28");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasCompletedLabDataCollection (player, npc))
|
|
{
|
|
stuvany_inglen_action_BruteForceCompleteLabData (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up when you stole that lab data. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_131");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasStealDataQuestNotComplete (player, npc))
|
|
{
|
|
//-- NPC: Why are you still here?
|
|
string_id message = new string_id (c_stringFile, "s_26");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Because I forgot what I was supposed to do?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_30");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 9);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_canDoStealData (player, npc))
|
|
{
|
|
//-- NPC: Good, you're back!
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've decided to see this through to the end.
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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.stuvany_inglen.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasntDoneData (player, npc))
|
|
{
|
|
//-- NPC: Maybe you should come back after you've spoken with Kole.
|
|
string_id message = new string_id (c_stringFile, "s_125");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasReturnedStealOre (player, npc))
|
|
{
|
|
//-- NPC: Excellent work, %TU! I'll have these samples analyzed immediately!
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you hope to learn from these samples?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_39");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 16);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasCompletedMinedOreCollection (player, npc))
|
|
{
|
|
stuvany_inglen_action_BruteForceCompleteMinedOre (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up when you mined the ore. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_130");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasStealOreQuestNotComplete (player, npc))
|
|
{
|
|
//-- NPC: Do you have the samples?
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Samples? What samples?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_48");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 20);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_canDoStealOre (player, npc))
|
|
{
|
|
//-- NPC: Are you ready to get your hands dirty?
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm not going to like this am I?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_72");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 22);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasntDoneOre (player, npc))
|
|
{
|
|
//-- NPC: Maybe you should come back after you've spoken with Jinkins.
|
|
string_id message = new string_id (c_stringFile, "s_124");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasReturnedPrisoner (player, npc))
|
|
{
|
|
//-- NPC: Good work, %TU!
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Did your operative have any useful information?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_67");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 29);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasCompletedPrisonerRescueCollection (player, npc))
|
|
{
|
|
stuvany_inglen_action_BruteForceCompletePrisoner (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up rescuing the Lok Revenant. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_129");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasPrisonerQuestNotComplete (player, npc))
|
|
{
|
|
//-- NPC: Back already, %TU?
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh right, your missing operative, I'll get right on that!
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_102");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 33);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_canDoPrisoner (player, npc))
|
|
{
|
|
//-- NPC: %TU! You are just the person I was looking for!
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What can I do for you?
|
|
boolean hasResponse0 = false;
|
|
if (stuvany_inglen_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_108");
|
|
|
|
utils.setScriptVar (player, "conversation.stuvany_inglen.branchId", 35);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "stuvany_inglen", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition_hasntDonePrisoner (player, npc))
|
|
{
|
|
//-- NPC: Maybe you should come back after you've spoken with Vana.
|
|
string_id message = new string_id (c_stringFile, "s_133");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (stuvany_inglen_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have urgent business to attend to. Come back later.
|
|
string_id message = new string_id (c_stringFile, "s_136");
|
|
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 != "stuvany_inglen")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
if (branchId == 2 && stuvany_inglen_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && stuvany_inglen_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && stuvany_inglen_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && stuvany_inglen_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && stuvany_inglen_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && stuvany_inglen_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && stuvany_inglen_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && stuvany_inglen_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && stuvany_inglen_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && stuvany_inglen_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && stuvany_inglen_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && stuvany_inglen_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && stuvany_inglen_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && stuvany_inglen_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && stuvany_inglen_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && stuvany_inglen_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && stuvany_inglen_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && stuvany_inglen_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && stuvany_inglen_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && stuvany_inglen_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && stuvany_inglen_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 36 && stuvany_inglen_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && stuvany_inglen_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && stuvany_inglen_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && stuvany_inglen_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.stuvany_inglen.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|