Skip to content
lsl.devlsl.devLSL Dev

llSetParcelForSale

function
Function syntax
integer llSetParcelForSale(
  1. integer ForSale,// Boolean. If TRUE, puts the parcel up for sale; if FALSE, removes it from sale.
  2. list Options// A list of options to configure the sale (e.g., price, authorized buyer, and object inclusion).
);
Returns
integer
Energy
10

Sets the parcel the object is on for sale.\nForSale is a boolean, if TRUE

the parcel is put up for sale. Options is a list of options to set for the sale,

such as price, authorized buyer, and whether to include objects on the parcel.\n

Setting ForSale to FALSE will remove the parcel from sale and clear any options

that were set.

This function requires that the script be owned by the parcel owner and that they have granted the PERMISSION_PRIVILEGED_LAND_ACCESS permission.

Returns an integer Error code or 0 if successful.

How to use
integer result = llSetParcelForSale(0, []);
From the LSL definitions: ParcelSaleParam (rule, then its arguments)
PARCEL_SALE_AGENT  // Option used with llSetParcelForSale to specify the agent ID authorized to buy the parcel.PARCEL_SALE_OBJECTS  // Option used with llSetParcelForSale.PARCEL_SALE_PRICE  // Option used with llSetParcelForSale to set the parcel price.
ConstantsValueDescription
PARCEL_SALE_AGENT2The agent id authorized to purchase the parcel. If none set, any agent may purchase.
PARCEL_SALE_OBJECTS3If TRUE, objects on the parcel are included in the sale.
PARCEL_SALE_PRICE1The price of the parcel. If no authorized agent is set, must be greater than 0.
ConstantsValueDescription
PARCEL_SALE_OK0The sale information was successfully set.
PARCEL_SALE_ERROR_NO_PARCEL1The parcel could not be found.
PARCEL_SALE_ERROR_NO_PERMISSIONS2The script does not have the required permissions to set the sale information.
PARCEL_SALE_ERROR_IN_ESCROW3The parcel is currently in escrow and cannot be set for sale.
PARCEL_SALE_ERROR_INVALID_PRICE4The price set for the parcel is invalid (e.g., less than or equal to 0).
PARCEL_SALE_ERROR_BAD_PARAMS5The parameters provided to set the sale information are invalid.
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.