mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1347 lines
44 KiB
Plaintext
1347 lines
44 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// death_watch_scientist.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/death_watch_scientist";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean death_watch_scientist_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int death_watch_scientist_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Don't shoot us! We're just technicians!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need information.
|
|
if (response == "s_5c9a6921")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Anything. You're not with--I thought you were--It's the look you see. You don't have the look in the eyes like they do. That stare...
|
|
string_id message = new string_id (c_stringFile, "s_6a31dcdf");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What are you talking about?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the armor. No more chatter.
|
|
boolean hasResponse1 = false;
|
|
if (death_watch_scientist_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_2313ac9e");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_63e494d6");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me what I want or I'll rip your heart out!
|
|
if (response == "s_499c388b")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You're just like them aren't you? You'd really do it. I think you'd kill me if I looked at you the wrong way. You shouldn't be here fighting the Death Watch. You should be signing up.
|
|
string_id message = new string_id (c_stringFile, "s_aabf00d1");
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Anything. You're not with--I thought you were--It's the look you see. You don't have the look in the eyes like they do. That stare...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What are you talking about?
|
|
if (response == "s_2313ac9e")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: These hooligans, this...Death Watch. They're like the Mandalorians. Oh it's so horrible. They threatened my daughter. They said they'd kill her if I didn't do what they said. I've been trapped here for...Oh my...I don't even know how long.
|
|
string_id message = new string_id (c_stringFile, "s_e45dce3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What about the armor? Can you tell me about that?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What did you mean about the eyes?
|
|
boolean hasResponse1 = false;
|
|
if (death_watch_scientist_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_e7b6a48e");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_504b2f50");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the armor. No more chatter.
|
|
if (response == "s_63e494d6")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course. It's what everyone wanted to know isn't it? The armor. Everyone wants something don't they?
|
|
string_id message = new string_id (c_stringFile, "s_ac332e1a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No more chatter.
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_6462ee3d");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: These hooligans, this...Death Watch. They're like the Mandalorians. Oh it's so horrible. They threatened my daughter. They said they'd kill her if I didn't do what they said. I've been trapped here for...Oh my...I don't even know how long.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What about the armor? Can you tell me about that?
|
|
if (response == "s_e7b6a48e")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course. It's what everyone wanted to know isn't it? The armor. Everyone wants something don't they?
|
|
string_id message = new string_id (c_stringFile, "s_ac332e1a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No more chatter.
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_6462ee3d");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What did you mean about the eyes?
|
|
if (response == "s_504b2f50")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The eyes of these men are dead. They frighten me. I don't think anything matters to them anymore but killing...
|
|
string_id message = new string_id (c_stringFile, "s_8ea92d7b");
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Of course. It's what everyone wanted to know isn't it? The armor. Everyone wants something don't they?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No more chatter.
|
|
if (response == "s_6462ee3d")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. What type are you trying to make? They're all different you know. They are broken up into three categories, however. Leggings, gloves, and the belt are a category to themselves. The bracers and the helmet are a second category. The third is the biceps, chest plate and boots. Which one are you looking for?
|
|
string_id message = new string_id (c_stringFile, "s_95833e54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Leggings, gloves, and belt.
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Bracers and helmet.
|
|
boolean hasResponse1 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Biceps, boots, and the chest plate.
|
|
boolean hasResponse2 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_be3bfbe9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_378814dd");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1a745122");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Very well. What type are you trying to make? They're all different you know. They are broken up into three categories, however. Leggings, gloves, and the belt are a category to themselves. The bracers and the helmet are a second category. The third is the biceps, chest plate and boots. Which one are you looking for?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Leggings, gloves, and belt.
|
|
if (response == "s_be3bfbe9")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah. You'll need a master tailor to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
string_id message = new string_id (c_stringFile, "s_e32f0a5b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What else?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_6789e90e");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Bracers and helmet.
|
|
if (response == "s_378814dd")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah. You'll need a master droid engineer to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
string_id message = new string_id (c_stringFile, "s_25d8aa7d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What else?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_27");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Biceps, boots, and the chest plate.
|
|
if (response == "s_1a745122")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah. You'll need a master armor smith to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
string_id message = new string_id (c_stringFile, "s_59959987");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What else?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_44");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. You'll need a master tailor to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What else?
|
|
if (response == "s_6789e90e")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
string_id message = new string_id (c_stringFile, "s_c8dd74ed");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I do once I have all this?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_58a0e26");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I do once I have all this?
|
|
if (response == "s_58a0e26")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the tailor, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
string_id message = new string_id (c_stringFile, "s_a7d1b9b8");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_e11df8ba");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the tailor, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
if (response == "s_e11df8ba")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
string_id message = new string_id (c_stringFile, "s_76196af");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do they do it?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_8d3d9470");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do they do it?
|
|
if (response == "s_8d3d9470")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To be honest, I'm not really sure. It's not teleportation, not really, though it's the beginnings of that technology. It would be wonderful to be able to study in that field, wouldn't it? But I digress. You have what you need from me. Now leave me to my work, please.
|
|
string_id message = new string_id (c_stringFile, "s_2f08b49c");
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. You'll need a master droid engineer to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What else?
|
|
if (response == "s_27")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I do once I have all this?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_31");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I do once I have all this?
|
|
if (response == "s_31")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the droid engineer, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
string_id message = new string_id (c_stringFile, "s_ef0cca06");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_34");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the droid engineer, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do they do it?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_38");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do they do it?
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To be honest, I'm not really sure. It's not teleportation, not really, though it's the beginnings of that technology. It would be wonderful to be able to study in that field, wouldn't it? But I digress. You have what you need from me. Now leave me to my work, please.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. You'll need a master armor smith to work the console. It's very simple really, as long as you have all the parts. You need the piece of armor you're converting...you do realize you can only convert the bounty hunter armor into Mandalorian armor don't you? Very good, very good. You'll need that piece first.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What else?
|
|
if (response == "s_44")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I do once I have all this?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_48");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alum, from the mines below. I don't know how you'll get that. You may have to talk to the miners down there. Just like us they are...slaves. And you'll need the two chemicals. The protective coating and the binary liquid. I honestly don't know where you can get any more of that. Our supply was cleaned out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I do once I have all this?
|
|
if (response == "s_48")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the armorsmith, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
string_id message = new string_id (c_stringFile, "s_4b6c9d58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_51");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Simple. You take it to the droids deeper inside the base. One droid for each category, you see? You give all the items to the droid, and then you'll need the armorsmith, a master of his craft, to work the controls. In fact, you'll need him just to get into the room. Once all the ingredients are given to the droid that's it. The piece will be made by the droid itself, and spit back out to your crafter. Assuming he works the terminal properly.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if he doesn't work it properly?
|
|
if (response == "s_51")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man, or woman, should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
string_id message = new string_id (c_stringFile, "s_14718ef0");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do they do it?
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_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_54");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int death_watch_scientist_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, the Death Watch are very clever about that indeed. If your man, or woman, should fail to complete the manufacturing process you and your entire group will be evacuated from the bunker. Quite clever indeed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do they do it?
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To be honest, I'm not really sure. It's not teleportation, not really, though it's the beginnings of that technology. It would be wonderful to be able to study in that field, wouldn't it? But I digress. You have what you need from me. Now leave me to my work, please.
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.death_watch_scientist");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable(self, true);
|
|
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.death_watch_scientist");
|
|
|
|
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 (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't shoot us! We're just technicians!
|
|
string_id message = new string_id (c_stringFile, "s_66da3f03");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need information.
|
|
boolean hasResponse0 = false;
|
|
if (death_watch_scientist_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me what I want or I'll rip your heart out!
|
|
boolean hasResponse1 = false;
|
|
if (death_watch_scientist_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_5c9a6921");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_499c388b");
|
|
|
|
utils.setScriptVar (player, "conversation.death_watch_scientist.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "death_watch_scientist", 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 != "death_watch_scientist")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
if (branchId == 1 && death_watch_scientist_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && death_watch_scientist_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && death_watch_scientist_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && death_watch_scientist_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && death_watch_scientist_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && death_watch_scientist_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && death_watch_scientist_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && death_watch_scientist_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && death_watch_scientist_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && death_watch_scientist_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && death_watch_scientist_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && death_watch_scientist_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && death_watch_scientist_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && death_watch_scientist_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && death_watch_scientist_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && death_watch_scientist_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && death_watch_scientist_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.death_watch_scientist.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|