Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/coa3linfoofficer.script
T
2013-09-10 23:17:15 -07:00

713 lines
23 KiB
Plaintext

// ======================================================================
//
// coa3linfoofficer.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.36 - 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/coa3linfoofficer";
// ======================================================================
// Script Conditions
// ======================================================================
boolean coa3linfoofficer_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean coa3linfoofficer_condition_hasTalkToCoordinator (obj_id player, obj_id npc)
{
return (getIntObjVar (player, "coa3.convTracker") >= 101);
}
// ======================================================================
// Script Actions
// ======================================================================
void coa3linfoofficer_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 coa3linfoofficer_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: Hello there. I'd be happy to share information with you about what has transpired and the plan of action we've drawn up for dealing with this messy situation.
//-- [RESPONSE NOTE] objvar set to 102. Player can go back to coordinator now.
//-- PLAYER: What's the current situation?
if (response == "s_4372123c")
{
coa3linfoofficer_action_infoOfficerDone (player, npc);
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: The situation was bad and now it has gotten worse. If you haven't heard already, Dr. Vacca has made the decision to side with the enemy. They are now starting the production and testing of the Dead Eye serum in many hidden research facilities. The enemy is even making the prototype available to their followers.
string_id message = new string_id (c_stringFile, "s_ccc29df2");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Tell me more.
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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.coa3linfoofficer.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_34")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int coa3linfoofficer_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The situation was bad and now it has gotten worse. If you haven't heard already, Dr. Vacca has made the decision to side with the enemy. They are now starting the production and testing of the Dead Eye serum in many hidden research facilities. The enemy is even making the prototype available to their followers.
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more.
if (response == "s_159911f5")
{
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: One hurdle they 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. This is one fact that we will use to our advantage.
string_id message = new string_id (c_stringFile, "s_d3ee0e7f");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Won't Dead Eye just fizzle out eventually?
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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.coa3linfoofficer.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_30")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int coa3linfoofficer_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: One hurdle they 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. This is one fact that we will use to our advantage.
//-- [RESPONSE NOTE]
//-- PLAYER: Won't Dead Eye just fizzle out eventually?
if (response == "s_a318edbd")
{
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: Vacca won't give up so easily. As soon as the supply of Alderaanian Flora is gone, Dead Eye is no more so they are set on finding an alternative. They have set up a number of secret research facilities to produce the Dead Eye serum and more importantly for them, to find a substitute for the rare flora. However some recent developments have come to light that may make tracking down these facilities easier than they expect.
string_id message = new string_id (c_stringFile, "s_d6199fa3");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you mean?
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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.coa3linfoofficer.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_26")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int coa3linfoofficer_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Vacca won't give up so easily. As soon as the supply of Alderaanian Flora is gone, Dead Eye is no more so they are set on finding an alternative. They have set up a number of secret research facilities to produce the Dead Eye serum and more importantly for them, to find a substitute for the rare flora. However some recent developments have come to light that may make tracking down these facilities easier than they expect.
//-- [RESPONSE NOTE]
//-- PLAYER: What do you mean?
if (response == "s_77e48d5b")
{
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: Scum of the galaxy or not, you have to admire the intelligence work of 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. If we track who is buying the flora and where it is being shipped, that will lead us to their research facilities.
string_id message = new string_id (c_stringFile, "s_65f79c5d");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Was there anything else?
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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_1bf8e6d");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
utils.setScriptVar (player, "conversation.coa3linfoofficer.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_22")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int coa3linfoofficer_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 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. If we track who is buying the flora and where it is being shipped, that will lead us to their research facilities.
//-- [RESPONSE NOTE]
//-- PLAYER: Was there anything else?
if (response == "s_1bf8e6d")
{
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: Well another way we can hinder the production of Dead Eye is hitting their stores of the Alderaanian Flora directly. If we can get to the flora before they do, that is that much less of the serum that can be made and used against us and that much less they can experiment with to find an alternative flora. I think the coordinator has other more immediate plans for you right now though.
string_id message = new string_id (c_stringFile, "s_c326ad8f");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what can I do to help?
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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.coa3linfoofficer.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_18")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int coa3linfoofficer_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well another way we can hinder the production of Dead Eye is hitting their stores of the Alderaanian Flora directly. If we can get to the flora before they do, that is that much less of the serum that can be made and used against us and that much less they can experiment with to find an alternative flora. I think the coordinator has other more immediate plans for you right now though.
//-- [RESPONSE NOTE]
//-- PLAYER: So what can I do to help?
if (response == "s_e6eebf47")
{
//-- [NOTE]
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
//-- NPC: Why don't you go back and speak with the coordinator. He was analyzing some data that had to do with discovering the locations of these hidden research facilities. He's probably finished by now and he probably has some work for you to do so go back and talk to him.
string_id message = new string_id (c_stringFile, "s_3259a3bc");
utils.removeScriptVar (player, "conversation.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've heard enough.
if (response == "s_7b8e8204")
{
//-- [NOTE]
if (coa3linfoofficer_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.coa3linfoofficer.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.coa3linfoofficer");
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.coa3linfoofficer");
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 (coa3linfoofficer_condition_hasTalkToCoordinator (player, npc))
{
//-- NPC: Hello there. I'd be happy to share information with you about what has transpired and the plan of action we've drawn up for dealing with this messy situation.
string_id message = new string_id (c_stringFile, "s_a9479d34");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What's the current situation?
boolean hasResponse0 = false;
if (coa3linfoofficer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've heard enough.
boolean hasResponse1 = false;
if (coa3linfoofficer_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.coa3linfoofficer.branchId", 1);
npcStartConversation (player, npc, "coa3linfoofficer", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (coa3linfoofficer_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 != "coa3linfoofficer")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.coa3linfoofficer.branchId");
if (branchId == 1 && coa3linfoofficer_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && coa3linfoofficer_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && coa3linfoofficer_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && coa3linfoofficer_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && coa3linfoofficer_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && coa3linfoofficer_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.coa3linfoofficer.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================