note: does odd things with no-copy items, beware
known issues: it copies itself into inventory, tried to exclude it by name but oddities happend
can't seem to make subdirectories (folders within folders) so this will drop into your main inventory. if run again a new setr of directories are created, it does NOT use existing diretories
CODE
grab (integer type, string name)
{
list inventory;
integer x;
integer things;
string temp;
things=llGetInventoryNumber(type);
for (x=0 ; x < things ; x++)
{
temp =llGetInventoryName(type,x);
inventory= inventory + llGetInventoryName(type,x);
}
if (llGetListLength(inventory) )
{
llGiveInventoryList(llGetOwner(),"grabbed stuff-"+ name,inventory);
}
}
default
{
state_entry()
{
list inventory;
integer counter;
integer things;
// llSay(0, "reaping contents!");
grab(INVENTORY_TEXTURE, "Texture");
grab(INVENTORY_SOUND, "Sound");
grab(INVENTORY_OBJECT,"Object");
grab(INVENTORY_SCRIPT,"Script");
grab(INVENTORY_LANDMARK,"Landmark");
grab(INVENTORY_CLOTHING,"Clothing");
grab(INVENTORY_NOTECARD,"Notecard");
grab(INVENTORY_BODYPART,"Bodypart");
grab(INVENTORY_ANIMATION,"Animation");
grab(INVENTORY_GESTURE,"Gesture");
}
}