STR_INVE.C
LIB3/STD/BASIC/STR_INVE.C · 410 B
From the archive nm4dos.zip
Download the archive « Back to the archive contents
#pragma save_binary
mixed query_strange_inventory( mixed arr )
{
mixed inv, desc;
object ob;
int i, k;
inv = ({ });
for( k = 0; k < sizeof( arr ); k++ )
{
ob = arr[ k ];
if( !(desc = (string)ob->short())||(desc == "") )
continue;
if( (i = member_array( desc, inv )) >= 0 )
inv[ i + 1 ] += ({ ob });
else
inv += ({ desc, ({ ob }) });
}
return inv;
}