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

139 lines
4.3 KiB
Plaintext

// ======================================================================
//
// bestine_capitol03.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;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/bestine_capitol03";
// ======================================================================
// Script Conditions
// ======================================================================
boolean bestine_capitol03_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean bestine_capitol03_condition_nonoffice (obj_id player, obj_id npc)
{
return hasObjVar(npc, "bestine.electionEnded");
}
// ======================================================================
// Script Actions
// ======================================================================
void bestine_capitol03_action__defaultAction (obj_id player, obj_id npc)
{
}
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "npc.conversation.bestine_capitol03");
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.bestine_capitol03");
return SCRIPT_CONTINUE;
}
// ======================================================================
// Script Triggers
// ======================================================================
trigger OnStartNpcConversation (obj_id player)
{
if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player))
return SCRIPT_OVERRIDE;
//-- [NOTE]
if (!bestine_capitol03_condition_nonoffice (player, self))
{
//-- NPC: All this talk about the new election. It's so boring! I should have volunteered at the museum instead! Ugh! You haven't heard about the election? You're lucky. The governor is taking votes so you need to speak with her. I'm going to take a break now...
string_id message = new string_id (c_stringFile, "s_a65103f5");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (bestine_capitol03_condition_nonoffice (player, self))
{
//-- NPC: It's really quiet around here when there isn't an election going on. Well... it's quiet, at least, for us volunteers. You should come back when an election is going on. I should be at the University, studying. I'm not that good of a student. Oh well!
string_id message = new string_id (c_stringFile, "s_4fc77052");
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 != "bestine_capitol03")
return SCRIPT_CONTINUE;
int branchId = getIntObjVar (player, "conversation.bestine_capitol03.branchId");
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
removeObjVar (player, "conversation.bestine_capitol03.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================