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

216 lines
6.9 KiB
Plaintext

// ======================================================================
//
// aurilia_sarguillo.script
//
//
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/aurilia_sarguillo";
// ======================================================================
// Script Conditions
// ======================================================================
boolean aurilia_sarguillo_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean aurilia_sarguillo_condition_axkva_min_intro_01 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "axkva_min_intro", "axkva_min_intro_01");
}
// ======================================================================
// Script Actions
// ======================================================================
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int aurilia_sarguillo_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Look alive. While it's true that we've found some peace with Mellichae as our prisoner, this planet has no end of threats to our new found prosperity. I, for one, shall not lower my guard.
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
if (response == "s_5")
{
//-- [NOTE]
if (aurilia_sarguillo_condition__defaultCondition (player, npc))
{
//-- NPC: That headdress was taken from a Nightsister who wandered into town. She seemed distracted and a bit disoriented until I approached her, then she attacked my men and I quite viciously. We subdued her, and she is now an unwilling guest of Aurilia.
string_id message = new string_id (c_stringFile, "s_6");
utils.removeScriptVar (player, "conversation.aurilia_sarguillo.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isTangible (self)) || (isPlayer (self)))
detachScript(self, "conversation.aurilia_sarguillo");
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.aurilia_sarguillo");
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 (aurilia_sarguillo_condition__defaultCondition (player, npc))
{
//-- NPC: Look alive. While it's true that we've found some peace with Mellichae as our prisoner, this planet has no end of threats to our new found prosperity. I, for one, shall not lower my guard.
string_id message = new string_id (c_stringFile, "s_4");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Tell me about the Nightsister headdress in the Adventurers' Guildhall.
boolean hasResponse0 = false;
if (aurilia_sarguillo_condition_axkva_min_intro_01 (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_5");
utils.setScriptVar (player, "conversation.aurilia_sarguillo.branchId", 1);
npcStartConversation (player, npc, "aurilia_sarguillo", 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 != "aurilia_sarguillo")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.aurilia_sarguillo.branchId");
if (branchId == 1 && aurilia_sarguillo_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.aurilia_sarguillo.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================