Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/rek_thelcar.script
T

2362 lines
65 KiB
Plaintext

// ======================================================================
//
// rek_thelcar.script
//
//
//
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.collection;
include library.conversation;
include library.groundquests;
include library.static_item;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/rek_thelcar";
// ======================================================================
// Script Conditions
// ======================================================================
boolean rek_thelcar_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_isEligibleSurveillance (obj_id player, obj_id npc)
{
faceTo(npc,player);
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_surveillance_collection")
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_isElligibleMinerDna (obj_id player, obj_id npc)
{
faceTo(npc,player);
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_miner_dna_collection")
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_surveillance_collection")
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_isElligibleQuestion (obj_id player, obj_id npc)
{
faceTo(npc,player);
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_question_scientist_collection")
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_miner_dna_collection")
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasReturnedMinerDna (obj_id player, obj_id npc)
{
faceTo(npc,player);
return groundquests.isTaskActive(player, "u16_nym_themepark_miner_dna_collection", "returnExtractMinerDnaComplete");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasReturnedQuestion (obj_id player, obj_id npc)
{
faceTo(npc,player);
return groundquests.isTaskActive(player, "u16_nym_themepark_question_scientist_collection", "returnQuestionComplete");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasSurveillanceNotComplete (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_surveillance_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasMinerDnaNotComplete (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.isQuestActive(player, "u16_nym_themepark_miner_dna_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasQuestionNotComplete (obj_id player, obj_id npc)
{
faceTo(npc, player);
return groundquests.isQuestActive(player, "u16_nym_themepark_question_scientist_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasReturnedSurveillance (obj_id player, obj_id npc)
{
faceTo(npc,player);
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_surveillance_collection", "returnSurveillanceComplete");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasntDoneSurveillance (obj_id player, obj_id npc)
{
faceTo(npc, player);
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasntDoneMinerDNA (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_surveillance_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasntDoneQuestion (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_miner_dna_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasCompletedScientistCollection (obj_id player, obj_id npc)
{
return hasCompletedCollection(player, "nyms_question_scientist")
&& groundquests.isQuestActive(player, "u16_nym_themepark_question_scientist_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasCompletedDNACollection (obj_id player, obj_id npc)
{
return hasCompletedCollection(player, "nyms_miner_dna")
&& groundquests.isQuestActive(player, "u16_nym_themepark_miner_dna_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasCompletedDeviceCollection (obj_id player, obj_id npc)
{
return hasCompletedCollection(player, "nyms_surveillance_device")
&& groundquests.isQuestActive(player, "u16_nym_themepark_pirate_surveillance_collection");
}
// ----------------------------------------------------------------------
boolean rek_thelcar_condition_hasCompletedAll (obj_id player, obj_id npc)
{
faceTo(npc,player);
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_question_scientist_collection");
}
// ======================================================================
// Script Actions
// ======================================================================
void rek_thelcar_action_grantSurveillanceQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "u16_nym_themepark_pirate_surveillance_collection");
if(!hasCompletedCollectionSlot(player, "nym_surveillance_activation"))
{
modifyCollectionSlotValue(player, "nym_surveillance_activation", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_grantMinerDnaQuest (obj_id player, obj_id npc)
{
obj_id playerInv = utils.getInventoryContainer(player);
static_item.createNewItemFunction("item_nym_themepark_dna_extractor", playerInv);
groundquests.grantQuest(player, "u16_nym_themepark_miner_dna_collection");
if(!hasCompletedCollectionSlot(player, "nym_miner_dna_activation"))
{
modifyCollectionSlotValue(player, "nym_miner_dna_activation", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_grantQuestionScientistQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "u16_nym_themepark_question_scientist_collection");
if(!hasCompletedCollectionSlot(player, "nym_question_scientist_activation"))
{
modifyCollectionSlotValue(player, "nym_question_scientist_activation", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_completeSurveillanceQuest (obj_id player, obj_id npc)
{
if(groundquests.isTaskActive(player, "u16_nym_themepark_pirate_surveillance_collection", "returnSurveillanceComplete"))
{
groundquests.sendSignal(player, "hasCompletedSurveillance");
}
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_1_surveillance"))
{
modifyCollectionSlotValue(player, "icon_nyms_master_collection_1_surveillance", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_completeMinerDnaQuest (obj_id player, obj_id npc)
{
if(groundquests.isTaskActive(player, "u16_nym_themepark_miner_dna_collection", "returnExtractMinerDnaComplete"))
{
groundquests.sendSignal(player, "hasCompletedMinerDna");
}
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_1_dna"))
{
modifyCollectionSlotValue(player, "icon_nyms_master_collection_1_dna", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_completeQuestionQuest (obj_id player, obj_id npc)
{
if(groundquests.isTaskActive(player, "u16_nym_themepark_question_scientist_collection", "returnQuestionComplete"))
{
groundquests.sendSignal(player, "hasCompletedQuestion");
}
if(!hasCompletedCollectionSlot(player, "icon_nyms_master_collection_1_scientist"))
{
modifyCollectionSlotValue(player, "icon_nyms_master_collection_1_scientist", 1);
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_BruteForceCompleteScientist (obj_id player, obj_id npc)
{
if(rek_thelcar_condition_hasCompletedScientistCollection(player,npc))
{
if(groundquests.isQuestActive(player, "u16_nym_themepark_question_scientist_collection"))
{
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_question_scientist_collection for player: "+player+" so they do not remailn bugged.");
int questid = questGetQuestId("quest/u16_nym_themepark_question_scientist_collection");
if((questid != 0) && questIsQuestActive(questid, player))
{
questCompleteQuest(questid, player);
rek_thelcar_action_completeQuestionQuest(player, npc);
}
}
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_BruteForceCompleteDNA (obj_id player, obj_id npc)
{
if(rek_thelcar_condition_hasCompletedDNACollection(player,npc))
{
if(groundquests.isQuestActive(player, "u16_nym_themepark_miner_dna_collection"))
{
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_miner_dna_collection for player: "+player+" so they do not remailn bugged.");
int questid = questGetQuestId("quest/u16_nym_themepark_miner_dna_collection");
if((questid != 0) && questIsQuestActive(questid, player))
{
questCompleteQuest(questid, player);
rek_thelcar_action_completeMinerDnaQuest(player, npc);
}
}
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_BruteForceCompleteDevice (obj_id player, obj_id npc)
{
if(rek_thelcar_condition_hasCompletedDeviceCollection(player,npc))
{
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_surveillance_collection"))
{
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_surveillance_collection for player: "+player+" so they do not remailn bugged.");
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_surveillance_collection");
if((questid != 0) && questIsQuestActive(questid, player))
{
questCompleteQuest(questid, player);
rek_thelcar_action_completeSurveillanceQuest(player, npc);
}
}
}
}
// ----------------------------------------------------------------------
void rek_thelcar_action_correctAnyPlayerErrors (obj_id player, obj_id npc)
{
rek_thelcar_action_completeSurveillanceQuest(player, npc);
rek_thelcar_action_completeMinerDnaQuest(player, npc);
rek_thelcar_action_completeQuestionQuest(player, npc);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int rek_thelcar_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! You're all done interrogate... I mean, questioning... some scientists, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Right... I don't think I got much, though.
if (response == "s_114")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "whisper");
//-- NPC: Sometimes it's not what they say but what they don't say, right?
string_id message = new string_id (c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yeah, well, good luck with that.
boolean hasResponse0 = false;
if (rek_thelcar_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.rek_thelcar.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Sometimes it's not what they say but what they don't say, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Yeah, well, good luck with that.
if (response == "s_116")
{
doAnimationAction (player, "cough_polite");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "handshake_tandem");
rek_thelcar_action_completeQuestionQuest (player, npc);
//-- NPC: Thanks, I'll need it and thanks for all of your help, too, right?
string_id message = new string_id (c_stringFile, "s_117");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! All done, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Not long now.
if (response == "s_105")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_on_dismissing");
//-- NPC: I'm sure you're doing your best, right?
string_id message = new string_id (c_stringFile, "s_106");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey, %TU! We all know that the guys out in that Imperial Research Facility are up to something, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Right?
if (response == "s_44")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_once");
//-- NPC: Of course right! So we Revenants have been trying everything to find out what and I figured out what we haven't tried yet, right?
string_id message = new string_id (c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Bribe them with Blue Milk?
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Oh wow, look at the time!
if (response == "s_80")
{
doAnimationAction (player, "check_wrist_device");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "hug_self");
//-- NPC: I'll wait, right?
string_id message = new string_id (c_stringFile, "s_104");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Of course right! So we Revenants have been trying everything to find out what and I figured out what we haven't tried yet, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Bribe them with Blue Milk?
if (response == "s_46")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Ugh! Disgusting color, right? No, I was thinking that we should just ask them, right?
string_id message = new string_id (c_stringFile, "s_47");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So you want me to play Twenty Questions?
boolean hasResponse0 = false;
if (rek_thelcar_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.rek_thelcar.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ugh! Disgusting color, right? No, I was thinking that we should just ask them, right?
//-- [RESPONSE NOTE]
//-- PLAYER: So you want me to play Twenty Questions?
if (response == "s_48")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_no");
//-- NPC: No... ten should be enough, right?
string_id message = new string_id (c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You're serious?
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't have time for one question, see you around.
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No... ten should be enough, right?
//-- [RESPONSE NOTE]
//-- PLAYER: You're serious?
if (response == "s_50")
{
doAnimationAction (player, "huh");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
rek_thelcar_action_grantQuestionScientistQuest (player, npc);
//-- NPC: I put some info in your datapad so you can find the place, right?
string_id message = new string_id (c_stringFile, "s_51");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't have time for one question, see you around.
if (response == "s_52")
{
doAnimationAction (player, "wave_on_dismissing");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "sigh_deeply");
//-- NPC: When your curiosity gets too much you know where to find me, right?
string_id message = new string_id (c_stringFile, "s_53");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! You got the samples we need, right?
//-- [RESPONSE NOTE]
//-- PLAYER: I got them right here.
if (response == "s_109")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: Hmm... it's going to take a while to analyze these, right?
string_id message = new string_id (c_stringFile, "s_110");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll leave you to it, then.
boolean hasResponse0 = false;
if (rek_thelcar_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_111");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hmm... it's going to take a while to analyze these, right?
//-- [RESPONSE NOTE]
//-- PLAYER: I'll leave you to it, then.
if (response == "s_111")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "handshake_tandem");
rek_thelcar_action_completeMinerDnaQuest (player, npc);
//-- NPC: Sure thing, and thanks again for the help, right?
string_id message = new string_id (c_stringFile, "s_112");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! That didn't take long, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Not quite done yet, Rek, sorry.
if (response == "s_102")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_on_dismissing");
//-- NPC: No hurry, we're just made of time here, right?
string_id message = new string_id (c_stringFile, "s_103");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey, %TU! You heard that the miners in the Imperial Mine have gone nuts, right?
//-- [RESPONSE NOTE]
//-- PLAYER: I heard something about that, yeah.
if (response == "s_41")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_multiple");
//-- NPC: I know, right? Well, we Revenants need as much information as we can get about what's going on with them, right?
string_id message = new string_id (c_stringFile, "s_55");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What kind of information?
boolean hasResponse0 = false;
if (rek_thelcar_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_60");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, this is the first I've heard of it.
if (response == "s_56")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: Well, we Revenants need as much information as we can get about what's going on with them, right?
string_id message = new string_id (c_stringFile, "s_58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What kind of information?
boolean hasResponse0 = false;
if (rek_thelcar_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_60");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, Rek, I'm kind of busy.
if (response == "s_79")
{
doAnimationAction (player, "check_wrist_device");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_on_dismissing");
//-- NPC: Sure, sure, you'll get back to me when you can, right?
string_id message = new string_id (c_stringFile, "s_101");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I know, right? Well, we Revenants need as much information as we can get about what's going on with them, right?
//-- [RESPONSE NOTE]
//-- PLAYER: What kind of information?
if (response == "s_60")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_hands");
//-- NPC: Just basics like could it affect us or could we use it somehow, that sort of thing, right?
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So where do I fit into all this?
boolean hasResponse0 = false;
if (rek_thelcar_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_64");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, we Revenants need as much information as we can get about what's going on with them, right?
//-- [RESPONSE NOTE]
//-- PLAYER: What kind of information?
if (response == "s_60")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_hands");
//-- NPC: Just basics like could it affect us or could we use it somehow, that sort of thing, right?
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So where do I fit into all this?
boolean hasResponse0 = false;
if (rek_thelcar_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_64");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Just basics like could it affect us or could we use it somehow, that sort of thing, right?
//-- [RESPONSE NOTE]
//-- PLAYER: So where do I fit into all this?
if (response == "s_64")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "poke");
//-- NPC: I got these DNA Extractors here, right? I need someone to go down in those mines and use them to take a few samples that we can test to see what's what. right? And you're Someone, right?
string_id message = new string_id (c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I guess I'm your Someone...
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Cool story, Bro. Pity I don't have time right now.
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_72");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I got these DNA Extractors here, right? I need someone to go down in those mines and use them to take a few samples that we can test to see what's what. right? And you're Someone, right?
//-- [RESPONSE NOTE]
//-- PLAYER: I guess I'm your Someone...
if (response == "s_68")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
rek_thelcar_action_grantMinerDnaQuest (player, npc);
//-- NPC: Here is the DNA extractor you'll need to use on the miners to get the DNA, right? I've also put some info in your datapad so you can find the place, right?
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Cool story, Bro. Pity I don't have time right now.
if (response == "s_72")
{
doAnimationAction (player, "thumbs_up");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: No sweat, Someones are like shuttles, right?
string_id message = new string_id (c_stringFile, "s_74");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! Everything's all set up, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Yeah, see anything interesting?
if (response == "s_87")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "hands_above_head");
//-- NPC: Give us some time, we just started watching, right?
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Take all the time you need.
boolean hasResponse0 = false;
if (rek_thelcar_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_89");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 32);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Give us some time, we just started watching, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Take all the time you need.
if (response == "s_89")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "bow5");
rek_thelcar_action_completeSurveillanceQuest (player, npc);
//-- NPC: You got it, and thanks for the help, right?
string_id message = new string_id (c_stringFile, "s_91");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch35 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey %TU! That was fast, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, Rek, still a few more to go.
if (response == "s_96")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
//-- NPC: See you when you're done, then, right?
string_id message = new string_id (c_stringFile, "s_98");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch37 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey, %TU! Glad you stopped to chat, you've got time to lend me a hand, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Sure, what do you need?
if (response == "s_118")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
doAnimationAction (player, "rub_chin_thoughtful");
//-- NPC: Recent events have shown that we Revenants need to keep better tabs on the Sulfur Lake Pirates, right?
string_id message = new string_id (c_stringFile, "s_120");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So where do I come in?
boolean hasResponse0 = false;
if (rek_thelcar_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_122");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not right now, I'm kind of busy.
if (response == "s_140")
{
doAnimationAction (player, "check_wrist_device");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: I understand and I guess this can wait a while; we Revenants have made it this far without it, right?
string_id message = new string_id (c_stringFile, "s_143");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch38 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Recent events have shown that we Revenants need to keep better tabs on the Sulfur Lake Pirates, right?
//-- [RESPONSE NOTE]
//-- PLAYER: So where do I come in?
if (response == "s_122")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "hands_behind_head");
//-- NPC: Glad you asked! I got a bunch of these surveillance devices from our Head of Security over there. I need you to head out to the Pirates hideout and find good inconspicuous locations to place them, right?
string_id message = new string_id (c_stringFile, "s_124");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What then?
boolean hasResponse0 = false;
if (rek_thelcar_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.rek_thelcar.branchId", 39);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch39 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Glad you asked! I got a bunch of these surveillance devices from our Head of Security over there. I need you to head out to the Pirates hideout and find good inconspicuous locations to place them, right?
//-- [RESPONSE NOTE]
//-- PLAYER: What then?
if (response == "s_126")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
//-- NPC: Why, place them, of course! Then come report back to me when you're all done. Simple enough, right?
string_id message = new string_id (c_stringFile, "s_128");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Right! I'll be back when I'm done!
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sorry, Rek, I'm busy right now.
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_130");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 40);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rek_thelcar_handleBranch40 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Why, place them, of course! Then come report back to me when you're all done. Simple enough, right?
//-- [RESPONSE NOTE]
//-- PLAYER: Right! I'll be back when I'm done!
if (response == "s_130")
{
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
rek_thelcar_action_grantSurveillanceQuest (player, npc);
//-- NPC: I put some info in your datapad so you can find the place, right?
string_id message = new string_id (c_stringFile, "s_132");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, Rek, I'm busy right now.
if (response == "s_134")
{
doAnimationAction (player, "check_wrist_device");
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: Yeah, I guess this can wait a while; we Revenants have made it this far without it, right?
string_id message = new string_id (c_stringFile, "s_138");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isTangible (self)) || (isPlayer (self)))
detachScript(self, "conversation.rek_thelcar");
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.rek_thelcar");
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 (rek_thelcar_condition_hasCompletedAll (player, npc))
{
rek_thelcar_action_correctAnyPlayerErrors (player, npc);
//-- NPC: We are done, %TU. Good working with you....right!
string_id message = new string_id (c_stringFile, "s_147");
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 (rek_thelcar_condition_hasReturnedQuestion (player, npc))
{
doAnimationAction (npc, "hair_flip");
//-- NPC: Hey %TU! You're all done interrogate... I mean, questioning... some scientists, right?
string_id message = new string_id (c_stringFile, "s_113");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Right... I don't think I got much, though.
boolean hasResponse0 = false;
if (rek_thelcar_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_114");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 2);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasCompletedScientistCollection (player, npc))
{
rek_thelcar_action_BruteForceCompleteScientist (player, npc);
//-- NPC: Looks like things got a little bit mixed up when questioning those scientists. Let me help.
string_id message = new string_id (c_stringFile, "s_142");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition_hasQuestionNotComplete (player, npc))
{
doAnimationAction (npc, "applause_excited");
//-- NPC: Hey %TU! All done, right?
string_id message = new string_id (c_stringFile, "s_85");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not long now.
boolean hasResponse0 = false;
if (rek_thelcar_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_105");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 6);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_isElligibleQuestion (player, npc))
{
doAnimationAction (npc, "greet");
//-- NPC: Hey, %TU! We all know that the guys out in that Imperial Research Facility are up to something, right?
string_id message = new string_id (c_stringFile, "s_43");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Right?
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Oh wow, look at the time!
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_44");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 8);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasntDoneQuestion (player, npc))
{
//-- NPC: I don't know you well enough yet. You better speak with Kole before we work together, right?
string_id message = new string_id (c_stringFile, "s_137");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition_hasReturnedMinerDna (player, npc))
{
doAnimationAction (npc, "bounce");
//-- NPC: Hey %TU! You got the samples we need, right?
string_id message = new string_id (c_stringFile, "s_108");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I got them right here.
boolean hasResponse0 = false;
if (rek_thelcar_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_109");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 16);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasCompletedDNACollection (player, npc))
{
rek_thelcar_action_BruteForceCompleteDNA (player, npc);
//-- NPC: Looks like things got a little bit mixed up with that DNA mission. Let me help.
string_id message = new string_id (c_stringFile, "s_144");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition_hasMinerDnaNotComplete (player, npc))
{
doAnimationAction (npc, "bounce");
//-- NPC: Hey %TU! That didn't take long, right?
string_id message = new string_id (c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not quite done yet, Rek, sorry.
boolean hasResponse0 = false;
if (rek_thelcar_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.rek_thelcar.branchId", 20);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_isElligibleMinerDna (player, npc))
{
doAnimationAction (npc, "greet");
//-- NPC: Hey, %TU! You heard that the miners in the Imperial Mine have gone nuts, right?
string_id message = new string_id (c_stringFile, "s_39");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I heard something about that, yeah.
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No, this is the first I've heard of it.
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Sorry, Rek, I'm kind of busy.
boolean hasResponse2 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_79");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 22);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasntDoneMinerDNA (player, npc))
{
//-- NPC: I don't know you well enough yet. You better speak with Jinkins before we work together, right?
string_id message = new string_id (c_stringFile, "s_136");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition_hasReturnedSurveillance (player, npc))
{
doAnimationAction (npc, "greet");
//-- NPC: Hey %TU! Everything's all set up, right?
string_id message = new string_id (c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yeah, see anything interesting?
boolean hasResponse0 = false;
if (rek_thelcar_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_87");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 31);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasCompletedDeviceCollection (player, npc))
{
rek_thelcar_action_BruteForceCompleteDevice (player, npc);
//-- NPC: Looks like things got a little bit mixed up with those Surveillance Devices. Let me help.
string_id message = new string_id (c_stringFile, "s_146");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition_hasSurveillanceNotComplete (player, npc))
{
doAnimationAction (npc, "applause_excited");
//-- NPC: Hey %TU! That was fast, right?
string_id message = new string_id (c_stringFile, "s_94");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sorry, Rek, still a few more to go.
boolean hasResponse0 = false;
if (rek_thelcar_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.rek_thelcar.branchId", 35);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_isEligibleSurveillance (player, npc))
{
doAnimationAction (npc, "beckon");
//-- NPC: Hey, %TU! Glad you stopped to chat, you've got time to lend me a hand, right?
string_id message = new string_id (c_stringFile, "s_100");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure, what do you need?
boolean hasResponse0 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not right now, I'm kind of busy.
boolean hasResponse1 = false;
if (rek_thelcar_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_118");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
utils.setScriptVar (player, "conversation.rek_thelcar.branchId", 37);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "rek_thelcar", 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 (rek_thelcar_condition_hasntDoneSurveillance (player, npc))
{
//-- NPC: I don't know you well enough yet. You better speak with Vana Sage before we work together, right?
string_id message = new string_id (c_stringFile, "s_150");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (rek_thelcar_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "hi5_tandem");
//-- NPC: Lok Revenants rule, right?!
string_id message = new string_id (c_stringFile, "s_152");
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 != "rek_thelcar")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.rek_thelcar.branchId");
if (branchId == 2 && rek_thelcar_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && rek_thelcar_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && rek_thelcar_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && rek_thelcar_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && rek_thelcar_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && rek_thelcar_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && rek_thelcar_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && rek_thelcar_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && rek_thelcar_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && rek_thelcar_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && rek_thelcar_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && rek_thelcar_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && rek_thelcar_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && rek_thelcar_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && rek_thelcar_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && rek_thelcar_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && rek_thelcar_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 35 && rek_thelcar_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 37 && rek_thelcar_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 38 && rek_thelcar_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 39 && rek_thelcar_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 40 && rek_thelcar_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.rek_thelcar.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================