Event FirstRun

From StealthBot Wiki
Revision as of 19:15, 6 August 2009 by Ribose (talk | contribs) (See also)
Jump to: navigation, search

This StealthBot scripting event occurs when the bot loads, but not after script reload.

The Event_FirstRun() 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 loading them will cause the variables and objects to only be set up until the first reload. In this case, use Event_Load() instead.


This event was added in StealthBot version 2.7.


After the first script load, the script will print "Hello world!" in green using the AddChat function.

' occurs on first script load only
Sub Event_FirstRun()
    AddChat vbGreen, "Hello world!"
End Sub

See also