mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
3319 lines
101 KiB
Plaintext
3319 lines
101 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// choster_lok_cantina.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/choster_lok_cantina";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean choster_lok_cantina_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean choster_lok_cantina_condition_hasChosterTask (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_interview_choster", "findChoster");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean choster_lok_cantina_condition_hasCompletedPirate (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean choster_lok_cantina_condition_hasCompletedChoster (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return (groundquests.isTaskActive(player, "u16_nym_themepark_interview_choster", "tellVanaChosterMsg")
|
|
|| groundquests.hasCompletedQuest(player, "u16_nym_themepark_interview_choster"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean choster_lok_cantina_condition_hasSavedSheeli (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_negotiate_peace");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void choster_lok_cantina_action_finishChosterInterview (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasSpokenChoster");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int choster_lok_cantina_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A little mynock told me that you paid the pirates a little visit.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You have a talking mynock?
|
|
if (response == "s_101")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No, %TU. It was a figure of speech.
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh, well the Mynock was right.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_104");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 3);
|
|
|
|
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.choster_lok_cantina.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That mynock has a big mouth.
|
|
if (response == "s_102")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "airguitar");
|
|
|
|
//-- NPC: So it is true? Sweet vengeance! Ahahaha.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No, %TU. It was a figure of speech.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh, well the Mynock was right.
|
|
if (response == "s_104")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
//-- NPC: I think you drank something in their hideout, %TU. Hopefully it isn't permanent...anyway. Great job!
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.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 choster_lok_cantina_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Back again, %TU? Did you need some more information?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the math problems.
|
|
if (response == "s_93")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay, I think I got it all.
|
|
if (response == "s_95")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, take care. If you need to ask me about the defenses again, I'll be here. I hope you give those pirates what they deserve.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Something I can help you with? I don't seem to recall your face, but I'm getting a little long in the tooth. Do we know each other?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_63")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Just someone who's been stuck on Lok for too long, but you can call me Choster. It seems I've seen a thousand fringers just like you wandering this wasteland. You sure we haven't met?
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No. But I'm a friend of Vana's.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_66");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No. But I'm a friend of Vana's.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah, yes! Vana Sage. Always on top of security for Nym. I'm not sure why she sticks with those Lok Revenants, though. Did you ever hear how Sage met Nym? Funny story. But you aren't here for that story right? You want to know about the Sulfur Lake Pirates and the engineering work I did for them, don't you?
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, tell me about the pirates.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_68");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Just someone who's been stuck on Lok for too long, but you can call me Choster. It seems I've seen a thousand fringers just like you wandering this wasteland. You sure we haven't met?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No. But I'm a friend of Vana's.
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah, yes! Vana Sage. Always on top of security for Nym. I'm not sure why she sticks with those Lok Revenants, though. Did you ever hear how Sage met Nym? Funny story. But you aren't here for that story right? You want to know about the Sulfur Lake Pirates and the engineering work I did for them, don't you?
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, tell me about the pirates.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_68");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_69");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah, yes! Vana Sage. Always on top of security for Nym. I'm not sure why she sticks with those Lok Revenants, though. Did you ever hear how Sage met Nym? Funny story. But you aren't here for that story right? You want to know about the Sulfur Lake Pirates and the engineering work I did for them, don't you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, tell me about the pirates.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Sulfur Lake Pirates aren't the brightest pirate band on Lok. First, they named themselves after the lake where they have their 'hidden' lair. When they realized that every other group on Lok knew where they were holed up, the Sulfur crew hired me to set up some defenses. We eventually had a... falling out. There's no band of thieves that I hate more.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate them?
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Sulfur Lake Pirates aren't the brightest pirate band on Lok. First, they named themselves after the lake where they have their 'hidden' lair. When they realized that every other group on Lok knew where they were holed up, the Sulfur crew hired me to set up some defenses. We eventually had a... falling out. There's no band of thieves that I hate more.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of work did you do?
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I established the safeguards on their security system. It's not too dangerous, but does keep visitors out of the back room. Anyone who wants to enter needs to punch in a series of codes, which only the pirates know. But I did leave a backdoor: I gave the security system a rudimentary AI that will ask three questions to anyone who doesn't have the code.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Can you tell me more about this system's 'backdoor?'
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate them?
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_79");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate them?
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I established the safeguards on their security system. It's not too dangerous, but does keep visitors out of the back room. Anyone who wants to enter needs to punch in a series of codes, which only the pirates know. But I did leave a backdoor: I gave the security system a rudimentary AI that will ask three questions to anyone who doesn't have the code.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can you tell me more about this system's 'backdoor?'
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you don't have the access code, the security system is programmed to ask you three questions. The system's AI is a little... independent. It changes the questions periodically, so I don't know what they are, exactly. But, I only programmed it with knowledge in three fields: color spectrums, math, and Tatooine humor. Do you want to know more about these areas?
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate them?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: If you don't have the access code, the security system is programmed to ask you three questions. The system's AI is a little... independent. It changes the questions periodically, so I don't know what they are, exactly. But, I only programmed it with knowledge in three fields: color spectrums, math, and Tatooine humor. Do you want to know more about these areas?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the math problems.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
choster_lok_cantina_action_finishChosterInterview (player, npc);
|
|
|
|
//-- NPC: Well, take care. If you need to ask me about the defenses again, I'll be here. I hope you give those pirates what they deserve.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the math problems.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
choster_lok_cantina_action_finishChosterInterview (player, npc);
|
|
|
|
//-- NPC: Well, take care. If you need to ask me about the defenses again, I'll be here. I hope you give those pirates what they deserve.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the math problems.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
choster_lok_cantina_action_finishChosterInterview (player, npc);
|
|
|
|
//-- NPC: Well, take care. If you need to ask me about the defenses again, I'll be here. I hope you give those pirates what they deserve.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In my youth, I tried to make my fortune by forging famous holopaintings. I wasn't very successful, but I did learn basic facts about the 'color wheel.' The color spectrum includes both primary and secondary colors, and there are opposing colors on the color wheel. Red is the opposite of green, for example. The security system's AI seemed fascinated with the color wheel, so you might do a little research on that.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the math problems.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, at the time I was very intrigued by sequential numbers. If you're presented with a string of numbers, like 1, 3, 5, and 7, what comes next? Nine of course. That's just a simple odd number sequence. The sequence the AI uses might be a bit harder, but it could also be as easy as 1-2-3.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A few years back, I was stranded on Tatooine. I was 'befriended' by a Rodian drunk who liked to tell really terrible jokes. The jokes always involved Tatooine native species, like Jawas or dewbacks. The jokes were just awful... How do you get a one-armed Jawa out of a tree? Wave. I tried to purge the jokes from my brain by transferring them to the AI. If the system asks you a joke, just pick the most obvious punch line.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
boolean hasResponse4 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
boolean hasResponse5 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why do you hate the pirates?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll deal with the pirates.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
choster_lok_cantina_action_finishChosterInterview (player, npc);
|
|
|
|
//-- NPC: Well, take care. If you need to ask me about the defenses again, I'll be here. I hope you give those pirates what they deserve.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: After I set up their systems, the Sulfur morons decided that it would be easier, and maybe safer, to kill me instead of pay me. I barely escaped their bloodthirsty veermok with my life. I had to change my name and find an image designer to give me a new face. But I don't forget or forgive being betrayed. I came back here to hide on Lok, waiting for a chance to repay them.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of work did you do for the pirates?
|
|
if (response == "s_107")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I established the safeguards on their security system. It's not too dangerous, but does keep visitors out of the back room. Anyone who wants to enter needs to punch in a series of codes, which only the pirates know. But I did leave a backdoor: I gave the security system a rudimentary AI that will ask three questions to anyone who doesn't have the code.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Can you tell me more about this system's 'backdoor?'
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate them?
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_79");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about Vana Sage meeting Nym.
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Sulfur Lake Pirates aren't the brightest pirate band on Lok. First, they named themselves after the lake where they have their 'hidden' lair. When they realized that every other group on Lok knew where they were holed up, the Sulfur crew hired me to set up some defenses. We eventually had a... falling out. There's no band of thieves that I hate more.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate them?
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, Sage was hired by the Trade Federation, obviously a long time ago, to capture Nym. And believe it or not, she actually succeeded. She was the first and the last to succeed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How did Vana and Nym become partners.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Trade Federation wasn't exactly known for their honor. Not long after capturing Nym, Sage found out that the Trade Federation had a put out a contract for her termination. After that, well, the enemy of your enemy is your friend. I guess Nym thought it was a good idea to keep Sage close to help avoid being imprisoned in the future. Ah, I'm not doing the story justice. Lets just say that Nym and Sage busted a lot of Trade Federation heads.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So tell me about the pirates.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_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_73");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int choster_lok_cantina_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Trade Federation wasn't exactly known for their honor. Not long after capturing Nym, Sage found out that the Trade Federation had a put out a contract for her termination. After that, well, the enemy of your enemy is your friend. I guess Nym thought it was a good idea to keep Sage close to help avoid being imprisoned in the future. Ah, I'm not doing the story justice. Lets just say that Nym and Sage busted a lot of Trade Federation heads.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So tell me about the pirates.
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Sulfur Lake Pirates aren't the brightest pirate band on Lok. First, they named themselves after the lake where they have their 'hidden' lair. When they realized that every other group on Lok knew where they were holed up, the Sulfur crew hired me to set up some defenses. We eventually had a... falling out. There's no band of thieves that I hate more.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of work did you do?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why do you hate them?
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_77");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.choster_lok_cantina");
|
|
|
|
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.choster_lok_cantina");
|
|
|
|
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 (choster_lok_cantina_condition_hasSavedSheeli (player, npc))
|
|
{
|
|
//-- NPC: I heard what you did for Sheeli, my sister. Thanks for saving her from the Sulfur Lake Pirates. Now let me buy you a drink!
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition_hasCompletedPirate (player, npc))
|
|
{
|
|
//-- NPC: A little mynock told me that you paid the pirates a little visit.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You have a talking mynock?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: That mynock has a big mouth.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_101");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "choster_lok_cantina", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition_hasCompletedChoster (player, npc))
|
|
{
|
|
//-- NPC: Back again, %TU? Did you need some more information?
|
|
string_id message = new string_id (c_stringFile, "s_91");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me about the color spectrum.
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the math problems.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about the Tatooine jokes.
|
|
boolean hasResponse2 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Okay, I think I got it all.
|
|
boolean hasResponse3 = false;
|
|
if (choster_lok_cantina_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_92");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_93");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_95");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "choster_lok_cantina", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition_hasChosterTask (player, npc))
|
|
{
|
|
//-- NPC: Something I can help you with? I don't seem to recall your face, but I'm getting a little long in the tooth. Do we know each other?
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No. But I'm a friend of Vana's.
|
|
boolean hasResponse1 = false;
|
|
if (choster_lok_cantina_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_63");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
|
|
|
|
utils.setScriptVar (player, "conversation.choster_lok_cantina.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "choster_lok_cantina", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (choster_lok_cantina_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I can't talk right now. I'm too busy appreciating silence. Get the hint?
|
|
string_id message = new string_id (c_stringFile, "s_61");
|
|
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 != "choster_lok_cantina")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
if (branchId == 2 && choster_lok_cantina_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && choster_lok_cantina_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && choster_lok_cantina_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && choster_lok_cantina_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && choster_lok_cantina_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && choster_lok_cantina_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && choster_lok_cantina_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && choster_lok_cantina_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && choster_lok_cantina_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && choster_lok_cantina_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && choster_lok_cantina_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && choster_lok_cantina_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && choster_lok_cantina_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && choster_lok_cantina_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && choster_lok_cantina_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.choster_lok_cantina.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|