What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Request] Plugin guide

chemical

Active Member
Joined
Aug 30, 2010
Messages
1,310
AS title says, there isn't anything in the wiki about it or i haven't seen a post. but could someone create a" how to " on details to create a plugin. i have an idea on a plugin but have no clue on how to add it into HB
 
Well, you could check what other plugins do, and how they are coded.

Code:
using System;
using System.Windows.Forms;
using Styx.Helpers;
using Styx.Plugins.PluginClass;

namespace PluginTemplate
{
    internal class PluginTemplate : HBPlugin
    {
        private readonly Version _version = new Version(1, 0);
        private const string _author = "Your Name";
        private const string _name = "Name of the Plugin";
        private bool _isInitialized ;

        #region Overrides of HBPlugin
        /// <summary>
        /// Does this plugin want a button? If set to true, the button in the plugin manager will be enabled. [Default: false]
        /// </summary>
        public override bool WantButton { get { return true; } }

        /// <summary>
        /// The text of the button if the plugin wants it. [Default: "Settings"]
        /// </summary>
        public override string ButtonText { get { return _name; } }

        /// <summary>
        /// The name of this plugin.
        /// </summary>
        public override string Name { get { return _name; } }

        /// <summary>
        /// The author of this plugin.
        /// </summary>
        public override string Author { get { return _author; } }

        /// <summary>
        /// The version of the plugin.
        /// </summary>
        public override Version Version { get { return _version; } }

        /// <summary>
        /// Called everytime the engine pulses.
        /// </summary>
        public override void Pulse() { }

        /// <summary>
        /// Called when the user presses the button while having this plugin selected. The plugin can start a thread, show a form, or just do what the hell it wants.
        /// </summary>
        public override void OnButtonPress() { MessageBox.Show("We clicked the button!"); }

        /// <summary>
        /// Initializes this plugin after it has been properly loaded.
        /// </summary>
        public override void Initialize()
        {
            //Making sure we don't spam the log.
            if(_isInitialized)
                return;

            Logging.Write("Initialized");
            _isInitialized = true;
        }
        #endregion
    }
}

From here its up to you to figure out what you want to do with your Plugin.
 
Thanks ill give it a try

Sent from my GT-I9000 using Tapatalk
 
Last edited:
Back
Top