Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/nym_technician_1.script
T

1192 lines
34 KiB
Plaintext

// ======================================================================
//
// nym_technician_1.script
//
//
//
// 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_1";
// ======================================================================
// Script Conditions
// ======================================================================
boolean nym_technician_1_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean nym_technician_1_condition_isOnMission (obj_id player, obj_id npc)
{
return space_flags.hasSpaceFlag(player, "ss.findingAgent");
}
// ----------------------------------------------------------------------
boolean nym_technician_1_condition_isHuntingShip (obj_id player, obj_id npc)
{
return space_flags.hasSpaceFlag(player, "ss.huntingShip");
}
// ----------------------------------------------------------------------
boolean nym_technician_1_condition_hasCompletedMission (obj_id player, obj_id npc)
{
return space_quest.hasWonQuest( player, "assassinate", "imperial_ss_3" );
}
// ----------------------------------------------------------------------
boolean nym_technician_1_condition_hasReceivedReward2 (obj_id player, obj_id npc)
{
return space_quest.hasReceivedReward( player, "assassinate", "imperial_ss_3" );
}
// ----------------------------------------------------------------------
boolean nym_technician_1_condition_hasFailedKimogilaClaw (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_1_action_setHuntingShip (obj_id player, obj_id npc)
{
space_flags.removeSpaceFlag(player, "ss.findingAgent");
space_flags.setSpaceFlag(player, "ss.huntingShip", 1);
}
// ----------------------------------------------------------------------
void nym_technician_1_action_setAssassinateMission (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_1_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What are you doing back here? Didn't I tell you to take off or you would blow my cover?
//-- [RESPONSE NOTE]
//-- PLAYER: I failed in my attempt to destroy the Kimogila's Claw.
if (response == "s_7d114e8")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
nym_technician_1_action_setAssassinateMission (player, npc);
//-- NPC: Shhhhh. What are you telling me for? I don't want to know anything about that. All I can tell you is if you are going to try to blow up a ship full of Nym's men, you better not stop until you succeed. Now beat it.
string_id message = new string_id (c_stringFile, "s_ccc1622");
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You better take off or you'll blow my cover.
//-- [RESPONSE NOTE]
//-- PLAYER: I destroyed the Kimogila's Claw.
if (response == "s_fdee07ad")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: You did? Excellent. High Command will be pleased. You should try to get off Lok as soon as possible. Inform the Fleet of your success.
string_id message = new string_id (c_stringFile, "s_51f0669b");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm going there now.
boolean hasResponse0 = false;
if (nym_technician_1_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_b8779a78");
setObjVar (player, "conversation.nym_technician_1.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You did? Excellent. High Command will be pleased. You should try to get off Lok as soon as possible. Inform the Fleet of your success.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going there now.
if (response == "s_b8779a78")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: I'll be fine here. I think I'm still in the clear.
string_id message = new string_id (c_stringFile, "s_a84adf58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Good luck.
boolean hasResponse0 = false;
if (nym_technician_1_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_90422eb5");
setObjVar (player, "conversation.nym_technician_1.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'll be fine here. I think I'm still in the clear.
//-- [RESPONSE NOTE]
//-- PLAYER: Good luck.
if (response == "s_90422eb5")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: You too.
string_id message = new string_id (c_stringFile, "s_39510e77");
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'm really busy at the moment. Five wrecks and three borderline cases so far today. The Empire is really bringing it to Nym. I've got to get that blaster cylinder back online and it's probably going to take all day.
//-- [RESPONSE NOTE]
//-- PLAYER: Oh, don't let me get in your way.
if (response == "s_ced0fec8")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: I won't. You should probably take off, this area is supposed to be cordoned off.
string_id message = new string_id (c_stringFile, "s_aae05f6b");
removeObjVar (player, "conversation.nym_technician_1.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_1_condition__defaultCondition (player, npc))
{
//-- NPC: What did you say?
string_id message = new string_id (c_stringFile, "s_8d9eefec");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to clean the antimatter condenser.
boolean hasResponse0 = false;
if (nym_technician_1_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_67a590c3");
setObjVar (player, "conversation.nym_technician_1.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.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_1_condition__defaultCondition (player, npc))
{
//-- NPC: Sorry, you've got the wrong guy. I don't handle engine work.
string_id message = new string_id (c_stringFile, "s_dce481f1");
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to wax the matter infuser.
if (response == "s_35de4fcc")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: You're here to...huh?
string_id message = new string_id (c_stringFile, "s_135c7b04");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Never mind.
boolean hasResponse0 = false;
if (nym_technician_1_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_169df3bb");
setObjVar (player, "conversation.nym_technician_1.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What did you say?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to clean the antimatter condenser.
if (response == "s_67a590c3")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: Shh! Quiet. I can't believe the Empire sent someone here after what happened to the other agents.
string_id message = new string_id (c_stringFile, "s_66c37cce");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to find out Nym's plans.
boolean hasResponse0 = false;
if (nym_technician_1_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_37dad091");
setObjVar (player, "conversation.nym_technician_1.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Shh! Quiet. I can't believe the Empire sent someone here after what happened to the other agents.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to find out Nym's plans.
if (response == "s_37dad091")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: Well, you've probably only managed to blow my cover! Nym doesn't have any plans. He's too busy putting out fires and keeping his upper leadership from falling apart. The pressure the Empire has been putting on the organization has really started to test Nym's leadership.
string_id message = new string_id (c_stringFile, "s_42e8bcae");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Your report indicated a possible attack...
boolean hasResponse0 = false;
if (nym_technician_1_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_395d4c4");
setObjVar (player, "conversation.nym_technician_1.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, you've probably only managed to blow my cover! Nym doesn't have any plans. He's too busy putting out fires and keeping his upper leadership from falling apart. The pressure the Empire has been putting on the organization has really started to test Nym's leadership.
//-- [RESPONSE NOTE]
//-- PLAYER: Your report indicated a possible attack...
if (response == "s_395d4c4")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: Nym wants to organize something. Push the Empire back so he can start rebuilding. He's probably here for the long haul, but the Empire's assaults have definitely made him less likely to support the Rebels openly.
string_id message = new string_id (c_stringFile, "s_ed4d7aa6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what is he trying to organize?
boolean hasResponse0 = false;
if (nym_technician_1_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_536a83dc");
setObjVar (player, "conversation.nym_technician_1.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Nym wants to organize something. Push the Empire back so he can start rebuilding. He's probably here for the long haul, but the Empire's assaults have definitely made him less likely to support the Rebels openly.
//-- [RESPONSE NOTE]
//-- PLAYER: So what is he trying to organize?
if (response == "s_536a83dc")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: I don't know. He's called for five of his captains to meet and work out details for a massive response. They're preparing to leave soon on a YT-1300. The plan is to review the damage to Nym's fleet and then discuss how best to proceed...
string_id message = new string_id (c_stringFile, "s_9518acb5");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: YT-1300? If I can find that ship...
boolean hasResponse0 = false;
if (nym_technician_1_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_c70b951e");
setObjVar (player, "conversation.nym_technician_1.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I don't know. He's called for five of his captains to meet and work out details for a massive response. They're preparing to leave soon on a YT-1300. The plan is to review the damage to Nym's fleet and then discuss how best to proceed...
//-- [RESPONSE NOTE]
//-- PLAYER: YT-1300? If I can find that ship...
if (response == "s_c70b951e")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: You could lobotomize Nym's command structure. Nym wouldn't have much of a chance to mount any kind of significant response if that happened.
string_id message = new string_id (c_stringFile, "s_d724a599");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How can I find that ship?
boolean hasResponse0 = false;
if (nym_technician_1_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_81e175a9");
setObjVar (player, "conversation.nym_technician_1.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You could lobotomize Nym's command structure. Nym wouldn't have much of a chance to mount any kind of significant response if that happened.
//-- [RESPONSE NOTE]
//-- PLAYER: How can I find that ship?
if (response == "s_81e175a9")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
nym_technician_1_action_setHuntingShip (player, npc);
//-- NPC: There is another fuel technician that might know. She's should be around here somewhere. Pretty Zabrak, no tattoos, won't come with me to the cantina. You shouldn't have any trouble finding her. Tell her that you think the fuel balance on the 'Kimogila's Claw' is wrong and you need to check it. That should get you access to the ship.
string_id message = new string_id (c_stringFile, "s_3b4b03fd");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks. You better get out of here.
boolean hasResponse0 = false;
if (nym_technician_1_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_e15acd61");
setObjVar (player, "conversation.nym_technician_1.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There is another fuel technician that might know. She's should be around here somewhere. Pretty Zabrak, no tattoos, won't come with me to the cantina. You shouldn't have any trouble finding her. Tell her that you think the fuel balance on the 'Kimogila's Claw' is wrong and you need to check it. That should get you access to the ship.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks. You better get out of here.
if (response == "s_e15acd61")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: I can't leave without authorization from command.
string_id message = new string_id (c_stringFile, "s_3e5e55b6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Then keep your head down.
boolean hasResponse0 = false;
if (nym_technician_1_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_5c3323fd");
setObjVar (player, "conversation.nym_technician_1.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I can't leave without authorization from command.
//-- [RESPONSE NOTE]
//-- PLAYER: Then keep your head down.
if (response == "s_5c3323fd")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: You don't have to tell me twice. Good luck.
string_id message = new string_id (c_stringFile, "s_273b318b");
removeObjVar (player, "conversation.nym_technician_1.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_technician_1_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You're here to...huh?
//-- [RESPONSE NOTE]
//-- PLAYER: Never mind.
if (response == "s_169df3bb")
{
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: This area is supposed to be cordoned off.
string_id message = new string_id (c_stringFile, "s_2d587639");
removeObjVar (player, "conversation.nym_technician_1.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_1");
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_1");
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_1_condition_hasFailedKimogilaClaw (player, npc))
{
//-- NPC: What are you doing back here? Didn't I tell you to take off or you would blow my cover?
string_id message = new string_id (c_stringFile, "s_e727edeb");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I failed in my attempt to destroy the Kimogila's Claw.
boolean hasResponse0 = false;
if (nym_technician_1_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_7d114e8");
setObjVar (player, "conversation.nym_technician_1.branchId", 1);
npcStartConversation (player, npc, "nym_technician_1", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_technician_1_condition_hasReceivedReward2 (player, npc))
{
//-- NPC: You better take off or you'll blow my cover.
string_id message = new string_id (c_stringFile, "s_3345f404");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_technician_1_condition_hasCompletedMission (player, npc))
{
//-- NPC: You better take off or you'll blow my cover.
string_id message = new string_id (c_stringFile, "s_3345f404");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I destroyed the Kimogila's Claw.
boolean hasResponse0 = false;
if (nym_technician_1_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_fdee07ad");
setObjVar (player, "conversation.nym_technician_1.branchId", 4);
npcStartConversation (player, npc, "nym_technician_1", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_technician_1_condition_isHuntingShip (player, npc))
{
//-- NPC: You better take off or you'll blow my cover.
string_id message = new string_id (c_stringFile, "s_3345f404");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_technician_1_condition__defaultCondition (player, npc))
{
//-- NPC: I'm really busy at the moment. Five wrecks and three borderline cases so far today. The Empire is really bringing it to Nym. I've got to get that blaster cylinder back online and it's probably going to take all day.
string_id message = new string_id (c_stringFile, "s_ccc723ff");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Oh, don't let me get in your way.
boolean hasResponse0 = false;
if (nym_technician_1_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm here to clean the antimatter condenser.
boolean hasResponse1 = false;
if (nym_technician_1_condition_isOnMission (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm here to scrub the plasma injector.
boolean hasResponse2 = false;
if (nym_technician_1_condition_isOnMission (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I'm here to wax the matter infuser.
boolean hasResponse3 = false;
if (nym_technician_1_condition_isOnMission (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_ced0fec8");
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_35de4fcc");
setObjVar (player, "conversation.nym_technician_1.branchId", 9);
npcStartConversation (player, npc, "nym_technician_1", 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_1")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = getIntObjVar (player, "conversation.nym_technician_1.branchId");
if (branchId == 1 && nym_technician_1_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && nym_technician_1_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && nym_technician_1_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && nym_technician_1_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && nym_technician_1_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && nym_technician_1_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && nym_technician_1_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && nym_technician_1_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && nym_technician_1_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && nym_technician_1_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && nym_technician_1_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && nym_technician_1_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && nym_technician_1_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && nym_technician_1_handleBranch21 (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_1.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================