Difference between revisions of "HTTP API/Bot Commands/parcel buy"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE: parcel_buy}} <onlyinclude>Purchases the parcel at specific region point</onlyinclude> <syntaxhighlight lang="lsl"> // See "LSL Helper Functions" page for this...")
(No difference)

Revision as of 16:43, 16 January 2020

Purchases the parcel at specific region point

// See "LSL Helper Functions" page for this function
smartbotsAPI("parcel_buy", [
  "x", 30,
  "y", 60


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_info_update
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.
x optional the X coordinate of the parcel (default - at bot's position)
y optional the Y coordinate of the parcel (default - at bot's position)
group optional The UUID of the group to buy parcel for (if buying for the group)
remove_contribution optional 1 - remove the land contribution from the group after purchasing the parcel (if buying for the group)
(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.


  1. The land has to be set for sell (see [[./parcel_info_update parcel_info_update]] command to sell land)
  2. The bot must have enough money on balance
  3. If purchasing for the group, "Deed land and buy land for group" group ability is required

Return values

Use API testing suite to test this API function.

The command returns


if parcel has been purchased.

<< return back to Bot commands

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