mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
1362 lines
43 KiB
Plaintext
1362 lines
43 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_etyyy_chrilooc.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.money;
|
|
include library.space_quest;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_etyyy_chrilooc";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_etyyy_chrilooc_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_hasCompletedSmithQuest (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE of these quests are complete
|
|
return (groundquests.hasCompletedQuest(player, "ep3_hunt_chrilooc_seek_johnson"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_hasCompletedMedicalQuest (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE of this quest is complete
|
|
return (space_quest.hasWonQuest(player, "recovery", "ep3_hunting_chrilooc_medical_supplies"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_hasCompletedKerssocQuest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "ep3_hunt_chrilooc_seek_rodians", "chrilooc_talkToChrilooc") ||
|
|
groundquests.isTaskActive(player, "ep3_hunt_chrilooc_seek_rodians_02", "chrilooc_talkToChrilooc_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_isGettingMedicalSupplies (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE if the quest is active on the player
|
|
return (space_quest.hasQuest(player, "recovery", "ep3_hunting_chrilooc_medical_supplies"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_isSpeakingWithKerssoc (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE if the quest is active on the player
|
|
return groundquests.isTaskActive(player, "ep3_hunt_chrilooc_seek_rodians", "chrilooc_gainEtyyyEntry") ||
|
|
groundquests.isTaskActive(player, "ep3_hunt_chrilooc_seek_rodians_02", "chrilooc_gainEtyyyEntry_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_fromWrelaac (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "ep3_hunt_wrelaac_to_chrilooc");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_foundBrodyJohnson (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "ep3_hunt_johnson_brody_johnson");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_alreadyOnKerssocQuests (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "ep3_hunt_kerssoc_bantha_pelts") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_hunt_kerssoc_bantha_pelts");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_hasEtyyyAccess (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "ep3_hunt_kerssoc_enter_etyyy") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_hunt_kerssoc_enter_etyyy");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_failedGettingMedSupplies (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasFailedQuest(player, "recovery", "ep3_hunting_chrilooc_medical_supplies") ||
|
|
space_quest.hasAbortedQuest(player, "recovery", "ep3_hunting_chrilooc_medical_supplies");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_cannotSpeakWookiee (obj_id player, obj_id npc)
|
|
{
|
|
return utils.canSpeakWookiee(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_chrilooc_condition_alreadyHasSpaceMission (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest(player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_etyyy_chrilooc_action_speakWithSmith (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "chrilooc_talkToChrilooc");
|
|
groundquests.grantQuest(player, "ep3_hunt_chrilooc_seek_johnson");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_chrilooc_action_continueWithKerssoc (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_hunt_chrilooc_seek_rodians_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_chrilooc_action_getMedicalSupplies (obj_id player, obj_id npc)
|
|
{
|
|
if ( groundquests.isQuestActive(player, "ep3_hunt_wrelaac_to_chrilooc") )
|
|
{
|
|
groundquests.sendSignal(player, "wrelaac_talkToChrilooc");
|
|
}
|
|
|
|
space_quest.clearQuestFlags( player, "recovery", "ep3_hunting_chrilooc_medical_supplies" );
|
|
space_quest.grantQuest(player, "recovery", "ep3_hunting_chrilooc_medical_supplies");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_chrilooc_action_speakWithKerssoc (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_hunt_chrilooc_seek_rodians");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_chrilooc_action_thinkWookieeConfusion (obj_id player, obj_id npc)
|
|
{
|
|
utils.emoteWookieeConfusion (player, npc);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good, now that you can come and go from Etyyy, you can be of further service to me. And I can be of further service to you. West of the main Rodian hunting camp is a small compound being used by Arconans who are addicted to salt. Something about their physiology causes salt to be very addictive to Arconans. At this compound you'll find a colleague of mine named Johnson Smith.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Johnson Smith at the Arcona compound?
|
|
if (response == "s_372")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's right. Please help Johnson. He's not only helping those poor Arconans, but he is also overseeing a little project of mine. I'm certain he could use your help. Please do whatever you can for him. I think he will also have more information about the person you are looking for, Brody Johnson. So you see, if you seek him out, you help both of us.
|
|
string_id message = new string_id (c_stringFile, "s_374");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll go speak with Johnson Smith.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll go do that later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_376");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_380");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's right. Please help Johnson. He's not only helping those poor Arconans, but he is also overseeing a little project of mine. I'm certain he could use your help. Please do whatever you can for him. I think he will also have more information about the person you are looking for, Brody Johnson. So you see, if you seek him out, you help both of us.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll go speak with Johnson Smith.
|
|
if (response == "s_376")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_speakWithSmith (player, npc);
|
|
|
|
//-- NPC: Excellent. On your way then.
|
|
string_id message = new string_id (c_stringFile, "s_378");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll go do that later.
|
|
if (response == "s_380")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish.
|
|
string_id message = new string_id (c_stringFile, "s_382");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You need to gain access to the hunting grounds, Etyyy. Do whatever Kerssoc asks, and he should let you in.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Right. I'm working on it.
|
|
if (response == "s_386")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good luck.
|
|
string_id message = new string_id (c_stringFile, "s_388");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I appreciate your help in obtaining those medical supplies. In return I'll tell you what I know. I have a contact in the hunting grounds to the south known as Etyyy. I think he might have information about Brody Johnson. Yes, Brody spoke to me, but I can't say much more than that. My contact might know more, though, because I do know that Brody went to Etyyy.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do I get to these hunting grounds?
|
|
if (response == "s_392")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_alreadyOnKerssocQuests (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_continueWithKerssoc (player, npc);
|
|
|
|
//-- NPC: I've heard that you're already working with Kerssoc, a Rodian hunter near here. That's good. Continue with that. Kerssoc can grant you access to the hunting grounds. Once you've gained that, return and speak with me again. Oh, and don't let Kerssoc find out we've spoken. That could ruin everything.
|
|
string_id message = new string_id (c_stringFile, "s_394");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Etyyy is under the control of some Rodian hunters. They are very, very selective about who they let enter [*coughs*] their hunting grounds. To gain access, you'll need to speak with Kerssoc, a Rodian hunter at the small Rodian hunting camp near the gate to Etyyy.
|
|
string_id message = new string_id (c_stringFile, "s_396");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll go speak with Kerssoc.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind. I think I'll come back later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_398");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_402");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've already gained access to the hunting grounds from Kerssoc.
|
|
if (response == "s_406")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excellent. You're being able to travel to and from Etyyy will allow you to be of further service to me. And, of course, I can be of further service to you. West of the main Rodian hunting camp is a small compound being used by Arconans who are addicted to salt. Something about their physiology causes salt to be very addictive to Arconans. At this compound you'll find a colleague of mine named Johnson Smith.
|
|
string_id message = new string_id (c_stringFile, "s_408");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Johnson Smith at the Arcona compound?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_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_372");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ugh. More travel. Never mind.
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Giving up? I'm actually surprised. And disappointed. You could have been of use to me in Etyyy. Ah well, I guess it wasn't to be.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Etyyy is under the control of some Rodian hunters. They are very, very selective about who they let enter [*coughs*] their hunting grounds. To gain access, you'll need to speak with Kerssoc, a Rodian hunter at the small Rodian hunting camp near the gate to Etyyy.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll go speak with Kerssoc.
|
|
if (response == "s_398")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_speakWithKerssoc (player, npc);
|
|
|
|
//-- NPC: Follow the path east out of Kachirho, and you'll find them. Oh, and don't let Kerssoc know you've been talking to me. That will pretty much guarantee you won't get in.
|
|
string_id message = new string_id (c_stringFile, "s_400");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind. I think I'll come back later.
|
|
if (response == "s_402")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish. I'll be here.
|
|
string_id message = new string_id (c_stringFile, "s_404");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent. You're being able to travel to and from Etyyy will allow you to be of further service to me. And, of course, I can be of further service to you. West of the main Rodian hunting camp is a small compound being used by Arconans who are addicted to salt. Something about their physiology causes salt to be very addictive to Arconans. At this compound you'll find a colleague of mine named Johnson Smith.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Johnson Smith at the Arcona compound?
|
|
if (response == "s_372")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's right. Please help Johnson. He's not only helping those poor Arconans, but he is also overseeing a little project of mine. I'm certain he could use your help. Please do whatever you can for him. I think he will also have more information about the person you are looking for, Brody Johnson. So you see, if you seek him out, you help both of us.
|
|
string_id message = new string_id (c_stringFile, "s_374");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll go speak with Johnson Smith.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll go do that later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_376");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_380");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Look, we really need medical supplies. I'm going to have to insist that you help us with those. Maybe things didn't go so well last time, but you're simply going to have to try again if you want my assistance.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I understand. I'll try again.
|
|
if (response == "s_416")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_alreadyHasSpaceMission (player, npc))
|
|
{
|
|
//-- NPC: It looks like you already have a mission in space. Come back once you've completed that one.
|
|
string_id message = new string_id (c_stringFile, "s_418");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_getMedicalSupplies (player, npc);
|
|
|
|
//-- NPC: Very good. You can launch into space from the starport here in town. Return to me after the medical supplies have been secured by my people
|
|
string_id message = new string_id (c_stringFile, "s_420");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks. It's just too risky.
|
|
if (response == "s_422")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Guess you weren't serious about finding Brody Johnson. So be it.
|
|
string_id message = new string_id (c_stringFile, "s_424");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Launch into Kashyyyk space and intercept those medical supplies.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on my way.
|
|
if (response == "s_428")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Return when you are done.
|
|
string_id message = new string_id (c_stringFile, "s_430");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What do you want? I have no patience or time for... ah, I see. You're looking for Brody Johnson. I'm sorry. I have nothing to say on that subject.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Are you sure? Wrelaac said Brody spoke to you.
|
|
if (response == "s_434")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes, I'm... wait, come to think of it, you may be of use to me. I do remember Brody Johnson and would be willing to help you if in exchange you are willing to help me.
|
|
string_id message = new string_id (c_stringFile, "s_436");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay, what do you want me to do?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_438");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_452");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh, that's too bad. Never mind.
|
|
if (response == "s_456")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right. Good bye.
|
|
string_id message = new string_id (c_stringFile, "s_458");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, I'm... wait, come to think of it, you may be of use to me. I do remember Brody Johnson and would be willing to help you if in exchange you are willing to help me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay, what do you want me to do?
|
|
if (response == "s_438")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I and my associates are in need of medical supplies. Times are especially tough at the moment, and one cannot be overly prepared. But we lack the resources necessary to get them via the normal channels. Therefore, I want you to intercept a shipment of supplies inbound to the Kashyyyk system. You'll be relieving some Gotal bandits of them. And trust me, those bandits didn't pay for those supplies either.
|
|
string_id message = new string_id (c_stringFile, "s_440");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very well. I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks. Sounds too risky.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_442");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_448");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_452")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you wish. Farewell.
|
|
string_id message = new string_id (c_stringFile, "s_454");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_chrilooc_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I and my associates are in need of medical supplies. Times are especially tough at the moment, and one cannot be overly prepared. But we lack the resources necessary to get them via the normal channels. Therefore, I want you to intercept a shipment of supplies inbound to the Kashyyyk system. You'll be relieving some Gotal bandits of them. And trust me, those bandits didn't pay for those supplies either.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Very well. I'll do it.
|
|
if (response == "s_442")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_alreadyHasSpaceMission (player, npc))
|
|
{
|
|
//-- NPC: It looks like you already have a mission in space. Come back once you've completed that one.
|
|
string_id message = new string_id (c_stringFile, "s_444");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_getMedicalSupplies (player, npc);
|
|
|
|
//-- NPC: Very good. You can launch into space from the starport here in town. Return to me after the medical supplies have been secured by my people.
|
|
string_id message = new string_id (c_stringFile, "s_446");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks. Sounds too risky.
|
|
if (response == "s_448")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Guess you weren't serious about finding Brody Johnson. So be it.
|
|
string_id message = new string_id (c_stringFile, "s_450");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_etyyy_chrilooc");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_etyyy_chrilooc");
|
|
|
|
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_etyyy_chrilooc_condition_cannotSpeakWookiee (player, npc))
|
|
{
|
|
ep3_etyyy_chrilooc_action_thinkWookieeConfusion (player, npc);
|
|
|
|
//-- NPC: Sacwo wwoorwocsc oacanan wwwohwor rwo sacwo craccwo. Wwwohwor. Rhas sacwor oaraww rwooaooccwo ooharc rarrraacww.
|
|
string_id message = new string_id (c_stringFile, "s_364");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_foundBrodyJohnson (player, npc))
|
|
{
|
|
//-- NPC: So you discovered the truth, eh? Makes no real difference to me. I never understood why Brody would want to pretend he was dead anyway. Strange one, that human. But useful in his own way.
|
|
string_id message = new string_id (c_stringFile, "s_366");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_hasCompletedSmithQuest (player, npc))
|
|
{
|
|
//-- NPC: You've spoken to Johnson Smith? Good. I'm sure he can help you locate Brody. And please help him with the other matters he asks of you.
|
|
string_id message = new string_id (c_stringFile, "s_368");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_hasCompletedKerssocQuest (player, npc))
|
|
{
|
|
//-- NPC: Good, now that you can come and go from Etyyy, you can be of further service to me. And I can be of further service to you. West of the main Rodian hunting camp is a small compound being used by Arconans who are addicted to salt. Something about their physiology causes salt to be very addictive to Arconans. At this compound you'll find a colleague of mine named Johnson Smith.
|
|
string_id message = new string_id (c_stringFile, "s_370");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Johnson Smith at the Arcona compound?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_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_372");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_isSpeakingWithKerssoc (player, npc))
|
|
{
|
|
//-- NPC: You need to gain access to the hunting grounds, Etyyy. Do whatever Kerssoc asks, and he should let you in.
|
|
string_id message = new string_id (c_stringFile, "s_384");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Right. I'm working on it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_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_386");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_hasCompletedMedicalQuest (player, npc))
|
|
{
|
|
//-- NPC: I appreciate your help in obtaining those medical supplies. In return I'll tell you what I know. I have a contact in the hunting grounds to the south known as Etyyy. I think he might have information about Brody Johnson. Yes, Brody spoke to me, but I can't say much more than that. My contact might know more, though, because I do know that Brody went to Etyyy.
|
|
string_id message = new string_id (c_stringFile, "s_390");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do I get to these hunting grounds?
|
|
boolean hasResponse0 = false;
|
|
if (!ep3_etyyy_chrilooc_condition_hasEtyyyAccess (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've already gained access to the hunting grounds from Kerssoc.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_condition_hasEtyyyAccess (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Ugh. More travel. Never mind.
|
|
boolean hasResponse2 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_392");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_406");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_failedGettingMedSupplies (player, npc))
|
|
{
|
|
//-- NPC: Look, we really need medical supplies. I'm going to have to insist that you help us with those. Maybe things didn't go so well last time, but you're simply going to have to try again if you want my assistance.
|
|
string_id message = new string_id (c_stringFile, "s_414");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I understand. I'll try again.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks. It's just too risky.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_416");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_422");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 17);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_isGettingMedicalSupplies (player, npc))
|
|
{
|
|
//-- NPC: Launch into Kashyyyk space and intercept those medical supplies.
|
|
string_id message = new string_id (c_stringFile, "s_426");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_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_428");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 21);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition_fromWrelaac (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: What do you want? I have no patience or time for... ah, I see. You're looking for Brody Johnson. I'm sorry. I have nothing to say on that subject.
|
|
string_id message = new string_id (c_stringFile, "s_432");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Are you sure? Wrelaac said Brody spoke to you.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Oh, that's too bad. Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_chrilooc_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_434");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_456");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId", 23);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_chrilooc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_chrilooc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The forests will never be the same. Never. But they can become ours again.
|
|
string_id message = new string_id (c_stringFile, "s_460");
|
|
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_etyyy_chrilooc")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_etyyy_chrilooc.branchId");
|
|
|
|
if (branchId == 4 && ep3_etyyy_chrilooc_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_etyyy_chrilooc_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && ep3_etyyy_chrilooc_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && ep3_etyyy_chrilooc_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && ep3_etyyy_chrilooc_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && ep3_etyyy_chrilooc_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && ep3_etyyy_chrilooc_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && ep3_etyyy_chrilooc_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && ep3_etyyy_chrilooc_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && ep3_etyyy_chrilooc_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && ep3_etyyy_chrilooc_handleBranch25 (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_etyyy_chrilooc.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|