Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/event_bossk_bossk.script
T
2013-09-10 23:17:15 -07:00

1662 lines
47 KiB
Plaintext

// ======================================================================
//
// event_bossk_bossk.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.34 - 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/event_bossk_bossk";
// ======================================================================
// Script Conditions
// ======================================================================
boolean event_bossk_bossk_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_checkQ1 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int task = groundquests.getTaskId(quest1, "q1Failed");
return(questIsQuestActive(quest1, player) && questIsTaskActive(quest1, task, player));
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_checkQ2 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_2");
int task = groundquests.getTaskId(quest1, "q2Failed");
return(questIsQuestActive(quest1, player) && questIsTaskActive(quest1, task, player));
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_checkQ3 (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_checkQ4 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_4");
int task = groundquests.getTaskId(quest1, "q4Failed");
return(questIsQuestActive(quest1, player) && questIsTaskActive(quest1, task, player));
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_hasAnyQuest (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int quest2 = questGetQuestId("quest/event_cantina_bossk_2");
int quest3 = questGetQuestId("quest/event_cantina_bossk_3");
int quest4 = questGetQuestId("quest/event_cantina_bossk_4");
return ( questIsQuestActive(quest1, player) ||
questIsQuestActive(quest2, player) ||
questIsQuestActive(quest3, player) ||
questIsQuestActive(quest4, player) );
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_finishedQ1 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int quest2 = questGetQuestId("quest/event_cantina_bossk_2");
int quest3 = questGetQuestId("quest/event_cantina_bossk_3");
int quest4 = questGetQuestId("quest/event_cantina_bossk_4");
return ( questIsQuestComplete(quest1, player) &&
!questIsQuestActive(quest2, player) &&
!questIsQuestComplete(quest2, player) &&
!questIsQuestActive(quest3, player) &&
!questIsQuestComplete(quest3, player) &&
!questIsQuestActive(quest4, player) &&
!questIsQuestComplete(quest4, player) );
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_finishedQ2 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int quest2 = questGetQuestId("quest/event_cantina_bossk_2");
int quest3 = questGetQuestId("quest/event_cantina_bossk_3");
int quest4 = questGetQuestId("quest/event_cantina_bossk_4");
return ( questIsQuestComplete(quest1, player) &&
questIsQuestComplete(quest2, player) &&
!questIsQuestActive(quest3, player) &&
!questIsQuestComplete(quest3, player) &&
!questIsQuestActive(quest4, player) &&
!questIsQuestComplete(quest4, player) );
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_finishedQ3 (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int quest2 = questGetQuestId("quest/event_cantina_bossk_2");
int quest3 = questGetQuestId("quest/event_cantina_bossk_3");
int quest4 = questGetQuestId("quest/event_cantina_bossk_4");
return ( questIsQuestComplete(quest1, player) &&
questIsQuestComplete(quest2, player) &&
questIsQuestComplete(quest3, player) &&
!questIsQuestActive(quest4, player) &&
!questIsQuestComplete(quest4, player) );
}
// ----------------------------------------------------------------------
boolean event_bossk_bossk_condition_finishedAll (obj_id player, obj_id npc)
{
int quest1 = questGetQuestId("quest/event_cantina_bossk_1");
int quest2 = questGetQuestId("quest/event_cantina_bossk_2");
int quest3 = questGetQuestId("quest/event_cantina_bossk_3");
int quest4 = questGetQuestId("quest/event_cantina_bossk_4");
return ( questIsQuestComplete(quest1, player) &&
questIsQuestComplete(quest2, player) &&
questIsQuestComplete(quest3, player) &&
questIsQuestComplete(quest4, player) );
}
// ======================================================================
// Script Actions
// ======================================================================
void event_bossk_bossk_action_endQ1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "q1Failed");
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_endQ2 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "q2Failed");
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_endQ4 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "q4Failed");
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_grantQ1 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/event_cantina_bossk_1");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_grantQ2 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/event_cantina_bossk_2");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_grantQ3 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/event_cantina_bossk_3");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void event_bossk_bossk_action_grantQ4 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/event_cantina_bossk_4");
groundquests.grantQuest(questId, player, npc, true);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int event_bossk_bossk_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What're you doin' here? You haven't even finished the last job I gave ya. Take care of that then find me.
//-- [RESPONSE NOTE]
//-- PLAYER: Valarian's spice courier got away...
if (response == "s_165")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "loser");
event_bossk_bossk_action_endQ1 (player, npc);
//-- NPC: I knew I never should have trusted you. If you're still interested I might have something else for you to do.
string_id message = new string_id (c_stringFile, "s_167");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The tusken got away I think...
if (response == "s_169")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "loser");
event_bossk_bossk_action_endQ2 (player, npc);
//-- NPC: You think??? Of all the... You're lucky I don't tear your head off and wear it as a trophy! Actually, you still might have some use. Talk to me if you're interested in trying something else.
string_id message = new string_id (c_stringFile, "s_171");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The assassin got away...
if (response == "s_173")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "loser");
event_bossk_bossk_action_endQ4 (player, npc);
//-- NPC: So you're telling me there's an assassin loose, he's after one of Jabba's informants and you just left your post? That informant is as good as dead! That's the last time I ask you to do anything, get out of my face!
string_id message = new string_id (c_stringFile, "s_175");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Still alive, huh? I have more work for you.
//-- [RESPONSE NOTE]
//-- PLAYER: If you've got another job, I'll listen.
if (response == "s_181")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: You know about the Blacksun, right? Jabba's got a guy on the inside, but his cover's probably blown.
string_id message = new string_id (c_stringFile, "s_183");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: He's probably dead. What you want me to do?
boolean hasResponse0 = false;
if (event_bossk_bossk_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_185");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Partners? Not this time. Bye, Bossk.
if (response == "s_201")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rude");
//-- NPC: No one says no to Bossk. You better get lost before I end up gnawing your bones as a snack.
string_id message = new string_id (c_stringFile, "s_203");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You know about the Blacksun, right? Jabba's got a guy on the inside, but his cover's probably blown.
//-- [RESPONSE NOTE]
//-- PLAYER: He's probably dead. What you want me to do?
if (response == "s_185")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: Jabba wants to know more about them. How strong. How many. He wants to send some blasters out there to test their strength.
string_id message = new string_id (c_stringFile, "s_187");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What about Jabba's informant?
boolean hasResponse0 = false;
if (event_bossk_bossk_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_189");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba wants to know more about them. How strong. How many. He wants to send some blasters out there to test their strength.
//-- [RESPONSE NOTE]
//-- PLAYER: What about Jabba's informant?
if (response == "s_189")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: You dig up any intel on the guy, let me know. Frankly, I don't care but Jabba may pay extra. You on board?
string_id message = new string_id (c_stringFile, "s_191");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm on board.
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not this time.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_193");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_197");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You dig up any intel on the guy, let me know. Frankly, I don't care but Jabba may pay extra. You on board?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm on board.
if (response == "s_193")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
event_bossk_bossk_action_grantQ4 (player, npc);
//-- NPC: The info is in your journal. Don't get killed before you get some info I can use.
string_id message = new string_id (c_stringFile, "s_195");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not this time.
if (response == "s_197")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: Your loss. I can find better help elsewhere.
string_id message = new string_id (c_stringFile, "s_199");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba's pleased with how the Tusken plan worked out. I have another job for you.
//-- [RESPONSE NOTE]
//-- PLAYER: What do you have in mind?
if (response == "s_207")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: Jabba's got some kind of a bet with a cousin on Naboo or something. The bet is to see who can come up with the most interesting trophy.
string_id message = new string_id (c_stringFile, "s_209");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Trophy? Go on.
boolean hasResponse0 = false;
if (event_bossk_bossk_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_211");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I think I'll find work someplace else.
if (response == "s_223")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "loser");
//-- NPC: Blaster jockeys are a cred a crate out here. Don't need you anyway.
string_id message = new string_id (c_stringFile, "s_225");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba's got some kind of a bet with a cousin on Naboo or something. The bet is to see who can come up with the most interesting trophy.
//-- [RESPONSE NOTE]
//-- PLAYER: Trophy? Go on.
if (response == "s_211")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: Hutts don't get out much, so it's up to you to find something shiny for 'em. If you're up for it, I've got just the place for you to look.
string_id message = new string_id (c_stringFile, "s_213");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm game. What's the plan?
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I think I'll find work someplace else.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_215");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_219");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hutts don't get out much, so it's up to you to find something shiny for 'em. If you're up for it, I've got just the place for you to look.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm game. What's the plan?
if (response == "s_215")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
event_bossk_bossk_action_grantQ3 (player, npc);
//-- NPC: Head out to Dathomir and hunt some Nightsisters until you loot something good. You'll know when it happens, and bring it to one of Jabba's couriers. The details are in your journal.
string_id message = new string_id (c_stringFile, "s_217");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I think I'll find work someplace else.
if (response == "s_219")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "loser");
//-- NPC: Blaster jockeys are a cred a crate out here. Don't need you anyway.
string_id message = new string_id (c_stringFile, "s_221");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That Valarian traitor is dead. You aren't that pathetic after all. If you're looking for more work, I have another job that doesn't require a lot of brain power.
//-- [RESPONSE NOTE]
//-- PLAYER: Surprised you didn't take it then. What do you have?
if (response == "s_229")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
//-- NPC: Jabba's cookin' up a plan to get the Tuskens to attack Mos Eisley. Don't know why. Don't care. There is a problem though.
string_id message = new string_id (c_stringFile, "s_231");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What's the problem.
boolean hasResponse0 = false;
if (event_bossk_bossk_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_233");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not doing your work for you. I'm out of here.
if (response == "s_249")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rude");
//-- NPC: What do you know? Get lost, nerf herder.
string_id message = new string_id (c_stringFile, "s_251");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba's cookin' up a plan to get the Tuskens to attack Mos Eisley. Don't know why. Don't care. There is a problem though.
//-- [RESPONSE NOTE]
//-- PLAYER: What's the problem.
if (response == "s_233")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: A Tusken scout's got wind of the plan and can blow the whole deal. You have to find him before he can report to his friends.
string_id message = new string_id (c_stringFile, "s_235");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How do I find him?
boolean hasResponse0 = false;
if (event_bossk_bossk_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_237");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A Tusken scout's got wind of the plan and can blow the whole deal. You have to find him before he can report to his friends.
//-- [RESPONSE NOTE]
//-- PLAYER: How do I find him?
if (response == "s_237")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_forward");
//-- NPC: That's the fun part. Just start shooting some Sand People. They'll either get so mad they attack Mos Eisley anyway or you might find a clue to where he's hiding.
string_id message = new string_id (c_stringFile, "s_239");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Alright. I'm in.
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I got no problems with Tuskens. I'm out.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_241");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_245");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That's the fun part. Just start shooting some Sand People. They'll either get so mad they attack Mos Eisley anyway or you might find a clue to where he's hiding.
//-- [RESPONSE NOTE]
//-- PLAYER: Alright. I'm in.
if (response == "s_241")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
event_bossk_bossk_action_grantQ2 (player, npc);
//-- NPC: Details are in your journal. Get going.
string_id message = new string_id (c_stringFile, "s_243");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I got no problems with Tuskens. I'm out.
if (response == "s_245")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: Can't handle this? Blast off, barve.
string_id message = new string_id (c_stringFile, "s_247");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You don't look like much ta me, but I don't think that matters. If you need some work, I have some tasks that might not kill ya.
//-- [RESPONSE NOTE]
//-- PLAYER: I can handle anything you got.
if (response == "s_255")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: Valarian has a mole in Jabba's palace who's stealing info on Jabba's spice shipments.
string_id message = new string_id (c_stringFile, "s_257");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do I come in?
boolean hasResponse0 = false;
if (event_bossk_bossk_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_259");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 27);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I think I better go. This isn't my kind of job.
if (response == "s_271")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: Hey, it's your life. Not my problem if you don't have a spine. Now get lost before you waste more of my time.
string_id message = new string_id (c_stringFile, "s_273");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch27 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Valarian has a mole in Jabba's palace who's stealing info on Jabba's spice shipments.
//-- [RESPONSE NOTE]
//-- PLAYER: Where do I come in?
if (response == "s_259")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
//-- NPC: Jabba's paying creds to anyone willing to take out some of Valarian's people while looking for the barve who's selling secrets. Think you can handle it?
string_id message = new string_id (c_stringFile, "s_261");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm in.
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't want to cross Valarian.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_263");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_267");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 28);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int event_bossk_bossk_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba's paying creds to anyone willing to take out some of Valarian's people while looking for the barve who's selling secrets. Think you can handle it?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm in.
if (response == "s_263")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_once");
event_bossk_bossk_action_grantQ1 (player, npc);
//-- NPC: OK, you're working for me now. The details have been uploaded to your journal. Take care of the job and you'll get your cut.
string_id message = new string_id (c_stringFile, "s_265");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to cross Valarian.
if (response == "s_267")
{
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: Hey, it's your life. Not my problem if you don't have a spine. Now get lost before you waste more of my time.
string_id message = new string_id (c_stringFile, "s_269");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.event_bossk_bossk");
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
{
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
menuInfoData.setServerNotify (false);
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.event_bossk_bossk");
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 (event_bossk_bossk_condition_hasAnyQuest (player, npc))
{
doAnimationAction (npc, "gesticulate_wildly");
//-- NPC: What're you doin' here? You haven't even finished the last job I gave ya. Take care of that then find me.
string_id message = new string_id (c_stringFile, "s_163");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Valarian's spice courier got away...
boolean hasResponse0 = false;
if (event_bossk_bossk_condition_checkQ1 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: The tusken got away I think...
boolean hasResponse1 = false;
if (event_bossk_bossk_condition_checkQ2 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The assassin got away...
boolean hasResponse2 = false;
if (event_bossk_bossk_condition_checkQ4 (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_165");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_169");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_173");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 1);
npcStartConversation (player, npc, "event_bossk_bossk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (event_bossk_bossk_condition_finishedAll (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: You again? You can go find your own jobs from now on. I don't have anything more for ya.
string_id message = new string_id (c_stringFile, "s_177");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (event_bossk_bossk_condition_finishedQ3 (player, npc))
{
doAnimationAction (npc, "hands_behind_head");
//-- NPC: Still alive, huh? I have more work for you.
string_id message = new string_id (c_stringFile, "s_179");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: If you've got another job, I'll listen.
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Partners? Not this time. Bye, Bossk.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_181");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_201");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 6);
npcStartConversation (player, npc, "event_bossk_bossk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (event_bossk_bossk_condition_finishedQ2 (player, npc))
{
doAnimationAction (npc, "hands_behind_head");
//-- NPC: Jabba's pleased with how the Tusken plan worked out. I have another job for you.
string_id message = new string_id (c_stringFile, "s_205");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you have in mind?
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I think I'll find work someplace else.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_207");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_223");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 13);
npcStartConversation (player, npc, "event_bossk_bossk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (event_bossk_bossk_condition_finishedQ1 (player, npc))
{
doAnimationAction (npc, "hands_behind_head");
//-- NPC: That Valarian traitor is dead. You aren't that pathetic after all. If you're looking for more work, I have another job that doesn't require a lot of brain power.
string_id message = new string_id (c_stringFile, "s_227");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Surprised you didn't take it then. What do you have?
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not doing your work for you. I'm out of here.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_229");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_249");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 19);
npcStartConversation (player, npc, "event_bossk_bossk", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "poke");
//-- NPC: You don't look like much ta me, but I don't think that matters. If you need some work, I have some tasks that might not kill ya.
string_id message = new string_id (c_stringFile, "s_253");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can handle anything you got.
boolean hasResponse0 = false;
if (event_bossk_bossk_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I think I better go. This isn't my kind of job.
boolean hasResponse1 = false;
if (event_bossk_bossk_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_255");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_271");
utils.setScriptVar (player, "conversation.event_bossk_bossk.branchId", 26);
npcStartConversation (player, npc, "event_bossk_bossk", 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 != "event_bossk_bossk")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.event_bossk_bossk.branchId");
if (branchId == 1 && event_bossk_bossk_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && event_bossk_bossk_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && event_bossk_bossk_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && event_bossk_bossk_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && event_bossk_bossk_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && event_bossk_bossk_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && event_bossk_bossk_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && event_bossk_bossk_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && event_bossk_bossk_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && event_bossk_bossk_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && event_bossk_bossk_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && event_bossk_bossk_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && event_bossk_bossk_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 27 && event_bossk_bossk_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && event_bossk_bossk_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.event_bossk_bossk.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================