Jump to content
Sign in to follow this  
Billie Winslet

A No-Copy Inventory List?

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

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

Recommended Posts

Hi all. I have been searching everywhere for a snippet of a script that will let me collect all the names of no-copy inventory items as they are added to an object in a list. I only want to list the objects. Not notecards,scripts etc.
Can anyone help me out with just a sample or a link to a sample? I am fairly confident is scripting so I am defiantlly not asking for someone to do it all for me just help me get started.

Thank you

Share this post


Link to post
Share on other sites

First you get the number of inventory items in the list - and then you iterate over the items in a loop.

Then - at each loop, you check:

I hope this helps you.

  • Like 2

Share this post


Link to post
Share on other sites

Here is a snippet that displays an inventory list and adds a a note for attributes not set for each inventory item:

string s;string content="";integer no_perm;integer i;integer x = llGetInventoryNumber(INVENTORY_ALL);for ( i=x-1; i>=0; i-- ){    s = llGetInventoryName(INVENTORY_ALL, i);    content += "\n"+": "+s ;    no_perm = ~llGetInventoryPermMask( s, MASK_NEXT );    if ( no_perm & PERM_MODIFY ) content += " (No Modify)";    if ( no_perm & PERM_COPY ) content += " (No Copy)";    if ( no_perm & PERM_TRANSFER ) content += " (No Transfer)";}llOwnerSay(content);

This is for next owner's permissions
Substitute MASK_NEXT with MASK_OWNER to reflect curent permissions

  • Like 1

Share this post


Link to post
Share on other sites

This is a piece of code I came up with just now as I have a project coming up that will probably use it also.

I havent compiled it so I hope there is not too many errors. But hopefully helpful for you and others too.

//Define Varlist Object_list;//Define Functionlist Make_Inv_List(){list       objects = [];integer    l = llGetInventoryNumber(INVENTORY_OBJECT);	while(l){		string Object_name = llGetInventoryName(INVENTORY_OBJECT, --l);				if ((PERM_COPY & llGetInventoryPermMask(Object_name, MASK_OWNER)) == 0) {			//object was no copy			objects = Object_name + objects;		}	}return objects;}//Start Defaultdefault{	state_entry()	{		Object_list = Make_Inv_List();		llSay(0,llDumpList2String(Object_list, " \n"));//Output the contents of "Object_list" for debuging	} 	changed( integer change )	{		if ( change == CHANGED_INVENTORY ) {			//If the Inventory has changed			Object_list = Make_Inv_List();			llSay(0,llDumpList2String(Object_list, " \n"));//Output the contents of "Object_list" for debuging		}	}}

 xoxo Lilmix xoxo

  • Like 1

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3085 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...