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

The Plug-in System by _MaiN

Tony

"The Bee"
Joined
Jan 15, 2010
Messages
128,830
Reaction score
571
What is the plug-in system? The plug-in system is a big scary beast that you don't want to go near unless you want your head bitten off. Fair warning.

No, seriously, the plug-in system aims to allow developers to bring new features into HB, in an easy and flexible way. Plug-ins are normally considered to be pretty generic across multiple configurations, so XX plug-in works for both a priest and a hunter, for example.

A plug-in in HB derives from an abstract base class I've written, which is called HBPlugin. The plug-in should implement a Pulse function, a Name property and an Author property. Additionally, it can override request a button by overriding the 'WantButton' property, and also overriding 'OnButtonPress', that is called when the button is pressed. You can also specify the text of the button.

An important thing to note is that the 'Pulse' function is executed every time the engine pulses. It's executed by the engine, so that means it's from the same thread as for instance custom classes are called. 'OnButtonPress' is executed by the form when the button is pressed, and the plug-in can start its own thread or just show a form, or do what the hell it pleases.

I've given the link to an example plugin which adds an Exit Timer functionality to HB. It works fine, and you can tell HB when you want to stop the bot and exit WoW.
Furthermore I've also given the link to the abstract base class and documentation file accordingly.

P.S.: Plugins should be placed inside the 'Plugins' folder in the base folder of HB. If it's not there, you can start the bot first and it will create the folder.

ExitTimer plugin
'HBPlugin' base class and documentation
 
Back
Top