Difference between revisions of "User:PixelProphet Lane/Scripts/Fast List Prim Contents"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with 'A script which can display Object Inventory already exists, but it's a rather slow and inefficient implementation. This script loops through the Object Inventory of the Prim you ...')
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{LSL Header}}
{{box|Fast List Prim Contents|
A script which can display Object Inventory already exists, but it's a rather slow and inefficient implementation.
A script which can display Object Inventory already exists, but it's a rather slow and inefficient implementation.
This script loops through the Object Inventory of the Prim you add it to, and displays Itemname, Itemtype and next Owner permissions in chat by means of Owner message.
This script loops through the Object Inventory of the Prim you add it to, and displays Itemname, Itemtype and next Owner permissions in chat by means of Owner message.


{{LSL Header}}
It's easier and much faster to loop through the Inventory Item types, store the current type in a variable, and then loop through each item that is an item of our currently stored type. This way you don't need to fetch the Inventory Item type for each item you find.
 
<lsl>
<lsl>
// Fast Display Prim Contents and corresponding next Owner permissions in chat
// Fast Display Prim Contents and corresponding next Owner permissions in chat
// By PixelProphet Lane
// By PixelProphet Lane
// This code is free to copy, modify and transfer.
// This code is free to copy, modify and transfer.
// If you intend to distribute this code as is, then please the comments above as they are.
// If you intend to distribute this code as is, then please leave the comments above as they are.
// In case you distribute this code as non modifiable part of your scripts, please include a reference to the page
// In case you distribute this code as non modifiable part of your scripts, please include a reference to this page.
// you aquired this source code from.
   
   
string ME;
string ME;
Line 70: Line 74:
}
}
</lsl>
</lsl>
}}

Latest revision as of 13:35, 2 April 2010