Jump to content
Sign in to follow this  
ChaosRaine

Open Scripts

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

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

Recommended Posts

I made a script that will open a box automatically when rezzed. It is only works if the person I give the box to has copy rights to the boxes inventory. I want to make thing mod and trans for the buyer, but they get the "No objects passed filter" error when they don't have copy rights. Any ideas as to why that would happen?

Share this post


Link to post
Share on other sites

Thank you for helping. So a line like         llGiveInventoryList(inputKey, nameOfFolderToBeCreated, listOfItemsToSend);

Would change to llGiveInventory(inputKey, nameOfFolderToBeCreated, listOfItemsToSend);?

I can post my full script if that is easier

 

Share this post


Link to post
Share on other sites

Yeah that's not quite what I need, I want it to give the entire inventory at once. I've bought stuff that will do similar things to this and I will get the warning sometimes "Can't copy inventory. Inventory moved" or something like that I forget the warning, but its basically telling you that the object's inventory is now in your inventory with no copys left in the object. I think that is more along the lines of what I want. Do you have any ideas?

 

Share this post


Link to post
Share on other sites

Don't they still need to have copy rights for that to work? It looks like its going to do the same thing that way. Just copy all the contents to the person's inventory then delete it. So, won't it still not work if the person I'm giving it to doesn't have copy rights?

Share this post


Link to post
Share on other sites


ChaosRaine wrote:

Yeah that's not quite what I need, I want it to give the entire inventory at once. I've bought stuff that will do similar things to this and I will get the warning sometimes "Can't copy inventory. Inventory moved" or something like that I forget the warning, but its basically telling you that the object's inventory is now in your inventory with no copys left in the object. I think that is more along the lines of what I want. Do you have any ideas?
 

there is no LSL function that can create a folder and still work with no copy items. that example script from the wiki is the closest you can get, copiable ones can go to a folder but no copy ones go to generic destinations.

Share this post


Link to post
Share on other sites

Not sure were your info comes from, you can create a folder and put in no copy. by script Happens all the time in SL. @ ChaosRaine  As for the script, that is what the employment forum is for. I do not write scripts here anymore. This forum is to workout scripts you have written, not to write them for you.

Share this post


Link to post
Share on other sites

I confused on that as I get no copy items in a folder sent to me, please explain.

Hmm, maybe I getting confused with opening the box and trans contents. Any way if Roligsay i wrong theni wrong.

Share this post


Link to post
Share on other sites

Yes, YOU can put no-copy things in a folder yourself and hand it to me.  That's no problem.  It's just that a script can't do that with llGiveInventoryList.  If you want a script to give no-copy items, it has to give them one at a time with llGiveInventory.

Share this post


Link to post
Share on other sites


steph Arnott wrote:

I confused on that as I get no copy items in a folder sent to me, please explain.

Hmm, maybe I getting confused with opening the box and trans contents. Any way if Roligsay i wrong theni wrong.

for a case like a vendor, where you (as the seller) have copy permission but the next owner will not, then llGiveinventoryList would work.

for a case like the OP, where the box is already in the hands of the next owner and no copy is already active, it won't work.

Share this post


Link to post
Share on other sites

Ok I finnaly have something that is working. It still gives the items one at a time, however the user only has to click the item once to get the whole inventory. I'm still haveing trouble getting to activate on attach rather then touch though. Here is what I have now.

list give_in_folder;list give_individually;integer item_no;string name;string gUUID;integer folder_give = FALSE;integer item_give = FALSE;get_inv_details(){    name = llGetInventoryName( INVENTORY_ALL, item_no );    if ( name != llGetScriptName() )    {        integer mask = llGetInventoryPermMask(name, MASK_OWNER);        if ( (mask & PERM_COPY) )        {            give_in_folder = give_in_folder + [ name ];            folder_give = TRUE;        }        else        {            give_individually = give_individually + [ name ];            item_give = TRUE;        }    }}init(){//    Hovertext, edit accordingly - commented out right now,using separate script//    llSetText( "abc\ndef",<1,1,1>,1); }default{state_entry(){           gUUID = llList2String(llGetObjectDetails(llGetKey(), ([OBJECT_DESC])), 0);    init();}on_rez( integer param){                  llSay(0, "Open Chat History (Ctrl+H) and click this link to join our group: secondlife:///app/group/"+gUUID+"/about");    init();}   touch_start( integer num ){    item_no = 0;    for ( item_no= 0 ; item_no < llGetInventoryNumber( INVENTORY_ALL ) ;item_no++ )    {        get_inv_details();    }    if ( folder_give )    {        llGiveInventoryList ( llDetectedKey(0), llGetObjectName(), give_in_folder );    }    if ( item_give )    {        integer i;        for ( i=0 ; i<llGetListLength( give_individually ) ; i++ )        {            llGiveInventory( llDetectedKey(0),llList2String( give_individually, i ));        }    }}}

 

I thought what I had to do is replace

touch_start( integer num )

 with

attach(key id)

, but that doesn't seem to be working.

Share this post


Link to post
Share on other sites

Two problems:  First, an attach event is triggered whenever the scripted object is attached or detached, so you have to be sure to specify that you mean to give things only on attach.  So

attach(key id){    if (id)  // That is, if id != NULL_KEY    {        //Give stuff    }}

Then, llDetectedKey() only works in a touch* or collision* event, so you can't use it in attach.  Fortunately, though, you already know who you're giving stuff to >>> the the owner, otherwise known here as id.

So

llGiveInventoryList(id,llGetObjectName(),give_in_folder);

 

 

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 2307 days.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...