parcel_list

Retrieves all parcels of the current sim.

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

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

= parcel_list

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

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

Return values

Important: Due to large amount of data, this function works only with dataType=json.

The command fetches and returns all parcels in the current sim. For large numbers of parcels (>30), this could take up to 30 seconds.

On success, the command returns the parcel data:

result = OK
parcel = [array of parcel objects]

Each parcel object contains:

{
  "localID": 125,
  "name": "Ads-O-Matic: the adboard advertisement network",
  "desc": "The parcel description goes here",
  "owner": "cd93067e-7c4e-41c0-ba91-be01f4bafe35",
  "group": "f84cb903-bc07-9aef-dcbc-f63a317b3c4c",
  "groupOwned": false,
  "claimed": "10/26/2010 10:19:36 PM",
  "area": 9600,
  "prims": {
    "max": 2929,
    "total": 556,
    "owner": 541,
    "group": 0,
    "other": 15,
    "bonusRate": 1.35
  },
  "sale": {
    "forSale": true,
    "withObjects": true,
    "price": 1500,
    "buyer": "00000000-0000-0000-0000-000000000000"
  }
}