Difference between revisions of "Event Shutdown"

From StealthBot Wiki Backup
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:20, 1 December 2017

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