Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/npe_boba_fett.script
T

1012 lines
28 KiB
Plaintext

// ======================================================================
//
// npe_boba_fett.script
//
//
//
// 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.npe;
include library.space_quest;
include library.sui;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/npe_boba_fett";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_boba_fett_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_isAtLeastLevel5 (obj_id player, obj_id npc)
{
int level = getLevel(player);
if(level >= 5)
return true;
else
return false;
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_wantsBH (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "npe_pointer_bounty_template");
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_questComplete (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_boba");
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_busy (obj_id player, obj_id npc)
{
return ( groundquests.isTaskActive(player, "npe_boba", 0) &&
npe_boba_fett_condition_isBHTemplate(player, npc));
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_finishedFinalTask (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_boba", "return");
}
// ----------------------------------------------------------------------
boolean npe_boba_fett_condition_isBHTemplate (obj_id player, obj_id npc)
{
return utils.isProfession(player, utils.BOUNTY_HUNTER);
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_boba_fett_action_giveBHQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_boba");
groundquests.sendSignal(player, "found_bounty_hunter");
if(!hasObjVar(player, npe.QUEST_REWORK_VAR))
setObjVar(player, npe.QUEST_REWORK_VAR, npe.QUEST_ENUMERATION);
}
// ----------------------------------------------------------------------
void npe_boba_fett_action_giveReward (obj_id player, obj_id npc)
{
setObjVar(player, "npe.finishedTemplate", 1);
groundquests.sendSignal(player, "npe_boba_signal");
groundquests.grantQuest(player, "npe_pointer_secretary");
}
// ----------------------------------------------------------------------
void npe_boba_fett_action_giveSecretaryPointer (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_pointer_secretary");
}
// ----------------------------------------------------------------------
void npe_boba_fett_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void npe_boba_fett_action_leaveStation (obj_id player, obj_id npc)
{
string_id stfPrompt = new string_id("npe", "exit_station_prompt");
string_id stfTitle = new string_id("npe", "exit_station");
string prompt = utils.packStringId(stfPrompt);
string title = utils.packStringId(stfTitle);
int pid = sui.msgbox(player, player, prompt, sui.OK_CANCEL, title, 0, "handTransfer");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_boba_fett_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I just found out that the shipment went to Mos Eisley, but one of my marks is on the station. I don't have time to track where the shipment went from there. This mark has a much higher payout.
//-- [RESPONSE NOTE]
//-- PLAYER: I can follow it for you.
if (response == "s_40")
{
//-- [NOTE]
if (npe_boba_fett_condition_isAtLeastLevel5 (player, npc))
{
//-- NPC: I should have enough time to give you a lift and return here to find my mark. But I'm not a shuttle service. This is a one-way trip down there for you. Are you sure you want to go?
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am sure.
boolean hasResponse0 = false;
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No, wait. I have some things I need to take care of first.
boolean hasResponse1 = false;
if (npe_boba_fett_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_43");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
//-- NPC: Not yet you can't. This is a big task, you need to become more combat effective first.
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How do I do that?
boolean hasResponse0 = false;
if (npe_boba_fett_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_39");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I should have enough time to give you a lift and return here to find my mark. But I'm not a shuttle service. This is a one-way trip down there for you. Are you sure you want to go?
//-- [RESPONSE NOTE]
//-- PLAYER: I am sure.
if (response == "s_43")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
npe_boba_fett_action_leaveStation (player, npc);
//-- NPC: Okay, let's go.
string_id message = new string_id (c_stringFile, "s_53");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, wait. I have some things I need to take care of first.
if (response == "s_54")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "backhand_threaten");
//-- NPC: Stop wasting my time! Come back when you're actually ready to go.
string_id message = new string_id (c_stringFile, "s_56");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Not yet you can't. This is a big task, you need to become more combat effective first.
//-- [RESPONSE NOTE]
//-- PLAYER: How do I do that?
if (response == "s_39")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
npe_boba_fett_action_giveSecretaryPointer (player, npc);
//-- NPC: Take some more jobs. Inaldra's Lieutenant can help you with that.
string_id message = new string_id (c_stringFile, "s_45");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Do you have the information?
//-- [RESPONSE NOTE]
//-- PLAYER: Right here. It was a little damaged.
if (response == "s_46")
{
doAnimationAction (player, "feed_creature_medium");
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pound_fist_palm");
//-- NPC: Let me see that. The cargo was Dr... and that's it!? I'm missing critical information here! I ought to blast you right now!
string_id message = new string_id (c_stringFile, "s_47");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It's not my fault!
boolean hasResponse0 = false;
if (npe_boba_fett_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.npe_boba_fett.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Let me see that. The cargo was Dr... and that's it!? I'm missing critical information here! I ought to blast you right now!
//-- [RESPONSE NOTE]
//-- PLAYER: It's not my fault!
if (response == "s_83")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
//-- NPC: I've heard that before. No matter, it is enough to go on. I may not know who the doctor is, but I do know that one was smuggled here. Take this as a reward for helping me. Talk to Inaldra's Lieutenant if you need more work.
string_id message = new string_id (c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you.
boolean hasResponse0 = false;
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What about getting off the station?
boolean hasResponse1 = false;
if (npe_boba_fett_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_85");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_48");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I've heard that before. No matter, it is enough to go on. I may not know who the doctor is, but I do know that one was smuggled here. Take this as a reward for helping me. Talk to Inaldra's Lieutenant if you need more work.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you.
if (response == "s_85")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
npe_boba_fett_action_giveReward (player, npc);
//-- NPC: Now go away, I have work to do.
string_id message = new string_id (c_stringFile, "s_86");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What about getting off the station?
if (response == "s_48")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
npe_boba_fett_action_giveReward (player, npc);
//-- NPC: Maybe I can arrange transport for you...if I feel like it. Talk to me when you are ready to go.
string_id message = new string_id (c_stringFile, "s_49");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So, you're the newest Bounty Hunter on the station, huh?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes.
if (response == "s_34")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "mock");
//-- NPC: Yeah, I've heard of you %TU. You think you're a hot shot. Big fish in a small puddle. You could get yourself killed quick out here.
string_id message = new string_id (c_stringFile, "s_36");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am ready for anything.
boolean hasResponse0 = false;
if (npe_boba_fett_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_50");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 15);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yeah, I've heard of you %TU. You think you're a hot shot. Big fish in a small puddle. You could get yourself killed quick out here.
//-- [RESPONSE NOTE]
//-- PLAYER: I am ready for anything.
if (response == "s_50")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: Are you? Want to do a little job for me? I have a job that shouldn't be too hard, for the right person.
string_id message = new string_id (c_stringFile, "s_52");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: If the price is right, I'll do it.
boolean hasResponse0 = false;
if (npe_boba_fett_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_59");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Are you? Want to do a little job for me? I have a job that shouldn't be too hard, for the right person.
//-- [RESPONSE NOTE]
//-- PLAYER: If the price is right, I'll do it.
if (response == "s_59")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
npe_boba_fett_action_giveBHQuest (player, npc);
//-- NPC: Oh, the price is right, don't worry. You are to eliminate one Fidaval. I don't know where he is, but I know who does. If you apply a little pressure, his brother Ratheb will tell you all you need.
string_id message = new string_id (c_stringFile, "s_61");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_boba_fett_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Who are you?
//-- [RESPONSE NOTE]
//-- PLAYER: Just an admirer.
if (response == "s_80")
{
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
//-- NPC: Go admire someone else.
string_id message = new string_id (c_stringFile, "s_82");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.npe_boba_fett");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Boba Fett (Bounty Hunter)");
//setCondition(self, CONDITION_INTERESTING);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Boba Fett (Bounty Hunter)");
//setCondition(self, CONDITION_INTERESTING);
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.npe_boba_fett");
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 (!npe_boba_fett_condition_isBHTemplate (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: You are no Bounty Hunter. You're not worth my time.
string_id message = new string_id (c_stringFile, "s_69");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition_busy (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: Giving up already? Get back out there and finish your job!
string_id message = new string_id (c_stringFile, "s_42");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition_questComplete (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: I just found out that the shipment went to Mos Eisley, but one of my marks is on the station. I don't have time to track where the shipment went from there. This mark has a much higher payout.
string_id message = new string_id (c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can follow it for you.
boolean hasResponse0 = false;
if (npe_boba_fett_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_40");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 3);
npcStartConversation (player, npc, "npe_boba_fett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition_finishedFinalTask (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: Do you have the information?
string_id message = new string_id (c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Right here. It was a little damaged.
boolean hasResponse0 = false;
if (npe_boba_fett_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_46");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 9);
npcStartConversation (player, npc, "npe_boba_fett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition_wantsBH (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: So, you're the newest Bounty Hunter on the station, huh?
string_id message = new string_id (c_stringFile, "s_32");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 14);
npcStartConversation (player, npc, "npe_boba_fett", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_boba_fett_condition__defaultCondition (player, npc))
{
npe_boba_fett_action_facePlayer (player, npc);
//-- NPC: Who are you?
string_id message = new string_id (c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just an admirer.
boolean hasResponse0 = false;
if (npe_boba_fett_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_80");
utils.setScriptVar (player, "conversation.npe_boba_fett.branchId", 18);
npcStartConversation (player, npc, "npe_boba_fett", 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 != "npe_boba_fett")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.npe_boba_fett.branchId");
if (branchId == 3 && npe_boba_fett_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && npe_boba_fett_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && npe_boba_fett_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && npe_boba_fett_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && npe_boba_fett_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && npe_boba_fett_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && npe_boba_fett_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && npe_boba_fett_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && npe_boba_fett_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && npe_boba_fett_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.npe_boba_fett.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================