mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
2132 lines
65 KiB
Plaintext
2132 lines
65 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// newbie_ranged_combat.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/newbie_ranged_combat";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean newbie_ranged_combat_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_completedStepOne (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_1"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_completedStepTwo (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_2"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_completedStepThree (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_3"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_isOnStepOne (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_1"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_isOnStepTwo (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_2"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_isOnStepThree (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/newbie_ranged_combat", "newbie_ranged_kill_zealots_3"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean newbie_ranged_combat_condition_pickingPurvisPocket (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive(player, "quest/steal_speeder", "pickPurvisPocket"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void newbie_ranged_combat_action_grantRangedCombatQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "quest/newbie_ranged_combat");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void newbie_ranged_combat_action_startTaskTwo (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "start_task_two");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void newbie_ranged_combat_action_startTaskThree (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "start_task_three");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void newbie_ranged_combat_action_sendPocketPickSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "purvisPocketPicked");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int newbie_ranged_combat_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh! Hello. Was there something you wanted to talk about?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Um, no. (PICK POCKET)
|
|
if (response == "s_61")
|
|
{
|
|
newbie_ranged_combat_action_sendPocketPickSignal (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All right then. Have a nice day.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So, you've done it have you? I thought you might, I just thought you might. Who are you again? Oh, right. The Tusken Slayer. That's what I'll call you since I can't seem to remember your name. What was the nickname I just gave you? Doesn't matter. I need my pills. Anyway. What were we talking about?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Er...
|
|
if (response == "s_144")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excellent. Well, our time here is done. If you'd like you can go speak to Mayor Guh'rantt and perhaps he can find some more people to teach you some of the basics. Ok? Say, who were you again?
|
|
string_id message = new string_id (c_stringFile, "s_149");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yeah, I'm back again.
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Excellent. Well, our time here is done. If you'd like you can go speak to Mayor Guh'rantt and perhaps he can find some more people to teach you some of the basics. Ok? Say, who were you again?
|
|
string_id message = new string_id (c_stringFile, "s_149");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So, you've managed that as well, eh? I knew you had it in you. You've got that look, you know? The one that says you can handle yourself. What? What was I saying? Oh, right. Tuskens. I still think Jabba's behind it all. But anyway, that's not the point. What was the point?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You don't know the point?
|
|
if (response == "s_155")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right! Tuskens it is then. That's what we were talking about. Oh, and special moves. Did I tell you about those? I didn't, did I? Each of the disciplines of marksman allows you to learn special attacks. These can be very useful.
|
|
string_id message = new string_id (c_stringFile, "s_160");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of special attacks?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_163");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tuskens?
|
|
if (response == "s_157")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right! Tuskens it is then. That's what we were talking about. Oh, and special moves. Did I tell you about those? I didn't, did I? Each of the disciplines of marksman allows you to learn special attacks. These can be very useful.
|
|
string_id message = new string_id (c_stringFile, "s_160");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of special attacks?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_163");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Right! Tuskens it is then. That's what we were talking about. Oh, and special moves. Did I tell you about those? I didn't, did I? Each of the disciplines of marksman allows you to learn special attacks. These can be very useful.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of special attacks?
|
|
if (response == "s_163")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Things like Aimed Shot and Roll Shot are very important. They increase your accuracy, or sometimes your damage, or sometimes even your defense when you use them. But be careful not to overuse them. If you get tired and run out of energy you'll have to rest before you can do anything else.
|
|
string_id message = new string_id (c_stringFile, "s_165");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Is there anything else I need to know?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_168");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Things like Aimed Shot and Roll Shot are very important. They increase your accuracy, or sometimes your damage, or sometimes even your defense when you use them. But be careful not to overuse them. If you get tired and run out of energy you'll have to rest before you can do anything else.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is there anything else I need to know?
|
|
if (response == "s_168")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: At this point I believe you know everything I can teach you. I recommend that you talk to other adventurous type persons such as yourself and learn more 'tricks of the trade' as it were from them. Hm...seems like there was something else...
|
|
string_id message = new string_id (c_stringFile, "s_171");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Something else I needed to know?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_173");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: At this point I believe you know everything I can teach you. I recommend that you talk to other adventurous type persons such as yourself and learn more 'tricks of the trade' as it were from them. Hm...seems like there was something else...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Something else I needed to know?
|
|
if (response == "s_173")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hm? What? Oh, yes! Yes. There is something else I wanted you to do. Have you seen the Tusken zealots wandering about? You have haven't you?
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Uh...you've been sending me to 'take care' of them.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_179");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hm? What? Oh, yes! Yes. There is something else I wanted you to do. Have you seen the Tusken zealots wandering about? You have haven't you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uh...you've been sending me to 'take care' of them.
|
|
if (response == "s_179")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Have I? Good. I think I should have been. Oh, I'd like you take care of a few more. If you're up for it. Actually, are you up for it?
|
|
string_id message = new string_id (c_stringFile, "s_181");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not at the moment.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm ready.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_184");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_187");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Have I? Good. I think I should have been. Oh, I'd like you take care of a few more. If you're up for it. Actually, are you up for it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not at the moment.
|
|
if (response == "s_184")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Then go take care of your business and come back when you have more time.
|
|
string_id message = new string_id (c_stringFile, "s_270");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready.
|
|
if (response == "s_187")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ready for what?
|
|
string_id message = new string_id (c_stringFile, "s_189");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Killing more Tusken zealots?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_192");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ready for what?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Killing more Tusken zealots?
|
|
if (response == "s_192")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
newbie_ranged_combat_action_startTaskThree (player, npc);
|
|
|
|
//-- NPC: That's a great idea! Hey now, why didn't I think of that? Ok, you go out and take care of 10 more of those pesky Tusken zealots and then come back and we'll have one last little chat. Ok?
|
|
string_id message = new string_id (c_stringFile, "s_195");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I hear you've done your part to rid the city of those pesky little desert dwellers. You are the person I asked to take care of that right? Right. I thought so. So, what did you come back here for?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uh, you told me to?
|
|
if (response == "s_200")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right, right. Right you are. Yes indeed. Right you are. What? Oh, yes. Ranged combat. I guess the important thing you need to learn about is weapons.
|
|
string_id message = new string_id (c_stringFile, "s_205");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I need to know about weapons?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_208");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You were going to teach me more about combat.
|
|
if (response == "s_203")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Right, right. Right you are. Yes indeed. Right you are. What? Oh, yes. Ranged combat. I guess the important thing you need to learn about is weapons.
|
|
string_id message = new string_id (c_stringFile, "s_205");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I need to know about weapons?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_208");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Right, right. Right you are. Yes indeed. Right you are. What? Oh, yes. Ranged combat. I guess the important thing you need to learn about is weapons.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I need to know about weapons?
|
|
if (response == "s_208")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The most important thing is the DPS. Do you know DPS? Every weapon is rated for DPS by the council of something or other or something. Anyway, examining your weapon will show you the DPS. It's a number associated with every weapon created in the galaxy.
|
|
string_id message = new string_id (c_stringFile, "s_211");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What does DPS mean?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_213");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The most important thing is the DPS. Do you know DPS? Every weapon is rated for DPS by the council of something or other or something. Anyway, examining your weapon will show you the DPS. It's a number associated with every weapon created in the galaxy.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does DPS mean?
|
|
if (response == "s_213")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's Damage Per Second. DPS, see? Clever isn't it? Anyway, a marksman is only as good as his weapon. Well, that's not entirely true, your skill will play a great part in how well you use the weapon, but the weapon is an important part of the equation. You want a weapon that has the highest DPS possible.
|
|
string_id message = new string_id (c_stringFile, "s_216");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How is DPS calculated?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_219");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's Damage Per Second. DPS, see? Clever isn't it? Anyway, a marksman is only as good as his weapon. Well, that's not entirely true, your skill will play a great part in how well you use the weapon, but the weapon is an important part of the equation. You want a weapon that has the highest DPS possible.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How is DPS calculated?
|
|
if (response == "s_219")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Damage per second is a function of the amount of damage a weapon can do divided by the amount of time it takes to refire. A weapon that does low damage with a high rate of fire is just as good as a weapon that does a lot of damage but fires slowly.
|
|
string_id message = new string_id (c_stringFile, "s_221");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I think I've got it.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Can you repeat all that?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_224");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_250");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Damage per second is a function of the amount of damage a weapon can do divided by the amount of time it takes to refire. A weapon that does low damage with a high rate of fire is just as good as a weapon that does a lot of damage but fires slowly.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I think I've got it.
|
|
if (response == "s_224")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good, I have more for you to do. The mayor's a little suspicious about the Tusken attacks. They've been a little more aggressive these days, and no one's sure why. If you ask me that Hutt has something to do with it.
|
|
string_id message = new string_id (c_stringFile, "s_227");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You mean Jabba?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do you want me to do?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_229");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_237");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can you repeat all that?
|
|
if (response == "s_250")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The most important thing is the DPS. Do you know DPS? Every weapon is rated for DPS by the council of something or other or something. Anyway, examining your weapon will show you the DPS. It's a number associated with every weapon created in the galaxy.
|
|
string_id message = new string_id (c_stringFile, "s_211");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What does DPS mean?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_213");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good, I have more for you to do. The mayor's a little suspicious about the Tusken attacks. They've been a little more aggressive these days, and no one's sure why. If you ask me that Hutt has something to do with it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You mean Jabba?
|
|
if (response == "s_229")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Eh? You know about Jabba? Well, I don't know why I'm surprised. He's probably infamous throughout the galaxy by now. He's a no good waste of life. Every time we have trouble he seems to be behind it somehow. So, you ready for some more work?
|
|
string_id message = new string_id (c_stringFile, "s_232");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: More Tuskens?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_235");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you want me to do?
|
|
if (response == "s_237")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, regardless of who's behind it, they still need to be taken care of. This time I'll expect a little more from you. How about 10 Tuskens? Hm? Can you handle that?
|
|
string_id message = new string_id (c_stringFile, "s_240");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Consider it done.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not sure I'm ready just yet.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_243");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Eh? You know about Jabba? Well, I don't know why I'm surprised. He's probably infamous throughout the galaxy by now. He's a no good waste of life. Every time we have trouble he seems to be behind it somehow. So, you ready for some more work?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: More Tuskens?
|
|
if (response == "s_235")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, regardless of who's behind it, they still need to be taken care of. This time I'll expect a little more from you. How about 10 Tuskens? Hm? Can you handle that?
|
|
string_id message = new string_id (c_stringFile, "s_240");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Consider it done.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not sure I'm ready just yet.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_243");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, regardless of who's behind it, they still need to be taken care of. This time I'll expect a little more from you. How about 10 Tuskens? Hm? Can you handle that?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Consider it done.
|
|
if (response == "s_243")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
newbie_ranged_combat_action_startTaskTwo (player, npc);
|
|
|
|
//-- NPC: Excellent. Then I'll be expecting your safe return any time. When you come back we'll have one more little chat.
|
|
string_id message = new string_id (c_stringFile, "s_245");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not sure I'm ready just yet.
|
|
if (response == "s_248")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Then go take care of your business and come back when you have more time.
|
|
string_id message = new string_id (c_stringFile, "s_270");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So, you're the new one, huh? I've heard about you, kid. No, really, I have. Who are you again? No, no, wait, nevermind. I know who you are. You're supposed to be learning something from me. I'm here to teach you about...er...what is it I'm supposed to be teaching you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ranged combat?
|
|
if (response == "s_254")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course, of course. Ranged combat. What? What were we talking about? Oh, yes. Pistols, carbines, and rifles. It doesn't matter which you're interested in, they all work from the same concept. Hurt someone over there while standing over here. Simple enough, right?
|
|
string_id message = new string_id (c_stringFile, "s_258");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds simple enough.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Can you explain a little more?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_260");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_272");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Don't you know?
|
|
if (response == "s_256")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course, of course. Ranged combat. What? What were we talking about? Oh, yes. Pistols, carbines, and rifles. It doesn't matter which you're interested in, they all work from the same concept. Hurt someone over there while standing over here. Simple enough, right?
|
|
string_id message = new string_id (c_stringFile, "s_258");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds simple enough.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Can you explain a little more?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_260");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_272");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Of course, of course. Ranged combat. What? What were we talking about? Oh, yes. Pistols, carbines, and rifles. It doesn't matter which you're interested in, they all work from the same concept. Hurt someone over there while standing over here. Simple enough, right?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds simple enough.
|
|
if (response == "s_260")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is. Now, I assume you were given a weapon, all right? First things first is basic concepts. Stand somewhere and shoot at things that are not near ya. You can do me a favor too. I'm supposed to be cleaning up the city around here, so why don't you go take care of, say 5 of these Tusken zealots that have been plaguing the city, and then I'll know you're on your way to understanding.
|
|
string_id message = new string_id (c_stringFile, "s_262");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I think I'm busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_264");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_268");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can you explain a little more?
|
|
if (response == "s_272")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well it's not a complicated process really. You're going to use your weapon, a pistol or a carbine or a rifle, and you're going to project some form of damaging attack, like a bullet or a laser blast, to hit some target that's some distance away. Got all that?
|
|
string_id message = new string_id (c_stringFile, "s_274");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's it?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_276");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is. Now, I assume you were given a weapon, all right? First things first is basic concepts. Stand somewhere and shoot at things that are not near ya. You can do me a favor too. I'm supposed to be cleaning up the city around here, so why don't you go take care of, say 5 of these Tusken zealots that have been plaguing the city, and then I'll know you're on your way to understanding.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_264")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
newbie_ranged_combat_action_grantRangedCombatQuest (player, npc);
|
|
|
|
//-- NPC: Excellent. Come back when you've taken out the Tuskens and I'll explain a bit more about ranged combat.
|
|
string_id message = new string_id (c_stringFile, "s_266");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I think I'm busy right now.
|
|
if (response == "s_268")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Then go take care of your business and come back when you have more time.
|
|
string_id message = new string_id (c_stringFile, "s_270");
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int newbie_ranged_combat_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well it's not a complicated process really. You're going to use your weapon, a pistol or a carbine or a rifle, and you're going to project some form of damaging attack, like a bullet or a laser blast, to hit some target that's some distance away. Got all that?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's it?
|
|
if (response == "s_276")
|
|
{
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is. Now, I assume you were given a weapon, all right? First things first is basic concepts. Stand somewhere and shoot at things that are not near ya. You can do me a favor too. I'm supposed to be cleaning up the city around here, so why don't you go take care of, say 5 of these Tusken zealots that have been plaguing the city, and then I'll know you're on your way to understanding.
|
|
string_id message = new string_id (c_stringFile, "s_262");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I think I'm busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_264");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_268");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.newbie_ranged_combat");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.newbie_ranged_combat");
|
|
|
|
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 (newbie_ranged_combat_condition_pickingPurvisPocket (player, npc))
|
|
{
|
|
//-- NPC: Oh! Hello. Was there something you wanted to talk about?
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Um, no. (PICK POCKET)
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_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_61");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "newbie_ranged_combat", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_isOnStepOne (player, npc))
|
|
{
|
|
//-- NPC: Ah, Tuskens all taken care of then? No? Then what are you standing around gabbing with me for? Go get them out of our city!
|
|
string_id message = new string_id (c_stringFile, "s_128");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_isOnStepTwo (player, npc))
|
|
{
|
|
//-- NPC: I hear there's still some Tusken Raiders out there waiting to meet with you.
|
|
string_id message = new string_id (c_stringFile, "s_132");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_isOnStepThree (player, npc))
|
|
{
|
|
//-- NPC: Just not up to it? Or were you waiting for something? Come back and see me when you're done with that little task I gave you.
|
|
string_id message = new string_id (c_stringFile, "s_136");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_completedStepThree (player, npc))
|
|
{
|
|
//-- NPC: So, you've done it have you? I thought you might, I just thought you might. Who are you again? Oh, right. The Tusken Slayer. That's what I'll call you since I can't seem to remember your name. What was the nickname I just gave you? Doesn't matter. I need my pills. Anyway. What were we talking about?
|
|
string_id message = new string_id (c_stringFile, "s_140");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Er...
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yeah, I'm back again.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_144");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_147");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "newbie_ranged_combat", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_completedStepTwo (player, npc))
|
|
{
|
|
//-- NPC: So, you've managed that as well, eh? I knew you had it in you. You've got that look, you know? The one that says you can handle yourself. What? What was I saying? Oh, right. Tuskens. I still think Jabba's behind it all. But anyway, that's not the point. What was the point?
|
|
string_id message = new string_id (c_stringFile, "s_152");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You don't know the point?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tuskens?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_155");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_157");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "newbie_ranged_combat", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition_completedStepOne (player, npc))
|
|
{
|
|
//-- NPC: I hear you've done your part to rid the city of those pesky little desert dwellers. You are the person I asked to take care of that right? Right. I thought so. So, what did you come back here for?
|
|
string_id message = new string_id (c_stringFile, "s_197");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Uh, you told me to?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You were going to teach me more about combat.
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_200");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_203");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "newbie_ranged_combat", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: So, you're the new one, huh? I've heard about you, kid. No, really, I have. Who are you again? No, no, wait, nevermind. I know who you are. You're supposed to be learning something from me. I'm here to teach you about...er...what is it I'm supposed to be teaching you?
|
|
string_id message = new string_id (c_stringFile, "s_252");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ranged combat?
|
|
boolean hasResponse0 = false;
|
|
if (newbie_ranged_combat_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Don't you know?
|
|
boolean hasResponse1 = false;
|
|
if (newbie_ranged_combat_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_254");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_256");
|
|
|
|
utils.setScriptVar (player, "conversation.newbie_ranged_combat.branchId", 25);
|
|
|
|
npcStartConversation (player, npc, "newbie_ranged_combat", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "newbie_ranged_combat")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
if (branchId == 1 && newbie_ranged_combat_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && newbie_ranged_combat_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && newbie_ranged_combat_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && newbie_ranged_combat_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && newbie_ranged_combat_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && newbie_ranged_combat_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && newbie_ranged_combat_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && newbie_ranged_combat_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && newbie_ranged_combat_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && newbie_ranged_combat_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && newbie_ranged_combat_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && newbie_ranged_combat_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && newbie_ranged_combat_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && newbie_ranged_combat_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && newbie_ranged_combat_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && newbie_ranged_combat_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && newbie_ranged_combat_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && newbie_ranged_combat_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && newbie_ranged_combat_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && newbie_ranged_combat_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && newbie_ranged_combat_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.newbie_ranged_combat.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|