IsOnline function

From StealthBot Wiki Backup
(Redirected from IsOnline)
Jump to: navigation, search

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.

Development

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

Documentation

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

    IsOnline = g_Online

End Function

Summary

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

Syntax

Store the value:

BooleanValue = IsOnline()

Do something if the bot is online:

If IsOnline() Then
    ' code here
End If

Returns

True if the bot is online, false otherwise.

Example usage

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

See also