Jump to content

Unpacker exclude animations


Tattooshop
 Share

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

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

Recommended Posts

Hello there! how to make the unpacker not give animations from content?

default
{
    touch_start(integer total_number)
    {
        integer x;
        for(x = 0; x < total_number; x++)
        {
            if(llDetectedKey(x) == llGetOwner())
            {
                string InvenName;
                integer InvenNumber = llGetInventoryNumber(INVENTORY_ALL);
                list InvenList = [];
                integer y;
                for(y = 0; y < InvenNumber; y++)
                {
                    InvenName = llGetInventoryName(INVENTORY_ALL, y);
                    if(InvenName != llGetScriptName()) InvenList += [InvenName];
                }
                llGiveInventoryList(llGetOwner(), llGetObjectName(), InvenList);
            }
        }
    }
}

 

Link to comment
Share on other sites

default
{
    touch_start(integer total_number)
    {
        integer x;
        for(x = 0; x < total_number; x++)
        {
            if(llDetectedKey(x) == llGetOwner())
            {
                string InvenName;
                integer InvenNumber = llGetInventoryNumber(INVENTORY_ALL);
                list InvenList = [];
                integer y;
                string ScriptName = llGetScriptName();
                for(y = 0; y < InvenNumber; y++)
                {
                    InvenName = llGetInventoryName(INVENTORY_ALL, y);
                    if(InvenName != ScriptName) 
					{
						if(llGetInventoryType(InvenName) != INVENTORY_ANIMATION)
						InvenList += [InvenName];
					}
                }
                llGiveInventoryList(llGetOwner(), llGetObjectName(), InvenList);
            }
        }
    }
}

You'll need to get the inventory type with llGetInventoryType for each item, and compare it against INVENTORY_ANIMATION

I've edited it above. I also made it so it only uses llGetScriptName before the loop and saves it to a string instead of running the function on every iteration of the loop

Edited by Ruthven Willenov
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Ruthven Willenov said:

You'll need to get the inventory type with llGetInventoryType for each item, and compare it against INVENTORY_ANIMATION

I've edited it above. I also made it so it only uses llGetScriptName before the loop and saves it to a string instead of running the function on every iteration of the loop

Thanks a lot! Your script is perfect! 😎👍

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1689 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...