mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
840 lines
23 KiB
Plaintext
840 lines
23 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// nym_technician_3.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.25 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.space_flags;
|
|
include library.space_quest;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/nym_technician_3";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean nym_technician_3_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean nym_technician_3_condition_isOnStormSquadronQuest (obj_id player, obj_id npc)
|
|
{
|
|
return space_flags.hasSpaceFlag(player, "ss.findingAgent");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean nym_technician_3_condition_isHuntingShip (obj_id player, obj_id npc)
|
|
{
|
|
return space_flags.hasSpaceFlag(player, "ss.huntingShip");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean nym_technician_3_condition_isOnQuest (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest( player, "assassinate", "imperial_ss_3" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean nym_technician_3_condition_questDone (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasCompletedQuest( player, "assassinate", "imperial_ss_3" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean nym_technician_3_condition_failedQuest (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasFailedQuest( player, "assassinate", "imperial_ss_3" ) ||
|
|
space_quest.hasAbortedQuest( player, "assassinate", "imperial_ss_3" ) );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void nym_technician_3_action_grantAssassinateMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "assassinate", "imperial_ss_3" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int nym_technician_3_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You again? I don't have time to help you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where did you say the Kimogila's Claw was?
|
|
if (response == "s_248faf8a")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
nym_technician_3_action_grantAssassinateMission (player, npc);
|
|
|
|
//-- NPC: Are you an idiot? The Claw's already long gone. Somewhere in the Lok system, but I have no idea where.
|
|
string_id message = new string_id (c_stringFile, "s_e8060558");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh yeah...
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_d65e601b");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you an idiot? The Claw's already long gone. Somewhere in the Lok system, but I have no idea where.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh yeah...
|
|
if (response == "s_d65e601b")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You're strange.
|
|
string_id message = new string_id (c_stringFile, "s_a8162c2");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Can I help you? This is a restricted area right now. We've had a lot of damaged ships come in and this area is cordoned off for repairs.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh, I had no idea.
|
|
if (response == "s_8804f6ee")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Look, if you're a pilot, you can check on your ship later. Most of these are going to be junk, but we might be able to save a few.
|
|
string_id message = new string_id (c_stringFile, "s_544505bd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Uh, okay I'll do that.
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_1ebf6580");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to clean the antimatter condenser.
|
|
if (response == "s_67a590c3")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are? You're ahead of schedule. Our condenser has been working fine as far as I can tell. The thing isn't scheduled for maintenance for five cycles. Why don't you just clear out and let me focus on my repairs?
|
|
string_id message = new string_id (c_stringFile, "s_54711fd3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh yeah. Um, sorry about that.
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_88d98675");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to scrub the plasma injector.
|
|
if (response == "s_62f865dd")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Huh? Is that some kind of pilot slang? I'm not that kind of girl.
|
|
string_id message = new string_id (c_stringFile, "s_cf08b4c6");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh, I thought...
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_cbc1d532");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to wax the matter inducer.
|
|
if (response == "s_f49a789f")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's really disgusting. You pilots are all the same.
|
|
string_id message = new string_id (c_stringFile, "s_6da31acb");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The fuel balance on the Kimogila's Claw is messed up.
|
|
if (response == "s_7002e5c4")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What? No way. I checked the Claw myself before it left. The balance is perfect.
|
|
string_id message = new string_id (c_stringFile, "s_debe2412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: The ship already left?
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_4d5276b");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Look, if you're a pilot, you can check on your ship later. Most of these are going to be junk, but we might be able to save a few.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uh, okay I'll do that.
|
|
if (response == "s_1ebf6580")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Can you clear out now? This is hard enough without distractions.
|
|
string_id message = new string_id (c_stringFile, "s_7e5b1e91");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are? You're ahead of schedule. Our condenser has been working fine as far as I can tell. The thing isn't scheduled for maintenance for five cycles. Why don't you just clear out and let me focus on my repairs?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh yeah. Um, sorry about that.
|
|
if (response == "s_88d98675")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No problem. Just tell your boss you cleaned the condenser and come back in five cycles.
|
|
string_id message = new string_id (c_stringFile, "s_5fcdd10d");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Huh? Is that some kind of pilot slang? I'm not that kind of girl.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh, I thought...
|
|
if (response == "s_cbc1d532")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You thought WHAT? Get lost or I'll yell.
|
|
string_id message = new string_id (c_stringFile, "s_6e00532f");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What? No way. I checked the Claw myself before it left. The balance is perfect.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The ship already left?
|
|
if (response == "s_4d5276b")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
nym_technician_3_action_grantAssassinateMission (player, npc);
|
|
|
|
//-- NPC: Yeah, so there's nothing you can do about the fuel balance. Who are you anyway? You here to clean the antimatter condenser?
|
|
string_id message = new string_id (c_stringFile, "s_69e50906");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Never mind, I have to go.
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_52fbe706");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int nym_technician_3_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yeah, so there's nothing you can do about the fuel balance. Who are you anyway? You here to clean the antimatter condenser?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind, I have to go.
|
|
if (response == "s_52fbe706")
|
|
{
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whatever.
|
|
string_id message = new string_id (c_stringFile, "s_c1013aa7");
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.nym_technician_3");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
|
|
faceTo( self, player );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.nym_technician_3");
|
|
|
|
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 (nym_technician_3_condition_questDone (player, npc))
|
|
{
|
|
//-- NPC: You again? I don't have time to help you.
|
|
string_id message = new string_id (c_stringFile, "s_e32d36db");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition_failedQuest (player, npc))
|
|
{
|
|
//-- NPC: You again? I don't have time to help you.
|
|
string_id message = new string_id (c_stringFile, "s_e32d36db");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where did you say the Kimogila's Claw was?
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_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_248faf8a");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "nym_technician_3", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition_isOnQuest (player, npc))
|
|
{
|
|
//-- NPC: You again? I don't have time to help you.
|
|
string_id message = new string_id (c_stringFile, "s_e32d36db");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Can I help you? This is a restricted area right now. We've had a lot of damaged ships come in and this area is cordoned off for repairs.
|
|
string_id message = new string_id (c_stringFile, "s_76b02ea3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh, I had no idea.
|
|
boolean hasResponse0 = false;
|
|
if (nym_technician_3_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm here to clean the antimatter condenser.
|
|
boolean hasResponse1 = false;
|
|
if (nym_technician_3_condition_isOnStormSquadronQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm here to scrub the plasma injector.
|
|
boolean hasResponse2 = false;
|
|
if (nym_technician_3_condition_isOnStormSquadronQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm here to wax the matter inducer.
|
|
boolean hasResponse3 = false;
|
|
if (nym_technician_3_condition_isOnStormSquadronQuest (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: The fuel balance on the Kimogila's Claw is messed up.
|
|
boolean hasResponse4 = false;
|
|
if (nym_technician_3_condition_isHuntingShip (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8804f6ee");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_67a590c3");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62f865dd");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_f49a789f");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_7002e5c4");
|
|
|
|
setObjVar (player, "conversation.nym_technician_3.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "nym_technician_3", 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 != "nym_technician_3")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
if (branchId == 2 && nym_technician_3_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && nym_technician_3_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && nym_technician_3_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && nym_technician_3_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && nym_technician_3_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && nym_technician_3_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && nym_technician_3_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && nym_technician_3_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.nym_technician_3.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|