Give Inventory Item

31 July 2019

  • C10 - added the selection optional parameter.

6 October 2016

  • Release 9.133 - The command now can take a path instead of a name.

24 September 2015

  • Release 9.18 - added permissions optional parameter.

19 May 2015

  • Release 8.12 - range is now an optional parameter and not required to locate the item.
give (Commands)
TypeCorrade progressive command
Commandgive
DescriptionThe give command can be used to send an item from Corrade's inventory to an agent or object.
Permissionsinventory
Parametersgroup, password, item, entity
Last ChangesRelease 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.

Notes

  • The command is the singular form of the batchgive command that hands out multiple inventory items.
  • 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 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"
        ]
    )
);
  • Scripts that are added to a primitive using the 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.

secondlife/scripted_agents/corrade/api/commands/give.txt ยท Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.