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

2691 lines
78 KiB
Plaintext

// ======================================================================
//
// lf_safetyquestgiver.script
//
//
//
// Created with SwgConversationEditor 1.36 - 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/lf_safetyquestgiver";
// ======================================================================
// Script Conditions
// ======================================================================
boolean lf_safetyquestgiver_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part1complete (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/lf_safety1");
int questId2 = questGetQuestId("quest/lf_safety2");
boolean hasQuest2 = questIsQuestActive(questId2, player) || questIsQuestComplete(questId2, player);
return questIsQuestComplete(questId1, player) && !hasQuest2;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part5complete (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety5");
return questIsQuestComplete(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part4complete (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/lf_safety4");
int questId2 = questGetQuestId("quest/lf_safety5");
boolean hasQuest5 = questIsQuestActive(questId2, player) || questIsQuestComplete(questId2, player);
return questIsQuestComplete(questId1, player) && !hasQuest5;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part3complete (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/lf_safety3");
int questId2 = questGetQuestId("quest/lf_safety4");
boolean hasQuest4 = questIsQuestActive(questId2, player) || questIsQuestComplete(questId2, player);
return questIsQuestComplete(questId1, player) && !hasQuest4;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part2complete (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/lf_safety2");
int questId2 = questGetQuestId("quest/lf_safety3");
boolean hasQuest3 = questIsQuestActive(questId2, player) || questIsQuestComplete(questId2, player);
return questIsQuestComplete(questId1, player) && !hasQuest3;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_playeronquest (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/lf_safety1");
int questId2 = questGetQuestId("quest/lf_safety2");
int questId3 = questGetQuestId("quest/lf_safety3");
int questId4 = questGetQuestId("quest/lf_safety4");
int questId5 = questGetQuestId("quest/lf_safety5");
boolean onQuest = false;
onQuest = questIsQuestActive(questId1, player) || questIsQuestComplete(questId1, player);
onQuest |= questIsQuestActive(questId2, player) || questIsQuestComplete(questId2, player);
onQuest |= questIsQuestActive(questId3, player) || questIsQuestComplete(questId3, player);
onQuest |= questIsQuestActive(questId4, player) || questIsQuestComplete(questId4, player);
onQuest |= questIsQuestActive(questId5, player) || questIsQuestComplete(questId5, player);
return onQuest;
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part1active (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety1");
return questIsQuestActive(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part2active (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety2");
return questIsQuestActive(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part3active (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety3");
return questIsQuestActive(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part4active (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety4");
return questIsQuestActive(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_part5active (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety5");
return questIsQuestActive(questId, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_isquestcomplete1 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety1");
return questIsTaskComplete(questId, 0, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_isquestcomplete2 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety2");
return questIsTaskComplete(questId, 0, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_isquestcomplete3 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety3");
return questIsTaskComplete(questId, 0, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_isquestcomplete4 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety4");
return questIsTaskComplete(questId, 0, player);
}
// ----------------------------------------------------------------------
boolean lf_safetyquestgiver_condition_isquestcomplete5 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety5");
return questIsTaskComplete(questId, 0, player);
}
// ======================================================================
// Script Actions
// ======================================================================
void lf_safetyquestgiver_action_givequest1 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety1");
groundquests.grantQuest(questId, player, npc, true);
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = -1254;
loc.y = 12;
loc.z = -3617;
obj_id waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety5.questgiver", waypoint);
setWaypointName(waypoint, "Gerak Vertimis");
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givequest2 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety2");
groundquests.grantQuest(questId, player, npc, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givequest5 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety5");
groundquests.grantQuest(questId, player, npc, true);
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1500;
loc.y = 180;
loc.z = -2000;
obj_id waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety5.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Leader");
setWaypointActive(waypoint, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givequest4 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety4");
groundquests.grantQuest(questId, player, npc, true);
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1002;
loc.y = 187;
loc.z = -3019;
obj_id waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety4.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Camp 2");
setWaypointActive(waypoint, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givequest3 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety3");
groundquests.grantQuest(questId, player, npc, true);
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1145;
loc.y = 149;
loc.z = -3920;
obj_id waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety3.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Camp 1");
setWaypointActive(waypoint, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_completequest1 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety1");
questCompleteTask(questId, 1, player);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_completequest2 (obj_id player, obj_id npc)
{
int questId = questGetQuestId("quest/lf_safety2");
questCompleteTask(questId, 1, player);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_completequest3 (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety3.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player);
}
removeObjVar(player, "quest.general.quest/lf_safety3.waypoint");
int questId = questGetQuestId("quest/lf_safety3");
questCompleteTask(questId, 1, player);
obj_id playerInventory = utils.getInventoryContainer( player );
string templateName = "object/tangible/skill_buff/skill_buff_pistol_speed.iff";
obj_id newItem = createObject( templateName, playerInventory, "" ); //yep, that's an empty string.
/*
if (!isIdValid(newItem))
{
//...object creation failed. Inventory is probably full.
}
*/
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_completequest4 (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety4.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player); // Always use this function. Unless something has changed.
}
removeObjVar(player, "quest.general.quest/lf_safety4.waypoint");
int questId = questGetQuestId("quest/lf_safety4");
questCompleteTask(questId, 1, player);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_completequest5 (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety5.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player); // Always use this function. Unless something has changed.
}
removeObjVar(player, "quest.general.quest/lf_safety5.waypoint");
obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/lf_safety5.questgiver");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint2, player); // Always use this function. Unless something has changed.
}
removeObjVar(player, "quest.general.quest/lf_safety5.questgiver");
int questId = questGetQuestId("quest/lf_safety5");
questCompleteTask(questId, 1, player);
obj_id playerInventory = utils.getInventoryContainer( player );
string templateName = "object/tangible/skill_buff/skill_buff_pistol_accuracy.iff";
obj_id newItem = createObject( templateName, playerInventory, "" );// yep, that's an empty string.
if (!isIdValid(newItem))
{
//...object creation failed. Inventory is probably full.
}
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_faceplayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givewaypointcamp1 (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety3.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player); // Always use this function. Unless something has changed.
}
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1145;
loc.y = 149;
loc.z = -3920;
waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety3.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Camp 1");
setWaypointActive(waypoint, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givewaypointcamp2 (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety4.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player); // Always use this function. Unless something has changed.
}
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1002;
loc.y = 187;
loc.z = -3019;
waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety4.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Camp 2");
setWaypointActive(waypoint, true);
}
// ----------------------------------------------------------------------
void lf_safetyquestgiver_action_givewaypointleader (obj_id player, obj_id npc)
{
obj_id waypoint = getObjIdObjVar(player, "quest.general.quest/lf_safety5.waypoint");
if (waypoint != null)
{
destroyWaypointInDatapad(waypoint, player); // Always use this function. Unless something has changed.
}
obj_id top=getTopMostContainer(player);
location loc = getLocation(top);
loc.x = 1500;
loc.y = 180;
loc.z = -2000;
waypoint = createWaypointInDatapad(player, loc);
setObjVar(player, "quest.general.quest/lf_safety5.waypoint", waypoint);
setWaypointName(waypoint, "Brigand Leader");
setWaypointActive(waypoint, true);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int lf_safetyquestgiver_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I cannot believe how blasted nasty this place has become!
//-- [RESPONSE NOTE]
//-- PLAYER: What do you mean?
if (response == "s_111")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (player, "taken_aback");
//-- NPC: You haven't noticed all the creatures and bandits swarming around outside of town? It's so bad that you can't travel without a shuttle or a blaster rifle. And my son has neither and is coming to visit soon. I'm afraid for him.
string_id message = new string_id (c_stringFile, "s_113");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'd be happy to clear the way.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not interested
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_115");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_119");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: It isn't that bad! I think the city is quite clean.
if (response == "s_123")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: No no, not the city. I'm talking about the wilderness. If you live in a major city it's all right. But if there's no shuttle port, traveling here is just dangerous. And my son has neither and is coming to visit soon. I'm afraid for him
string_id message = new string_id (c_stringFile, "s_125");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'd be happy to help you make the area safer.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not interested.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_127");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_131");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nasty? Only if you are too weak to protect yourself.
if (response == "s_138")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "mock");
//-- NPC: You think so? If you are so tough, I have a job for you then. I want some of the dangerous creatures cleared out. You strong enough for that?
string_id message = new string_id (c_stringFile, "s_142");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Why not? I could use the credits.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Nah. Sounds too boring.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_146");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_154");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You haven't noticed all the creatures and bandits swarming around outside of town? It's so bad that you can't travel without a shuttle or a blaster rifle. And my son has neither and is coming to visit soon. I'm afraid for him.
//-- [RESPONSE NOTE]
//-- PLAYER: I'd be happy to clear the way.
if (response == "s_115")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "bow");
lf_safetyquestgiver_action_givequest1 (player, npc);
//-- NPC: Thank you! First thing, I need you to go thin out the worrt population. Come back when you are done.
string_id message = new string_id (c_stringFile, "s_117");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not interested
if (response == "s_119")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: I wish you would reconsider. If you do, come back and talk to me.
string_id message = new string_id (c_stringFile, "s_121");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No no, not the city. I'm talking about the wilderness. If you live in a major city it's all right. But if there's no shuttle port, traveling here is just dangerous. And my son has neither and is coming to visit soon. I'm afraid for him
//-- [RESPONSE NOTE]
//-- PLAYER: I'd be happy to help you make the area safer.
if (response == "s_127")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_away");
lf_safetyquestgiver_action_givequest1 (player, npc);
//-- NPC: Great! First thing, I need you to go thin out the worrt population. Come back when you are done.
string_id message = new string_id (c_stringFile, "s_129");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not interested.
if (response == "s_131")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "slump_head");
//-- NPC: I wish you would reconsider. If you do, please come back and talk to me.
string_id message = new string_id (c_stringFile, "s_134");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You think so? If you are so tough, I have a job for you then. I want some of the dangerous creatures cleared out. You strong enough for that?
//-- [RESPONSE NOTE]
//-- PLAYER: Why not? I could use the credits.
if (response == "s_146")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "applause_excited");
lf_safetyquestgiver_action_givequest1 (player, npc);
//-- NPC: Great! First thing, I need you to go thin out the worrt population. Come back when you are done.
string_id message = new string_id (c_stringFile, "s_150");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nah. Sounds too boring.
if (response == "s_154")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: Guess you aren't as tough as you say you are. If you change your mind, I'll be here.
string_id message = new string_id (c_stringFile, "s_158");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: How are you doing with the worrts?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm done.
if (response == "s_166")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest1 (player, npc);
//-- NPC: Excellent! Thanks for taking care of that. I transferred some credits into your bank account. Come back and talk to me when you are ready for another job.
string_id message = new string_id (c_stringFile, "s_170");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not finished yet.
if (response == "s_174")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Well, I believe in you. You can do it!
string_id message = new string_id (c_stringFile, "s_178");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Welcome back. I have another assignment if you are willing.
//-- [RESPONSE NOTE]
//-- PLAYER: Sure. I'm always ready for a good fight.
if (response == "s_186")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givequest2 (player, npc);
//-- NPC: There's an infestation of rills. Please go kill 10 of them.
string_id message = new string_id (c_stringFile, "s_190");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, I'm too busy right now.
if (response == "s_194")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Fine. Come back when you have more free time.
string_id message = new string_id (c_stringFile, "s_198");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: How are you doing with the rills?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm not quite done yet.
if (response == "s_206")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Come back to me when you finish.
string_id message = new string_id (c_stringFile, "s_210");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I finished what you wanted.
if (response == "s_214")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest2 (player, npc);
//-- NPC: Fantastic! I transferred a few credits to your account to offset your operating costs. Now, I'm tracking down some information. I'll have it in a moment or two if you don't mind waiting.
string_id message = new string_id (c_stringFile, "s_218");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello again! Now that I know that you are an accomplished hunter, I can tell you about something that is far more serious and dangerous than the pests near the city.
//-- [RESPONSE NOTE]
//-- PLAYER: What do you mean?
if (response == "s_226")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: About a week ago, a particularly nasty gang of thugs ambushed a caravan of people who were moving to the city. There were... no survivors.
string_id message = new string_id (c_stringFile, "s_230");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That's terrible!
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: And how does this affect me?
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_233");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_249");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Good. I want to go after tougher prey. Tell me more.
if (response == "s_265")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: About a week ago, a particularly nasty gang of thugs ambushed a caravan of people who were moving to the city. There were... no survivors.
string_id message = new string_id (c_stringFile, "s_230");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That's terrible!
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: And how does this affect me?
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_233");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_249");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: About a week ago, a particularly nasty gang of thugs ambushed a caravan of people who were moving to the city. There were... no survivors.
//-- [RESPONSE NOTE]
//-- PLAYER: That's terrible!
if (response == "s_233")
{
doAnimationAction (player, "taken_aback");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "apologize");
//-- NPC: Yes. While I know that getting the families' lost possessions back will not make up for the loss of their loved ones, at least it will help with their debts, and maybe give them something to remember their children by.
string_id message = new string_id (c_stringFile, "s_236");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will get the possessions back, if you want me to.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'd rather not deal with this.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_238");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_244");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: And how does this affect me?
if (response == "s_249")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "poke");
//-- NPC: I want you to go after these bandits and get back what they stole.
string_id message = new string_id (c_stringFile, "s_252");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure. A little revenge is great with caf in the morning.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not now. I'm tired. I'll go after them tomorrow.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_260");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes. While I know that getting the families' lost possessions back will not make up for the loss of their loved ones, at least it will help with their debts, and maybe give them something to remember their children by.
//-- [RESPONSE NOTE]
//-- PLAYER: I will get the possessions back, if you want me to.
if (response == "s_238")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givequest3 (player, npc);
//-- NPC: Thank you. I know that they will appreciate this.
string_id message = new string_id (c_stringFile, "s_241");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'd rather not deal with this.
if (response == "s_244")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: I thought better of you. But when you are done being afraid, come back to me.
string_id message = new string_id (c_stringFile, "s_246");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I want you to go after these bandits and get back what they stole.
//-- [RESPONSE NOTE]
//-- PLAYER: Sure. A little revenge is great with caf in the morning.
if (response == "s_254")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "bow");
lf_safetyquestgiver_action_givequest3 (player, npc);
//-- NPC: Thank you. I'll see you when you get back.
string_id message = new string_id (c_stringFile, "s_257");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not now. I'm tired. I'll go after them tomorrow.
if (response == "s_260")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
//-- NPC: I thought better of you. But if you must wait, then come back when you are ready.
string_id message = new string_id (c_stringFile, "s_262");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch28 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Have you found everything yet?
//-- [RESPONSE NOTE]
//-- PLAYER: Not yet.
if (response == "s_270")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Ok. I'm clearing some space in my transport for when you are done.
string_id message = new string_id (c_stringFile, "s_273");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. Here they are.
if (response == "s_276")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest3 (player, npc);
//-- NPC: This will be such a great help to them. Thank you very much. You deserve more, but this is all that I have for now.
string_id message = new string_id (c_stringFile, "s_280");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, I'm lost. Can you give me that waypoint again?
if (response == "s_284")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
lf_safetyquestgiver_action_givewaypointcamp1 (player, npc);
//-- NPC: Sure. I'll copy that to you now.
string_id message = new string_id (c_stringFile, "s_288");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well, you seem to have stirred up a flewt nest!
//-- [RESPONSE NOTE]
//-- PLAYER: What do you mean?
if (response == "s_296")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: It looks like those bandits didn't take too kindly to your attack. I hear that they started reappearing en force.
string_id message = new string_id (c_stringFile, "s_300");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Hmm... guess I should encourage them to go back to hiding.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't really think I need to concern myself with them any more.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_304");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_312");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 33);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: So?
if (response == "s_320")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Looks like you are now one of the bandits' targets. If you don't want to have to watch your back every second, you should probably go do something about them.
string_id message = new string_id (c_stringFile, "s_324");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I tend to watch my back anyway, but you're right. I'll go take care of them.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I have had enough of this. I'm done! No more brigands!
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_328");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_336");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 36);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch33 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: It looks like those bandits didn't take too kindly to your attack. I hear that they started reappearing en force.
//-- [RESPONSE NOTE]
//-- PLAYER: Hmm... guess I should encourage them to go back to hiding.
if (response == "s_304")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givequest4 (player, npc);
//-- NPC: I think that their leader is the one that you really want. Unfortunately, the leaders tend to be hard to find. I'll bet one of those guys out there has some information that will lead you to the leader. When you find it come back to me.
string_id message = new string_id (c_stringFile, "s_308");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't really think I need to concern myself with them any more.
if (response == "s_312")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: If you are now one of their targets, I don't think they will leave you alone. If you change your mind, come back to me.
string_id message = new string_id (c_stringFile, "s_316");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Looks like you are now one of the bandits' targets. If you don't want to have to watch your back every second, you should probably go do something about them.
//-- [RESPONSE NOTE]
//-- PLAYER: I tend to watch my back anyway, but you're right. I'll go take care of them.
if (response == "s_328")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givequest4 (player, npc);
//-- NPC: I'll bet if you take out their leader, they will scatter. I don't know where their leader is though. I'll bet one of the bandits has some kind of information about their main camp on them. Here's the latest information about their activity.
string_id message = new string_id (c_stringFile, "s_332");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have had enough of this. I'm done! No more brigands!
if (response == "s_336")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: For some reason I don't think they will respect your wishes. But if you want to ignore them, it's your funeral. Come back if you change your mind.
string_id message = new string_id (c_stringFile, "s_340");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch39 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: How did it go?
//-- [RESPONSE NOTE]
//-- PLAYER: I haven't found anything yet.
if (response == "s_344")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "salute1");
//-- NPC: There has to be something. Good luck!
string_id message = new string_id (c_stringFile, "s_346");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Looks like this datapad has something useful.
if (response == "s_348")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "applause_excited");
lf_safetyquestgiver_action_completequest4 (player, npc);
//-- NPC: Great! Let me take a look at it... give me a moment.
string_id message = new string_id (c_stringFile, "s_350");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need the location again.
if (response == "s_352")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givewaypointcamp2 (player, npc);
//-- NPC: All right. I'm copying the data to you now.
string_id message = new string_id (c_stringFile, "s_354");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch43 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Welcome back. Ready to squish a bug?
//-- [RESPONSE NOTE]
//-- PLAYER: If you mean hunting down the brigand leader, then yes.
if (response == "s_358")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givequest5 (player, npc);
//-- NPC: That's exactly what I mean. Here is the location of the camp.
string_id message = new string_id (c_stringFile, "s_360");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yep. Less competition for me...I mean, yes, of course.
if (response == "s_362")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Hm...less competition? Well, if you leave innocent travelers alone, that's your life. I just want this thug eliminated.
string_id message = new string_id (c_stringFile, "s_364");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch46 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I have been hearing rumors, but nothing confirmed. How is it going?
//-- [RESPONSE NOTE]
//-- PLAYER: The leader was tough, but not impossible.
if (response == "s_368")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest5 (player, npc);
//-- NPC: I'm glad the area is safe for travelers now. Too many people died because of them. Thank you from the bottom of my heart. Take this.
string_id message = new string_id (c_stringFile, "s_370");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: They messed with the wrong person
if (response == "s_372")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest5 (player, npc);
//-- NPC: They did indeed, and I put my trust in the right one. Too many good people died because of them. Take this as thanks for the great service you did.
string_id message = new string_id (c_stringFile, "s_374");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I took care of the leader. I'm surprised that they were able to do as much damage as they did.
if (response == "s_376")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
//-- NPC: Yes, well...I guess their leader was better at organizing than fighting. Many good people died because of him.
string_id message = new string_id (c_stringFile, "s_378");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not anymore.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm sure they did. Now, about my reward?
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_380");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_384");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 49);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I haven't gotten to the leader yet.
if (response == "s_388")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: I guess the rumors were optimistic. No matter, come back when you are done.
string_id message = new string_id (c_stringFile, "s_390");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, I need the location again.
if (response == "s_392")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_givewaypointleader (player, npc);
//-- NPC: It's a good thing I keep copies! Here you are.
string_id message = new string_id (c_stringFile, "s_394");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int lf_safetyquestgiver_handleBranch49 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, well...I guess their leader was better at organizing than fighting. Many good people died because of him.
//-- [RESPONSE NOTE]
//-- PLAYER: Not anymore.
if (response == "s_380")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
lf_safetyquestgiver_action_completequest5 (player, npc);
//-- NPC: No. Not anymore. You have certainly earned your reward. I already transferred 2000 credits into your bank account and this should help you in your travels.
string_id message = new string_id (c_stringFile, "s_382");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm sure they did. Now, about my reward?
if (response == "s_384")
{
//-- [NOTE]
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "slump_head");
lf_safetyquestgiver_action_completequest5 (player, npc);
//-- NPC: I already transferred 2000 credits into your bank account. I also have this for you. You did me a favor and I thank you for it. But after this, I don't want to talk to you again.
string_id message = new string_id (c_stringFile, "s_386");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.lf_safetyquestgiver");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Gerak Vurtimis");
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Gerak Vurtimis");
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.lf_safetyquestgiver");
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 (!lf_safetyquestgiver_condition_playeronquest (player, npc))
{
doAnimationAction (npc, "stamp_feet");
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: I cannot believe how blasted nasty this place has become!
string_id message = new string_id (c_stringFile, "s_109");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you mean?
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: It isn't that bad! I think the city is quite clean.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Nasty? Only if you are too weak to protect yourself.
boolean hasResponse2 = false;
if (lf_safetyquestgiver_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_111");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_138");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 1);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part1active (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: How are you doing with the worrts?
string_id message = new string_id (c_stringFile, "s_162");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm done.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition_isquestcomplete1 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm not finished yet.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_166");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 11);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part1complete (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Welcome back. I have another assignment if you are willing.
string_id message = new string_id (c_stringFile, "s_182");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure. I'm always ready for a good fight.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sorry, I'm too busy right now.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_186");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_194");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 14);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part2active (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: How are you doing with the rills?
string_id message = new string_id (c_stringFile, "s_202");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm not quite done yet.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I finished what you wanted.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_condition_isquestcomplete2 (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_206");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_214");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 17);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part2complete (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Hello again! Now that I know that you are an accomplished hunter, I can tell you about something that is far more serious and dangerous than the pests near the city.
string_id message = new string_id (c_stringFile, "s_222");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you mean?
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Good. I want to go after tougher prey. Tell me more.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_226");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_265");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 20);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part3active (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Have you found everything yet?
string_id message = new string_id (c_stringFile, "s_268");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not yet.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes. Here they are.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_condition_isquestcomplete3 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Actually, I'm lost. Can you give me that waypoint again?
boolean hasResponse2 = false;
if (lf_safetyquestgiver_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_270");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_276");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_284");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 28);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part3complete (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Well, you seem to have stirred up a flewt nest!
string_id message = new string_id (c_stringFile, "s_292");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you mean?
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: So?
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_296");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_320");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 32);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part4active (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: How did it go?
string_id message = new string_id (c_stringFile, "s_342");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I haven't found anything yet.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Looks like this datapad has something useful.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_condition_isquestcomplete4 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I need the location again.
boolean hasResponse2 = false;
if (lf_safetyquestgiver_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_344");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_348");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_352");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 39);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part4complete (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Welcome back. Ready to squish a bug?
string_id message = new string_id (c_stringFile, "s_356");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: If you mean hunting down the brigand leader, then yes.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yep. Less competition for me...I mean, yes, of course.
boolean hasResponse1 = false;
if (lf_safetyquestgiver_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_358");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_362");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 43);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part5active (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: I have been hearing rumors, but nothing confirmed. How is it going?
string_id message = new string_id (c_stringFile, "s_366");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The leader was tough, but not impossible.
boolean hasResponse0 = false;
if (lf_safetyquestgiver_condition_isquestcomplete5 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: They messed with the wrong person
boolean hasResponse1 = false;
if (lf_safetyquestgiver_condition_isquestcomplete5 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I took care of the leader. I'm surprised that they were able to do as much damage as they did.
boolean hasResponse2 = false;
if (lf_safetyquestgiver_condition_isquestcomplete5 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I haven't gotten to the leader yet.
boolean hasResponse3 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: Actually, I need the location again.
boolean hasResponse4 = false;
if (lf_safetyquestgiver_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_368");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_372");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_376");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_388");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_392");
utils.setScriptVar (player, "conversation.lf_safetyquestgiver.branchId", 46);
npcStartConversation (player, npc, "lf_safetyquestgiver", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (lf_safetyquestgiver_condition_part5complete (player, npc))
{
lf_safetyquestgiver_action_faceplayer (player, npc);
//-- NPC: Thanks again for all your help.
string_id message = new string_id (c_stringFile, "s_396");
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 != "lf_safetyquestgiver")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
if (branchId == 1 && lf_safetyquestgiver_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && lf_safetyquestgiver_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && lf_safetyquestgiver_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && lf_safetyquestgiver_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && lf_safetyquestgiver_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && lf_safetyquestgiver_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && lf_safetyquestgiver_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && lf_safetyquestgiver_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && lf_safetyquestgiver_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && lf_safetyquestgiver_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && lf_safetyquestgiver_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 28 && lf_safetyquestgiver_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && lf_safetyquestgiver_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 33 && lf_safetyquestgiver_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 36 && lf_safetyquestgiver_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 39 && lf_safetyquestgiver_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 43 && lf_safetyquestgiver_handleBranch43 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 46 && lf_safetyquestgiver_handleBranch46 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 49 && lf_safetyquestgiver_handleBranch49 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.lf_safetyquestgiver.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================