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

505 lines
15 KiB
Plaintext

// ======================================================================
//
// padawan_artist_02.script
// Copyright 2003, Sony Online Entertainment
// All Rights Reserved.
//
// DO NOT EDIT THIS AUTO-GENERATED FILE. PLEASE USE THE CONVERATION EDITOR!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.jedi_trials;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/padawan_artist_02";
// ======================================================================
// Script Conditions
// ======================================================================
boolean padawan_artist_02_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean padawan_artist_02_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(player, "jedi_trials.padawan_trials.temp.spokeToTarget_01");
}
}
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void padawan_artist_02_action_setSpokeToNpc (obj_id player, obj_id npc)
{
setObjVar(player, "jedi_trials.padawan_trials.temp.spokeToTarget_01", true);
messageTo(player, "handleSetBeginLoc", null, 1, false);
return;
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "npc.conversation.padawan_artist_02");
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, "npc.conversation.padawan_artist_02");
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)
{
if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player))
return SCRIPT_OVERRIDE;
//-- [NOTE]
if (padawan_artist_02_condition_isTrialPlayer (player, self))
{
//-- NPC: I see she has already found a replacement for me.
string_id message = new string_id (c_stringFile, "s_e00a6a73");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm just here to get you to return with her supplies.
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_7fb2178f");
setObjVar (player, "conversation.padawan_artist_02.branchId", 1);
npcStartConversation (player, self, "padawan_artist_02", message, responses);
}
else
{
chat.chat (self, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
//-- NPC: I don't care what she thinks... I'm following my own dreams.
string_id message = new string_id (c_stringFile, "s_a54bac2d");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "padawan_artist_02")
return SCRIPT_CONTINUE;
int branchId = getIntObjVar (player, "conversation.padawan_artist_02.branchId");
//-- [BRANCH NOTE]
//-- NPC: I see she has already found a replacement for me.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm just here to get you to return with her supplies.
if (branchId == 1 && response == "s_7fb2178f")
{
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
doAnimationAction (self, "dismiss");
//-- NPC: I've told her already, I'm not fetching her 'mud and refuse' ever again.
string_id message = new string_id (c_stringFile, "s_5c12a1a9");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Then why are you digging around in the mud?
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_5439ef9");
setObjVar (player, "conversation.padawan_artist_02.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'I see she has already found a replacement for me.' were false.");
return SCRIPT_CONTINUE;
}
//-- [BRANCH NOTE]
//-- NPC: I've told her already, I'm not fetching her 'mud and refuse' ever again.
//-- [RESPONSE NOTE]
//-- PLAYER: Then why are you digging around in the mud?
if (branchId == 2 && response == "s_5439ef9")
{
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
doAnimationAction (self, "shrug_hands");
//-- NPC: Because... I... I've lost all direction in my life, where do I go from here? There must be something better than fetching dirt and droppings from various places. But I have nowhere else to go.
string_id message = new string_id (c_stringFile, "s_70d2d7a8");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: There are plenty of worse professions out there.
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_b4b8a975");
setObjVar (player, "conversation.padawan_artist_02.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'I've told her already, I'm not fetching her 'mud and refuse' ever again.' were false.");
return SCRIPT_CONTINUE;
}
//-- [BRANCH NOTE]
//-- NPC: Because... I... I've lost all direction in my life, where do I go from here? There must be something better than fetching dirt and droppings from various places. But I have nowhere else to go.
//-- [RESPONSE NOTE]
//-- PLAYER: There are plenty of worse professions out there.
if (branchId == 3 && response == "s_b4b8a975")
{
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
//-- NPC: You don't have to lie to make me feel better.
string_id message = new string_id (c_stringFile, "s_f0a76084");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sorry...
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_b19ae492");
setObjVar (player, "conversation.padawan_artist_02.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Because... I... I've lost all direction in my life, where do I go from here? There must be something better than fetching dirt and droppings from various places. But I have nowhere else to go.' were false.");
return SCRIPT_CONTINUE;
}
//-- [BRANCH NOTE]
//-- NPC: You don't have to lie to make me feel better.
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry...
if (branchId == 4 && response == "s_b19ae492")
{
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
doAnimationAction (self, "pound_fist_palm");
//-- NPC: I have hopes and dreams too! I have talent!
string_id message = new string_id (c_stringFile, "s_c5493e9b");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Right.. can you just please get back to the delivery?
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_cb5a9d1b");
setObjVar (player, "conversation.padawan_artist_02.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'You don't have to lie to make me feel better.' were false.");
return SCRIPT_CONTINUE;
}
//-- [BRANCH NOTE]
//-- NPC: I have hopes and dreams too! I have talent!
//-- [RESPONSE NOTE]
//-- PLAYER: Right.. can you just please get back to the delivery?
if (branchId == 5 && response == "s_cb5a9d1b")
{
//-- [NOTE]
if (padawan_artist_02_condition__defaultCondition (player, self))
{
doAnimationAction (self, "slump_head");
//-- NPC: No, I don't have it in me.
string_id message = new string_id (c_stringFile, "s_e83d11f6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Then let me return with the paint mixture for you.
boolean hasResponse0 = false;
if (padawan_artist_02_condition__defaultCondition (player, self))
{
++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_1ed6eefa");
setObjVar (player, "conversation.padawan_artist_02.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'I have hopes and dreams too! I have talent!' were false.");
return SCRIPT_CONTINUE;
}
//-- [BRANCH NOTE]
//-- NPC: No, I don't have it in me.
//-- [RESPONSE NOTE]
//-- PLAYER: Then let me return with the paint mixture for you.
if (branchId == 6 && response == "s_1ed6eefa")
{
//-- [NOTE] Gives player 'mud and refuse' paint mixture.
if (padawan_artist_02_condition__defaultCondition (player, self))
{
doAnimationAction (self, "nod_head_once");
padawan_artist_02_action_setSpokeToNpc (player, self);
//-- NPC: Yeah. Okay. Thanks, tell Sathme that I'm sorry.
string_id message = new string_id (c_stringFile, "s_26360156");
removeObjVar (player, "conversation.padawan_artist_02.branchId");
npcSpeak (player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'No, I don't have it in me.' were false.");
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
removeObjVar (player, "conversation.padawan_artist_02.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================