CODE
// List All Non-Full Perms Textures in a Prim's Inventory
//
// By Apollia Pirandello
//
// 8/24/2007
//
//
// Public domain. Free to use and/or modify for any purpose,
// including commercial purposes.
//
//
// This simple script searches through the inventory of the prim
// it's in for textures without full copy/mod/transfer permissions
// (perms).
//
// If it finds any such textures, it states the texture's name and
// number in an OwnerSay.
//
// The script runs any time the owner touches the prim that it's in.
integer num_of_textures;
integer x;
integer perms;
key owner_key;
key allpurpose_key;
string allpurpose_string_A;
integer ListTexturesWithoutFullPerms()
{ num_of_textures=llGetInventoryNumber(INVENTORY_TEXTURE);
llOwnerSay("Listing textures without full copy/mod/transfer perms:");
for (x=0;x<num_of_textures;x++)
{
allpurpose_string_A=llGetInventoryName(INVENTORY_TEXTURE,x);
perms=0;
perms=llGetInventoryPermMask(allpurpose_string_A,MASK_OWNER);
if ((perms & (PERM_COPY | PERM_MODIFY | PERM_TRANSFER))!=(PERM_COPY | PERM_MODIFY | PERM_TRANSFER))
{
llOwnerSay((string)x+": "+allpurpose_string_A);
}
}
return 1;
}
default
{
touch_start(integer total_number)
{ owner_key=llGetOwner();
allpurpose_key=llDetectedKey(0);
if (owner_key==allpurpose_key)
{
ListTexturesWithoutFullPerms();
}
}
}