From SmartBots Developers Docs
Jump to: navigation, search

Retrieves all parcels of the current sim

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


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

Variable Required Description
Input basic parameters:
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.
(to be received in http_response LSL event, see docs for details)
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 current sim. For large number of parcels (>30) this could be a time-consumptive operation, be ready to wait up to 30 seconds for the result.

On success, the command returns the parcel data:

parcel=the array of parcels

The following data is being returned:

    // The internal ID, may be useful for other API queries
    "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, // The parcel area (m2)

    // The prim counter data
    "prims": { 
      "max": 2929,
      "total": 556,
      "owner": 541,
      "group": 0,
      "other": 15,
      "bonusRate": 1.35
    // The parcel selling information
      "forSale": true,  // is parcel for sale
      "withObjects": true,
      "price": 1500,
      "buyer": "00000000-0000-0000-0000-000000000000"

<< return back to Bot commands

(Miss an API call or parameter? Submit your request in forum)