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

139 lines
4.2 KiB
Plaintext

// ======================================================================
//
// bestine_capitol04.script
//
//
//
// 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_capitol04";
// ======================================================================
// Script Conditions
// ======================================================================
boolean bestine_capitol04_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean bestine_capitol04_condition_nonoffice (obj_id player, obj_id npc)
{
return hasObjVar(npc, "bestine.electionEnded");
}
// ======================================================================
// Script Actions
// ======================================================================
void bestine_capitol04_action__defaultAction (obj_id player, obj_id npc)
{
}
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "npc.conversation.bestine_capitol04");
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_capitol04");
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_capitol04_condition_nonoffice (player, self))
{
//-- NPC: I guess I didn't make the cut. Like many of the politicians here, I too wanted to work with the governor on her new project. Now, it's between Victor Visalis and Sean Trenwell. I guess they deserve it. Speak with the governor for more details. I really must get back to work.
string_id message = new string_id (c_stringFile, "s_754d87ee");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (bestine_capitol04_condition_nonoffice (player, self))
{
//-- NPC: Do you think I'll make the next election? I have so many good ideas for Bestine. Listen to them... actually, I'm not going to tell you. You may steal my ideas and run for office. You think you're pretty smart, huh?
string_id message = new string_id (c_stringFile, "s_2fcca84c");
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_capitol04")
return SCRIPT_CONTINUE;
int branchId = getIntObjVar (player, "conversation.bestine_capitol04.branchId");
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
removeObjVar (player, "conversation.bestine_capitol04.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================