mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
857 lines
26 KiB
Plaintext
857 lines
26 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// reelo_baruk.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/reelo_baruk";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean reelo_baruk_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_completedReelosQuests (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedQuest (player, "quest/jabba_reelo_baruk"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_AlkharanQuest_active (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/jabba_reelo_baruk", "killAlkharanBandits"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_AlkharanQuest_finished (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/jabba_reelo_baruk", "killAlkharanBandits"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_ValarianSoldiers_active (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/jabba_reelo_baruk", "killingValarians"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_ValariansSoldiers_finished (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/jabba_reelo_baruk", "killingValarians"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_DebtCollection_active (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/jabba_reelo_baruk", "collectingDebts"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_DebtCollection_finished (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/jabba_reelo_baruk", "collectingDebts"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean reelo_baruk_condition_reeloQuestActive (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "quest/jabba_reelo_baruk");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void reelo_baruk_action_grantReeloQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest (player, "quest/jabba_reelo_baruk");
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void reelo_baruk_action_sendDoneSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal (player, "completelyFinished");
|
|
groundquests.grantQuest(player, "pointer_ree_yees");
|
|
faceTo(npc, player);
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void reelo_baruk_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int reelo_baruk_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Finally took care of the Alkharans I see. Good work, good work. You've got good timing too. If there's anything Jabba hates more than Alkharans it's Lady Valarian. Her thugs have been skulking around lately, and Jabba's sick of it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who's Lady Valarian?
|
|
if (response == "s_51")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You're the curious kind aren't you? Valarian's a whiphid. Ever seen one? Ugly as sin. And I'm saying that knowing full well how some people feel about Rodians. Anyway, she's got a little operation out of the Lucky Despot. Fancies herself Jabba's 'competition'. Funny, huh?
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So, she's not competition?
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_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_55");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You're the curious kind aren't you? Valarian's a whiphid. Ever seen one? Ugly as sin. And I'm saying that knowing full well how some people feel about Rodians. Anyway, she's got a little operation out of the Lucky Despot. Fancies herself Jabba's 'competition'. Funny, huh?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So, she's not competition?
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hardly. Let me put it this way, if she's a womp rat, Jabba's a full fledged ancient Krayt Dragon. You got me? She's not even in the boss's league. But, just the same, Jabba wants her put in her place.
|
|
string_id message = new string_id (c_stringFile, "s_57");
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You look like you might have some fight in ya. Wanna work for Jabba?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not really, no.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah, you look a little weak. I thought maybe you had some spark of life in you, but, you know, I've been wrong about people before. Go on, get out of here until you're ready for some work.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's hear about the job first.
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Smart. You wanna know what you're up against before you tackle it. I like that. Okay, here's the deal, you ever heard of the Alkhara bandits?
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It doesn't matter who they are.
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, who are they?
|
|
boolean hasResponse1 = false;
|
|
if (reelo_baruk_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_73");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_75");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do whatever you want.
|
|
if (response == "s_100")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
reelo_baruk_action_grantReeloQuest (player, npc);
|
|
|
|
//-- NPC: I like your style. Get out there and make us proud. Don't come back until you've killed at least ten of these Alkharan bandits.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Smart. You wanna know what you're up against before you tackle it. I like that. Okay, here's the deal, you ever heard of the Alkhara bandits?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It doesn't matter who they are.
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
reelo_baruk_action_grantReeloQuest (player, npc);
|
|
|
|
//-- NPC: I like your style. Get out there and make us proud. Don't come back until you've killed at least ten of these Alkharan bandits.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, who are they?
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, a long time ago, there was this bandit named Alkhara. Allied himself with the Sand People, and took out a police garrison. Problem is, he immediately turned on the Sand People that helped him and slaughtered them all.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds like a nice guy.
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_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_79");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, a long time ago, there was this bandit named Alkhara. Allied himself with the Sand People, and took out a police garrison. Problem is, he immediately turned on the Sand People that helped him and slaughtered them all.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds like a nice guy.
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yeah, he's one of the reasons there's still a feud between the Sand People and normal folks. Anyway, Alkhara died, but recently a group of people who were ousted from their homes by Sand People got together and reformed themselves into a group called Alkhara's bandits. Which would be fine if they'd just stick to fighting the Sand People.
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I take it they're more trouble than that.
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_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_83");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yeah, he's one of the reasons there's still a feud between the Sand People and normal folks. Anyway, Alkhara died, but recently a group of people who were ousted from their homes by Sand People got together and reformed themselves into a group called Alkhara's bandits. Which would be fine if they'd just stick to fighting the Sand People.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I take it they're more trouble than that.
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Way more. They have to keep supplied so they hit some of the outlying farms and merchants and such. Trouble is those people pay Jabba for protection. Jabba, in his infinite capacity for selfless behavior is now actually going to honor those contracts. You're going to make sure the Alkharans stop attacking the merchants.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: By killing them.
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_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_96");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int reelo_baruk_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Way more. They have to keep supplied so they hit some of the outlying farms and merchants and such. Trouble is those people pay Jabba for protection. Jabba, in his infinite capacity for selfless behavior is now actually going to honor those contracts. You're going to make sure the Alkharans stop attacking the merchants.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: By killing them.
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
reelo_baruk_action_grantReeloQuest (player, npc);
|
|
|
|
//-- NPC: You got it. Now get out there and make us proud. Don't come back until you've killed at least ten of them.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.reelo_baruk");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
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.reelo_baruk");
|
|
|
|
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 (reelo_baruk_condition_completedReelosQuests (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You did good work. Did I tell you that Ree-Yees was even impressed? Well, he wasn't really, but it sounds better if I say that he was.
|
|
string_id message = new string_id (c_stringFile, "s_4");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_DebtCollection_finished (player, npc))
|
|
{
|
|
reelo_baruk_action_sendDoneSignal (player, npc);
|
|
|
|
//-- NPC: Excellent. We'll start collecting on these immediately. Now, if you're still hungry for some work I suggest you talk to my friend Ree-Yees. He'll have something for you to do.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_DebtCollection_active (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I'm still waiting on those twelve gambling debts you're supposed to be bringing me.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_ValariansSoldiers_finished (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Ah, I see Valarian's people are starting to get the message. Perhaps they'll pass it along up the food chain.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_ValarianSoldiers_active (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: My people in the field tell me Valarian's thugs aren't too impressed with you yet. Do something about that, would ya?
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_AlkharanQuest_finished (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Finally took care of the Alkharans I see. Good work, good work. You've got good timing too. If there's anything Jabba hates more than Alkharans it's Lady Valarian. Her thugs have been skulking around lately, and Jabba's sick of it.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who's Lady Valarian?
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_51");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "reelo_baruk", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition_AlkharanQuest_active (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I see you still haven't taken care of those Alkharans. Were you planning on getting around to that soon?
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
reelo_baruk_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You look like you might have some fight in ya. Wanna work for Jabba?
|
|
string_id message = new string_id (c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not really, no.
|
|
boolean hasResponse0 = false;
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Let's hear about the job first.
|
|
boolean hasResponse1 = false;
|
|
if (reelo_baruk_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll do whatever you want.
|
|
boolean hasResponse2 = false;
|
|
if (reelo_baruk_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_65");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
utils.setScriptVar (player, "conversation.reelo_baruk.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "reelo_baruk", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "reelo_baruk")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
if (branchId == 6 && reelo_baruk_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && reelo_baruk_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && reelo_baruk_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && reelo_baruk_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && reelo_baruk_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && reelo_baruk_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && reelo_baruk_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.reelo_baruk.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|