31 July 2019
selection optional parameter.30 April 2027
The batchgive command can be used to give multiple items from inventory to an agent or object.
| Command | Required Parameters | Required Corrade Permissions | Example |
|---|---|---|---|
batchgive | group, password, item, entity | inventory | |
item is a CSV list of inventory paths or inventory item UUIDs (please note that inventory item UUIDs are different from asset UUIDs and also different from in-world object UUIDs - you need to specify an inventory UUID, not the latter).
| Parameter | Possible Value | Additional Parameters | Description | Example |
|---|---|---|---|---|
entity | avatar | firstname | The first name of the avatar to give the item to. | |
lastname | The second name of the avatar to give the item to. |
|||
agent | The key of the agent if more convenient than firstname and lastname |
|||
item | A CSV list of UUID or path to items in Corrade's inventory. |
|||
object | range | The range in which to find the object to give the item to. | |
|
target | A name or UUID of the object to give the inventory item to. |
|||
item | A CSV list of UUID or path to items in Corrade's inventory. |
|||
selection | Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively. |
The permissions on the item can be set by passing a permissions key with the permissions set in Corrade permission notation. For example, to change the next-owner permissions to only copy when sending items, you would issue:
llInstantMessage(CORRADE,
wasKeyValueEncode(
[
"command", "batchgive",
"group", wasURLEscape(GROUP),
"password", wasURLEscape(PASSWORD),
"entity", "avatar",
"item", wasListToCSV(
[
wasURLEscape("/My Inventory/Objects/Carrot"),
wasURLEscape("/My Inventory/Objects/Bunny")
]
),
// or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d"
"firstname", "Bugs",
"lastname", "Bunny",
// set permissions to copy only
"permissions", "c--mvt------------c---v-c--mvt"
]
)
);