Jump to content

Forcing a folder into the root level of inventory


LissomePrey
 Share

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

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

Recommended Posts

I'm trying to use llGiveInventoryList to set up an rlv folder in #RLV directory.

I, and I imagine many others, have a default directory for new items, let's call it "2024 To Sort"

Using the line

llGiveInventoryList(myId,"#RLV/CARP Test",["Cuff LW","Cuff LA","Cuff RW","Cuff RA"]);

The inventory arrives in - 2024 To Sort/#RLV/CARP Test

How can I force it into #RLV/CARP Test?

Link to comment
Share on other sites

2 hours ago, LissomePrey said:

I'm trying to use llGiveInventoryList to set up an rlv folder in #RLV directory.

I, and I imagine many others, have a default directory for new items, let's call it "2024 To Sort"

Using the line

llGiveInventoryList(myId,"#RLV/CARP Test",["Cuff LW","Cuff LA","Cuff RW","Cuff RA"]);

The inventory arrives in - 2024 To Sort/#RLV/CARP Test

How can I force it into #RLV/CARP Test?

Here's an old rlv trap script...

 

integer RELAY_CH = -1812221819;
integer CH;
integer CH_LS;
string Folder = "~name of trap folder";
key target;
list inventory;
string CheckFolders;
integer i;
integer num;
string name;
float lockTime = 10.0; //sec
    
strippav()
{
// Clothing    
    llSay(RELAY_CH, "strip," + (string)target + ",@remoutfit=force");
// Attachments    
// All
    llSay(RELAY_CH, "detach," + (string)target +",@detach=force"); 
}

default
{
    state_entry()
    {
        CH=(integer) (llFrand(100000)+100000);    

        list inventory_types = [INVENTORY_BODYPART,INVENTORY_CLOTHING,INVENTORY_NOTECARD,INVENTORY_OBJECT];
        integer inventory_count = llGetListLength(inventory_types);
        integer j;
        integer k;
        integer type;
        integer typecount;
        string myname = llGetScriptName();
        string objectname;

        for (j=0; j<inventory_count;j++)
        {
            type = llList2Integer(inventory_types,j); // get the next inventory type from the list
            typecount = llGetInventoryNumber(type);  // how many of that kind of inventory is in the box?
            if (typecount > 0)
            {
                for (k=0; k<typecount;k++)
                {
                    objectname = llGetInventoryName(type,k);
                    inventory += objectname;
                }
            }            
        }
    }

    on_rez(integer param){
            llResetScript();
    }

    changed(integer change){
            llResetScript();
    }

    touch_start(integer total_number)
    {
        llSetTimerEvent(lockTime);
        llSay(0, "Cool message about touching the Trap!");
        CH_LS = llListen(CH,"",NULL_KEY,"");
        target = llDetectedKey(0);

        llSay(RELAY_CH, "Checker,"+(string)target+",@getinv="+(string) CH); 
    }

    listen(integer channel, string name, key id, string message)
    {
        if(channel == CH)
        {
            llListenRemove(CH_LS);
            CheckFolders = message;  
            if(llSubStringIndex(CheckFolders,Folder) != -1) 
            {
                llSay(0,"Trap folder reworn message!");
                strippav();
                llSay(RELAY_CH, "WearTrap,"+(string)target+",@attachover:"+Folder+"=force");    
            }
            else
            {
                llGiveInventoryList(target, "#RLV/"+Folder, inventory);
                llSay(0,"Wear Trap folder message!");
                strippav();
                llSay(RELAY_CH, "WearTrap,"+(string)target+",@attachover:"+Folder+"=force");
            }
        }   
    }
}

 

There are ways to improve this, I'm sure, such as adding retrys incase the target doesn't accept the folder promptly, etc., but... This basically works.

Viewers that use some fancy smancy "shove every inv offer in here" override, who can say, rlv/rlva wasn't designed with those in mind, also, are you wearing an RLV Relay, and using an RLV enabled viewer when you test your code?

RLV folder gives on non RLV enabled viewers, who knows where it can end up, especially if they don't have a #RLV folder to begin with.

 

  • Thanks 1
Link to comment
Share on other sites

Thanks.

The rlv bit would work fine if the folder went in the correct place but it doesn't. I was hoping there was some symbol I could put before #RLV that forced putting it into the root rlv folder.

I could use a viewer that had the root as default for accepting inventory but I can't force others to do that.

As my viewer is Catznip and they look after rlva, I'll seek their opinion.

Link to comment
Share on other sites

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