mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
698 lines
20 KiB
Plaintext
698 lines
20 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// delivery_hassel.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.create;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/delivery_hassel";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean delivery_hassel_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean delivery_hassel_condition_noAntivirus (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return (!groundquests.hasCompletedQuest(player, "outbreak_quest_01_imperial")
|
|
&& !groundquests.hasCompletedQuest(player, "outbreak_quest_01_rebel")
|
|
&& !groundquests.hasCompletedQuest(player, "outbreak_quest_01_neutral"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean delivery_hassel_condition_hasNotFoundNextCamp (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
string collectionSlot = "";
|
|
if(questName.startsWith("camp_alpha_delivery_0"))
|
|
{
|
|
collectionSlot = "exp_icon_deathtroopers_camp_beta";
|
|
}
|
|
else if(questName.startsWith("camp_beta_delivery_0"))
|
|
{
|
|
collectionSlot = "exp_icon_deathtroopers_camp_gamma";
|
|
}
|
|
else if(questName.startsWith("camp_gamma_delivery_0"))
|
|
{
|
|
collectionSlot = "exp_icon_deathtroopers_camp_delta";
|
|
}
|
|
else if(questName.startsWith("camp_delta_delivery_0"))
|
|
{
|
|
collectionSlot = "exp_icon_deathtroopers_camp_epsilon";
|
|
}
|
|
|
|
if(collectionSlot == null || collectionSlot.length() <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return !hasCompletedCollectionSlot(player, collectionSlot);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean delivery_hassel_condition_neverDelivered (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
return (!groundquests.isQuestActiveOrComplete(player, questName));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean delivery_hassel_condition_hasDeliveredBefore (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return groundquests.hasCompletedQuest(player, questName);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean delivery_hassel_condition_hasQuestCompleted (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return (groundquests.hasCompletedQuest(player, questName));
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void delivery_hassel_action_giveQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() npc "+npc+" has no questName objvar. Aborting the camp defense functionality.");
|
|
return;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() npc "+npc+" has an invalid questName objvar. Aborting the camp defense functionality.");
|
|
return;
|
|
}
|
|
|
|
if(groundquests.hasCompletedQuest(player, questName))
|
|
{
|
|
groundquests.clearQuest(player, questName);
|
|
}
|
|
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() NPC "+npc+" has questName: "+questName+".");
|
|
|
|
string creatureName = getStringObjVar(npc, "creature_type");
|
|
if(creatureName == null || creatureName.length() <= 0)
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() NPC "+npc+" has an invalid creatureName. Aborting the camp defense functionality.");
|
|
return;
|
|
}
|
|
|
|
int combatLevel = getLevel(player);
|
|
if(combatLevel < 0 || combatLevel > 90)
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() Player "+player+" has a level that is invalid. Player level is: "+combatLevel+". Aborting the camp defense.");
|
|
return;
|
|
}
|
|
|
|
int maxLevel = getIntObjVar(npc, "maxLevel");
|
|
if(maxLevel < 0 || maxLevel > 90)
|
|
{
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() NPC "+npc+" has an invalid maxLevel. Aborting the camp defense.");
|
|
return;
|
|
}
|
|
|
|
if(combatLevel > maxLevel)
|
|
{
|
|
combatLevel = maxLevel;
|
|
}
|
|
|
|
CustomerServiceLog("outbreak_themepark", "conversation.delivery_hassel() NPC "+npc+" is attempting to give player: "+player+" the quest: "+questName+".");
|
|
|
|
groundquests.grantQuest(player, questName);
|
|
|
|
setObjVar(npc, "combatLevel", combatLevel);
|
|
setObjVar(npc, "owner", player);
|
|
setObjVar(npc, create.INITIALIZE_CREATURE_DO_NOT_SCALE_OBJVAR, 1);
|
|
|
|
dictionary creatureDict = utils.dataTableGetRow("datatables/mob/creatures.iff", creatureName);
|
|
if(creatureDict != null)
|
|
{
|
|
create.initializeCreature (npc, creatureName, creatureDict, combatLevel);
|
|
}
|
|
|
|
setName(npc, "Delivery Volunteer ("+getPlayerName(player)+")");
|
|
setInvulnerable(npc, false);
|
|
utils.setScriptVar(npc, ai_lib.SCRIPTVAR_CACHED_PATROL_TYPE, 0);
|
|
clearCondition(npc, CONDITION_CONVERSABLE);
|
|
clearCondition(npc, CONDITION_INTERESTING);
|
|
setAttrib(npc, HEALTH, getMaxAttrib( npc, HEALTH ));
|
|
messageTo(npc, "startBeastDeliveryPathing", null, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void delivery_hassel_action_clearDeliveryQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
if(!hasObjVar(npc, "questName"))
|
|
{
|
|
return;
|
|
}
|
|
|
|
string questName = getStringObjVar(npc, "questName");
|
|
if(questName == null || questName.length() <= 0)
|
|
{
|
|
return;
|
|
}
|
|
groundquests.clearQuest(player, questName);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int delivery_hassel_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I need someone good with combat and you look like you want some extra credits!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Depends on what you need.
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: I need someone to escort me to the next camp. I already know you have been there, word gets around.
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What are we delivering?
|
|
boolean hasResponse0 = false;
|
|
if (delivery_hassel_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_13");
|
|
|
|
utils.setScriptVar (player, "conversation.delivery_hassel.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int delivery_hassel_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I need someone to escort me to the next camp. I already know you have been there, word gets around.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What are we delivering?
|
|
if (response == "s_13")
|
|
{
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Medical supplies, food, water, ammunition, news...maybe a little hope.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure. I'll help.
|
|
boolean hasResponse0 = false;
|
|
if (delivery_hassel_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_19");
|
|
|
|
utils.setScriptVar (player, "conversation.delivery_hassel.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int delivery_hassel_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Medical supplies, food, water, ammunition, news...maybe a little hope.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure. I'll help.
|
|
if (response == "s_19")
|
|
{
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, I almost forgot. You should know that I am armed with more than weapons. If I think we are about to be overrun I will hit a panic switch and detonate explosives I am carrying. I AM NOT going to wander Dathomir as one of THEM!
|
|
string_id message = new string_id (c_stringFile, "s_21");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Uh...I will keep my distance then.
|
|
boolean hasResponse0 = false;
|
|
if (delivery_hassel_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_38");
|
|
|
|
utils.setScriptVar (player, "conversation.delivery_hassel.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int delivery_hassel_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, I almost forgot. You should know that I am armed with more than weapons. If I think we are about to be overrun I will hit a panic switch and detonate explosives I am carrying. I AM NOT going to wander Dathomir as one of THEM!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uh...I will keep my distance then.
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
delivery_hassel_action_giveQuest (player, npc);
|
|
|
|
//-- NPC: Alright. Follow me.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int delivery_hassel_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You want to help out with another delivery? Same credit amount if you are interested.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
delivery_hassel_action_giveQuest (player, npc);
|
|
|
|
//-- NPC: Alright. Follow me.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.delivery_hassel");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
|
|
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.delivery_hassel");
|
|
|
|
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 (delivery_hassel_condition_noAntivirus (player, npc))
|
|
{
|
|
//-- NPC: You don't have the anti-virus yet?? Get away from me...go see Doctor Cody. She can help you out.
|
|
string_id message = new string_id (c_stringFile, "s_7");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition_hasNotFoundNextCamp (player, npc))
|
|
{
|
|
//-- NPC: I hear there is another camp not far from here. If you find it, come back. I have a job you might want.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition_neverDelivered (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumb_up");
|
|
|
|
//-- NPC: I need someone good with combat and you look like you want some extra credits!
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Depends on what you need.
|
|
boolean hasResponse0 = false;
|
|
if (delivery_hassel_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_96");
|
|
|
|
utils.setScriptVar (player, "conversation.delivery_hassel.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "delivery_hassel", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition_hasDeliveredBefore (player, npc))
|
|
{
|
|
//-- NPC: You want to help out with another delivery? Same credit amount if you are interested.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (delivery_hassel_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_33");
|
|
|
|
utils.setScriptVar (player, "conversation.delivery_hassel.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "delivery_hassel", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (delivery_hassel_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you are hungry there are plenty of rations inside the camp.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
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 != "delivery_hassel")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
if (branchId == 3 && delivery_hassel_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && delivery_hassel_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && delivery_hassel_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && delivery_hassel_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && delivery_hassel_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.delivery_hassel.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|