mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
691 lines
20 KiB
Plaintext
691 lines
20 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// mtp_hideout_recon.script
|
|
//
|
|
//
|
|
//
|
|
// 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.static_item;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/mtp_hideout_recon";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean mtp_hideout_recon_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_hideout_recon_condition_collectionComplete (obj_id player, obj_id npc)
|
|
{
|
|
//Collection is already complete - dont offer this conversation
|
|
if(hasCompletedCollection(player, "col_meatlump_photo_01"))
|
|
{
|
|
return false;
|
|
}
|
|
//Collection is active! - Dont offer this conversation
|
|
if(hasCompletedCollectionSlotPrereq(player, "meatlump_photo_corellia") && !hasCompletedCollection(player, "col_meatlump_photo_01"))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_hideout_recon_condition_collectionStillActive (obj_id player, obj_id npc)
|
|
{
|
|
//Only show this conversation if the player has the collection active.
|
|
if(!hasCompletedCollection(player, "col_meatlump_photo_01") && hasCompletedCollectionSlotPrereq(player, "meatlump_photo_corellia"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_hideout_recon_condition_returnNoCamera (obj_id player, obj_id npc)
|
|
{
|
|
obj_id camera = utils.getStaticItemInInventory(player, "meatlump_camera_02_01");
|
|
if(!isIdValid(camera))
|
|
{
|
|
//player does not have the camera in his inventory.
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_hideout_recon_condition_planetsNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
//check to ensure each slot is complete
|
|
for(int j = 0; j < PHOTO_PLANETS.length; j++)
|
|
{
|
|
if(!hasCompletedCollectionSlot(player, PHOTO_PLANETS[j]))
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void mtp_hideout_recon_action_grantMeatlumpCamera (obj_id player, obj_id npc)
|
|
{
|
|
//give the player a camera.
|
|
obj_id pInv = utils.getInventoryContainer(player);
|
|
obj_id camera = static_item.createNewItemFunction("meatlump_camera_02_01", pInv);
|
|
// obj_id camera = createObjectInInventoryAllowOverload("meatlump_camera_02_01", pInv);
|
|
//activate the collection for them.
|
|
modifyCollectionSlotValue(player, "meatlump_camera_starter_slot", 1);
|
|
|
|
//ensure the camera was created correctly.
|
|
if(!isIdValid(camera) || !exists(camera))
|
|
{
|
|
//TODO: CS LOG
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mtp_hideout_recon_action_returnTheCamera (obj_id player, obj_id npc)
|
|
{
|
|
//make sure the player has the camera -
|
|
obj_id camera = utils.getStaticItemInInventory(player, "meatlump_camera_02_01");
|
|
if(!isIdValid(camera))
|
|
{
|
|
//player does not have the camera in his inventory.
|
|
return;
|
|
}
|
|
if(!hasCompletedCollectionSlotPrereq(player, "meatlump_photo_corellia"))
|
|
{
|
|
return;
|
|
}
|
|
//check to ensure each slot is complete
|
|
for(int j = 0; j < PHOTO_PLANETS.length; j++)
|
|
{
|
|
if(!hasCompletedCollectionSlot(player, PHOTO_PLANETS[j]))
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
//grant the final slot for the collection
|
|
modifyCollectionSlotValue(player, "meatlump_camera_finish_slot", 1);
|
|
|
|
if(hasCompletedCollection(player, "col_meatlump_photo_01"))
|
|
{
|
|
//destroy the camera - the player no longer has any need for it.
|
|
detachScript(camera, "item.special.nodestroy");
|
|
destroyObject(camera);
|
|
CustomerServiceLog("Collection: ", "Player " + getFirstName(player) + "(" + player + ") completed the 'meatlump photo' collection. " + "item 'meatlump_camera_02_01'" + "(" + camera + ") " + "was deleted. *****This deletion is required to finish the collection!*****");
|
|
}
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int mtp_hideout_recon_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey there!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hi, I'm new here, could you give me a little background info?
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm not big on giving out too much information about our cause to new-comers. I do, however, have a task for you if you wish to prove your worthiness to the organization.
|
|
string_id message = new string_id (c_stringFile, "s_8");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What did you have in mind?
|
|
boolean hasResponse0 = false;
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks, I'm busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_hideout_recon_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_10");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_hideout_recon.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hey, can you point me to the restroom?
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Restroom? We suggest you leave the hideout...other than that...you're on your own.
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm still trying to get all those photos taken.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, there is no time limit, but the sooner the better.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I think I'm all done getting the photos you requested.
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition_planetsNotComplete (player, npc))
|
|
{
|
|
mtp_hideout_recon_action_returnTheCamera (player, npc);
|
|
|
|
//-- NPC: Ah! Great work! I'll get these developed and take them to the King! You've done a great service, Thank You!
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition_returnNoCamera (player, npc))
|
|
{
|
|
//-- NPC: Remember to bring the camera when you return so I can get the film developed.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!mtp_hideout_recon_condition_planetsNotComplete (player, npc))
|
|
{
|
|
//-- NPC: It doesn't look like you've used up all the film. Finish taking the recon photos and return to me.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_hideout_recon_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm not big on giving out too much information about our cause to new-comers. I do, however, have a task for you if you wish to prove your worthiness to the organization.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What did you have in mind?
|
|
if (response == "s_10")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: People all over the Galaxy have built harvesters to mine minerals, collect gasses, water, etc. This type of mass production will only lead to a societal breakdown in years to come. Now is our chance to slow the advancement of strife.
|
|
string_id message = new string_id (c_stringFile, "s_12");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I see where you're coming from. What do you want me to do?
|
|
boolean hasResponse0 = false;
|
|
if (mtp_hideout_recon_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_14");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_hideout_recon.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks, I'm busy right now.
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Come back anytime.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_hideout_recon_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: People all over the Galaxy have built harvesters to mine minerals, collect gasses, water, etc. This type of mass production will only lead to a societal breakdown in years to come. Now is our chance to slow the advancement of strife.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I see where you're coming from. What do you want me to do?
|
|
if (response == "s_14")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Take this camera and travel across the Galaxy. During your travels, seek out and take pictures of harvesters people have built. The information you return with will help us locate future targets.
|
|
string_id message = new string_id (c_stringFile, "s_16");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Give me the camera and I'll be on my way.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Uhh, no thanks, I don't want to be involved in this. I'm just here to have a good time.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_hideout_recon_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_18");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_22");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_hideout_recon.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_hideout_recon_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Take this camera and travel across the Galaxy. During your travels, seek out and take pictures of harvesters people have built. The information you return with will help us locate future targets.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Give me the camera and I'll be on my way.
|
|
if (response == "s_18")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
mtp_hideout_recon_action_grantMeatlumpCamera (player, npc);
|
|
|
|
//-- NPC: Here you go. Also, while you're out gathering intelligence, make sure you're not being watched. We do not want to make it seem like we're doing anything suspicious.
|
|
string_id message = new string_id (c_stringFile, "s_20");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uhh, no thanks, I don't want to be involved in this. I'm just here to have a good time.
|
|
if (response == "s_22")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, if you ever change your mind, I'll be here.
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
const string[] PHOTO_PLANETS =
|
|
{
|
|
"meatlump_photo_corellia",
|
|
"meatlump_photo_dantooine",
|
|
"meatlump_photo_dathomir",
|
|
"meatlump_photo_endor",
|
|
"meatlump_photo_lok",
|
|
"meatlump_photo_naboo",
|
|
"meatlump_photo_rori",
|
|
"meatlump_photo_talus",
|
|
"meatlump_photo_tatooine",
|
|
"meatlump_photo_yavin4"
|
|
};
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.mtp_hideout_recon");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.mtp_hideout_recon");
|
|
|
|
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 (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hey there!
|
|
string_id message = new string_id (c_stringFile, "s_4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Hi, I'm new here, could you give me a little background info?
|
|
boolean hasResponse0 = false;
|
|
if (mtp_hideout_recon_condition_collectionComplete (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hey, can you point me to the restroom?
|
|
boolean hasResponse1 = false;
|
|
if (mtp_hideout_recon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm still trying to get all those photos taken.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_hideout_recon_condition_collectionStillActive (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I think I'm all done getting the photos you requested.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_hideout_recon_condition_collectionStillActive (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_30");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_hideout_recon.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "mtp_hideout_recon", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "mtp_hideout_recon")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
if (branchId == 1 && mtp_hideout_recon_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && mtp_hideout_recon_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && mtp_hideout_recon_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && mtp_hideout_recon_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.mtp_hideout_recon.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|