mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1730 lines
50 KiB
Plaintext
1730 lines
50 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// legacy_button_barrezz.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.features;
|
|
include library.groundquests;
|
|
include library.space_quest;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/legacy_button_barrezz";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean legacy_button_barrezz_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_onButtonImp (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_button_imp_pt2");
|
|
|
|
|
|
|
|
boolean OnTask = hasObjVar(player, "legacy.faction.imperialPath");
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_onButtonReb (obj_id player, obj_id npc)
|
|
{
|
|
|
|
boolean OnTask = hasObjVar(player, "legacy.faction.rebelPath");
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failKickImp (obj_id player, obj_id npc)
|
|
{
|
|
boolean hasCompleted = false;
|
|
if(groundquests.isQuestActiveOrComplete(player, "naboo_kadaraa_tipping_the_balance_1"))
|
|
hasCompleted = true;
|
|
if(groundquests.hasCompletedQuest(player, "quest/legacy_naboo_kick_imp"))
|
|
hasCompleted = true;
|
|
|
|
return hasCompleted;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failValarian (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest (player, "quest/legacy_button_jawatracks_pt3")
|
|
|| groundquests.hasCompletedQuest (player, "quest/legacy_button_jawatracks_pt3_v2"))
|
|
&& (!groundquests.isQuestActiveOrComplete (player, "quest/legacy_button_valarian")
|
|
&& !groundquests.isQuestActiveOrComplete (player, "quest/legacy_button_valarian_v2"));
|
|
|
|
/*
|
|
int questId1 = questGetQuestId("quest/legacy_button_jawatracks_pt3");
|
|
int questId2 = questGetQuestId("quest/legacy_button_valarian");
|
|
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
*/
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_questButtonComplete (obj_id player, obj_id npc)
|
|
{
|
|
int questId1 = questGetQuestId("quest/legacy_button_imp_pt2");
|
|
|
|
boolean OnTask = questIsQuestComplete(questId1, player);
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failTosche (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_button_start");
|
|
int questId2 = questGetQuestId("quest/legacy_button_jawatracks");
|
|
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failDarklighter (obj_id player, obj_id npc)
|
|
{
|
|
return ((groundquests.hasCompletedQuest(player, "legacy_button_valarian") || groundquests.hasCompletedQuest(player, "quest/legacy_button_valarian_v2"))
|
|
&& !groundquests.isQuestActiveOrComplete(player, "legacy_button_darklighter"));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failSlicer (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_button_darklighter");
|
|
int questId2 = questGetQuestId("quest/legacy_button_valarian");
|
|
int questId3 = questGetQuestId("quest/legacy_button_jawatracks_pt3");
|
|
int questId4 = questGetQuestId("quest/legacy_button_imp_pt2");
|
|
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& (questIsQuestComplete (questId2, player))
|
|
&& (questIsQuestComplete (questId3, player))
|
|
&& ( !(questIsQuestActive(questId4, player))
|
|
&& !(questIsQuestComplete (questId4, player)));
|
|
|
|
|
|
return OnTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_finishTogether (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "legacy_together") ||
|
|
groundquests.hasCompletedQuest(player, "legacy_together_2"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_failWatto (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_button_imp_pt2");
|
|
int questId2 = questGetQuestId("quest/legacy_watto_pointer");
|
|
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_button_barrezz_condition_onButtonStart (obj_id player, obj_id npc)
|
|
{
|
|
|
|
return groundquests.isQuestActiveOrComplete(player, "quest/legacy_button_start");
|
|
/*
|
|
int questId1 = questGetQuestId("quest/legacy_button_start");
|
|
|
|
boolean OnTask = (questIsQuestActive(questId1, player));
|
|
|
|
return OnTask;*/
|
|
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void legacy_button_barrezz_action_reGrantDarklighter (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_button_darklighter");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_reGrantKick (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_naboo_kick_imp");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_grantSlicer (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_button_imp_pt2");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_signalTosche (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_button_jawatracks");
|
|
setObjVar(player, "legacy.faction.imperialPath", 1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_grantWatto (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_watto_pointer");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_signalGotoComplete (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "legacy_button_start_launch_e3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_regrantTocshe (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_button_jawatracks");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_button_barrezz_action_reGrantValarian (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_button_valarian_v2");
|
|
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int legacy_button_barrezz_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: How is it going on Naboo?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just fine.
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good to hear that.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where did you say he was again?
|
|
if (response == "s_76")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
legacy_button_barrezz_action_reGrantKick (player, npc);
|
|
|
|
//-- NPC: Some agent you will make. Ok here is the info again. Don't lose it.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I appreciate your help with the cargo. But now you have to recover the droid.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where is Watto?
|
|
if (response == "s_88")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_grantWatto (player, npc);
|
|
|
|
//-- NPC: In Mos Espa.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What are you doing back here? If you are looking for a way to blow your cover you are doing a good job of it. It's all or nothing, do you understand? I have to find out everything that the Jawas, Valarians and Darklighters got. Now get out!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry. It will not happen again.
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: See that it doesn't.
|
|
string_id message = new string_id (c_stringFile, "s_55");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need info on the Sand Crawler again.
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_regrantTocshe (player, npc);
|
|
|
|
//-- NPC: Here is the info.
|
|
string_id message = new string_id (c_stringFile, "s_85");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where are the Valarians again?
|
|
if (response == "s_59")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_reGrantValarian (player, npc);
|
|
|
|
//-- NPC: Near Bestine. Here is the information again.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The Darklighter cache info is gone from my datapad.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_reGrantDarklighter (player, npc);
|
|
|
|
//-- NPC: Sounds like you need a new pad. Here is the information again.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where is the slicer?
|
|
if (response == "s_61")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_grantSlicer (player, npc);
|
|
|
|
//-- NPC: Here is the information. Now get to it!
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] D1
|
|
//-- NPC: You think I have time for the likes of you? Why should I give you the time of day?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to help you find that shipment that you are so interested in.
|
|
if (response == "s_115")
|
|
{
|
|
legacy_button_barrezz_action_signalGotoComplete (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: So you know about that. But aren't you the one who was helping Solo on the station?
|
|
string_id message = new string_id (c_stringFile, "s_119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I was. But I was confused by Solo and all the shooting.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry, I didn't mean to bother you.
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "adjust");
|
|
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Good. Now leave.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So you know about that. But aren't you the one who was helping Solo on the station?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I was. But I was confused by Solo and all the shooting.
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: And now you want to clear your name by helping me? Is that it?
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Something like that.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Really, I was just a victim of circumstance.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_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_30");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: And now you want to clear your name by helping me? Is that it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Something like that.
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I don't trust you, but it can't hurt to have you help me, because I am too short-handed. And of course if you betray me I will have you killed.
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will do it.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: So what is the job?
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I want to help but I need more experience.
|
|
boolean hasResponse2 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am not sure that I want to do this.
|
|
boolean hasResponse3 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_42");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Really, I was just a victim of circumstance.
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Some circumstances. My information shows you helped a known criminal sell hi-jacked goods. Are you going to deny it?
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Solo made me do it.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_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.legacy_button_barrezz.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I don't trust you, but it can't hurt to have you help me, because I am too short-handed. And of course if you betray me I will have you killed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will do it.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: My information has the Jawas, Valarians and Darklighters each have gotten a part of the shipment. I first want to track down the Jawa Sand Crawler and see what they have. They are on a trade route and I expect you can pick up their trail at Tosche Station.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll be done in a flash.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_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_77");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So what is the job?
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It's a simple one. I need to get an inventory of some cargo that was acquired by various parties here on Tatooine, parties that are not inclined to help the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_43");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: And what is so special about this cargo?
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: You know I am not really interested.
|
|
boolean hasResponse2 = false;
|
|
if (legacy_button_barrezz_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_44");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to help but I need more experience.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_forward");
|
|
|
|
//-- NPC: You should check with Captain Jasha across the way then.
|
|
string_id message = new string_id (c_stringFile, "s_95");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am not sure that I want to do this.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As I suspected. You are just trying to win your way into my good graces. Leave now before I have you thrown out.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: My information has the Jawas, Valarians and Darklighters each have gotten a part of the shipment. I first want to track down the Jawa Sand Crawler and see what they have. They are on a trade route and I expect you can pick up their trail at Tosche Station.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll be done in a flash.
|
|
if (response == "s_77")
|
|
{
|
|
legacy_button_barrezz_action_signalGotoComplete (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_signalTosche (player, npc);
|
|
|
|
//-- NPC: The trail starts at Tosche Station.
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's a simple one. I need to get an inventory of some cargo that was acquired by various parties here on Tatooine, parties that are not inclined to help the Empire.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_44")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: My information has the Jawas, Valarians and Darklighters each have gotten a part of the shipment. I first want to track down the Jawa Sand Crawler and see what they have. They are on a trade route and I expect you can pick up their trail at Tosche Station.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll be done in a flash.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_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_77");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And what is so special about this cargo?
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That is something that you don't need to know at the moment. I just need the list of everything these parties acquired. Do you think you can do that?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I can do it.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I think I will pass on this one.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_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_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You know I am not really interested.
|
|
if (response == "s_56")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As I suspected. You are just trying to win your way into my good graces. Leave now before I have you thrown out.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That is something that you don't need to know at the moment. I just need the list of everything these parties acquired. Do you think you can do that?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I can do it.
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: My information has the Jawas, Valarians and Darklighters each have gotten a part of the shipment. I first want to track down the Jawa Sand Crawler and see what they have. They are on a trade route and I expect you can pick up their trail at Tosche Station.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll be done in a flash.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_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_77");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I think I will pass on this one.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As I suspected. You are just trying to win your way into my good graces. Leave now before I have you thrown out.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Some circumstances. My information shows you helped a known criminal sell hi-jacked goods. Are you going to deny it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Solo made me do it.
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_finger_warning");
|
|
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Well lucky for you, the Empire needs to find out what was in that cargo more than it needs to spend time punishing you for your crimes. Are you willing to help me to clear your name?
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I am.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No it sounds too dangerous.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_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_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_button_barrezz_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well lucky for you, the Empire needs to find out what was in that cargo more than it needs to spend time punishing you for your crimes. Are you willing to help me to clear your name?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I am.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: My information has the Jawas, Valarians and Darklighters each have gotten a part of the shipment. I first want to track down the Jawa Sand Crawler and see what they have. They are on a trade route and I expect you can pick up their trail at Tosche Station.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll be done in a flash.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_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_77");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No it sounds too dangerous.
|
|
if (response == "s_91")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As I suspected. You are just trying to win your way into my good graces. Leave now before I have you thrown out.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.legacy_button_barrezz");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Commander Barrezz");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Commander Barrezz");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
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.legacy_button_barrezz");
|
|
|
|
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 (legacy_button_barrezz_condition_onButtonReb (player, npc))
|
|
{
|
|
doAnimationAction (npc, "threaten");
|
|
|
|
//-- NPC: I know who you are working for. I don't want you bothering me again, or I will take drastic measures.
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition_finishTogether (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: How is it going on Naboo?
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just fine.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Where did you say he was again?
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_condition_failKickImp (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_76");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "legacy_button_barrezz", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition_questButtonComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "threaten");
|
|
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I appreciate your help with the cargo. But now you have to recover the droid.
|
|
string_id message = new string_id (c_stringFile, "s_101");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where is Watto?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition_failWatto (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_88");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "legacy_button_barrezz", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_button_barrezz_condition_onButtonImp (player, npc))
|
|
{
|
|
doAnimationAction (npc, "dismiss");
|
|
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: What are you doing back here? If you are looking for a way to blow your cover you are doing a good job of it. It's all or nothing, do you understand? I have to find out everything that the Jawas, Valarians and Darklighters got. Now get out!
|
|
string_id message = new string_id (c_stringFile, "s_144");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sorry. It will not happen again.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need info on the Sand Crawler again.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_condition_failTosche (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Where are the Valarians again?
|
|
boolean hasResponse2 = false;
|
|
if (legacy_button_barrezz_condition_failValarian (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: The Darklighter cache info is gone from my datapad.
|
|
boolean hasResponse3 = false;
|
|
if (legacy_button_barrezz_condition_failDarklighter (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Where is the slicer?
|
|
boolean hasResponse4 = false;
|
|
if (legacy_button_barrezz_condition_failSlicer (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_59");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_61");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "legacy_button_barrezz", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] D1
|
|
if (legacy_button_barrezz_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_button_barrezz_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You think I have time for the likes of you? Why should I give you the time of day?
|
|
string_id message = new string_id (c_stringFile, "s_805");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to help you find that shipment that you are so interested in.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_button_barrezz_condition_onButtonStart (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sorry, I didn't mean to bother you.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_button_barrezz_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_115");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_button_barrezz.branchId", 13);
|
|
|
|
npcStartConversation (player, npc, "legacy_button_barrezz", 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 != "legacy_button_barrezz")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.legacy_button_barrezz.branchId");
|
|
|
|
if (branchId == 2 && legacy_button_barrezz_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && legacy_button_barrezz_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && legacy_button_barrezz_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && legacy_button_barrezz_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && legacy_button_barrezz_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && legacy_button_barrezz_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && legacy_button_barrezz_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && legacy_button_barrezz_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && legacy_button_barrezz_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && legacy_button_barrezz_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && legacy_button_barrezz_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && legacy_button_barrezz_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.legacy_button_barrezz.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|