mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-04 04:15:52 -04:00
1582 lines
46 KiB
Plaintext
1582 lines
46 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// talus_dearic_jana.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/talus_dearic_jana";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean talus_dearic_jana_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_dearic_jana_condition_onBetterGenetics (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "talus_nashal_better_genetics");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_dearic_jana_condition_notOnBetterGenetics (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActive(player, "talus_nashal_better_genetics");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_dearic_jana_condition_completeAdaptiveBiology (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "talus_dearic_adaptive_biology");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_dearic_jana_condition_onAdaptiveBiology (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "talus_dearic_adaptive_biology");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_dearic_jana_condition_returnAdaptiveBiology (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "talus_dearic_adaptive_biology", "adaptive_biology_signal_01_02");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void talus_dearic_jana_action_grantAdaptiveBiology (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "talus_dearic_adaptive_biology");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void talus_dearic_jana_action_signalAdaptiveBiology (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "adaptive_biology_signal_01_02");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int talus_dearic_jana_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I can't believe you did it. The entire base has been cleared.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Well, I took care of the mate. He won't be 'morphing' anytime soon.
|
|
if (response == "s_28")
|
|
{
|
|
doAnimationAction (player, "thumb_up");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
talus_dearic_jana_action_signalAdaptiveBiology (player, npc);
|
|
|
|
//-- NPC: You really are good at your job. here take this. I was saving it to sell later, but I don't think I want the responsibility of restarting this whole mess. You take it and do with it what you want.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Is this thing alive?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_30");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You really are good at your job. here take this. I was saving it to sell later, but I don't think I want the responsibility of restarting this whole mess. You take it and do with it what you want.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is this thing alive?
|
|
if (response == "s_30")
|
|
{
|
|
doAnimationAction (player, "wtf");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Alive but dormant. It won't hatch, but it's a queen egg, it has the potential to restart this entire process. Guard it well.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Right...
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_32");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alive but dormant. It won't hatch, but it's a queen egg, it has the potential to restart this entire process. Guard it well.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Right...
|
|
if (response == "s_32")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave1");
|
|
|
|
//-- NPC: Goodbye.
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Were you able to kill him?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you want me to kill again?
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: The queen's mate. I already told you!
|
|
string_id message = new string_id (c_stringFile, "s_25");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Could you tell me again?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_26");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The queen's mate. I already told you!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Could you tell me again?
|
|
if (response == "s_26")
|
|
{
|
|
doAnimationAction (player, "beckon");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
//-- NPC: He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_52");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: We designed him with adaptive biology. If he is the only arachne left, he can morph into a breeder. Even without a mate he can repopulate the species. It was a fail safe in case the rest of the product had been successfully eradicated.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very efficient of you.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_56");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What are you doing here?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've been sent by Agent Taarna of CorSec to investigate this facility.
|
|
if (response == "s_19")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: I must say, you're very good at your job. We only had the containment failure a few hours ago. How did you find out so fast.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I was dispatched to a crash site northeast of Nashal and the clues there led me here.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_36");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just passing through the area. What's going on here?
|
|
if (response == "s_64")
|
|
{
|
|
doAnimationAction (player, "explain");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: This lab has had a creature containment failure. They have overrun the facility. I don't know if there are survivors or not.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I could check for you.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yea, that's terrible, but as I was saying I'm just passing through.
|
|
boolean hasResponse1 = false;
|
|
if (talus_dearic_jana_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_68");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I must say, you're very good at your job. We only had the containment failure a few hours ago. How did you find out so fast.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I was dispatched to a crash site northeast of Nashal and the clues there led me here.
|
|
if (response == "s_36")
|
|
{
|
|
doAnimationAction (player, "point_away");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "squirm");
|
|
|
|
//-- NPC: You found the crew? How are they? I knew someone on the ship, his name was...
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No one survived. The creatures killed them all.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_40");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You found the crew? How are they? I knew someone on the ship, his name was...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No one survived. The creatures killed them all.
|
|
if (response == "s_40")
|
|
{
|
|
doAnimationAction (player, "shake_head_no");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
//-- NPC: I...I see. They'll kill us all too, you know.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to prevent that. I have orders to destroy them completely.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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.talus_dearic_jana.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I...I see. They'll kill us all too, you know.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to prevent that. I have orders to destroy them completely.
|
|
if (response == "s_44")
|
|
{
|
|
doAnimationAction (player, "explain");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "dismiss");
|
|
|
|
//-- NPC: You seem so confident, I'm not so sure you can kill them all.
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why do you say that?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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.talus_dearic_jana.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You seem so confident, I'm not so sure you can kill them all.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you say that?
|
|
if (response == "s_48")
|
|
{
|
|
doAnimationAction (player, "shrug_shoulders");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: The queen's mate. He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_52");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The queen's mate. He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: We designed him with adaptive biology. If he is the only arachne left, he can morph into a breeder. Even without a mate he can repopulate the species. It was a fail safe in case the rest of the product had been successfully eradicated.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very efficient of you.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_56");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We designed him with adaptive biology. If he is the only arachne left, he can morph into a breeder. Even without a mate he can repopulate the species. It was a fail safe in case the rest of the product had been successfully eradicated.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Very efficient of you.
|
|
if (response == "s_56")
|
|
{
|
|
doAnimationAction (player, "cough_polite");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: You must kill him as well. You will need help though.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will gather some allies and kill the mate.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_60");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You must kill him as well. You will need help though.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will gather some allies and kill the mate.
|
|
if (response == "s_60")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
talus_dearic_jana_action_grantAdaptiveBiology (player, npc);
|
|
|
|
//-- NPC: I hope you do, for all of our sakes.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This lab has had a creature containment failure. They have overrun the facility. I don't know if there are survivors or not.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I could check for you.
|
|
if (response == "s_68")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: I don't know about that. It's extremely dangerous.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I can take care of myself. What do you need done?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_72");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yea, that's terrible, but as I was saying I'm just passing through.
|
|
if (response == "s_84")
|
|
{
|
|
doAnimationAction (player, "dismiss");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
//-- NPC: Of course, better to leave this to the authorities. Goodbye.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I don't know about that. It's extremely dangerous.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can take care of myself. What do you need done?
|
|
if (response == "s_72")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Well, first off it's going to take more than just you. I suggest you find some help before taking this on.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Understood. So what is it we would be up against?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_76");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, first off it's going to take more than just you. I suggest you find some help before taking this on.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Understood. So what is it we would be up against?
|
|
if (response == "s_76")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_down");
|
|
|
|
//-- NPC: The base is being cleared by a CorSec crew, but I don't think they understand the power and strength of the queen's mate. I also don't think they understand his biological potential and may bypass him as an unnecessary risk.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What's so special about him?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_80");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The base is being cleared by a CorSec crew, but I don't think they understand the power and strength of the queen's mate. I also don't think they understand his biological potential and may bypass him as an unnecessary risk.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What's so special about him?
|
|
if (response == "s_80")
|
|
{
|
|
doAnimationAction (player, "shrug_shoulders");
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_52");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_dearic_jana_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: He is much larger and stronger than the rest. He was designed to be exceptionally durable. The queen is tough in her own right, but much of her mass we had to dedicate to reproductive functions. Her mate however, we could design to be almost entirely devoted to combat. I don't think any one man could take him down.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why does he matter? If I destroy the queen and her breeders, then he will eventually die without a mate to help propagate the species.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: We designed him with adaptive biology. If he is the only arachne left, he can morph into a breeder. Even without a mate he can repopulate the species. It was a fail safe in case the rest of the product had been successfully eradicated.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very efficient of you.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_56");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.talus_dearic_jana");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
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);
|
|
|
|
faceTo( self, player );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.talus_dearic_jana");
|
|
|
|
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 (talus_dearic_jana_condition_completeAdaptiveBiology (player, npc))
|
|
{
|
|
doAnimationAction (npc, "celebrate");
|
|
|
|
//-- NPC: You have saved all of Talus. You're a hero.
|
|
string_id message = new string_id (c_stringFile, "s_23");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition_returnAdaptiveBiology (player, npc))
|
|
{
|
|
doAnimationAction (npc, "clap_rousing");
|
|
|
|
//-- NPC: I can't believe you did it. The entire base has been cleared.
|
|
string_id message = new string_id (c_stringFile, "s_22");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Well, I took care of the mate. He won't be 'morphing' anytime soon.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_28");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "talus_dearic_jana", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition_onAdaptiveBiology (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
//-- NPC: Were you able to kill him?
|
|
string_id message = new string_id (c_stringFile, "s_21");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you want me to kill again?
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_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_24");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "talus_dearic_jana", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
//-- NPC: What are you doing here?
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've been sent by Agent Taarna of CorSec to investigate this facility.
|
|
boolean hasResponse0 = false;
|
|
if (talus_dearic_jana_condition_onBetterGenetics (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Just passing through the area. What's going on here?
|
|
boolean hasResponse1 = false;
|
|
if (talus_dearic_jana_condition_notOnBetterGenetics (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_19");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_dearic_jana.branchId", 9);
|
|
|
|
npcStartConversation (player, npc, "talus_dearic_jana", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_dearic_jana_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Look out for mutant spiders.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
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 != "talus_dearic_jana")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
if (branchId == 2 && talus_dearic_jana_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && talus_dearic_jana_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && talus_dearic_jana_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && talus_dearic_jana_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && talus_dearic_jana_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && talus_dearic_jana_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && talus_dearic_jana_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && talus_dearic_jana_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && talus_dearic_jana_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && talus_dearic_jana_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && talus_dearic_jana_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && talus_dearic_jana_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && talus_dearic_jana_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && talus_dearic_jana_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && talus_dearic_jana_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && talus_dearic_jana_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && talus_dearic_jana_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && talus_dearic_jana_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && talus_dearic_jana_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.talus_dearic_jana.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|