Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/ep3_vryyyr.script
T

625 lines
18 KiB
Plaintext

// ======================================================================
//
// ep3_vryyyr.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/ep3_vryyyr";
// ======================================================================
// Script Conditions
// ======================================================================
boolean ep3_vryyyr_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean ep3_vryyyr_condition_knows_Shiryyywook (obj_id player, obj_id npc)
{
return utils.canSpeakWookiee(player,npc);
}
// ----------------------------------------------------------------------
boolean ep3_vryyyr_condition_is_Trandoshan (obj_id player, obj_id npc)
{
int plrSpecies = getSpecies( player );
return ( plrSpecies == SPECIES_TRANDOSHAN);
}
// ======================================================================
// Script Actions
// ======================================================================
void ep3_vryyyr_action_growl (obj_id player, obj_id npc)
{
playClientEffectObj(npc, "clienteffect/voc_wookiee_loud_6sec.cef", player, "");
}
// ----------------------------------------------------------------------
void ep3_vryyyr_action_medium_talk (obj_id player, obj_id npc)
{
playClientEffectObj(npc, "clienteffect/voc_wookiee_loud_2sec.cef", player, "");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int ep3_vryyyr_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What do you want, outsider? Are you here for an honorable hunt or are you here to spread the evil of the Empire?!
//-- [RESPONSE NOTE]
//-- PLAYER: I am a hunter.
if (response == "s_456")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: You're not a hunter until you have stalked the wilds of Kachirho, survived the terrors of Etyyy, and met the challenge of the Rryatt Trail!
string_id message = new string_id (c_stringFile, "s_458");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Kachirho? You mean this city?
boolean hasResponse0 = false;
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What is this Rryatt Trail?
boolean hasResponse1 = false;
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What's so terrifying about Etyyy?
boolean hasResponse2 = false;
if (ep3_vryyyr_condition__defaultCondition (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_460");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_468");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_480");
utils.setScriptVar (player, "conversation.ep3_vryyyr.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Evil? Empire? You watch your mouth!
if (response == "s_484")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
ep3_vryyyr_action_growl (player, npc);
//-- NPC: Perhaps I should rip your mouth right out of your face, outsider?!
string_id message = new string_id (c_stringFile, "s_486");
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: The Empire is doomed to fall!
if (response == "s_488")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: You have the courage to stand up to the Empire? Then perhaps you have what it takes to hunt on Kashyyyk after all.
string_id message = new string_id (c_stringFile, "s_490");
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_vryyyr_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You're not a hunter until you have stalked the wilds of Kachirho, survived the terrors of Etyyy, and met the challenge of the Rryatt Trail!
//-- [RESPONSE NOTE]
//-- PLAYER: Kachirho? You mean this city?
if (response == "s_460")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: The city can be dangerous if you make the wrong friends... but, no. I mean the outskirts of this city. The thick forest that embraces Kachirho is filled with cunning beasts! Powerful! Dangerous!
string_id message = new string_id (c_stringFile, "s_462");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you.
boolean hasResponse0 = false;
if (ep3_vryyyr_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_464");
utils.setScriptVar (player, "conversation.ep3_vryyyr.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What is this Rryatt Trail?
if (response == "s_468")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: So you have the courage to face it? Good. But, courage isn't enough! You'll need true skill!
string_id message = new string_id (c_stringFile, "s_470");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I have the skill!
boolean hasResponse0 = false;
if (ep3_vryyyr_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_472");
utils.setScriptVar (player, "conversation.ep3_vryyyr.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What's so terrifying about Etyyy?
if (response == "s_480")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: Honestly? The Rodians disturb me most. They have formed an alliance with the Empire and now control the entrance to Etyyy... My ancestors' hunting grounds have become their private reserve!
string_id message = new string_id (c_stringFile, "s_482");
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_vryyyr_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The city can be dangerous if you make the wrong friends... but, no. I mean the outskirts of this city. The thick forest that embraces Kachirho is filled with cunning beasts! Powerful! Dangerous!
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you.
if (response == "s_464")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
ep3_vryyyr_action_medium_talk (player, npc);
//-- NPC: Farewell.
string_id message = new string_id (c_stringFile, "s_466");
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_vryyyr_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So you have the courage to face it? Good. But, courage isn't enough! You'll need true skill!
//-- [RESPONSE NOTE]
//-- PLAYER: I have the skill!
if (response == "s_472")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: Then don't waste your time talking to me 'hunter!' Go to the Rryatt Trail! Find Achonnko, master trail guide of the Rryatt trail. A consummate hunter! He will tell you what you need to know.
string_id message = new string_id (c_stringFile, "s_474");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will.
boolean hasResponse0 = false;
if (ep3_vryyyr_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_476");
utils.setScriptVar (player, "conversation.ep3_vryyyr.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_vryyyr_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Then don't waste your time talking to me 'hunter!' Go to the Rryatt Trail! Find Achonnko, master trail guide of the Rryatt trail. A consummate hunter! He will tell you what you need to know.
//-- [RESPONSE NOTE]
//-- PLAYER: I will.
if (response == "s_476")
{
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: Farewell.
string_id message = new string_id (c_stringFile, "s_478");
utils.removeScriptVar (player, "conversation.ep3_vryyyr.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.ep3_vryyyr");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable(self, true);
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.ep3_vryyyr");
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_vryyyr_condition_is_Trandoshan (player, npc))
{
ep3_vryyyr_action_growl (player, npc);
//-- NPC: WRRROARRRR!
string_id message = new string_id (c_stringFile, "s_450");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_vryyyr_condition_knows_Shiryyywook (player, npc))
{
//-- NPC: Rrrowrr wroroww?
string_id message = new string_id (c_stringFile, "s_452");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
//-- NPC: What do you want, outsider? Are you here for an honorable hunt or are you here to spread the evil of the Empire?!
string_id message = new string_id (c_stringFile, "s_454");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am a hunter.
boolean hasResponse0 = false;
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Evil? Empire? You watch your mouth!
boolean hasResponse1 = false;
if (ep3_vryyyr_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: The Empire is doomed to fall!
boolean hasResponse2 = false;
if (ep3_vryyyr_condition__defaultCondition (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_456");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_484");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_488");
utils.setScriptVar (player, "conversation.ep3_vryyyr.branchId", 3);
npcStartConversation (player, npc, "ep3_vryyyr", 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_vryyyr")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.ep3_vryyyr.branchId");
if (branchId == 3 && ep3_vryyyr_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && ep3_vryyyr_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && ep3_vryyyr_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && ep3_vryyyr_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && ep3_vryyyr_handleBranch8 (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_vryyyr.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================