Event Close

From StealthBot Wiki
Jump to: navigation, search

This StealthBot scripting event occurs when the bot is closing, and before script reload to clean up objects and such.

This event is often used to clean up after the script, such as closing connections to databases and servers or setting objects to Nothing.


The Event_Close() event was added in StealthBot version 2.4 and hasn't changed since.


Before script reload and before bot close, the script will print "Bye cruel world!" in red using the AddChat function.

' occurs on script unload and bot close
Sub Event_Close()
    AddChat vbRed, "Bye cruel world!"
End Sub

See also