Marcus Perry
Registered User
Join date: 22 Nov 2006
Posts: 87
|
03-25-2007 06:40
Greetings all, I have a group of items that I want to sell as a boxed set. I know, i put all the items into the box. But here's the thing: When them customer opens and unpacks the box, i want the items in the box to be copied into a specific directory in the customers inventory. A directory labelled something like: "Marus Perrys Hot New Product", or in other words, a directory that doesnt exist. How do I do that ? All help very much apprechiated, as usual 
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
03-25-2007 06:41
When you unpack a box, the folder it creates has the same name as the box.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
03-25-2007 09:48
Where you check "Sell" set the box to sell "contents", that way it puts the contents in a new folder with the same name as the box you bought from.
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
Yiffy Yaffle
Purple SpiritWolf Mystic
Join date: 22 Oct 2004
Posts: 2,802
|
03-25-2007 15:18
Here is an example script that shows how a touch folder unpacker works. This script will create a folder in your inventory when you click on the prim it's inside of. If you simply include this script in the box with the stuff your selling, your customer can click on the box to have it offer the contents of the prim as a folder. This script will only give the contents to it's current owner, if you wish to have it give the contents to anyone who touches it, you will need to edit the llGiveInventoryList(llGetOwner(), llGetObjectName(), gInventoryList ); line and replace it with llGiveInventoryList(llDetectedKey(0), llGetObjectName(), gInventoryList ); list gInventoryList;
list getInventoryList() { integer i; integer n = llGetInventoryNumber(INVENTORY_ALL); list result = [];
for( i = 0; i < n; i++ ) { result += [ llGetInventoryName(INVENTORY_ALL, i) ]; } return result; }
default { state_entry() { gInventoryList = getInventoryList(); }
touch_start( integer n ) { integer i;
for( i = 0; i < n; i++ ) { llGiveInventoryList(llGetOwner(), llGetObjectName(), gInventoryList ); } }
changed( integer change ) { if ( change == CHANGED_INVENTORY ) gInventoryList = getInventoryList(); } }
|
Yiffy Yaffle
Purple SpiritWolf Mystic
Join date: 22 Oct 2004
Posts: 2,802
|
03-25-2007 15:21
There is also a way to do this without a script. The other posters explained that. Simply set the item for sale, and set it to give contents. However this will not give them the box too, it wil l just give them the stuff inside it. So they will only have 1 copy if they make a mistake and ruin it.  The script method is only intended for you if you plan on selling them the whole box and all, and having them unpack it after purchase.
|
Marcus Perry
Registered User
Join date: 22 Nov 2006
Posts: 87
|
03-25-2007 17:29
The option of items being copied into a customers folder named after the box they came in works fine - thanks for the help to all of you people nontheless. 
|