mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
758 lines
22 KiB
Plaintext
758 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// padawan_artist_01.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.34 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.jedi_trials;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/padawan_artist_01";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean padawan_artist_01_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean padawan_artist_01_condition_isTrialPlayer (obj_id player, obj_id npc)
|
|
{
|
|
obj_id trialPlayer = getObjIdObjVar(npc, jedi_trials.PADAWAN_TRIAL_PLAYER_OBJVAR);
|
|
if ( player == trialPlayer )
|
|
{
|
|
string trialName = jedi_trials.getJediTrialName(player);
|
|
|
|
if ( trialName != null && trialName.equals("artist") )
|
|
{
|
|
return !hasObjVar(npc, "padawan_trials.playerFailed");
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean padawan_artist_01_condition_spokeToTarget (obj_id player, obj_id npc)
|
|
{
|
|
obj_id trialPlayer = getObjIdObjVar(npc, jedi_trials.PADAWAN_TRIAL_PLAYER_OBJVAR);
|
|
if ( player == trialPlayer )
|
|
{
|
|
return hasObjVar(player, "jedi_trials.padawan_trials.temp.spokeToTarget_01");
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean padawan_artist_01_condition_acceptedQuest (obj_id player, obj_id npc)
|
|
{
|
|
obj_id trialPlayer = getObjIdObjVar(npc, jedi_trials.PADAWAN_TRIAL_PLAYER_OBJVAR);
|
|
if ( player == trialPlayer )
|
|
{
|
|
return hasObjVar(player, "jedi_trials.padawan_trials.temp.acceptedTask");
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean padawan_artist_01_condition_completedSuccess (obj_id player, obj_id npc)
|
|
{
|
|
obj_id trialPlayer = getObjIdObjVar(npc, jedi_trials.PADAWAN_TRIAL_PLAYER_OBJVAR);
|
|
if ( player == trialPlayer )
|
|
{
|
|
string trialName = jedi_trials.getJediTrialName(player);
|
|
|
|
if ( trialName != null && !trialName.equals("artist") )
|
|
{
|
|
return hasObjVar(npc, "padawan_trials.playerSucceeded");
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void padawan_artist_01_action_questFailure (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar(npc, "padawan_trials.playerFailed", true);
|
|
|
|
messageTo(player, "handleQuestFailure", null, 1, false);
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void padawan_artist_01_action_questSuccess (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar(npc, "padawan_trials.playerSucceeded", true);
|
|
|
|
messageTo(player, "handleTrialComplete", null, 1, false);
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void padawan_artist_01_action_sendToNextNpc (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar(npc, "padawan_trials.playerAccepted", true);
|
|
setObjVar(player, "jedi_trials.padawan_trials.temp.acceptedTask", true);
|
|
messageTo(player, "handleSetSecondLoc", null, 1, false);
|
|
return;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int padawan_artist_01_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Where is my assistant?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I haven't been able to find your assistant.
|
|
if (response == "s_705f9dd1")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Did you even try? I'm not sure why I bothered to ask for your help.
|
|
string_id message = new string_id (c_stringFile, "s_cc45360d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I did get your supplies though.
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_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_d21432e3");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm afraid your assistant will not be coming back... but I have your supplies.
|
|
if (response == "s_a2c41722")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
padawan_artist_01_action_questSuccess (player, npc);
|
|
|
|
//-- NPC: Oh no, he will. Sorry for not bringing this up before, but it is not the first time he has done this. I know it's not the most glamorous job in the world, but I think a part of him sort of enjoys it.
|
|
string_id message = new string_id (c_stringFile, "s_4f3396fb");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int padawan_artist_01_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Did you even try? I'm not sure why I bothered to ask for your help.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I did get your supplies though.
|
|
if (response == "s_d21432e3")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
padawan_artist_01_action_questSuccess (player, npc);
|
|
|
|
//-- NPC: Oh. Maybe I spoke hastily. But how did you know what to get? [check the supplies] Yes, these all look correct. I'm impressed. Ever think about becoming an artist's assistant?
|
|
string_id message = new string_id (c_stringFile, "s_ec321028");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int padawan_artist_01_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Have you found my assistant yet?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not yet. I'm still working on it.
|
|
if (response == "s_593d8ed6")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you. Let me know when you find him.
|
|
string_id message = new string_id (c_stringFile, "s_78bd6c2");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No and I'm not going to. Find him yourself.
|
|
if (response == "s_a0e28661")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "refuse_offer_affection");
|
|
|
|
padawan_artist_01_action_questFailure (player, npc);
|
|
|
|
//-- NPC: What? But... you... I see. Very well. I see how your true colors now.
|
|
string_id message = new string_id (c_stringFile, "s_a95dd416");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int padawan_artist_01_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Who are you? Never mind, I think we both know that doesn't matter.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Excuse me?
|
|
if (response == "s_a51658ea")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm an aspiring artist working on some paintings using natural materials as the base for my paints. The texture and brilliance of the colors I get using them echoes the emotions I try to express in my work.
|
|
string_id message = new string_id (c_stringFile, "s_76f9d659");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds... interesting.
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_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_bdf1fbc8");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int padawan_artist_01_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm an aspiring artist working on some paintings using natural materials as the base for my paints. The texture and brilliance of the colors I get using them echoes the emotions I try to express in my work.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds... interesting.
|
|
if (response == "s_bdf1fbc8")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes... you see if I don't get the supplies I need to make the paints I'm afraid I will not be able to finish my paintings. Which means my patrons will not receive those paintings and will therefore not pay me. This in turn means I won't be able to pay my bills.
|
|
string_id message = new string_id (c_stringFile, "s_5e1dfbcd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I get the picture. What can I do to help?
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Lady, you're a freak. Get a real job and leave the rest of us alone.
|
|
boolean hasResponse1 = false;
|
|
if (padawan_artist_01_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_f9a16624");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_81192d80");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int padawan_artist_01_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes... you see if I don't get the supplies I need to make the paints I'm afraid I will not be able to finish my paintings. Which means my patrons will not receive those paintings and will therefore not pay me. This in turn means I won't be able to pay my bills.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I get the picture. What can I do to help?
|
|
if (response == "s_f9a16624")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
padawan_artist_01_action_sendToNextNpc (player, npc);
|
|
|
|
//-- NPC: My assistant is out collecting a mixture of mud and refuse that is just right for the colors I need. If you could please meet him there and assist him in returning safely I would be ever appreciative.
|
|
string_id message = new string_id (c_stringFile, "s_8bed149");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Lady, you're a freak. Get a real job and leave the rest of us alone.
|
|
if (response == "s_81192d80")
|
|
{
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
padawan_artist_01_action_questFailure (player, npc);
|
|
|
|
//-- NPC: Your excuses are as transparent as a Twi'lek entertainers clothing. Lets both just forget I asked.
|
|
string_id message = new string_id (c_stringFile, "s_a8a01106");
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.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.padawan_artist_01");
|
|
|
|
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.padawan_artist_01");
|
|
|
|
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 (padawan_artist_01_condition_completedSuccess (player, npc))
|
|
{
|
|
doAnimationAction (npc, "bow2");
|
|
|
|
//-- NPC: Thank you so much for retrieving my supplies. I'm not sure what I'll do about getting another assistant, but that's something I can worry about later.
|
|
string_id message = new string_id (c_stringFile, "s_35c6bce6");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition_spokeToTarget (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: Where is my assistant?
|
|
string_id message = new string_id (c_stringFile, "s_aad1f131");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I haven't been able to find your assistant.
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm afraid your assistant will not be coming back... but I have your supplies.
|
|
boolean hasResponse1 = false;
|
|
if (padawan_artist_01_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_705f9dd1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a2c41722");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "padawan_artist_01", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition_acceptedQuest (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Have you found my assistant yet?
|
|
string_id message = new string_id (c_stringFile, "s_a1ae198d");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not yet. I'm still working on it.
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No and I'm not going to. Find him yourself.
|
|
boolean hasResponse1 = false;
|
|
if (padawan_artist_01_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_593d8ed6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a0e28661");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "padawan_artist_01", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition_isTrialPlayer (player, npc))
|
|
{
|
|
//-- NPC: Who are you? Never mind, I think we both know that doesn't matter.
|
|
string_id message = new string_id (c_stringFile, "s_c4960c85");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Excuse me?
|
|
boolean hasResponse0 = false;
|
|
if (padawan_artist_01_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_a51658ea");
|
|
|
|
utils.setScriptVar (player, "conversation.padawan_artist_01.branchId", 9);
|
|
|
|
npcStartConversation (player, npc, "padawan_artist_01", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (padawan_artist_01_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "tap_foot");
|
|
|
|
//-- NPC: Where is my assistant with those supplies. Arrgh, this is becoming annoying.
|
|
string_id message = new string_id (c_stringFile, "s_28225432");
|
|
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 != "padawan_artist_01")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
if (branchId == 2 && padawan_artist_01_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && padawan_artist_01_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && padawan_artist_01_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && padawan_artist_01_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && padawan_artist_01_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && padawan_artist_01_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.padawan_artist_01.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|