mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-07 23:13:17 -04:00
1007 lines
29 KiB
Plaintext
1007 lines
29 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// talus_nashal_kiki.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.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/talus_nashal_kiki";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean talus_nashal_kiki_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_completeGotoKiki (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "talus_nashal_goto_kiki", "selonian_goto_kiki") ||
|
|
groundquests.hasCompletedQuest(player, "talus_nashal_goto_kiki");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_onFindRecon (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_recon_hill_1") ||
|
|
groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_recon_landin_pad") ||
|
|
groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_recon_hill_2") ||
|
|
groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_recon_hill_3"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_onReturnKiki1 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_return_kiki_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_onFindFlight (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_gather_missions") ||
|
|
groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_cargo_flight_plan") ||
|
|
groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_kiki_comm"));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_onReturnKiki2 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "talus_nashal_find_weakness", "selonian_return_kiki_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_completeFindWeakness (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "talus_nashal_find_weakness");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean talus_nashal_kiki_condition_completeGotoMother (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "talus_nashal_goto_mother");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void talus_nashal_kiki_action_grantFindWeakness (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "talus_nashal_find_weakness");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void talus_nashal_kiki_action_signalFindFlight (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "selonian_return_kiki_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void talus_nashal_kiki_action_signalCompleteFindWeakness (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "selonian_return_kiki_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void talus_nashal_kiki_action_grantGotoMother (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "talus_nashal_goto_mother");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void talus_nashal_kiki_action_signalTalkKiki (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "selonian_goto_kiki");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int talus_nashal_kiki_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Have you talked to the den mother yet?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, not yet.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
talus_nashal_kiki_action_grantGotoMother (player, npc);
|
|
|
|
//-- NPC: Please do. She is waiting for you.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unless you have obtained the smugglers' cargo ship flight plan, I have no desire to communicate with you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I managed to secure the flight plan you asked for.
|
|
if (response == "s_36")
|
|
{
|
|
doAnimationAction (player, "explain");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "expect_tip");
|
|
|
|
//-- NPC: Please upload it to my datapad now.
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Here you go.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need a bit more in compensation than was previously stated.
|
|
boolean hasResponse1 = false;
|
|
if (talus_nashal_kiki_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_39");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_40");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_nashal_kiki.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Please upload it to my datapad now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Here you go.
|
|
if (response == "s_39")
|
|
{
|
|
doAnimationAction (player, "paper");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
talus_nashal_kiki_action_signalCompleteFindWeakness (player, npc);
|
|
|
|
//-- NPC: This is the data I was looking for. You are a skilled individual. Here is the agreed upon payment for your services. The den mother would like to speak with you now.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will speak to her immediately.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_65");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_nashal_kiki.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need a bit more in compensation than was previously stated.
|
|
if (response == "s_40")
|
|
{
|
|
doAnimationAction (player, "expect_tip");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
talus_nashal_kiki_action_signalCompleteFindWeakness (player, npc);
|
|
|
|
//-- NPC: Unfortunately for you, I do not negotiate after the fact. The den mother would like to speak with you now.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why does she want to talk to me?
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_67");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_nashal_kiki.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This is the data I was looking for. You are a skilled individual. Here is the agreed upon payment for your services. The den mother would like to speak with you now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will speak to her immediately.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
talus_nashal_kiki_action_grantGotoMother (player, npc);
|
|
|
|
//-- NPC: That is acceptible.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unfortunately for you, I do not negotiate after the fact. The den mother would like to speak with you now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why does she want to talk to me?
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
talus_nashal_kiki_action_grantGotoMother (player, npc);
|
|
|
|
//-- NPC: That I would not know. Talk to her immediately.
|
|
string_id message = new string_id (c_stringFile, "s_68");
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What have you discovered?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am uploading my information to your datapad now.
|
|
if (response == "s_26")
|
|
{
|
|
doAnimationAction (player, "paper");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "paper");
|
|
|
|
doAnimationAction (player, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Three hills. All well guarded. An operations building connected to their landing pad. This information indicates that the only successful approach will be to infiltrate the buildings and find ways to end their efforts from the inside.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What would you have me do next, Advisor?
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_nashal_kiki.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Three hills. All well guarded. An operations building connected to their landing pad. This information indicates that the only successful approach will be to infiltrate the buildings and find ways to end their efforts from the inside.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What would you have me do next, Advisor?
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Slice the flight terminal in the operations building adjacent to the landing pad and return a cargo shuttle's flight plan to me. Before you leave, speak with my den mates to see what they need from the inside as well.
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Understood, Advisor. I will return when I've got that flight plan.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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.talus_nashal_kiki.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Slice the flight terminal in the operations building adjacent to the landing pad and return a cargo shuttle's flight plan to me. Before you leave, speak with my den mates to see what they need from the inside as well.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Understood, Advisor. I will return when I've got that flight plan.
|
|
if (response == "s_34")
|
|
{
|
|
doAnimationAction (player, "nod_head_multiple");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "dismiss");
|
|
|
|
talus_nashal_kiki_action_signalFindFlight (player, npc);
|
|
|
|
//-- NPC: Do not waste time and effort by returning before then.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am Kiki of the Dorente sept, advisor to the Neetha den mother. You have heard of our plight with the smugglers here on Talus?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I am here to help as I can.
|
|
if (response == "s_52")
|
|
{
|
|
doAnimationAction (player, "bow");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
doAnimationAction (player, "listen");
|
|
|
|
//-- NPC: We ask that you reconnoiter the smuggler base at the location I will give you and return here with what information you gather.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will return soon, Advisor.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_nashal_kiki.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int talus_nashal_kiki_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We ask that you reconnoiter the smuggler base at the location I will give you and return here with what information you gather.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will return soon, Advisor.
|
|
if (response == "s_56")
|
|
{
|
|
doAnimationAction (player, "nod");
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "survey");
|
|
|
|
talus_nashal_kiki_action_grantFindWeakness (player, npc);
|
|
|
|
//-- NPC: Here is the location. I would rather you returned when you have sufficient data rather than in a minimal amount of time.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
utils.removeScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.talus_nashal_kiki");
|
|
|
|
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_nashal_kiki");
|
|
|
|
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_nashal_kiki_condition_completeGotoMother (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: We are grateful for your work. If we have need of you again, we will contact you then.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_completeFindWeakness (player, npc))
|
|
{
|
|
//-- NPC: Have you talked to the den mother yet?
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No, not yet.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_47");
|
|
|
|
utils.setScriptVar (player, "conversation.talus_nashal_kiki.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "talus_nashal_kiki", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_onReturnKiki2 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_finger_warning");
|
|
|
|
//-- NPC: Unless you have obtained the smugglers' cargo ship flight plan, I have no desire to communicate with you.
|
|
string_id message = new string_id (c_stringFile, "s_9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I managed to secure the flight plan you asked for.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_nashal_kiki.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "talus_nashal_kiki", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_onFindFlight (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_finger_warning");
|
|
|
|
//-- NPC: Unless you have obtained the smugglers' cargo ship flight plan and completed my den mate's other requests, I have no purpose in communicating with you.
|
|
string_id message = new string_id (c_stringFile, "s_21");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_onReturnKiki1 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "beckon");
|
|
|
|
//-- NPC: What have you discovered?
|
|
string_id message = new string_id (c_stringFile, "s_23");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am uploading my information to your datapad now.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_nashal_kiki.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "talus_nashal_kiki", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_onFindRecon (player, npc))
|
|
{
|
|
doAnimationAction (npc, "dismiss");
|
|
|
|
//-- NPC: Insufficient time has passed for you to have reconnoitered the base to any useful degree. Conversation with you is pointless until you have.
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition_completeGotoKiki (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
doAnimationAction (player, "listen");
|
|
|
|
talus_nashal_kiki_action_signalTalkKiki (player, npc);
|
|
|
|
//-- NPC: I am Kiki of the Dorente sept, advisor to the Neetha den mother. You have heard of our plight with the smugglers here on Talus?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I am here to help as I can.
|
|
boolean hasResponse0 = false;
|
|
if (talus_nashal_kiki_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_nashal_kiki.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "talus_nashal_kiki", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (talus_nashal_kiki_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: I have no purpose in communicating with you, outsider.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
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_nashal_kiki")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.talus_nashal_kiki.branchId");
|
|
|
|
if (branchId == 2 && talus_nashal_kiki_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && talus_nashal_kiki_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && talus_nashal_kiki_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && talus_nashal_kiki_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && talus_nashal_kiki_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && talus_nashal_kiki_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && talus_nashal_kiki_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && talus_nashal_kiki_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && talus_nashal_kiki_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && talus_nashal_kiki_handleBranch17 (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_nashal_kiki.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|