Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/c_newbie_entertainer.script
T
2013-09-10 23:17:15 -07:00

971 lines
28 KiB
Plaintext

// ======================================================================
//
// c_newbie_entertainer.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.30 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.anims;
include library.chat;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/c_newbie_entertainer";
// ======================================================================
// Script Conditions
// ======================================================================
boolean c_newbie_entertainer_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean c_newbie_entertainer_condition_onCantinaStep (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/c_newbie_quest3");
int cantinastep = groundquests.getTaskId(questId1, "cantinastep");
return questIsTaskActive(questId1, cantinastep, player);
}
// ----------------------------------------------------------------------
boolean c_newbie_entertainer_condition_afterPerform (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/c_newbie_quest3");
int cantinareturn = groundquests.getTaskId(questId1, "cantinareturn");
return questIsTaskActive(questId1, cantinareturn, player);
}
// ======================================================================
// Script Actions
// ======================================================================
void c_newbie_entertainer_action_forwardQuest (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "c_newbie_cantinastep");
}
// ----------------------------------------------------------------------
void c_newbie_entertainer_action_dance (obj_id player, obj_id npc)
{
ai_lib.setMood (npc, "themepark_oola");
dictionary webster=new dictionary();
webster.put ("npc", npc);
messageTo( npc, "stopDancing", webster, 9, false );
}
// ----------------------------------------------------------------------
void c_newbie_entertainer_action_faceplayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int c_newbie_entertainer_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well hello there. Have you come to watch me dance? I'm quite adept.
//-- [RESPONSE NOTE]
//-- PLAYER: Trehla Keelo sent me.
if (response == "s_427")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Did she? In that case, you must be %TU. I have been waiting to talk to you.
string_id message = new string_id (c_stringFile, "s_430");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How is it that you know me?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_434");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 2);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.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;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I would love to see you dance!
if (response == "s_482")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
c_newbie_entertainer_action_dance (player, npc);
//-- NPC: Certainly.
string_id message = new string_id (c_stringFile, "s_486");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Trehla Keelo sent me to talk to you.
boolean hasResponse0 = false;
if (c_newbie_entertainer_condition_onCantinaStep (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: You dance very well.
boolean hasResponse1 = false;
if (!c_newbie_entertainer_condition_onCantinaStep (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_490");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_494");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have finished performing.
if (response == "s_509")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "applause_excited");
//-- NPC: Great! Exhilarating, isn't it? I love the feeling of people watching me and enjoying my work. I hope you feel the same. Hmmm... you should probably return to Trehla, I'll bet she's waiting for you.
string_id message = new string_id (c_stringFile, "s_511");
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Did she? In that case, you must be %TU. I have been waiting to talk to you.
//-- [RESPONSE NOTE]
//-- PLAYER: How is it that you know me?
if (response == "s_434")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: I know a lot of things. You hear quite a bit in cantinas, and this one specifically. I know a little about everything, and everything about entertaining. That is what you need to learn.
string_id message = new string_id (c_stringFile, "s_438");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm ready to start.
boolean hasResponse0 = false;
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: More lessons?
boolean hasResponse1 = false;
if (c_newbie_entertainer_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_442");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_466");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I know a lot of things. You hear quite a bit in cantinas, and this one specifically. I know a little about everything, and everything about entertaining. That is what you need to learn.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm ready to start.
if (response == "s_442")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: Good. First thing that you need to know is to listen to yourself. Your inner music and inner rhythm will make your art come to life. But no matter how much talent you have, you must practice. Try it now! Sing! Dance! Whatever your heart desires.
string_id message = new string_id (c_stringFile, "s_446");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will!
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_450");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: More lessons?
if (response == "s_466")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
//-- NPC: Of course! You wouldn't want to go into a blaster fight without a weapon! You need weapons of the intellect as well. So, let me start to arm you. Feel the music and get out onto the floor!
string_id message = new string_id (c_stringFile, "s_470");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Fine.
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_474");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good. First thing that you need to know is to listen to yourself. Your inner music and inner rhythm will make your art come to life. But no matter how much talent you have, you must practice. Try it now! Sing! Dance! Whatever your heart desires.
//-- [RESPONSE NOTE]
//-- PLAYER: I will!
if (response == "s_450")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Very good. I want you to perform for 2 minutes. That will give you an hour of inspiration and a good feel for what it is like.
string_id message = new string_id (c_stringFile, "s_454");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Inspiration?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_500");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Very good. I want you to perform for 2 minutes. That will give you an hour of inspiration and a good feel for what it is like.
//-- [RESPONSE NOTE]
//-- PLAYER: Inspiration?
if (response == "s_500")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Yes! Entertainers inspire people to do better. For awhile after watching a musician or dancer, or performing yourself, you will learn faster, craft better, and gain faction more efficiently.
string_id message = new string_id (c_stringFile, "s_502");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Interesting. Any entertainer can do this?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_504");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes! Entertainers inspire people to do better. For awhile after watching a musician or dancer, or performing yourself, you will learn faster, craft better, and gain faction more efficiently.
//-- [RESPONSE NOTE]
//-- PLAYER: Interesting. Any entertainer can do this?
if (response == "s_504")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
c_newbie_entertainer_action_forwardQuest (player, npc);
//-- NPC: Yes. Now get out there and perform! Your public is waiting!
string_id message = new string_id (c_stringFile, "s_506");
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Of course! You wouldn't want to go into a blaster fight without a weapon! You need weapons of the intellect as well. So, let me start to arm you. Feel the music and get out onto the floor!
//-- [RESPONSE NOTE]
//-- PLAYER: Fine.
if (response == "s_474")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Good. I want you to perform for 2 minutes. That will give you an hour of inspiration and a good feel for what it is like.
string_id message = new string_id (c_stringFile, "s_478");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Inspiration?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_500");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good. I want you to perform for 2 minutes. That will give you an hour of inspiration and a good feel for what it is like.
//-- [RESPONSE NOTE]
//-- PLAYER: Inspiration?
if (response == "s_500")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Yes! Entertainers inspire people to do better. For awhile after watching a musician or dancer, or performing yourself, you will learn faster, craft better, and gain faction more efficiently.
string_id message = new string_id (c_stringFile, "s_502");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Interesting. Any entertainer can do this?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_504");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_newbie_entertainer_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Certainly.
//-- [RESPONSE NOTE]
//-- PLAYER: Trehla Keelo sent me to talk to you.
if (response == "s_490")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Did she? In that case, you must be %TU. I have been waiting to talk to you.
string_id message = new string_id (c_stringFile, "s_430");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How is it that you know me?
boolean hasResponse0 = false;
if (c_newbie_entertainer_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_434");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 2);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.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;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You dance very well.
if (response == "s_494")
{
//-- [NOTE]
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
//-- NPC: Thank you. I practiced a lot.
string_id message = new string_id (c_stringFile, "s_498");
utils.removeScriptVar (player, "conversation.c_newbie_entertainer.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.c_newbie_entertainer");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Allura");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Allura");
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.c_newbie_entertainer");
return SCRIPT_CONTINUE;
}
messageHandler stopDancing()
{
obj_id npc=params.getObjId ("npc");
ai_lib.setMood (npc, "default");
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 (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
c_newbie_entertainer_action_faceplayer (player, npc);
//-- NPC: Well hello there. Have you come to watch me dance? I'm quite adept.
string_id message = new string_id (c_stringFile, "s_425");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Trehla Keelo sent me.
boolean hasResponse0 = false;
if (c_newbie_entertainer_condition_onCantinaStep (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I would love to see you dance!
boolean hasResponse1 = false;
if (c_newbie_entertainer_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I have finished performing.
boolean hasResponse2 = false;
if (c_newbie_entertainer_condition_afterPerform (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_427");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_482");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_509");
utils.setScriptVar (player, "conversation.c_newbie_entertainer.branchId", 1);
npcStartConversation (player, npc, "c_newbie_entertainer", 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 != "c_newbie_entertainer")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.c_newbie_entertainer.branchId");
if (branchId == 1 && c_newbie_entertainer_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && c_newbie_entertainer_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && c_newbie_entertainer_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && c_newbie_entertainer_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && c_newbie_entertainer_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && c_newbie_entertainer_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && c_newbie_entertainer_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && c_newbie_entertainer_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && c_newbie_entertainer_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.c_newbie_entertainer.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================