Jump to content

I need a special Unpack script please help me create one.


1113TheMidnightMage
 Share

You are about to reply to a thread that has been inactive for 2728 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have an issue with unpacking items into my inventory. Namely I am working with textures and snapshots (right now, later there will be other types). I am using a duplicate scanner to remove dups to get a "Pure List" of my textures.I am going to be using the Zdrop feature to move them to the box but to get them out I need a script that will give me say 50-100 items (prefer a variable that i can change as the day goes with lag LOL, then pauses a few seconds then the next batch etc.. until the box is empty. I have tried folder creation and inventoryall scripts and i either get "Can not create item" or I get Script run-time error
Stack-Heap Collision. I am dealing with thousands of Items so I think the stack heap is that there are to many. And the Create one after research is that i am moving to many at a time and that is causing me to lose items. I have had to start my project over because i lost so many grrrr. Please help me with this. Ohh the items that i am dealing with do have some No Mod and No Transfer but none are no copy.

Link to comment
Share on other sites

Ok I have been talking to a very helpful script writer and what needs to happen is a loop that creates a list with 100 or so names of the objects send them then pauses using the ||sleep () command recreates the list with the next.100 out so till all items are given out. So I'm researching trying to figure out how to do that with the ||GiveInventoryList command now. That is the plan at least.

Link to comment
Share on other sites

try this. I only tried it with about 150 textures. it doesn't take into account for no copy items, so you would need to add a check for that, or make sure you don't have any no copy items in the object

drop the script into the object. drop in the items, and it will show you a number in green of how many there are. touch it, and it will run a loop within a loop to create a list of 100 items each time and give you a numbered folder for each 100 items. It will show in red text where it is in the process

text(integer loops, integer loop, integer idx, integer total){    string floattext = "Loop " + (string)loop + " of " + (string)loops +                        "\n Item Number " + (string)(idx+1) + " of " + (string)total;    llSetText(floattext,<1.0,0,0>,1.0);}default{    state_entry()    {        integer count = llGetInventoryNumber(INVENTORY_ALL);        llSetText((string)count + " Items",<0,1,0>,1.0);    }    touch_start(integer total_number)    {        key id = llDetectedKey(0);        if(id == llGetOwner())        {               string myname = llGetScriptName();            integer count = llGetInventoryNumber(INVENTORY_ALL);            integer loops = llRound(count/100.0);//used a float version of 100 and rounded up to make sure it gets the last section that is less than 100            integer loop = loops;            do            {                list items;                integer start = loop*100;                integer end = start + 100;                if(end > count){end = count;}                for(start; start < end; start++)                {                    text(loops,loop,start,count);                    string name = llGetInventoryName(INVENTORY_ALL,start);                    if(name != myname)                    {                        items += [name];                    }                }                llGiveInventoryList(id,llGetObjectName()+" "+(string)loop,items);                loop--;            }            while(loop > -1);            llResetScript();        }                    }    changed(integer change)    {        if(change & CHANGED_INVENTORY)        {            llResetScript();        }    }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2728 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...