mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
688 lines
22 KiB
Plaintext
688 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// u13_wernell_covington.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// 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.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/u13_wernell_covington";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean u13_wernell_covington_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_active_u13_vengeance_01 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "u13_vengeance_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_returning_u13_vengeance_01 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "u13_vengeance_01", "u13_vengeance_01_06") ||
|
|
groundquests.hasCompletedQuest(player, "u13_vengeance_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_active_u13_vengeance_02 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "u13_vengeance_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_active_u13_vengeance_pointer (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActiveOrComplete(player, "u13_vengeance_pointer");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_returning_u13_vengeance_02 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "u13_vengeance_02", "u13_vengeance_02_04") ||
|
|
groundquests.hasCompletedQuest(player, "u13_vengeance_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean u13_wernell_covington_condition_needs_u13_ponda_pointer (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActiveOrComplete(player, "u13_ponda_pointer");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void u13_wernell_covington_action_signal_u13_vengeance_pointer (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "u13_vengeance_pointer");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void u13_wernell_covington_action_grant_u13_vengeance_01 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "u13_vengeance_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void u13_wernell_covington_action_signal_u13_vengeance_01 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "u13_vengeance_01_06");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void u13_wernell_covington_action_grant_u13_vengeance_02 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "u13_vengeance_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void u13_wernell_covington_action_grant_u13_ponda_pointer (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "u13_ponda_pointer");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void u13_wernell_covington_action_signal_u13_vengeance_02 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "u13_vengeance_02_04");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int u13_wernell_covington_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Finally, I can be at peace. Thank you. You have made an old man very happy. I shall be extremely generous to you for bringing me such peace after all these years.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am glad to have been of service.
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
u13_wernell_covington_action_grant_u13_ponda_pointer (player, npc);
|
|
|
|
//-- NPC: Oh, before I forget...my associate in the Narmle Militia mentioned an RSF officer in Narmle who is in need of assistance. Report to him if you are interested in more work.
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int u13_wernell_covington_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Horace already contacted me with their names. Now we must find them and eliminate them. I have an associate in the Narmle Militia. He can get their last known locations, but requests a favor.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What's the favor?
|
|
if (response == "s_22")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
u13_wernell_covington_action_grant_u13_vengeance_02 (player, npc);
|
|
|
|
//-- NPC: He needs someone to reactivate the security terminals through Narmle. Go do that for him. Should be easy enough.
|
|
string_id message = new string_id (c_stringFile, "s_23");
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int u13_wernell_covington_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Who are you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Lieutenant Varias sent me.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh did he? Well, perhaps you might be of use to me then. Let me explain. Many, many years ago...when I was a much younger man...my daughter, Felicia, was kidnapped. She was the most precious thing in the galaxy to me, and yet she was snatched away.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm sorry to hear that.
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_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_16");
|
|
|
|
utils.setScriptVar (player, "conversation.u13_wernell_covington.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int u13_wernell_covington_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh did he? Well, perhaps you might be of use to me then. Let me explain. Many, many years ago...when I was a much younger man...my daughter, Felicia, was kidnapped. She was the most precious thing in the galaxy to me, and yet she was snatched away.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm sorry to hear that.
|
|
if (response == "s_16")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes. Let me continue. Despite attempts to pay the ransom and the best efforts of law enforcement officers, the entire ordeal went badly. Very badly. Felicia was killed. She was jettisoned into space from the starship on which she was being held. From that moment onward, I have dedicated my life to tracking down and destroying the people who committed this horrible act.
|
|
string_id message = new string_id (c_stringFile, "s_18");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How awful.
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_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_20");
|
|
|
|
utils.setScriptVar (player, "conversation.u13_wernell_covington.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int u13_wernell_covington_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes. Let me continue. Despite attempts to pay the ransom and the best efforts of law enforcement officers, the entire ordeal went badly. Very badly. Felicia was killed. She was jettisoned into space from the starship on which she was being held. From that moment onward, I have dedicated my life to tracking down and destroying the people who committed this horrible act.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How awful.
|
|
if (response == "s_20")
|
|
{
|
|
doAnimationAction (player, "shake_head_disgust");
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I've spared no expense in tracking down the kidnappers...one by one. And I have personally struck the killing blow each time one was found. All of the original kidnappers are now dead, except for two. Those last two have evaded me and now my age and dwindling wealth have forced me to turn to someone else for assistance. Will you help me?
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will. Those men must pay for what they did.
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I cannot take part in such violence. I must pass.
|
|
boolean hasResponse1 = false;
|
|
if (u13_wernell_covington_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_31");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.u13_wernell_covington.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int u13_wernell_covington_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I've spared no expense in tracking down the kidnappers...one by one. And I have personally struck the killing blow each time one was found. All of the original kidnappers are now dead, except for two. Those last two have evaded me and now my age and dwindling wealth have forced me to turn to someone else for assistance. Will you help me?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will. Those men must pay for what they did.
|
|
if (response == "s_31")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
u13_wernell_covington_action_grant_u13_vengeance_01 (player, npc);
|
|
|
|
//-- NPC: Good. Let's waste no time. First we must identify the last two kidnappers. I think I finally have an idea how to do that. Horace Korr was a reporter for the Corellia Times back during the kidnapping and he covered it in the news. Speak with him and find out if he knows their identity. I'll make sure he's expecting you.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I cannot take part in such violence. I must pass.
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
u13_wernell_covington_action_grant_u13_ponda_pointer (player, npc);
|
|
|
|
//-- NPC: Very well. I understand. Perhaps you can still be of service...to someone. An associate of mine in the Narmle Militia mentioned an RSF officer in Narmle who is in need of assistance. Report to him if you are interested in some work that is a bit more dainty.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.u13_wernell_covington");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
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.u13_wernell_covington");
|
|
|
|
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 (u13_wernell_covington_condition_returning_u13_vengeance_02 (player, npc))
|
|
{
|
|
u13_wernell_covington_action_signal_u13_vengeance_02 (player, npc);
|
|
|
|
//-- NPC: Finally, I can be at peace. Thank you. You have made an old man very happy. I shall be extremely generous to you for bringing me such peace after all these years.
|
|
string_id message = new string_id (c_stringFile, "s_25");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am glad to have been of service.
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_condition_needs_u13_ponda_pointer (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_26");
|
|
|
|
utils.setScriptVar (player, "conversation.u13_wernell_covington.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "u13_wernell_covington", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition_active_u13_vengeance_02 (player, npc))
|
|
{
|
|
//-- NPC: So close to completing my oath to bring those vile villains to justice. Don't stop until they feel the same fear of death that my Felicia must have felt.
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition_returning_u13_vengeance_01 (player, npc))
|
|
{
|
|
u13_wernell_covington_action_signal_u13_vengeance_01 (player, npc);
|
|
|
|
//-- NPC: Horace already contacted me with their names. Now we must find them and eliminate them. I have an associate in the Narmle Militia. He can get their last known locations, but requests a favor.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What's the favor?
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_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_22");
|
|
|
|
utils.setScriptVar (player, "conversation.u13_wernell_covington.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "u13_wernell_covington", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition_active_u13_vengeance_01 (player, npc))
|
|
{
|
|
//-- NPC: Speak with Horace Korr and help him identify the final two kidnappers.
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition_active_u13_vengeance_pointer (player, npc))
|
|
{
|
|
u13_wernell_covington_action_signal_u13_vengeance_pointer (player, npc);
|
|
|
|
//-- NPC: Who are you?
|
|
string_id message = new string_id (c_stringFile, "s_12");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Lieutenant Varias sent me.
|
|
boolean hasResponse0 = false;
|
|
if (u13_wernell_covington_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.u13_wernell_covington.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "u13_wernell_covington", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (u13_wernell_covington_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Almost done. Almost. Then I can finally rest.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
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 != "u13_wernell_covington")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
if (branchId == 1 && u13_wernell_covington_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && u13_wernell_covington_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && u13_wernell_covington_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && u13_wernell_covington_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && u13_wernell_covington_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && u13_wernell_covington_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.u13_wernell_covington.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|