Jump to content

A No-Copy Inventory List?


Billie Winslet
 Share

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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

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