LlGiveInventoryList
From Second Life Wiki
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Contents |
Specification
target types
Depending upon the type of target this function works differently.
- Avatar
- Must be or recently have been within the same Region as sending object. SVC-868
- Places the inventory items in a newly created folder in the avatars inventory (even if there is a folder by the same name, a new one is created).
- Prim / Object
- The prim must be in the same region.
- Does not create a folder.
Caveats
- This function causes the script to sleep for 3.0 seconds.
- If target is is not the owner nor shares the same owner, and inventory cannot be transferred, an error is shouted on DEBUG_CHANNEL.
- If inventory cannot be copied then an error is shouted on DEBUG_CHANNEL.
- If target is a prim that is not in the same region an error is shouted on DEBUG_CHANNEL.
- If inventory is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.
Examples
// When any user clicks this object, this script will give a folder containing everything in the objects inventory // This could be used to give away multiple freebies at once. default { touch_start(integer total_number) { list inventory; integer num = llGetInventoryNumber(INVENTORY_ALL); string script = llGetScriptName(); integer i = 0; for (; i < num; ++i) { string name = llGetInventoryName(INVENTORY_ALL, i); //Don't give them the selling script. if(name != script) { if(llGetInventoryPermMask(name, MASK_OWNER) & PERM_COPY) { inventory += name; } else { llSay(0, "Don't have permissions to give you \""+name+"\"."); } } } if (llGetListLength(inventory) < 1) { llSay(0, "No items to offer."); } else { // give folder to agent, use name of object as name of folder we are giving llGiveInventoryList(llDetectedKey(0), llGetObjectName(), inventory); } } }
Deep Notes
Issues
~ Search JIRA for related Issues| | | SVC-868 | [c] | llGiveInventoryList should be able to work gridwide |
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

