31 July 2019
selection
optional parameter.6 October 2016
24 September 2015
permissions
optional parameter.19 May 2015
range
is now an optional parameter and not required to locate the item.give (Commands) | |
---|---|
Type | Corrade progressive command |
Command | give |
Description | The give command can be used to send an item from Corrade's inventory to an agent or object. |
Permissions | inventory |
Parameters | group , password , item , entity |
Last Changes | Release 9.133 - The command now can take a path instead of a name. |
The give
command can be used to send an item from Corrade's inventory to an agent or object.
Command | Required Parameters | Required Corrade Permissions | Example |
---|---|---|---|
give | group , password , item , entity | inventory | llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "give", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), "entity", "avatar", "item", wasURLEscape("/My Inventory/Objects/Carrot"), // or UUID // or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d" "firstname", "Bugs", "lastname", "Bunny" ] ) ); |
item
can be the path to an inventory item or the UUID
of an inventory item.
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 | An UUID or path to an item in the bot's inventory. |
|||
object | range | The range in which to find the object to give the item to. | llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "give", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), // a path or UUID of an item in inventory "item", wasURLEscape("/My Inventory/Gestures/smile"), // give the item to an object // instead of an avatar. "entity", "object", // object name or uuid to give // the item to. "target", "Face", // the range in which to find // the object to give the item to. "range", 3, "callback", wasURLEscape(URL) ] ) ); |
|
target | A name or UUID of the object to give the inventory item to. |
|||
item | An UUID or path to an item in the bot'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. |
permissions
key with the permissions set in Corrade permission notation. For example, to change the next-owner permissions to only copy
when sending an item, you would issue:llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "give", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), "entity", "avatar", "item", wasURLEscape("/My Inventory/Objects/Carrot"), // or UUID // or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d" "firstname", "Bugs", "lastname", "Bunny", // set permissions to copy only "permissions", "c--mvt------------c---v-c--mvt" ] ) );
give
command have to be first compiled and then set to running. You can perform both last steps with the recompilescript command that has an optional parameter "run" that will also set the script to running. Additionally, if you have the textual representation of a script, you can also use the updatescript command that will allow you to perform all the steps in one go.