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

176 lines
5.5 KiB
Plaintext

// ======================================================================
//
// itp_thrawn_keeloo.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.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/itp_thrawn_keeloo";
// ======================================================================
// Script Conditions
// ======================================================================
boolean itp_thrawn_keeloo_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean itp_thrawn_keeloo_condition_thrawnTaskActive (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "itp_thrawn_02", "itp_thrawn_02_02a");
}
// ======================================================================
// Script Actions
// ======================================================================
void itp_thrawn_keeloo_action_thrawnSignal (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "itp_thrawn_02_02a");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.itp_thrawn_keeloo");
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);
faceTo( self, player );
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.itp_thrawn_keeloo");
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 (itp_thrawn_keeloo_condition_thrawnTaskActive (player, npc))
{
itp_thrawn_keeloo_action_thrawnSignal (player, npc);
//-- NPC: Before you even ask, the prototype was stolen. You will have to recover it from the thieves before they can fence it. They let slip that their hideout is somewhere outside of Narmle.
string_id message = new string_id (c_stringFile, "s_32");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (itp_thrawn_keeloo_condition__defaultCondition (player, npc))
{
//-- NPC: Unbelievable that I would be robbed just as I was to deliver the prototype. Though on second thought, maybe that isn't so unbelievable at that. Time to increase security.
string_id message = new string_id (c_stringFile, "s_34");
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 != "itp_thrawn_keeloo")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.itp_thrawn_keeloo.branchId");
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.itp_thrawn_keeloo.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================