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

2572 lines
72 KiB
Plaintext

// ======================================================================
//
// c_newbie_secondchance.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.combat;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/c_newbie_secondchance";
// ======================================================================
// Script Conditions
// ======================================================================
boolean c_newbie_secondchance_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_combatHigh (obj_id player, obj_id npc)
{
if ((combat.getLevel(player)) > 9)
return true;
return false;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_combatLow (obj_id player, obj_id npc)
{
if ((combat.getLevel(player)) < 10)
return true;
return false;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_safety (obj_id player, obj_id npc)
{
return false;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_impOnQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotoimp");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_smugOnQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotosmug");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_rebOnQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotoreb");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_pilotOnQuest (obj_id player, obj_id npc)
{
boolean imp = groundquests.isQuestActive(player, "quest/tatooine_eisley_gotoimp");
boolean reb = groundquests.isQuestActive(player, "tatooine_eisley_gotoreb");
boolean smug = groundquests.isQuestActive(player, "tatooine_eisley_gotosmug");
if (imp || reb || smug)
return false;
return true;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_trehlaOnQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gototrehla_v2");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_newbieStart (obj_id player, obj_id npc)
{
boolean niko = groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gotoniko");
boolean mayor = groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gotomayor");
if(niko || mayor)
return false;
return true;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_mayorAndTen (obj_id player, obj_id npc)
{
return ((groundquests.hasCompletedQuest (player, "newbie_scout_pt6") ||
groundquests.hasCompletedQuest (player, "purvis_kill_warriors") ||
groundquests.hasCompletedQuest (player, "newbie_mayor_vaigon_shinn")) &&
(c_newbie_secondchance_condition_combatHigh(player, npc)));
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_bibOnQuest (obj_id player, obj_id npc)
{
boolean niko = groundquests.isQuestActive(player, "tatooine_eisley_gotoniko");
boolean mayor = groundquests.isQuestActive(player, "tatooine_eisley_gotomayor");
if(niko || mayor)
return true;
return false;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_isAcquiringVehicle (obj_id player, obj_id npc)
{
if (groundquests.isQuestActive (player, "quest/steal_speeder") || groundquests.isQuestActive (player, "quest/build_speeder"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_needsVehicle (obj_id player, obj_id npc)
{
if (groundquests.hasCompletedQuest (player, "quest/build_speeder") || groundquests.hasCompletedQuest (player, "quest/steal_speeder"))
{
return false;
}
return true;
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_alreadyOnNiko (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_nikos_coins");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_allComplete (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "tatooine_eisley_faceevil");
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_onTrehla (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "quest/c_newbie_quest1") ||
groundquests.isQuestActive(player, "quest/c_newbie_quest1a") ||
groundquests.isQuestActive(player, "quest/c_newbie_quest4") ||
groundquests.isQuestActive(player, "quest/c_newbie_quest5") ||
groundquests.isQuestActive(player, "quest/c_newbie_quest6") ||
groundquests.isQuestActive(player, "quest/tatooine_eisley_gototrehla_v2"));
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_FinishedAllMayor (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest (player, "newbie_scout_pt6") &&
groundquests.hasCompletedQuest (player, "purvis_kill_warriors") &&
groundquests.hasCompletedQuest (player, "newbie_mayor_vaigon_shinn"));
}
// ----------------------------------------------------------------------
boolean c_newbie_secondchance_condition_fromMayor (obj_id player, obj_id npc)
{
return (c_newbie_secondchance_condition_mayorAndTen(player, npc) || c_newbie_secondchance_condition_FinishedAllMayor(player, npc));
}
// ======================================================================
// Script Actions
// ======================================================================
void c_newbie_secondchance_action_signalOffer (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_sendToMajolnir (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
groundquests.requestGrantQuest (player, "quest/find_majolnir");
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_signalGotoVourk (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_goto_vourk");
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_facePlayerAndSignalVourk (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_goto_vourk");
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantImp (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoimp");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantReb (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoreb");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantSmug (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/tatooine_eisley_gotosmug");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantTrehla (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "tatooine_eisley_gototrehla_v2");
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantStart (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
if ((combat.getLevel(player)) > 9)
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoniko");
groundquests.grantQuest(questId, player, npc, true);
}
else
{
int questId1 = questGetQuestId("quest/tatooine_eisley_gotomayor");
groundquests.grantQuest(questId1, player, npc, true);
}
}
// ----------------------------------------------------------------------
void c_newbie_secondchance_action_grantTalkNiko (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/tatooine_eisley_talkniko");
groundquests.grantQuest(questId, player, npc, true);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int c_newbie_secondchance_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good work taking care of those jobs for the Mayor. He's had plenty of trouble with Jabba. I am sure the Mayor appreciates all of your help.
//-- [RESPONSE NOTE]
//-- PLAYER: It was easy.
if (response == "s_86")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Glad you feel that way because I think we're ready to get you involved with the big boys. If you do the next couple of tasks well, you should be introduced to Reimos.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what do I need to do?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_90");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Glad you feel that way because I think we're ready to get you involved with the big boys. If you do the next couple of tasks well, you should be introduced to Reimos.
//-- [RESPONSE NOTE]
//-- PLAYER: So what do I need to do?
if (response == "s_90")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Talk to Niko. He needs an upstart gang roughed up. Don't worry about the gangers though. These guys are some of the meanest punks in Mos Eisley. You'll be doing us all a favor by cleaning up that trash.
string_id message = new string_id (c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'm ready.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_94");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Talk to Niko. He needs an upstart gang roughed up. Don't worry about the gangers though. These guys are some of the meanest punks in Mos Eisley. You'll be doing us all a favor by cleaning up that trash.
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'm ready.
if (response == "s_94")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_forward");
c_newbie_secondchance_action_grantTalkNiko (player, npc);
//-- NPC: That's Niko right there.
string_id message = new string_id (c_stringFile, "s_96");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Did you get the comm from Bib yet?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, I did.
if (response == "s_100")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nervous");
//-- NPC: What are you waiting for? Take care of what he needs you to do.
string_id message = new string_id (c_stringFile, "s_102");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm on my way.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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.c_newbie_secondchance.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, I didn't.
if (response == "s_108")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: It should be any second.
string_id message = new string_id (c_stringFile, "s_110");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll wait.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_112");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What are you waiting for? Take care of what he needs you to do.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm on my way.
if (response == "s_104")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Good luck, friend.
string_id message = new string_id (c_stringFile, "s_106");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: It should be any second.
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'll wait.
if (response == "s_112")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Bye.
string_id message = new string_id (c_stringFile, "s_114");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Have you finished with Trehla yet?
//-- [RESPONSE NOTE]
//-- PLAYER: Not quite.
if (response == "s_62")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_finger_warning");
//-- NPC: Well hurry, you don't want to make Jabba angry.
string_id message = new string_id (c_stringFile, "s_63");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You have to hurry. Jabba is already searching for you.
//-- [RESPONSE NOTE]
//-- PLAYER: Why does Jabba want to force me to work for him?
if (response == "s_118")
{
c_newbie_secondchance_action_signalGotoVourk (player, npc);
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: I can't explain right now. The Empire wanted you because you're special, and that's good enough for him to want you too. That's all I can say right now.
string_id message = new string_id (c_stringFile, "s_120");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what do I do?
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not doing anything you ask, until I know why Jabba is after me.
boolean hasResponse1 = false;
if (c_newbie_secondchance_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_122");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_170");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I can't explain right now. The Empire wanted you because you're special, and that's good enough for him to want you too. That's all I can say right now.
//-- [RESPONSE NOTE]
//-- PLAYER: So what do I do?
if (response == "s_122")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: I have inside information that Jabba's man Bib is going to contact you shortly. Just do what he asks. We'll make sure to get you out of this situation soon.
string_id message = new string_id (c_stringFile, "s_124");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Is he going to kill me?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_126");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not doing anything you ask, until I know why Jabba is after me.
if (response == "s_170")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "poke");
//-- NPC: The Empire thinks you're something special. That's enough to get Jabba's interest. You also were rescued by Han Solo, someone Jabba has a burning interest in. Jabba figures one way or another, you're a gold mine that just fell into his lap.
string_id message = new string_id (c_stringFile, "s_172");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what do I do now?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_64");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 28);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I have inside information that Jabba's man Bib is going to contact you shortly. Just do what he asks. We'll make sure to get you out of this situation soon.
//-- [RESPONSE NOTE]
//-- PLAYER: Is he going to kill me?
if (response == "s_126")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: No, he wants you to work for him. We've got people on the inside that will be able to help you later. Just do what Bib asks.
string_id message = new string_id (c_stringFile, "s_128");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How will I know who I can trust?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_130");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, he wants you to work for him. We've got people on the inside that will be able to help you later. Just do what Bib asks.
//-- [RESPONSE NOTE]
//-- PLAYER: How will I know who I can trust?
if (response == "s_130")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: You won't. Just do what Bib asks and we'll handle the rest.
string_id message = new string_id (c_stringFile, "s_132");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll do what he says.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: But I don't know anything about Mos Eisley!
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What if he asks me to fly a ship for him?
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_142");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You won't. Just do what Bib asks and we'll handle the rest.
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'll do what he says.
if (response == "s_134")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
c_newbie_secondchance_action_grantStart (player, npc);
//-- NPC: Go now!
string_id message = new string_id (c_stringFile, "s_136");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: But I don't know anything about Mos Eisley!
if (response == "s_138")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantTrehla (player, npc);
//-- NPC: Trehla can show you what you need to know. She's got no love for Jabba, that's for sure.
string_id message = new string_id (c_stringFile, "s_140");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What if he asks me to fly a ship for him?
if (response == "s_142")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: There are three training schools on Tatooine. The Imperial trainer, the Smuggler's Alliance and the Rebels.
string_id message = new string_id (c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to talk to the Imperial trainer.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want to talk to the smuggler.
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I want to talk to the Rebellion trainer.
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_146");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_154");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_162");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There are three training schools on Tatooine. The Imperial trainer, the Smuggler's Alliance and the Rebels.
//-- [RESPONSE NOTE]
//-- PLAYER: I want to talk to the Imperial trainer.
if (response == "s_146")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Lt. Akal Colzet is the Imperial pilot trainer. I'll upload his information into your datapad.
string_id message = new string_id (c_stringFile, "s_148");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_150");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I want to talk to the smuggler.
if (response == "s_154")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Dravis leads up the smuggler's alliance. I've personally seen him run a Star Destroyer blockade without taking a scratch. I'll put his information in your datapad.
string_id message = new string_id (c_stringFile, "s_156");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_158");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I want to talk to the Rebellion trainer.
if (response == "s_162")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Commander Da'la Socuna is the trainer for a group of pilots that I believe have ties to the Rebellion. Here is his location data.
string_id message = new string_id (c_stringFile, "s_164");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_166");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Lt. Akal Colzet is the Imperial pilot trainer. I'll upload his information into your datapad.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks.
if (response == "s_150")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantImp (player, npc);
//-- NPC: Anything else?
string_id message = new string_id (c_stringFile, "s_152");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll do what he says.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: But I don't know anything about Mos Eisley!
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What if he asks me to fly a ship for him?
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_142");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Anything else?
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'll do what he says.
if (response == "s_134")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
c_newbie_secondchance_action_grantStart (player, npc);
//-- NPC: Go now!
string_id message = new string_id (c_stringFile, "s_136");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: But I don't know anything about Mos Eisley!
if (response == "s_138")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantTrehla (player, npc);
//-- NPC: Trehla can show you what you need to know. She's got no love for Jabba, that's for sure.
string_id message = new string_id (c_stringFile, "s_140");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What if he asks me to fly a ship for him?
if (response == "s_142")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: There are three training schools on Tatooine. The Imperial trainer, the Smuggler's Alliance and the Rebels.
string_id message = new string_id (c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to talk to the Imperial trainer.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want to talk to the smuggler.
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I want to talk to the Rebellion trainer.
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_146");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_154");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_162");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Dravis leads up the smuggler's alliance. I've personally seen him run a Star Destroyer blockade without taking a scratch. I'll put his information in your datapad.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks.
if (response == "s_158")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantSmug (player, npc);
//-- NPC: Anything else?
string_id message = new string_id (c_stringFile, "s_160");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll do what he says.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: But I don't know anything about Mos Eisley!
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What if he asks me to fly a ship for him?
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_142");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Anything else?
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'll do what he says.
if (response == "s_134")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
c_newbie_secondchance_action_grantStart (player, npc);
//-- NPC: Go now!
string_id message = new string_id (c_stringFile, "s_136");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: But I don't know anything about Mos Eisley!
if (response == "s_138")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantTrehla (player, npc);
//-- NPC: Trehla can show you what you need to know. She's got no love for Jabba, that's for sure.
string_id message = new string_id (c_stringFile, "s_140");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What if he asks me to fly a ship for him?
if (response == "s_142")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: There are three training schools on Tatooine. The Imperial trainer, the Smuggler's Alliance and the Rebels.
string_id message = new string_id (c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to talk to the Imperial trainer.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want to talk to the smuggler.
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I want to talk to the Rebellion trainer.
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_146");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_154");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_162");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Commander Da'la Socuna is the trainer for a group of pilots that I believe have ties to the Rebellion. Here is his location data.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks.
if (response == "s_166")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantReb (player, npc);
//-- NPC: Anything else?
string_id message = new string_id (c_stringFile, "s_168");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll do what he says.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: But I don't know anything about Mos Eisley!
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What if he asks me to fly a ship for him?
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_142");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch27 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Anything else?
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I'll do what he says.
if (response == "s_134")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shoo");
c_newbie_secondchance_action_grantStart (player, npc);
//-- NPC: Go now!
string_id message = new string_id (c_stringFile, "s_136");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: But I don't know anything about Mos Eisley!
if (response == "s_138")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_grantTrehla (player, npc);
//-- NPC: Trehla can show you what you need to know. She's got no love for Jabba, that's for sure.
string_id message = new string_id (c_stringFile, "s_140");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What if he asks me to fly a ship for him?
if (response == "s_142")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: There are three training schools on Tatooine. The Imperial trainer, the Smuggler's Alliance and the Rebels.
string_id message = new string_id (c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to talk to the Imperial trainer.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want to talk to the smuggler.
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I want to talk to the Rebellion trainer.
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_146");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_154");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_162");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The Empire thinks you're something special. That's enough to get Jabba's interest. You also were rescued by Han Solo, someone Jabba has a burning interest in. Jabba figures one way or another, you're a gold mine that just fell into his lap.
//-- [RESPONSE NOTE]
//-- PLAYER: So what do I do now?
if (response == "s_64")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: Well, I doubt Jabba will get involved in this personally. He'll probably have someone like Bib take care of you.
string_id message = new string_id (c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I don't care who contacts me, I don't want to work for Jabba.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_68");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 29);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, I doubt Jabba will get involved in this personally. He'll probably have someone like Bib take care of you.
//-- [RESPONSE NOTE]
//-- PLAYER: I don't care who contacts me, I don't want to work for Jabba.
if (response == "s_68")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: Who does? I know someone on the inside. His name is Reimos. He's being forced to work for Jabba also.
string_id message = new string_id (c_stringFile, "s_70");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How can he help me? It sounds like he has his own problems.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_72");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 30);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch30 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Who does? I know someone on the inside. His name is Reimos. He's being forced to work for Jabba also.
//-- [RESPONSE NOTE]
//-- PLAYER: How can he help me? It sounds like he has his own problems.
if (response == "s_72")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: He thinks a local shipping company is a front for something terrible. He says he's on to a way we can stop these horrible crimes and get square with Jabba all at once. You just have to play along.
string_id message = new string_id (c_stringFile, "s_74");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So how do I meet this guy?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_76");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 31);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: He thinks a local shipping company is a front for something terrible. He says he's on to a way we can stop these horrible crimes and get square with Jabba all at once. You just have to play along.
//-- [RESPONSE NOTE]
//-- PLAYER: So how do I meet this guy?
if (response == "s_76")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: You will, but you have to work your way up to it. Reimos is doing sensitive work for Jabba. He's not going to put someone he doesn't trust on that job.
string_id message = new string_id (c_stringFile, "s_79");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How will I know who is on our side?
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 32);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_secondchance_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You will, but you have to work your way up to it. Reimos is doing sensitive work for Jabba. He's not going to put someone he doesn't trust on that job.
//-- [RESPONSE NOTE]
//-- PLAYER: How will I know who is on our side?
if (response == "s_83")
{
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
//-- NPC: You won't. Just do what Bib asks and we'll handle the rest.
string_id message = new string_id (c_stringFile, "s_132");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I'll do what he says.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: But I don't know anything about Mos Eisley!
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What if he asks me to fly a ship for him?
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_134");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_142");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.c_newbie_secondchance");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
{
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
menuInfoData.setServerNotify (false);
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.c_newbie_secondchance");
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 (c_newbie_secondchance_condition_allComplete (player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk (player, npc);
//-- NPC: Great work. You've really helped out Reimos and me. I am glad to see you free of Jabba's control. Han was right about you. You're going places!
string_id message = new string_id (c_stringFile, "s_60");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition_alreadyOnNiko (player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk (player, npc);
//-- NPC: You shouldn't be talking to me. Just do what Bib is asking of you.
string_id message = new string_id (c_stringFile, "s_59");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition_fromMayor (player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk (player, npc);
//-- NPC: Good work taking care of those jobs for the Mayor. He's had plenty of trouble with Jabba. I am sure the Mayor appreciates all of your help.
string_id message = new string_id (c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It was easy.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_86");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 3);
npcStartConversation (player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition_bibOnQuest (player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk (player, npc);
//-- NPC: Did you get the comm from Bib yet?
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, I did.
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No, I didn't.
boolean hasResponse1 = false;
if (c_newbie_secondchance_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_100");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 7);
npcStartConversation (player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition_onTrehla (player, npc))
{
//-- NPC: Have you finished with Trehla yet?
string_id message = new string_id (c_stringFile, "s_61");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not quite.
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_62");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 12);
npcStartConversation (player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition_newbieStart (player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk (player, npc);
//-- NPC: You have to hurry. Jabba is already searching for you.
string_id message = new string_id (c_stringFile, "s_116");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Why does Jabba want to force me to work for him?
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_118");
utils.setScriptVar (player, "conversation.c_newbie_secondchance.branchId", 14);
npcStartConversation (player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (c_newbie_secondchance_condition__defaultCondition (player, npc))
{
c_newbie_secondchance_action_signalGotoVourk (player, npc);
//-- NPC: I'm in trouble and you don't need to be. Clear off.
string_id message = new string_id (c_stringFile, "s_200");
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 != "c_newbie_secondchance")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.c_newbie_secondchance.branchId");
if (branchId == 3 && c_newbie_secondchance_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && c_newbie_secondchance_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && c_newbie_secondchance_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && c_newbie_secondchance_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && c_newbie_secondchance_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && c_newbie_secondchance_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && c_newbie_secondchance_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && c_newbie_secondchance_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && c_newbie_secondchance_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && c_newbie_secondchance_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && c_newbie_secondchance_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && c_newbie_secondchance_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && c_newbie_secondchance_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && c_newbie_secondchance_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && c_newbie_secondchance_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && c_newbie_secondchance_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && c_newbie_secondchance_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && c_newbie_secondchance_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 27 && c_newbie_secondchance_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && c_newbie_secondchance_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 29 && c_newbie_secondchance_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 30 && c_newbie_secondchance_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && c_newbie_secondchance_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && c_newbie_secondchance_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.c_newbie_secondchance.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================