using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Windows; using System.Windows.Forms; using Buddy.BehaviorTree; using Buddy.Common; using Buddy.Common.Plugins; using Buddy.Swtor; using Action = System.Action; namespace Buddywing.Plugins { class AutoSkip : IPlugin { #region Implementation of IEquatable /// /// Indicates whether the current object is equal to another object of the same type. /// /// /// true if the current object is equal to the parameter; otherwise, false. /// /// An object to compare with this object. public bool Equals(IPlugin other) { return other.Name == Name; } #endregion #region Implementation of IPlugin public string Author { get { return "Nesox"; } } public Version Version { get { return new Version(1, 0, 1); } } public string Name { get { return "AutoSkip"; } } public string Description { get { return "HotKeys - R=Light, T=Dark, Y=Normal"; } } public Window DisplayWindow { get { return null; } } /// Executes the pulse action. This is called every "tick" of the bot. public void OnPulse() { } public Buddy.Swtor.Objects.TorPlaceable Chest { get { return ObjectManager.GetObjects().FirstOrDefault(o => o.Name.Contains("Chest") && o.Distance <= 4f); } } /// Executes the initialize action. This is called at initial bot startup. (When the bot itself is started, not when Start() is called) public void OnInitialize() { Hotkeys.RegisterHotkey("Skip Conversation Light", () => OracleManager.SetConversationSkip(ConversationSkip.LightAutoSkip), Keys.R); Hotkeys.RegisterHotkey("Skip Conversation Dark", () => OracleManager.SetConversationSkip(ConversationSkip.DarkAutoSkip), Keys.T); Hotkeys.RegisterHotkey("Skip Conversation Normal", () => OracleManager.SetConversationSkip(ConversationSkip.Normal), Keys.Y); } /// Executes the shutdown action. This is called when the bot is shutting down. (Not when Stop() is called) public void OnShutdown() { } /// Executes the enabled action. This is called when the user has enabled this specific plugin via the GUI. public void OnEnabled() { } /// Executes the disabled action. This is called whent he user has disabled this specific plugin via the GUI. public void OnDisabled() { } #endregion } }