mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
718 lines
20 KiB
Plaintext
718 lines
20 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_tien_wallub.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.30 - 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/ep3_tien_wallub";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_tien_wallub_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_tien_wallub_condition_readyForJesskSignal (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isQuestActive(player, "ep3_stren_jessk_bounty") &&
|
|
!groundquests.hasCompletedTask(player, "ep3_stren_jessk_bounty", 2));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_tien_wallub_condition_isJesskQuestActive (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "ep3_stren_jessk_bounty");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_tien_wallub_condition_bountyDiscussion (obj_id player, obj_id npc)
|
|
{
|
|
//return (groundquests.hasCompletedQuest(player, "ep3_stren_jessk_bounty_tien") &&
|
|
// !groundquests.hasCompletedQuest(player, "ep3_stren_jessk_bounty"));
|
|
//accesed through general conversation.
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_tien_wallub_condition_canLearnAboutJessk (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "ep3_stren_jessk_bounty") ||
|
|
!groundquests.isQuestActive(player, "ep3_stren_jessk_bounty"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_tien_wallub_condition_canGetJesskBountyInfo (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "ep3_stren_jessk_bounty_tien", "speakWithTien");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_tien_wallub_action_grantJesskBounty (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isQuestActive(player, "ep3_stren_jessk_bounty"))
|
|
{
|
|
groundquests.clearQuest(player, "ep3_stren_jessk_bounty");
|
|
}
|
|
|
|
groundquests.grantQuest(player, "ep3_stren_jessk_bounty");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_tien_wallub_action_sendJesskSpokeWithTien (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "signalJesskSpeakWithTien");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_tien_wallub_action_signalSpeakWithTienEnd (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "signalJesskSpeakWithTien");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_tien_wallub_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Jessk Bounty
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Stren has sent me.
|
|
if (response == "s_433")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Stren sent you then did he?
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need to hear about Jessk the Trandoshan.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_55");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_tien_wallub_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Stren sent you then did he?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need to hear about Jessk the Trandoshan.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah, the Trandoshan. He cheated a few of our customers and it is hurting business. One of these customers is a friend of the owner, so we have taken it upon ourselves to solve the problem.
|
|
string_id message = new string_id (c_stringFile, "s_437");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Solve the problem?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_445");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_tien_wallub_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah, the Trandoshan. He cheated a few of our customers and it is hurting business. One of these customers is a friend of the owner, so we have taken it upon ourselves to solve the problem.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Solve the problem?
|
|
if (response == "s_445")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A final solution.
|
|
string_id message = new string_id (c_stringFile, "s_59");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: So where can I find him?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_447");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_tien_wallub_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A final solution.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: So where can I find him?
|
|
if (response == "s_447")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: My people tell me he has flown out for Tatooine. A contact at the Tatooine station indicates he is inbound to Mos Eisley and expected soon.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds like I'm off to Tatooine.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_449");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_tien_wallub_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: My people tell me he has flown out for Tatooine. A contact at the Tatooine station indicates he is inbound to Mos Eisley and expected soon.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds like I'm off to Tatooine.
|
|
if (response == "s_449")
|
|
{
|
|
ep3_tien_wallub_action_sendJesskSpokeWithTien (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_tien_wallub_action_grantJesskBounty (player, npc);
|
|
|
|
//-- NPC: Good luck %NU
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_tien_wallub_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the cantina, how can I help you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm just passing through.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well enjoy the view. The world is a lot more dangerous down on ground level.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here about Jessk. Stren sent me.
|
|
if (response == "s_72")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Stren sent you then did he?
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need to hear about Jessk the Trandoshan.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_55");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need to ask about Jessk again.
|
|
if (response == "s_18")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Stren sent you then did he?
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need to hear about Jessk the Trandoshan.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_55");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_tien_wallub");
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_tien_wallub");
|
|
|
|
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 (ep3_tien_wallub_condition_bountyDiscussion (player, npc))
|
|
{
|
|
//-- NPC: Jessk Bounty
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Stren has sent me.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_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_433");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "ep3_tien_wallub", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the cantina, how can I help you?
|
|
string_id message = new string_id (c_stringFile, "s_292");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm just passing through.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_tien_wallub_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm here about Jessk. Stren sent me.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_tien_wallub_condition_canGetJesskBountyInfo (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need to ask about Jessk again.
|
|
boolean hasResponse2 = false;
|
|
if (ep3_tien_wallub_condition_isJesskQuestActive (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_68");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_72");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_tien_wallub.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "ep3_tien_wallub", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "ep3_tien_wallub")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
if (branchId == 1 && ep3_tien_wallub_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && ep3_tien_wallub_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && ep3_tien_wallub_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && ep3_tien_wallub_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_tien_wallub_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && ep3_tien_wallub_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_tien_wallub.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|