From StealthBot Wiki
Revision as of 09:31, 26 August 2009 by Ribose (talk | contribs) (Created page with 'A plugin is a specialized script which is loaded by the plugin system. Plugins and the plugin system made a legacy system used during the lifetime StealthBot vers…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A plugin is a specialized script which is loaded by the plugin system. Plugins and the plugin system made a legacy system used during the lifetime StealthBot version 2.6, where many of the current features of the script system did not exist.


The idea of the plugin system was originally from Xellos. In 2006, Swent rewrote the plugin system, later incorporating an update plugin by FiftyToo and a help plugin by Hdx into the core functionality of the system. When development for version 2.7 was opened to more people, Swent incorporated some of the plugin system into the bot itself, adding a new UI feature: the menu system. Later Eric redid the script system, making the plugin system obsolete due to the ability of the enhanced script system to do everything the plugin system could and more.


Plugins, due to the nature of the system, had to avoid conflicting variable names with other plugins and the plugin system itself. Therefore, plugins are required to give a prefix and prepend this prefix to all used script events. Also, in order to do version checking with the update system, plugins also must provide their version number. Optional phelp parameters are also providable in the plugin header.

Plugin Header

The plugin header consists of two to six lines of information the plugin is providing to the plugin system. It is formed like this:

'&plugin name:plugin author:plugin description
'&plugin command:plugin command:...
'&important note:important note:...


The prefix has to be unique, or the plugin is not loaded. It is often an abbreviated version of the plugin's name. The prefix is then used to form plugin events with the subroutine signature of:

Sub <prefix>_Event_<EventName>([args])

The plugin system will check for and call such correctly formatted events in every loaded plugin when it receives the script event on its own, as it is actually just a script.

It is recommended that global variables, custom functions, and classes be named with the prefix prepended as well, to avoid conflicting with other plugins' global varialbes, custom functions, and classes.


The plugin version must be a valid VBScript double which is used to determine whether the plugin is outdated with the help of the plugin server.

Plugin help

The plugin system has a built in plugin help (also known as "phelp") system which is used to provide users with the ability to get quick help on loaded plugins.

The lines in the header beginning with '& are optional and provide the information the phelp command uses to display plugin help.

The plugin name should be anything describing the plugin in a word or two. The plugin author field should be used for the author's name. The plugin description, new in plugin system version 0.98, should provide a more extensive plugin description in a sentence or two.

The list of plugin commands is separated by : and should list the commands the plugin uses.

The help topic number provides a topic number for the old /board/ forum where more informaton on the plugin can be found.

The list of important notes is separated by : and should list things that are important to note.

Plugin body

Plugins rely on many plugin system provided functions in order to use a standard setting system, timer system, menu system (in version 0.98 available to StealthBot version 2.7 only), and display system, since those features were not well made for multiple scripts until the script system in version 2.7.

Plugins otherwise had all of the features of a script, except those created for version 2.7, including the Script Support Class and the Bot Variables objects.

See also