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

842 lines
23 KiB
Plaintext

// ======================================================================
//
// ep3_myyydril_guard.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.chat;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/ep3_myyydril_guard";
// ======================================================================
// Script Conditions
// ======================================================================
boolean ep3_myyydril_guard_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean ep3_myyydril_guard_condition_hasLnguage (obj_id player, obj_id npc)
{
return utils.canSpeakWookiee(player, npc);
}
// ======================================================================
// Script Actions
// ======================================================================
void ep3_myyydril_guard_action_Language (obj_id player, obj_id npc)
{
utils.emoteWookieeConfusion (player, npc);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int ep3_myyydril_guard_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: [The guards look sternly at you.] You shouldn't be wandering aimlessly down here. It's dangerous.
//-- [RESPONSE NOTE]
//-- PLAYER: It's okay. I'm well-armed.
if (response == "s_458")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: [The guard looks you over.] I suppose... Is there anything I can help you with?
string_id message = new string_id (c_stringFile, "s_460");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are the Urnsor'is?
boolean hasResponse0 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Myyydril Village?
boolean hasResponse1 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm going to go explore now.
boolean hasResponse2 = false;
if (ep3_myyydril_guard_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_462");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_470");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_myyydril_guard_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: [The guard looks you over.] I suppose... Is there anything I can help you with?
//-- [RESPONSE NOTE]
//-- PLAYER: What are the Urnsor'is?
if (response == "s_462")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: The Urnsor'is are vile creatures feasting on the souls of the living. It is imperative that you keep away from these creatures. We have lost many strong Myyydril to these.. things. Don't go toying with them. If you're curious, they're in the Deep Depths. [The guard shrugs.]
string_id message = new string_id (c_stringFile, "s_464");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you for telling me.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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_466");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Myyydril Village?
if (response == "s_470")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: If you continue to travel downward, you won't be able to miss it. Just beyond the Myyydril Village is the entrance to the Deep Depths. You should be careful.
string_id message = new string_id (c_stringFile, "s_472");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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.ep3_myyydril_guard.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going to go explore now.
if (response == "s_478")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: Keep your wits about you, my friend.
string_id message = new string_id (c_stringFile, "s_480");
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_myyydril_guard_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The Urnsor'is are vile creatures feasting on the souls of the living. It is imperative that you keep away from these creatures. We have lost many strong Myyydril to these.. things. Don't go toying with them. If you're curious, they're in the Deep Depths. [The guard shrugs.]
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you for telling me.
if (response == "s_466")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: Is there anything else?
string_id message = new string_id (c_stringFile, "s_468");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are the Urnsor'is?
boolean hasResponse0 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Myyydril Village?
boolean hasResponse1 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm going to go explore now.
boolean hasResponse2 = false;
if (ep3_myyydril_guard_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_462");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_470");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_myyydril_guard_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Is there anything else?
//-- [RESPONSE NOTE]
//-- PLAYER: What are the Urnsor'is?
if (response == "s_462")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: The Urnsor'is are vile creatures feasting on the souls of the living. It is imperative that you keep away from these creatures. We have lost many strong Myyydril to these.. things. Don't go toying with them. If you're curious, they're in the Deep Depths. [The guard shrugs.]
string_id message = new string_id (c_stringFile, "s_464");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you for telling me.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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_466");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Myyydril Village?
if (response == "s_470")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: If you continue to travel downward, you won't be able to miss it. Just beyond the Myyydril Village is the entrance to the Deep Depths. You should be careful.
string_id message = new string_id (c_stringFile, "s_472");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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.ep3_myyydril_guard.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going to go explore now.
if (response == "s_478")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: Keep your wits about you, my friend.
string_id message = new string_id (c_stringFile, "s_480");
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_myyydril_guard_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: If you continue to travel downward, you won't be able to miss it. Just beyond the Myyydril Village is the entrance to the Deep Depths. You should be careful.
//-- [RESPONSE NOTE]
//-- PLAYER: Thanks.
if (response == "s_474")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: Anything else?
string_id message = new string_id (c_stringFile, "s_476");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are the Urnsor'is?
boolean hasResponse0 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Myyydril Village?
boolean hasResponse1 = false;
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm going to go explore now.
boolean hasResponse2 = false;
if (ep3_myyydril_guard_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_462");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_470");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_478");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int ep3_myyydril_guard_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Anything else?
//-- [RESPONSE NOTE]
//-- PLAYER: What are the Urnsor'is?
if (response == "s_462")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: The Urnsor'is are vile creatures feasting on the souls of the living. It is imperative that you keep away from these creatures. We have lost many strong Myyydril to these.. things. Don't go toying with them. If you're curious, they're in the Deep Depths. [The guard shrugs.]
string_id message = new string_id (c_stringFile, "s_464");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you for telling me.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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_466");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Myyydril Village?
if (response == "s_470")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: If you continue to travel downward, you won't be able to miss it. Just beyond the Myyydril Village is the entrance to the Deep Depths. You should be careful.
string_id message = new string_id (c_stringFile, "s_472");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thanks.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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.ep3_myyydril_guard.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going to go explore now.
if (response == "s_478")
{
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: Keep your wits about you, my friend.
string_id message = new string_id (c_stringFile, "s_480");
utils.removeScriptVar (player, "conversation.ep3_myyydril_guard.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_myyydril_guard");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
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_myyydril_guard");
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_myyydril_guard_condition_hasLnguage (player, npc))
{
ep3_myyydril_guard_action_Language (player, npc);
//-- NPC: Rrworr!
string_id message = new string_id (c_stringFile, "s_676");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (ep3_myyydril_guard_condition__defaultCondition (player, npc))
{
//-- NPC: [The guards look sternly at you.] You shouldn't be wandering aimlessly down here. It's dangerous.
string_id message = new string_id (c_stringFile, "s_456");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It's okay. I'm well-armed.
boolean hasResponse0 = false;
if (ep3_myyydril_guard_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_458");
utils.setScriptVar (player, "conversation.ep3_myyydril_guard.branchId", 2);
npcStartConversation (player, npc, "ep3_myyydril_guard", 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_myyydril_guard")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.ep3_myyydril_guard.branchId");
if (branchId == 2 && ep3_myyydril_guard_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && ep3_myyydril_guard_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && ep3_myyydril_guard_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && ep3_myyydril_guard_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && ep3_myyydril_guard_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && ep3_myyydril_guard_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_myyydril_guard.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================