Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void do_mwhere( CHAR_DATA* ch, const char* argument )
- {
- char arg[ MAX_INPUT_LENGTH ];
- CHAR_DATA* victim;
- bool found;
- set_pager_color( AT_PLAIN, ch );
- one_argument( argument, arg );
- if ( arg[ 0 ] == '\0' )
- {
- send_to_char( "Mwhere whom?\n\r", ch );
- return;
- }
- found = FALSE;
- for ( victim = first_char; victim; victim = victim->next )
- {
- if ( IS_NPC( victim ) && victim->in_room && nifty_is_name( arg, victim->name ) )
- {
- found = TRUE;
- /*
- pager_printf( ch, "[%5d] %-28s [%5d] %s\n\r",
- victim->pIndexData->vnum, victim->short_descr, victim->in_room->vnum, victim->in_room->name );
- */
- char tmpBuf[ MSL ], vnum[ MSL ], shortDesc[ MSL ], roomVnum[ MSL ], roomName[ MSL ];
- // found++;
- snprintf( tmpBuf, MSL, "%d", victim->pIndexData->vnum );
- snprintf( vnum, MSL, "%s", color_align( tmpBuf, 10, ALIGN_CENTER ) );
- snprintf( shortDesc, MSL, "%s", color_align( victim->short_descr, 30, ALIGN_LEFT ) );
- snprintf( tmpBuf, MSL, "%d", victim->in_room->vnum );
- snprintf( roomVnum, MSL, "%s", color_align( tmpBuf, 10, ALIGN_CENTER ) );
- snprintf( roomName, MSL, "%s", color_align( victim->in_room->name, 30, ALIGN_LEFT ) );
- snprintf( tmpBuf, MSL, "&D[%-10s] %-30s&D [%-10s] %-30s", vnum, shortDesc, roomVnum, roomName );
- pager_printf( ch, "%s\n\r", color_align( tmpBuf, color_strlen( tmpBuf ), ALIGN_LEFT ) );
- found++;
- }
- // found++;
- }
- if ( found )
- pager_printf( ch, "Number of matches: %d\n", found);
- if ( !found )
- act( AT_PLAIN, "You didn't find any $T.", ch, NULL, arg, TO_CHAR );
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement