Well, you could modify it a little bit. Instead of doing it exactly the way i have it, you can make a macro or function to check to see if the person has a bounty. If they do, then you can show a number for them.
Of course, you could make an item with a specific name (kind of like the helmet thing in star wars: bounty hunter) that allows you to use a function to "scan" someone or an area to see if a character that resides there has a bounty.
Then the code would be more like:
int i = 0;
CHAR_DATA *mob;
for ( mob = area->first_mob; mob; mob = mob->next_in_area )
{
if ( !str_cmp(mob->name, desired_target) && IS_NPC(mob) && has_bounty(mob->name))
{
i++;
sprintf( buf, "%d.%s Description: %s\n\r", i, mob->name, mob->short_desc) );
send_to_char( buf, ch );
}
}
bool has_bounty( char *name)
{
BOUNTY_DATA *bounty;
bool bountied = FALSE;
/* compare name against disintigration list here */
for ( bounty = first_bounty; bounty; bounty = bounty->next)
{
if ( !str_cmp( name, bounty->name ) )
{
bountied = TRUE;
break;
}
}
return bountied;
}
Of course those loops wouldn't reall work, considering I didn't look at the code (might be disintigration, i dunno, I haven't looked through the bounty stuff for my mud in a while). But I think you all can figure what i mean. |