STR_INVE.C
LIB3/SECURE/SIMUL_EF/STR_INVE.C · 405 B
From the archive nm4dos.zip
Download the archive « Back to the archive contents
mixed query_strange_inventory( mixed arr )
{
mixed inv;
object ob;
mixed desc;
int i, j, 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;
}