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

2217 lines
61 KiB
Plaintext

// ======================================================================
//
// newbie_scout_a.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.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/newbie_scout_a";
// ======================================================================
// Script Conditions
// ======================================================================
boolean newbie_scout_a_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_completedFirstTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_e3"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_completedSecondTask (obj_id player, obj_id npc)
{
if (groundquests.hasCompletedTask(player, "quest/newbie_scout", "newbie_scout_task_filet_kreetles"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_completedThirdTask (obj_id player, obj_id npc)
{
if (groundquests.hasCompletedTask(player, "quest/newbie_scout", "newbie_scout_make_traps"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_onFirstTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_task_skin_womprats"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_onSecondTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_task_filet_kreetles"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_onThirdTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_make_traps"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_completedFourthTask (obj_id player, obj_id npc)
{
if (groundquests.hasCompletedTask(player, "quest/newbie_scout", "newbie_scout_task_trap_rills"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_onFourthTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_task_trap_rills"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_completedFifthTask (obj_id player, obj_id npc)
{
if (groundquests.hasCompletedTask(player, "quest/newbie_scout", "newbie_scout_make_camp"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_onFifthTask (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "quest/newbie_scout", "newbie_scout_make_camp"))
{
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_mayorSent (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/c_scout_trainer");
boolean OnTask = questIsQuestComplete(questId1, player);
return OnTask;
}
// ----------------------------------------------------------------------
boolean newbie_scout_a_condition_readyForBugs (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/newbie_scout");
boolean OnTask = questIsQuestComplete(questId1, player);
return OnTask;
}
// ======================================================================
// Script Actions
// ======================================================================
void newbie_scout_a_action_startScoutQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "quest/newbie_scout");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_grantKreetles (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "quest/newbie_scout_pt2");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_sendTrapSignal (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_scout_craft_traps");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_sendRillSignal (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_scout_trap_rills");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_sendMakeCampSignal (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_scout_make_camp");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_finishScoutQuest (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_scout_launch_e4");
}
// ----------------------------------------------------------------------
void newbie_scout_a_action_signalRatReward (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "newbie_scout_launch_e4");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int newbie_scout_a_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The public health department has reported another case of grunge fever. We need those samples fast.
//-- [RESPONSE NOTE]
//-- PLAYER: I am working on it.
if (response == "s_79")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_grantKreetles (player, npc);
//-- NPC: Get to it.
string_id message = new string_id (c_stringFile, "s_122");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am still getting reports of Rontos being maimed by stumbling on kreetle burrows. Come on I need help with this.
//-- [RESPONSE NOTE]
//-- PLAYER: I am working on it.
if (response == "s_78")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Please hurry.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Look I know you are talented, but I need those bones in one piece.
//-- [RESPONSE NOTE]
//-- PLAYER: It just takes time.
if (response == "s_76")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Please hurry.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The tempest rills are making lots of problems for me. Please get on with it.
//-- [RESPONSE NOTE]
//-- PLAYER: Just getting to it.
if (response == "s_74")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Please hurry.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The tempest rills are history. The mayor really owes you one. If it was not for you this place would have been overrun and destroyed. You should go back and get every credit you can from that incompetent.
//-- [RESPONSE NOTE]
//-- PLAYER: I intend to.
if (response == "s_722")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Good for you.
string_id message = new string_id (c_stringFile, "s_724");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Destroyed by these vermin? Be serious.
if (response == "s_80")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: I am. You get grunge fever and you only have a 70 percent chance of living. Those kreetle burrows almost cut off this city from the poorer farmers in the region. And the tempest rills would have chewed through every power conduit in the city. I know vermin killing doesn't sound very heroic but you saved this city from a major catastrophe. Its not all about saving princesses and blowing up the bad guy's killer ship.
string_id message = new string_id (c_stringFile, "s_81");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I hadn't thought of it that way.
boolean hasResponse0 = false;
if (newbie_scout_a_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_82");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am. You get grunge fever and you only have a 70 percent chance of living. Those kreetle burrows almost cut off this city from the poorer farmers in the region. And the tempest rills would have chewed through every power conduit in the city. I know vermin killing doesn't sound very heroic but you saved this city from a major catastrophe. Its not all about saving princesses and blowing up the bad guy's killer ship.
//-- [RESPONSE NOTE]
//-- PLAYER: I hadn't thought of it that way.
if (response == "s_82")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Well you done good.
string_id message = new string_id (c_stringFile, "s_83");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Lovely rill bones. Thanks. One more job and we can call it a day. You ready?
//-- [RESPONSE NOTE]
//-- PLAYER: Just dump and off I go.
if (response == "s_112")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Remember its tempest rills. Look for them outside the city.
string_id message = new string_id (c_stringFile, "s_113");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: So what do you need?
if (response == "s_114")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Some idiot brought in some tempest rills as pets. Once they stop being cute he released them into the wild. I need them destroyed.
string_id message = new string_id (c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: OK I am on it.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: And this is bad because?
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I am out of here.
boolean hasResponse2 = false;
if (newbie_scout_a_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_116");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_117");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_121");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Some idiot brought in some tempest rills as pets. Once they stop being cute he released them into the wild. I need them destroyed.
//-- [RESPONSE NOTE]
//-- PLAYER: OK I am on it.
if (response == "s_116")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Remember its tempest rills. Look for them outside the city.
string_id message = new string_id (c_stringFile, "s_113");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: And this is bad because?
if (response == "s_117")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Because these rills will cross breed with the normal variety around the city. Tempest rills chew on the insulation of power cables. If they cross bred then every single rill in the city will be its own little blackout waiting to happen. We need to kill them before they spread.
string_id message = new string_id (c_stringFile, "s_118");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: OK I am there.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I have more important things to do.
boolean hasResponse1 = false;
if (newbie_scout_a_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_119");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_120");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am out of here.
if (response == "s_121")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Because these rills will cross breed with the normal variety around the city. Tempest rills chew on the insulation of power cables. If they cross bred then every single rill in the city will be its own little blackout waiting to happen. We need to kill them before they spread.
//-- [RESPONSE NOTE]
//-- PLAYER: OK I am there.
if (response == "s_119")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendRillSignal (player, npc);
//-- NPC: Remember its tempest rills. Look for them outside the city.
string_id message = new string_id (c_stringFile, "s_113");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have more important things to do.
if (response == "s_120")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good. Looks like the farmers can make it to market now. You ready for the next task?
//-- [RESPONSE NOTE]
//-- PLAYER: Just dump the info.
if (response == "s_312")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendTrapSignal (player, npc);
//-- NPC: Here you go. Remember I need intact rill bones. You can find them outside the city.
string_id message = new string_id (c_stringFile, "s_104");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What is it?
if (response == "s_103")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Every once in a while I get to hire some people who know how to use traps and the like. But they need me to supply them with the traps. I need a number of rill bones to make the traps. You want to help?
string_id message = new string_id (c_stringFile, "s_106");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Why rill bones?
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_107");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not right now.
if (response == "s_105")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Every once in a while I get to hire some people who know how to use traps and the like. But they need me to supply them with the traps. I need a number of rill bones to make the traps. You want to help?
//-- [RESPONSE NOTE]
//-- PLAYER: Sure.
if (response == "s_107")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_startScoutQuest (player, npc);
//-- NPC: Here you go. They can be found outside the city.
string_id message = new string_id (c_stringFile, "s_141");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Why rill bones?
if (response == "s_108")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: They are organic. These traps can't smell like metal or the animals are spooked. Rill bones give of a smell that attracts local scavengers. They also have enough elasticity to serve as high powered springs. So I use rill bones. You willing to help?
string_id message = new string_id (c_stringFile, "s_109");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure am.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'll pass.
boolean hasResponse1 = false;
if (newbie_scout_a_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_110");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: They are organic. These traps can't smell like metal or the animals are spooked. Rill bones give of a smell that attracts local scavengers. They also have enough elasticity to serve as high powered springs. So I use rill bones. You willing to help?
//-- [RESPONSE NOTE]
//-- PLAYER: Sure am.
if (response == "s_110")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_sendTrapSignal (player, npc);
//-- NPC: Here you go. Remember I need intact rill bones. You can find them outside the city.
string_id message = new string_id (c_stringFile, "s_104");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'll pass.
if (response == "s_111")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great work on those womp rats. I am getting the info to the medical teams now. Here is somthing for your troubles. Talk to me if you want more work.
//-- [RESPONSE NOTE]
//-- PLAYER: Just dump the details on my datapad.
if (response == "s_698")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_grantKreetles (player, npc);
//-- NPC: Great. Those kreetles are about to shut commerce down here in the city. Get them under control.
string_id message = new string_id (c_stringFile, "s_700");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: On my way.
boolean hasResponse0 = false;
if (newbie_scout_a_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_701");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What is the job.
if (response == "s_97")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Kreetles are burrowing all over the desert outside of town. Those burrows can be collapsed by the weight of a Ronto or other domesticated animal.
string_id message = new string_id (c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what?
boolean hasResponse0 = false;
if (newbie_scout_a_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_99");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not at the moment.
if (response == "s_699")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great. Those kreetles are about to shut commerce down here in the city. Get them under control.
//-- [RESPONSE NOTE]
//-- PLAYER: On my way.
if (response == "s_701")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Hurry. You can find them right outside the city.
string_id message = new string_id (c_stringFile, "s_704");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Kreetles are burrowing all over the desert outside of town. Those burrows can be collapsed by the weight of a Ronto or other domesticated animal.
//-- [RESPONSE NOTE]
//-- PLAYER: So what?
if (response == "s_99")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Most of the poorer farmers use Rontos to pull their wagons and carts filled with whatever harvest they can gather. If the Rontos break their legs the farmers can't bring the harvest into the city. So the kreetles have to go.
string_id message = new string_id (c_stringFile, "s_100");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok count me in.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I have better things to do.
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_101");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 23);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Most of the poorer farmers use Rontos to pull their wagons and carts filled with whatever harvest they can gather. If the Rontos break their legs the farmers can't bring the harvest into the city. So the kreetles have to go.
//-- [RESPONSE NOTE]
//-- PLAYER: Ok count me in.
if (response == "s_101")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_grantKreetles (player, npc);
//-- NPC: Great. Those kreetles are about to shut commerce down here in the city. Get them under control.
string_id message = new string_id (c_stringFile, "s_700");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: On my way.
boolean hasResponse0 = false;
if (newbie_scout_a_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_701");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have better things to do.
if (response == "s_102")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I assume that the mayor sent you?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes he did.
if (response == "s_135")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Well at least he is listening. I need people to do some dirty jobs. You interested?
string_id message = new string_id (c_stringFile, "s_137");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just tell me what to do.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: How dirty?
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Not interested.
boolean hasResponse2 = false;
if (newbie_scout_a_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_139");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_143");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_157");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not really.
if (response == "s_349")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: Well I can't hire you without authorization. Go see him.
string_id message = new string_id (c_stringFile, "s_134");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well at least he is listening. I need people to do some dirty jobs. You interested?
//-- [RESPONSE NOTE]
//-- PLAYER: Just tell me what to do.
if (response == "s_139")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_startScoutQuest (player, npc);
//-- NPC: Here you go. They can be found outside the city.
string_id message = new string_id (c_stringFile, "s_141");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How dirty?
if (response == "s_143")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: The public health in Mos Eisely is in danger. If we don't get the vermin under control we will lose this city.
string_id message = new string_id (c_stringFile, "s_145");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You are kidding.
boolean hasResponse0 = false;
if (newbie_scout_a_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_147");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 28);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not interested.
if (response == "s_157")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The public health in Mos Eisely is in danger. If we don't get the vermin under control we will lose this city.
//-- [RESPONSE NOTE]
//-- PLAYER: You are kidding.
if (response == "s_147")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
//-- NPC: I have womprats spreading grunge fever. This is not a joke. I need to get samples of the infected womprats to the meds. The fever is transmitted by pus from lesion in the rat's skin. You can tell if the rat is infected if the skin is mottled. Just kill the womprat and see if the skin is mottle. Oh and be careful and don't touch the pus.
string_id message = new string_id (c_stringFile, "s_149");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: OK I will do it.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Pus? I am passing on this.
boolean hasResponse1 = false;
if (newbie_scout_a_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_151");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_153");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 29);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int newbie_scout_a_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I have womprats spreading grunge fever. This is not a joke. I need to get samples of the infected womprats to the meds. The fever is transmitted by pus from lesion in the rat's skin. You can tell if the rat is infected if the skin is mottled. Just kill the womprat and see if the skin is mottle. Oh and be careful and don't touch the pus.
//-- [RESPONSE NOTE]
//-- PLAYER: OK I will do it.
if (response == "s_151")
{
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
newbie_scout_a_action_startScoutQuest (player, npc);
//-- NPC: Here you go. They can be found outside the city.
string_id message = new string_id (c_stringFile, "s_141");
utils.removeScriptVar (player, "conversation.newbie_scout_a.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Pus? I am passing on this.
if (response == "s_153")
{
doAnimationAction (player, "dismiss");
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: Yea you looked like someone who didn't know a real problem if it bit him.
string_id message = new string_id (c_stringFile, "s_155");
utils.removeScriptVar (player, "conversation.newbie_scout_a.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_scout_a");
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_scout_a");
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_scout_a_condition_onFirstTask (player, npc))
{
//-- NPC: The public health department has reported another case of grunge fever. We need those samples fast.
string_id message = new string_id (c_stringFile, "s_696");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am working on it.
boolean hasResponse0 = false;
if (newbie_scout_a_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_79");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 1);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_onSecondTask (player, npc))
{
//-- NPC: I am still getting reports of Rontos being maimed by stumbling on kreetle burrows. Come on I need help with this.
string_id message = new string_id (c_stringFile, "s_708");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am working on it.
boolean hasResponse0 = false;
if (newbie_scout_a_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_78");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 3);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_onThirdTask (player, npc))
{
//-- NPC: Look I know you are talented, but I need those bones in one piece.
string_id message = new string_id (c_stringFile, "s_710");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It just takes time.
boolean hasResponse0 = false;
if (newbie_scout_a_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.newbie_scout_a.branchId", 4);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_onFourthTask (player, npc))
{
//-- NPC: The tempest rills are making lots of problems for me. Please get on with it.
string_id message = new string_id (c_stringFile, "s_712");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just getting to it.
boolean hasResponse0 = false;
if (newbie_scout_a_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_74");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 5);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_completedFourthTask (player, npc))
{
//-- NPC: The tempest rills are history. The mayor really owes you one. If it was not for you this place would have been overrun and destroyed. You should go back and get every credit you can from that incompetent.
string_id message = new string_id (c_stringFile, "s_713");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I intend to.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Destroyed by these vermin? Be serious.
boolean hasResponse1 = false;
if (newbie_scout_a_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_722");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 7);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_completedThirdTask (player, npc))
{
//-- NPC: Lovely rill bones. Thanks. One more job and we can call it a day. You ready?
string_id message = new string_id (c_stringFile, "s_711");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just dump and off I go.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So what do you need?
boolean hasResponse1 = false;
if (newbie_scout_a_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_112");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_114");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 11);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_completedSecondTask (player, npc))
{
//-- NPC: Good. Looks like the farmers can make it to market now. You ready for the next task?
string_id message = new string_id (c_stringFile, "s_709");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just dump the info.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What is it?
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Not right now.
boolean hasResponse2 = false;
if (newbie_scout_a_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_312");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_103");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_105");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 15);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_readyForBugs (player, npc))
{
doAnimationAction (npc, "greet");
//-- NPC: Great work on those womp rats. I am getting the info to the medical teams now. Here is somthing for your troubles. Talk to me if you want more work.
string_id message = new string_id (c_stringFile, "s_697");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just dump the details on my datapad.
boolean hasResponse0 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What is the job.
boolean hasResponse1 = false;
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Not at the moment.
boolean hasResponse2 = false;
if (newbie_scout_a_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_698");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_97");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_699");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 19);
npcStartConversation (player, npc, "newbie_scout_a", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition_completedFirstTask (player, npc))
{
newbie_scout_a_action_signalRatReward (player, npc);
//-- NPC: These skins will be invaluable. Talk with me if you want more work.
string_id message = new string_id (c_stringFile, "s_68");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (newbie_scout_a_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: I assume that the mayor sent you?
string_id message = new string_id (c_stringFile, "s_343");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes he did.
boolean hasResponse0 = false;
if (newbie_scout_a_condition_mayorSent (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not really.
boolean hasResponse1 = false;
if (newbie_scout_a_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_135");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_349");
utils.setScriptVar (player, "conversation.newbie_scout_a.branchId", 25);
npcStartConversation (player, npc, "newbie_scout_a", 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_scout_a")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.newbie_scout_a.branchId");
if (branchId == 1 && newbie_scout_a_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && newbie_scout_a_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && newbie_scout_a_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && newbie_scout_a_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && newbie_scout_a_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && newbie_scout_a_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && newbie_scout_a_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && newbie_scout_a_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && newbie_scout_a_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && newbie_scout_a_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && newbie_scout_a_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && newbie_scout_a_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && newbie_scout_a_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && newbie_scout_a_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && newbie_scout_a_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && newbie_scout_a_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && newbie_scout_a_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && newbie_scout_a_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && newbie_scout_a_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 29 && newbie_scout_a_handleBranch29 (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_scout_a.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================