Event FirstRun

From StealthBot Wiki Backup
Revision as of 03:29, 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 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.

History

This event was added in StealthBot version 2.7.

Example

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