sim_info_current

Gets the settings and access info of the current sim (the region the bot is currently in).

// See "LSL Helper Functions" page for this function
smartbotsAPI("sim_info_current", []);

Variables

The following table shows input values (you send them with the API call) and returned output values.

Input basic parameters

Variable

Required

Description

action

yes

= sim_info_current

apikey

yes

Your personal developer's API key

botname

yes

Your bot's SL login

secret

yes

Bot access code of your bot

dataType

optional

Set to "json" to get JSON reply instead of URL-encoded string

custom

optional

The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response.

Input

This command does not take any additional input parameters.

Output

(To be received in *http_response* LSL event, see docs for details)

Variable

Description

result

OK - command completed successfully
FAIL - command failed

resulttext

Detailed reason for the failure

custom

The value from input "custom" parameter. See above

region

An object containing the region settings (see below)

The "region" object

Variable

Description

sim_owner

The UUID of the estate owner

is_manager

true if the bot is an estate manager of this region

managers

The list of estate manager UUIDs

public_access

true if public access to the region is allowed

access_allowed

The list of resident UUIDs explicitly allowed to enter the region

access_allowed_groups

The list of group UUIDs allowed to enter the region

access_banned

The list of resident UUIDs banned from the region

access_payment_only

true if only residents with payment info on file may enter

access_18_only

true if only adult (18+) residents may enter

direct_teleport

true if direct teleports are allowed (no telehub routing)

voice_chat

true if voice chat is enabled

allow_damage

true if damage (combat) is enabled

restrict_push

true if pushing is restricted

block_fly

true if flying is blocked

block_show_in_search

true if the region is hidden from search

block_terraform

true if terraforming is blocked

allow_land_resell

true if land resale is allowed

allow_land_divide

true if joining/dividing land parcels is allowed

disable_scripts

true if scripts are disabled

disable_physics

true if physics is disabled

disable_collisions

true if collisions are disabled


Examples

Get info for the current sim

action=sim_info_current

Sample response:

{
  "action": "sim_info_current",
  "result": "OK",
  "region": {
    "sim_owner": "cd93067e-7c4e-41c0-ba91-be01f4bafe35",
    "is_manager": true,
    "managers": [
      "4d9ce772-d3ee-4cce-9555-bfb06ffcb228",
      "bd67863e-b273-4c3b-8ae5-dd8f61229280",
      "75fb5ef1-f829-447e-b4ac-f7e01baff261"
    ],
    "public_access": true,
    "access_allowed": [],
    "access_allowed_groups": [],
    "access_banned": [],
    "access_payment_only": false,
    "access_18_only": false,
    "direct_teleport": true,
    "voice_chat": true,
    "allow_damage": false,
    "restrict_push": false,
    "block_fly": false,
    "block_show_in_search": false,
    "block_terraform": false,
    "allow_land_resell": false,
    "allow_land_divide": true,
    "disable_scripts": false,
    "disable_physics": false,
    "disable_collisions": false
  }
}