Contents

Support Managers

Aerielle Kiyori
English
offline
Anomelli Mellow
English
offline
show offline managers  
English, Hindi, Russian  

About SBSL

Have a question? Ask at SmartBots DevPortal!

DevPortal is a blog and forum for developers. Ask your questions to get a prompt reply!

Continue to DevPortal

SBSL (SmartBots Scripting Language) is a simple programming language which allows your bot to react on in-world events and residents' activity.

Language basics

SBSL program is a set of commands which are being executed when something happens to the bot (instant message received, inventory item offered etc).

These corresponding commands are combined to events: the set of commands to be completed together.

Each event contains its own set of predefined variables. Developer is able to add own variables to the system.

Program structure

The program contains the following blocks:

  • user variable definition (optional)
  • events definition
    • commands within events

Example program

This simple program repeats your previous sentence when you send an IM to the bot

# SBSL script, created on 2014-02-03 16:41
# Author: Glaznah Gassner
# Purpose: SBSL Demo Script
 
# define user variable
var $previous_message
 
 
# define event to process incoming IM
instant_message {
  # Say the previous message
  im $speaker_name I remember your previous message: $previous_message
 
  # Remember the message for the future usage
  set $previous_message $message
}

See more examples here.

Language reference

COMMANDS EVENTS
Commands are instructions for your bot, they tell bot what to do: say something, invite resident to the group or do HTTP query.

SBSL Commands section contains the full list of the commands.

Event is fired when something happens with your bot (message arrives, inventory is being offered etc.)

SBSL Events section contains all events currently available in SBSL.

Read also the SBSL User Variables section.