Event Shutdown

From StealthBot Wiki Backup
Revision as of 03:30, 7 December 2009 by Ribose (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This StealthBot scripting event occurs when the bot closes, but not before script reload.

The Event_Shutdown() event can be used to do special actions that should be done one time per bot lifetime.

Note that any global variable and object settings will be reset by reload script, so using this event for cleaning them up will only clean them up when the bot is shutting down, and not when the script is being reloaded. In this case, use Event_Close() instead.

History

This event was added in StealthBot version 2.7.

Example

Before the bot shuts down, the script will print "Bye for good!" in red using the AddChat function.

' occurs on first script load only
Sub Event_Shutdown()
    AddChat vbRed, "Bye for good!"
End Sub

See also