Give Inventory Item

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 give an item from inventory to an agent by name.

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.

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"
        ]
    )
);

Notes


secondlife/scripted_agents/corrade/api/progressive/commands/give.txt ยท Last modified: 2017/04/30 13:13 by Wizardry and Steamworks

Access website using Tor


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