Difference between revisions of "IsOnline function"

From StealthBot Wiki
Jump to: navigation, search
(Created page with '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 t…')
 
m (See also)
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
   
 
   
 
  End Function
 
  End Function
==Summary==
+
===Summary===
 
This function returns true if the bot is online, and false if not.
 
This function returns true if the bot is online, and false if not.
  
==Syntax==
+
===Syntax===
 
Store the value:
 
Store the value:
 
  BooleanValue = IsOnline()
 
  BooleanValue = IsOnline()
Line 23: Line 23:
 
  End If
 
  End If
  
===Returns===
+
====Returns====
 
True if the bot is online, false otherwise.
 
True if the bot is online, false otherwise.
  
==Example usage==
+
===Example usage===
 
<ul>
 
<ul>
 
<li>Connect if offline:</li>
 
<li>Connect if offline:</li>
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.

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