Difference between revisions of "TotalControl for LSL/Usage"

From SmartBots Developers Docs
Jump to: navigation, search
Line 2: Line 2:
 
This section describes how to communicate with AdminBot gateway: manage it to login / logout your bot, talk over and listen to bot chat etc.
 
This section describes how to communicate with AdminBot gateway: manage it to login / logout your bot, talk over and listen to bot chat etc.
  
== Interacting with AdminBot ==
+
== Interacting with TotalControl ==
The two-way communication is performed by
+
The two-way communication is performed by using commands and events:
* Commands (your script => AdminBot)
+
* Events (AdminBot => your script).
+
{| width=100%
+
  
! width=50% | EVENTS (bot => script)
+
{| width=100% class="niceTable"
! width=50% | COMMANDS (script => bot)
+
  
|- class=row-a
+
! width=50% | COMMANDS (your script => library)
| Events is a notification being sent from the bot to your script (error message, group chat IM etc).
+
! width=50% | EVENTS (library => your script)
 
+
[[/Events|AdminBot Events]] section contains all events which can be sent by AdminBot to your script.
+
  
 +
|-
 
| These are the commands you send to the bot (initialization, group invitation etc).
 
| These are the commands you send to the bot (initialization, group invitation etc).
  
[[TotalControl for LSL/Commands|AdminBot Commands]] section contains the full list of the commands.
+
[[TotalControl for LSL/Commands|TotalControl Commands]] section contains the full list of the commands.
 +
 
 +
| Events is a notification being sent from the bot to your script (error message, group chat IM etc).
 +
 
 +
[[TotalControl for LSL/Events|TotalControl Events]] section contains all events which can be sent by AdminBot to your script.
  
 
|- class=row-b
 
|- class=row-b
|
 
=== How to receive events ===
 
Use [https://wiki.secondlife.com/wiki/Link_message link_message] LSL event to catch the events from the bot.
 
 
 
|
 
|
 
=== How to send commands ===
 
=== How to send commands ===
 
Use LSL [http://wiki.secondlife.com/wiki/LlMessageLinked llMessageLinked] function to send commands to the bot.
 
Use LSL [http://wiki.secondlife.com/wiki/LlMessageLinked llMessageLinked] function to send commands to the bot.
  
 +
|
 +
=== How to receive events ===
 +
Use [https://wiki.secondlife.com/wiki/Link_message link_message] LSL event to catch the events from the bot.
  
|- class=row-a
+
 
|
+
|- class=row-a|
 
|
 
|
 
=== Was the command successful? ===
 
=== Was the command successful? ===
Due to the nature or llMessageLinked function, it's not possible to retrieve the command result directly.
+
TotalControl invokes events to send you the command result.
 
+
However, AdminBot invokes events to signal the command result, available by [http://wiki.secondlife.com/wiki/Link_message link_message].
+
 
|}
 
|}
 +
  
 
== Before Sending Any Commands ==
 
== Before Sending Any Commands ==
Line 43: Line 40:
  
 
== Examples ==
 
== Examples ==
We've provided examples on the most important functions of AdminBot. They are available here: [[TotalControl for LSL/Examples|TotalControl Examples]].
+
We've provided examples on the most important functions of TotalControl. They are available here: [[TotalControl for LSL/Examples|TotalControl Examples]].
  
 
{{NavMenu}}
 
{{NavMenu}}
  
 
__NOTOC__
 
__NOTOC__

Revision as of 13:50, 12 May 2017

This section describes how to communicate with AdminBot gateway: manage it to login / logout your bot, talk over and listen to bot chat etc.

Interacting with TotalControl

The two-way communication is performed by using commands and events:

COMMANDS (your script => library) EVENTS (library => your script)
These are the commands you send to the bot (initialization, group invitation etc).

TotalControl Commands section contains the full list of the commands.

Events is a notification being sent from the bot to your script (error message, group chat IM etc).

TotalControl Events section contains all events which can be sent by AdminBot to your script.

How to send commands

Use LSL llMessageLinked function to send commands to the bot.

How to receive events

Use link_message LSL event to catch the events from the bot.


Was the command successful?

TotalControl invokes events to send you the command result.


Before Sending Any Commands

You have to set the group name before issuing the most of the commands. See Initializing TotalControl for details.

Examples

We've provided examples on the most important functions of TotalControl. They are available here: TotalControl Examples.