Difference between revisions of "IsOnline function"

From StealthBot Wiki
Jump to: navigation, search
m (See also)
(One intermediate revision by the same user not shown)
Line 33: Line 33:
==See also==
==See also==
* [[Connect]]()
* [[Connect function]]
* [[Disconnect]]()
* [[Disconnect function]]
* [[BotClose]]()
* [[BotClose function]]
* [[Script Support Class]]
* [[Script Support Class]]
* [[Script system]]
* [[Script system]]

Latest revision as of 07:53, 21 November 2009

The IsOnline() function is available to StealthBot through the Script Support Class. It allows users to determine whether the bot is connected to Battle.net through scripting.


The IsOnline function was added in StealthBot version 2.6 by the request of Xellos.


'// Returns a boolean denoting teh bot's status ONLINE=TRUE, OFFLINE=FALSE.
Public Function IsOnline() As Boolean

    IsOnline = g_Online

End Function


This function returns true if the bot is online, and false if not.


Store the value:

BooleanValue = IsOnline()

Do something if the bot is online:

If IsOnline() Then
    ' code here
End If


True if the bot is online, false otherwise.

Example usage

  • Connect if offline:
  • If Not IsOnline() Then Connect

See also