mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1761 lines
49 KiB
Plaintext
1761 lines
49 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_sera_jossi.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - 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/ep3_sera_jossi";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_sera_jossi_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_sera_jossi_condition_hasCompletedInitialQuests (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "ep3_sera_10_wookiee_teeth") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_sera_wrhisch_liver"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_sera_jossi_condition_hasCompleted10WookieeTeeth (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_sera_10_wookiee_teeth") && !groundquests.hasCompletedQuest(player, "ep3_sera_wrhisch_liver");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_sera_jossi_condition_isOnMyQuests (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isQuestActive(player, "ep3_sera_10_wookiee_teeth") ||
|
|
groundquests.isQuestActive(player, "ep3_sera_wrhisch_liver"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_sera_jossi_condition_isRroowDeliveryActive (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "ep3_rroow_sera_package_deliver");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_sera_jossi_action_GrantKill10Wookiee (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_sera_10_wookiee_teeth");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_sera_jossi_action_GrantCollectWrhischLiver (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_sera_wrhisch_liver");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_sera_jossi_action_sendDeliverComplete (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "signalRroowSeraDeliver");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_sera_jossi_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Please tell me Rroow sent you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, and I brought your lunch.
|
|
if (response == "s_149")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_belly");
|
|
|
|
//-- NPC: Oh thank you.
|
|
string_id message = new string_id (c_stringFile, "s_150");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rroow said something about a payment?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_151");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh thank you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rroow said something about a payment?
|
|
if (response == "s_151")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "smack_self");
|
|
|
|
ep3_sera_jossi_action_sendDeliverComplete (player, npc);
|
|
|
|
//-- NPC: Oh yes, here is your fee.
|
|
string_id message = new string_id (c_stringFile, "s_172");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It was no problem.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_173");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh yes, here is your fee.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It was no problem.
|
|
if (response == "s_173")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition_isRroowDeliveryActive (player, npc))
|
|
{
|
|
//-- NPC: Please tell me Rroow sent you.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, and I brought your lunch.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_149");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition_isOnMyQuests (player, npc))
|
|
{
|
|
//-- NPC: You look lost. I'm sure you can find them in the abandoned village, they all end up there eventually.
|
|
string_id message = new string_id (c_stringFile, "s_143");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!ep3_sera_jossi_condition_hasCompletedInitialQuests (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Hey there, are you new to Kashyyyk?
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, this is my first trip through the region.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What, Kashyyyk? No, come here all the time.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_60");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_82");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition_hasCompleted10WookieeTeeth (player, npc))
|
|
{
|
|
//-- NPC: Back so soon?
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: A question remained. You spoke of another way?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_194");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Be mindful of the inhabitants. Not all wookiees will be accommodating to strangers.
|
|
string_id message = new string_id (c_stringFile, "s_147");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey there, are you new to Kashyyyk?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, this is my first trip through the region.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well Kashyyyk can be a dangerous place if you don't know what you are doing.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's fine, I know how to take care of myself.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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.ep3_sera_jossi.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What, Kashyyyk? No, come here all the time.
|
|
if (response == "s_82")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumb_up");
|
|
|
|
//-- NPC: Great, I was wondering then if you could help me out with a quick task?
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What sort of thing did you have in mind?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_86");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well Kashyyyk can be a dangerous place if you don't know what you are doing.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's fine, I know how to take care of myself.
|
|
if (response == "s_72")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, if you are up to it I could use a bit of help.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What sort of thing did you have in mind?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I don't think I'm up for any work.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_76");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, if you are up to it I could use a bit of help.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What sort of thing did you have in mind?
|
|
if (response == "s_76")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
//-- NPC: There are some Wookiees down near an old abandoned village that have been stricken with madness. The Trandoshan invasion has had mixed results among the populace and this is just one sign.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds tragic to be sure, but what do you want me to do about it?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_90");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't think I'm up for any work.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's ok. But I'm here all day if you change your mind.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Great, I was wondering then if you could help me out with a quick task?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What sort of thing did you have in mind?
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
//-- NPC: There are some Wookiees down near an old abandoned village that have been stricken with madness. The Trandoshan invasion has had mixed results among the populace and this is just one sign.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds tragic to be sure, but what do you want me to do about it?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_90");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are some Wookiees down near an old abandoned village that have been stricken with madness. The Trandoshan invasion has had mixed results among the populace and this is just one sign.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds tragic to be sure, but what do you want me to do about it?
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: They are mad creatures and will attack anybody on sight. The Wookiees from Kachirho won't kill their own, the Trandoshans don't care about a Wookiee they can't enslave. There is a local bounty office that will pay you for proof of their destruction.
|
|
string_id message = new string_id (c_stringFile, "s_92");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: A bounty you say. How much?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Is there no other way?
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_94");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They are mad creatures and will attack anybody on sight. The Wookiees from Kachirho won't kill their own, the Trandoshans don't care about a Wookiee they can't enslave. There is a local bounty office that will pay you for proof of their destruction.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: A bounty you say. How much?
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "tap_head");
|
|
|
|
//-- NPC: Bounties pay 1000 per wookiee destroyed.The office has limited hunters to ten wookiees destroyed per hunter. And you must be able to prove their sickness.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How would I do that?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_98");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is there no other way?
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
//-- NPC: There is a wookiee in town named Cheyerooto. I understand he was a bio engineer of some renown on Chandrillia.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And he can cure them?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_120");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Bounties pay 1000 per wookiee destroyed.The office has limited hunters to ten wookiees destroyed per hunter. And you must be able to prove their sickness.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How would I do that?
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: When the madness sets in, their health erodes some. A common manifestation is in the teeth which will corrode quickly. Take a tooth from each wookiee you kill for proof.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will do it. Credits are always welcome.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: The taking of innocent lives is not for me. You may keep your blood money.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_102");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_106");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: When the madness sets in, their health erodes some. A common manifestation is in the teeth which will corrode quickly. Take a tooth from each wookiee you kill for proof.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will do it. Credits are always welcome.
|
|
if (response == "s_102")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_sera_jossi_action_GrantKill10Wookiee (player, npc);
|
|
|
|
//-- NPC: There is an abandoned Wookiee village to the north. They all end up there when the madness settles in. I do not know what the draw of this place is.
|
|
string_id message = new string_id (c_stringFile, "s_104");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The taking of innocent lives is not for me. You may keep your blood money.
|
|
if (response == "s_106")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is good to see someone with a pure heart these days. There is another way.
|
|
string_id message = new string_id (c_stringFile, "s_108");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me then what it is.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I have heard enough from you today, I will take my leave.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_110");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is good to see someone with a pure heart these days. There is another way.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me then what it is.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
//-- NPC: There is a wookiee in town named Cheyerooto. I understand he was a bio engineer of some renown on Chandrillia.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And he can cure them?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_120");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have heard enough from you today, I will take my leave.
|
|
if (response == "s_112")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I can understand. But be weary; you may have no desire to harm the wookiee, but they will not have the same regard for you.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is a wookiee in town named Cheyerooto. I understand he was a bio engineer of some renown on Chandrillia.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And he can cure them?
|
|
if (response == "s_120")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: He believes so. The anguish at their situation brings on a mental sickness. The sickness is perpetuated by physical ills in the afflicted wookiee. Dr. Cheyerooto believes that he can treat the symptoms and cure the mad wookiee.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What does he need me to do?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_124");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: He believes so. The anguish at their situation brings on a mental sickness. The sickness is perpetuated by physical ills in the afflicted wookiee. Dr. Cheyerooto believes that he can treat the symptoms and cure the mad wookiee.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does he need me to do?
|
|
if (response == "s_124")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There is a large wookiee down in a destroyed village called Wrhisch. He was one of the first to come under the sickness and is dying from the decay it causes. If you could put him out of his misery and bring his liver to the doctor, a cure might be found.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That seems a bit gruesome!
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_128");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is a large wookiee down in a destroyed village called Wrhisch. He was one of the first to come under the sickness and is dying from the decay it causes. If you could put him out of his misery and bring his liver to the doctor, a cure might be found.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That seems a bit gruesome!
|
|
if (response == "s_128")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is asking alot I know. But Wrhisch is dying already and his pain must be great. I can pay you 1000 for your services with Wrhisch, and the doctor can offer 9000 more when the task is complete.
|
|
string_id message = new string_id (c_stringFile, "s_130");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Again with the blood money.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_132");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is asking alot I know. But Wrhisch is dying already and his pain must be great. I can pay you 1000 for your services with Wrhisch, and the doctor can offer 9000 more when the task is complete.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Again with the blood money.
|
|
if (response == "s_132")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Some sacrifices are necessary for the overall good.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I understand. I will kill this Wrhisch, and Cheyerooto will have his medicine.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: There is no price on blood. Not for me.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_136");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Some sacrifices are necessary for the overall good.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I understand. I will kill this Wrhisch, and Cheyerooto will have his medicine.
|
|
if (response == "s_136")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_sera_jossi_action_GrantCollectWrhischLiver (player, npc);
|
|
|
|
//-- NPC: Thank you. Dr. Cheyerooto is in the medical center, you can speak with him when you have finished.
|
|
string_id message = new string_id (c_stringFile, "s_138");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: There is no price on blood. Not for me.
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good day then.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_sera_jossi_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Back so soon?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: A question remained. You spoke of another way?
|
|
if (response == "s_194")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
//-- NPC: There is a wookiee in town named Cheyerooto. I understand he was a bio engineer of some renown on Chandrillia.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And he can cure them?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_120");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_sera_jossi");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
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.ep3_sera_jossi");
|
|
|
|
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 (ep3_sera_jossi_condition_isRroowDeliveryActive (player, npc))
|
|
{
|
|
//-- NPC: Please tell me Rroow sent you.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, and I brought your lunch.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_149");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "ep3_sera_jossi", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition_isOnMyQuests (player, npc))
|
|
{
|
|
//-- NPC: You look lost. I'm sure you can find them in the abandoned village, they all end up there eventually.
|
|
string_id message = new string_id (c_stringFile, "s_143");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!ep3_sera_jossi_condition_hasCompletedInitialQuests (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Hey there, are you new to Kashyyyk?
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, this is my first trip through the region.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What, Kashyyyk? No, come here all the time.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_sera_jossi_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_60");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_82");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "ep3_sera_jossi", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition_hasCompleted10WookieeTeeth (player, npc))
|
|
{
|
|
//-- NPC: Back so soon?
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: A question remained. You spoke of another way?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_sera_jossi_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_194");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_sera_jossi.branchId", 24);
|
|
|
|
npcStartConversation (player, npc, "ep3_sera_jossi", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_sera_jossi_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Be mindful of the inhabitants. Not all wookiees will be accommodating to strangers.
|
|
string_id message = new string_id (c_stringFile, "s_147");
|
|
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 != "ep3_sera_jossi")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
if (branchId == 1 && ep3_sera_jossi_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && ep3_sera_jossi_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && ep3_sera_jossi_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_sera_jossi_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && ep3_sera_jossi_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && ep3_sera_jossi_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && ep3_sera_jossi_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && ep3_sera_jossi_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && ep3_sera_jossi_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && ep3_sera_jossi_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && ep3_sera_jossi_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && ep3_sera_jossi_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && ep3_sera_jossi_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && ep3_sera_jossi_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && ep3_sera_jossi_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && ep3_sera_jossi_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && ep3_sera_jossi_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && ep3_sera_jossi_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_sera_jossi.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|