mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
713 lines
22 KiB
Plaintext
713 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// coa3winfoofficer.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/coa3winfoofficer";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean coa3winfoofficer_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean coa3winfoofficer_condition_hasTalkToCoordinator (obj_id player, obj_id npc)
|
|
{
|
|
return (getIntObjVar (player, "coa3.convTracker") <= -101);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void coa3winfoofficer_action_infoOfficerDone (obj_id player, obj_id npc)
|
|
{
|
|
if (getIntObjVar (player, "coa3.convTracker") == -101)
|
|
setObjVar (player, "coa3.convTracker", -102);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int coa3winfoofficer_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] Has spoken to Coordinator at least once and is allowed to speak to info officer.
|
|
//-- NPC: I was told you would be arriving. I don't have much time and there's much to do, so I'll try to make this briefing quick.
|
|
|
|
//-- [RESPONSE NOTE] objvar set to 102. Player can go back to coordinator now.
|
|
//-- PLAYER: What's the current situation?
|
|
if (response == "s_4372123c")
|
|
{
|
|
coa3winfoofficer_action_infoOfficerDone (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The situation is good. The message Princess Leia sent to Vacca did the trick. He's given us a prototype Dead Eye schematic. You can requisition one from any of our Recruiters, but you'll need some science skills to use it. It's nearly ready for use, though there are a few technical hurdles we must overcome.
|
|
string_id message = new string_id (c_stringFile, "s_c91c8c81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_30");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3winfoofficer_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The situation is good. The message Princess Leia sent to Vacca did the trick. He's given us a prototype Dead Eye schematic. You can requisition one from any of our Recruiters, but you'll need some science skills to use it. It's nearly ready for use, though there are a few technical hurdles we must overcome.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more.
|
|
if (response == "s_159911f5")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: One hurdle we have not been able to overcome is the fact that the Dead Eye serum requires flora that only grew on Alderaan. Needless to say, the supplies of that flora are finite and very limited.
|
|
string_id message = new string_id (c_stringFile, "s_e695be09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Won't Dead Eye just fizzle out eventually?
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_a318edbd");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3winfoofficer_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: One hurdle we have not been able to overcome is the fact that the Dead Eye serum requires flora that only grew on Alderaan. Needless to say, the supplies of that flora are finite and very limited.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Won't Dead Eye just fizzle out eventually?
|
|
if (response == "s_a318edbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It will unless we can produce an alternative. We have already set up a number of small research facilities where we are trying to find an alternative. If it works, and we are not hindered by the opposition, we should be able to keep Dead Eye up and running. If we don't find an alternative, Dead Eye will be useless once the current supply of Alderaanian Flora runs out. If we can even get our hands on the current supply.
|
|
string_id message = new string_id (c_stringFile, "s_5adb0095");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you mean?
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_77e48d5b");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_22");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3winfoofficer_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It will unless we can produce an alternative. We have already set up a number of small research facilities where we are trying to find an alternative. If it works, and we are not hindered by the opposition, we should be able to keep Dead Eye up and running. If we don't find an alternative, Dead Eye will be useless once the current supply of Alderaanian Flora runs out. If we can even get our hands on the current supply.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you mean?
|
|
if (response == "s_77e48d5b")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Scum of the galaxy or not, you have to admire the intelligence work of the underworld organizations. They learned of the importance of this flora well in advance of anyone else and took it upon themselves to corner the market.
|
|
string_id message = new string_id (c_stringFile, "s_8bb9b684");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do we do?
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_80cfbf07");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_22")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3winfoofficer_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Scum of the galaxy or not, you have to admire the intelligence work of the underworld organizations. They learned of the importance of this flora well in advance of anyone else and took it upon themselves to corner the market.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do we do?
|
|
if (response == "s_80cfbf07")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We'll have to get it from them quickly. Without even a small supply we won't be able to replicate an alternative and all this work will have been for nothing.
|
|
string_id message = new string_id (c_stringFile, "s_f971a76c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So what can I do to help?
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_e6eebf47");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_7b8e8204");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_18")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_20");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int coa3winfoofficer_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We'll have to get it from them quickly. Without even a small supply we won't be able to replicate an alternative and all this work will have been for nothing.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So what can I do to help?
|
|
if (response == "s_e6eebf47")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We sent briefings to the Coordinators on some potential ways to get our hands on some of the stockpiles of the flora. Go talk with the Coordinator and he'll assign you a mission.
|
|
string_id message = new string_id (c_stringFile, "s_a43858ea");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard enough.
|
|
if (response == "s_7b8e8204")
|
|
{
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, well I didn't mean to bore you. If you ever want a recap of what is going on, just let me know. You may want to go and see if the coordinator is ready for you.
|
|
string_id message = new string_id (c_stringFile, "s_36b24b81");
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.coa3winfoofficer");
|
|
|
|
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.coa3winfoofficer");
|
|
|
|
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] Has spoken to Coordinator at least once and is allowed to speak to info officer.
|
|
if (coa3winfoofficer_condition_hasTalkToCoordinator (player, npc))
|
|
{
|
|
//-- NPC: I was told you would be arriving. I don't have much time and there's much to do, so I'll try to make this briefing quick.
|
|
string_id message = new string_id (c_stringFile, "s_708aa59f");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What's the current situation?
|
|
boolean hasResponse0 = false;
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've heard enough.
|
|
boolean hasResponse1 = false;
|
|
if (coa3winfoofficer_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_4372123c");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
utils.setScriptVar (player, "conversation.coa3winfoofficer.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "coa3winfoofficer", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (coa3winfoofficer_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hello there. I'm a little busy at the moment. If you're looking for work, perhaps you should seek out the Coordinator in this city. He may have something for you to do.
|
|
string_id message = new string_id (c_stringFile, "s_eb1ac0f9");
|
|
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 != "coa3winfoofficer")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
if (branchId == 1 && coa3winfoofficer_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && coa3winfoofficer_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && coa3winfoofficer_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && coa3winfoofficer_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && coa3winfoofficer_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && coa3winfoofficer_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.coa3winfoofficer.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|