mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
843 lines
27 KiB
Plaintext
843 lines
27 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// coa3wtactofficer.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.badge;
|
|
include library.chat;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/coa3wtactofficer";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean coa3wtactofficer_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3wtactofficer_condition_extraFloraMissionActive (obj_id player, obj_id npc)
|
|
{
|
|
// Is the extra flora mission active?
|
|
return (getIntObjVar (player, "coa3.extraFlora") == -1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3wtactofficer_condition_hasWonStory (obj_id player, obj_id npc)
|
|
{
|
|
// Check to see if the player has the COA3 story badge. # TBA
|
|
return (badge.hasBadge(player, "event_coa3_rebel"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3wtactofficer_condition_storyFloraMissionComplete (obj_id player, obj_id npc)
|
|
{
|
|
return (getIntObjVar (player, "coa3.convTracker") < -302);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3wtactofficer_condition_talkedToCoordinator (obj_id player, obj_id npc)
|
|
{
|
|
return (getIntObjVar (player, "coa3.convTracker") == -301);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3wtactofficer_condition_storyFloraMissionActive (obj_id player, obj_id npc)
|
|
{
|
|
return (getIntObjVar (player, "coa3.convTracker") == -302);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void coa3wtactofficer_action_refreshExtraFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
// Refresh the extra flora mission. This mission is independent of the story arc.
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", 3);
|
|
|
|
messageTo(npc, "messageStartMission", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void coa3wtactofficer_action_abortExtraFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
// Abort the extra flora mission
|
|
removeObjVar (player, "coa3.extraFlora");
|
|
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", -1);
|
|
|
|
messageTo(player, "handleAbortMission", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void coa3wtactofficer_action_getExtraFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
// Give player an extra flora mission. This is independent of the story arc.
|
|
setObjVar (player, "coa3.extraFlora", -1);
|
|
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", 3);
|
|
|
|
messageTo(npc, "messageStartMission", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void coa3wtactofficer_action_getStoryFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar (player, "coa3.convTracker", -302);
|
|
|
|
// Give flora destroy mission. Completing this mission
|
|
// should set coa3.convTracker objvar to 303
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", 3);
|
|
|
|
messageTo(npc, "messageStartMission", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void coa3wtactofficer_action_refreshStoryFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar (player, "coa3.convTracker", -302);
|
|
|
|
// Refresh the story flora mission waypoint
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", 3);
|
|
|
|
messageTo(npc, "messageStartMission", params, 0, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void coa3wtactofficer_action_abortStoryFloraMission (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar (player, "coa3.convTracker", -301);
|
|
|
|
// Abort the story flora mission.
|
|
dictionary params = new dictionary();
|
|
params.put("player", player);
|
|
params.put("npc", npc);
|
|
params.put("value", 3);
|
|
|
|
messageTo(player, "handleAbortMission", params, 0, false);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int coa3wtactofficer_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] Check if the outside flora mission is active.
|
|
//-- NPC: You still haven't destroyed that warehouse. Why is that?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry, I'll get right now it.
|
|
if (response == "s_688721b0")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Quit standing around then and move it.
|
|
string_id message = new string_id (c_stringFile, "s_38f00205");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE] Refresh the story flora mission waypoint
|
|
//-- PLAYER: I was not able to find the warehouse.
|
|
if (response == "s_f2fe6350")
|
|
{
|
|
coa3wtactofficer_action_refreshExtraFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmm, that's odd. Maybe we already took care of that one. Here, I've given you a waypoint for another warehouse we need taken out. Good luck to you!
|
|
string_id message = new string_id (c_stringFile, "s_268282e6");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE] Abort the extra flora mission
|
|
//-- PLAYER: I can't complete this mission.
|
|
if (response == "s_2e791c9d")
|
|
{
|
|
coa3wtactofficer_action_abortExtraFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well I appreciate the offer of help anyway. If you want to try it again later, come back and let me know.
|
|
string_id message = new string_id (c_stringFile, "s_3d82703f");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3wtactofficer_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] If the player's objvar is less the -302, they have got past the story flora mission and they can take an extra flora mission.
|
|
//-- NPC: There's plenty more warehouses to take care of if you're still interested! Otherwise, maybe the coordinator has something else he needs done. Either way if you have any Alderaanian Flora you'd like to dispose of, I will happily reward you for it.
|
|
|
|
//-- [RESPONSE NOTE] Give player an extra flora mission. This is independent of the story arc.
|
|
//-- PLAYER: I'm ready to take out another warehouse
|
|
if (response == "s_1cb2157b")
|
|
{
|
|
coa3wtactofficer_action_getExtraFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's what I like to hear. There's a waypoint in your datapad for another warehouse we've found. Go get it!
|
|
string_id message = new string_id (c_stringFile, "s_1f281089");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not interested in that right now.
|
|
if (response == "s_5166bfb2")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ok, suit yourself then. Come back any time you feel like helping find more stores of Alderaanian Flora.
|
|
string_id message = new string_id (c_stringFile, "s_885ae409");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3wtactofficer_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] Check to see if the player has recieved their story badge for Act 3. If so, they can take an extra flora mission.
|
|
//-- NPC: If you haven't completed the Coordinator's tasks, you should return to him. If you have, we know of more warehouses you can assault anytime. Either way, you can hand me any Alderaanian Flora you have and I will happily reward you for it.
|
|
|
|
//-- [RESPONSE NOTE] Give player an extra flora mission. This is independent of the story arc.
|
|
//-- PLAYER: I'm ready to take out another warehouse
|
|
if (response == "s_16")
|
|
{
|
|
coa3wtactofficer_action_getExtraFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's what I like to hear. There's a waypoint in your datapad for another warehouse we've found. Go get it!
|
|
string_id message = new string_id (c_stringFile, "s_18");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've got some business I need to take care of first.
|
|
if (response == "s_1b8e1fa4")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alright, come back any time you feel like helping me find more of these stores of Alderaanian Flora.
|
|
string_id message = new string_id (c_stringFile, "s_29fae614");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3wtactofficer_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] The player has talked to coordinator and was told to seek out the tactical officer.
|
|
//-- NPC: You're the one the Coordinator sent to help out? I see. Well, if you're here you must be doing something right. Right now our biggest issue is getting a hold of this Alderaanian Flora. Without it Dead Eye is just so much space garbage. We need people to go out and strike at these underworld storehouses and recover as much as we can.
|
|
|
|
//-- [RESPONSE NOTE] Give flora destroy mission. objvar set to -302.
|
|
//-- PLAYER: I'd be happy to help.
|
|
if (response == "s_f96e5eed")
|
|
{
|
|
coa3wtactofficer_action_getStoryFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good! Jabba has warehouses of that flora all over the Galaxy. As we find them, we are sending volunteers out to destroy them and confiscate the flora. I've added a waypoint to your datapad for a warehouse we've located close by. Go destroy it and confiscate any flora you find. I'll reward you for any Alderaanian Flora that you turn in.
|
|
string_id message = new string_id (c_stringFile, "s_1b5eac32");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not going to be able to help you right now.
|
|
if (response == "s_e4daff30")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What? Don't have the stomach for it? Come back when you've had a chance to settle your nerves.
|
|
string_id message = new string_id (c_stringFile, "s_83258fb0");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3wtactofficer_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] Player is in the middle of the flora story mission.
|
|
//-- NPC: Why haven't you destroyed that warehouse? Is something the matter?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing's wrong, never mind.
|
|
if (response == "s_ba1a3080")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well quit standing around! There's work to be done!
|
|
string_id message = new string_id (c_stringFile, "s_e40779f7");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE] Refresh mission and objvar -302
|
|
//-- PLAYER: I wasn't able to find the warehouse.
|
|
if (response == "s_8d1b9304")
|
|
{
|
|
coa3wtactofficer_action_refreshStoryFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmm, that's odd. Maybe we already took care of that one. Here, I've given you a waypoint for another warehouse we need taken out. Good luck to you!
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE] Abort and set objvar to -301
|
|
//-- PLAYER: I can't complete this mission.
|
|
if (response == "s_33")
|
|
{
|
|
coa3wtactofficer_action_abortStoryFloraMission (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you a moisture farmer or something? I guess we all can't be soldiers. Well I appreciate the offer of help anyway. If you want to try it again later, come back and let me know.
|
|
string_id message = new string_id (c_stringFile, "s_6a582260");
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.coa3wtactofficer");
|
|
|
|
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.coa3wtactofficer");
|
|
|
|
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] Check if the outside flora mission is active.
|
|
if (coa3wtactofficer_condition_extraFloraMissionActive (player, npc))
|
|
{
|
|
//-- NPC: You still haven't destroyed that warehouse. Why is that?
|
|
string_id message = new string_id (c_stringFile, "s_743c9f18");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sorry, I'll get right now it.
|
|
boolean hasResponse0 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I was not able to find the warehouse.
|
|
boolean hasResponse1 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can't complete this mission.
|
|
boolean hasResponse2 = false;
|
|
if (coa3wtactofficer_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_688721b0");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_f2fe6350");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2e791c9d");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3wtactofficer.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "coa3wtactofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] If the player's objvar is less the -302, they have got past the story flora mission and they can take an extra flora mission.
|
|
if (coa3wtactofficer_condition_hasWonStory (player, npc))
|
|
{
|
|
//-- NPC: There's plenty more warehouses to take care of if you're still interested! Otherwise, maybe the coordinator has something else he needs done. Either way if you have any Alderaanian Flora you'd like to dispose of, I will happily reward you for it.
|
|
string_id message = new string_id (c_stringFile, "s_ddef5a7b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm ready to take out another warehouse
|
|
boolean hasResponse0 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that right now.
|
|
boolean hasResponse1 = false;
|
|
if (coa3wtactofficer_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_1cb2157b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5166bfb2");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3wtactofficer.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "coa3wtactofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] Check to see if the player has recieved their story badge for Act 3. If so, they can take an extra flora mission.
|
|
if (coa3wtactofficer_condition_storyFloraMissionComplete (player, npc))
|
|
{
|
|
//-- NPC: If you haven't completed the Coordinator's tasks, you should return to him. If you have, we know of more warehouses you can assault anytime. Either way, you can hand me any Alderaanian Flora you have and I will happily reward you for it.
|
|
string_id message = new string_id (c_stringFile, "s_acadf21d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm ready to take out another warehouse
|
|
boolean hasResponse0 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've got some business I need to take care of first.
|
|
boolean hasResponse1 = false;
|
|
if (coa3wtactofficer_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_16");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1b8e1fa4");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3wtactofficer.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "coa3wtactofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] The player has talked to coordinator and was told to seek out the tactical officer.
|
|
if (coa3wtactofficer_condition_talkedToCoordinator (player, npc))
|
|
{
|
|
//-- NPC: You're the one the Coordinator sent to help out? I see. Well, if you're here you must be doing something right. Right now our biggest issue is getting a hold of this Alderaanian Flora. Without it Dead Eye is just so much space garbage. We need people to go out and strike at these underworld storehouses and recover as much as we can.
|
|
string_id message = new string_id (c_stringFile, "s_b8e8976a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'd be happy to help.
|
|
boolean hasResponse0 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not going to be able to help you right now.
|
|
boolean hasResponse1 = false;
|
|
if (coa3wtactofficer_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_f96e5eed");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e4daff30");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3wtactofficer.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "coa3wtactofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] Player is in the middle of the flora story mission.
|
|
if (coa3wtactofficer_condition_storyFloraMissionActive (player, npc))
|
|
{
|
|
//-- NPC: Why haven't you destroyed that warehouse? Is something the matter?
|
|
string_id message = new string_id (c_stringFile, "s_3c57b03");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Nothing's wrong, never mind.
|
|
boolean hasResponse0 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I wasn't able to find the warehouse.
|
|
boolean hasResponse1 = false;
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can't complete this mission.
|
|
boolean hasResponse2 = false;
|
|
if (coa3wtactofficer_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_ba1a3080");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8d1b9304");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_33");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3wtactofficer.branchId", 14);
|
|
|
|
npcStartConversation (player, npc, "coa3wtactofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (coa3wtactofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm sorry I can't talk right now. I'm very busy. This Dead Eye situation is getting out of control and I have my hands full. Rather than chit-chatting, how about you lend a hand already? Go and talk to the coordinator and make yourself useful.
|
|
string_id message = new string_id (c_stringFile, "s_f64d217f");
|
|
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 != "coa3wtactofficer")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
if (branchId == 1 && coa3wtactofficer_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && coa3wtactofficer_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && coa3wtactofficer_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && coa3wtactofficer_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && coa3wtactofficer_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.coa3wtactofficer.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|