diff -i smaug14/src/mud_comm.c smaug18/src/mud_comm.c
8c8
<  * Tricops and Fireblade                                      |             *
---
>  * Tricops, Fireblade, Edmond, Conran                         |             *
46a47,48
>               case GREET_IN_FIGHT_PROG:
>                       return "greet_in_fight_prog";
88a91,104
>               case LOAD_PROG:
>                       return "load_prog";
>               case LOGIN_PROG:
>                       return "login_prog";
>               case VOID_PROG:
>                       return "void_prog";
>               case IMMINFO_PROG:
>                       return "imminfo_prog";
>               case CMD_PROG:
>                       return "cmd_prog";
>               case SELL_PROG:
>                       return "sell_prog";
>               case TELL_PROG:
>                       return "tell_prog";
102a119
>       sh_int cnt = 0;
131c148
<               send_to_char( "That Mobile has no Programs set.\n\r", ch );
---
>               ch_printf( ch, "No programs on mobile:  %s - #%d\n\r", victim->name, victim->pIndexData->vnum );
148c165
<               ch_printf( ch, ">%s %s\n\r%s\n\r", mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
---
>               ch_printf( ch, "%d >%s %s\n\r%s\n\r", ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
157a175
>       sh_int cnt = 0;
184c202
<               ch_printf( ch, ">%s %s\n\r%s\n\r", mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
---
>               ch_printf( ch, "%d >%s %s\n\r%s\n\r", ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
193a212
>       sh_int cnt = 0;
204c223
<               ch_printf( ch, ">%s %s\n\r%s\n\r", mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
---
>               ch_printf( ch, "%d >%s %s\n\r%s\n\r", ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist );
259,264d277
< 
<       if ( !IS_NPC( ch ) || IS_AFFECTED( ch, AFF_CHARM ) )
<       {
<               send_to_char( "Huh?\n\r", ch );
<               return;
<       }
270a284,288
>       if ( !IS_NPC( ch ) || IS_AFFECTED( ch, AFF_CHARM ) )
>       {
>               send_to_char( "Huh?\n\r", ch );
>               return;
>       }
320d337
< 
864a882,984
> /* mpplace by Edmond 010731 */
> void do_mpplace( CHAR_DATA * ch, char *argument )
> {
>       char arg1[MAX_STRING_LENGTH];
>       char arg2[MAX_STRING_LENGTH];
>       char arg3[MAX_STRING_LENGTH];
>       char buf[MAX_INPUT_LENGTH];
>       OBJ_DATA *obj;
>       ROOM_INDEX_DATA *pRoomIndex;
>       AREA_DATA *tarea;
>       bool found = FALSE;
>       int lo_vnum, hi_vnum;
> 
>       if ( !IS_NPC( ch ) || ch->desc || IS_AFFECTED( ch, AFF_CHARM ) )
>       {
>               send_to_char( "Huh?\n\r", ch );
>               return;
>       }
> 
>       argument = one_argument( argument, arg1 );
>       argument = one_argument( argument, arg2 );
>       argument = one_argument( argument, arg3 );
>       if ( arg1[0] == '\0' )
>       {
>               send_to_char( "Mpplace what?\n\r", ch );
>               progbug( "Mpplace: no argument", ch );
>               return;
>       }
> 
>       if ( ( obj = get_obj_carry( ch, arg1 ) ) == NULL )
>       {
>               send_to_char( "You cannot mpplace that item.\n\r", ch );
>               progbug( "Mpplace: not carrying such object", ch );
>               return;
>       }
> 
>       if ( arg2[0] == '\0' )
>       {
>               lo_vnum = 101;
>               hi_vnum = MAX_VNUM;
>       }
>       else if ( !strcmp( arg2, "area" ) )
>       {
>               for ( tarea = first_area; tarea; tarea = tarea->next )
>               {
>                       if ( !str_cmp( arg3, tarea->filename ) )
>                       {
>                               found = TRUE;
>                               break;
>                       }
>               }
>               if ( !found )
>                       for ( tarea = first_build; tarea; tarea = tarea->next )
>                       {
>                               if ( !str_cmp( arg2, tarea->filename ) )
>                               {
>                                       found = TRUE;
>                                       break;
>                               }
>                       }
>               if ( !found )
>               {
>                       send_to_char( "Invalid area - you cannot mpplace there.\n\r", ch );
>                       progbug( "Mpplace: no such area", ch );
>                       return;
>               }
>               else
>               {
>                       lo_vnum = tarea->low_r_vnum;
>                       hi_vnum = tarea->hi_r_vnum;
>               }
>       }
>       else if ( is_number( arg2 ) && is_number( arg3 ) )
>       {
>               lo_vnum = atoi( arg2 );
>               hi_vnum = atoi( arg3 );
>               if ( hi_vnum <= lo_vnum )
>               {
>                       send_to_char( "Invalid vnum range, hi vnum lower than/equal to  low vnum.\n\r", ch );
>                       progbug( "Mpplace: invalid vnum range", ch );
>                       return;
>               }
>       }
>       else
>       {
>               send_to_char( "Invalid syntax.\n\r", ch );
>               progbug( "Mpplace: Invalid syntax", ch );
>               return;
>       }
> 
>       for ( ;; )
>       {
>               pRoomIndex = get_room_index( number_range( lo_vnum, hi_vnum ) );
>               if ( pRoomIndex )
>                       if ( !pRoomIndex->first_person || xIS_SET( pRoomIndex->room_flags, ROOM_DEATH ) )
>                               break;
>       }
> 
>       sprintf( buf, "%d drop %s", pRoomIndex->vnum, arg1 );
>       do_mpat( ch, buf );
>       return;
> }
> 
1037c1157
<               if ( level < 2 || level > 51 )
---
>               if ( level < 2 || level > LEVEL_IMMORTAL )
1289c1409,1411
< 
---
> /*
>  * Bug fixes for transfer all by Gianfranco Finell    -- Shaddai
>  */
1295c1417
<       ROOM_INDEX_DATA *location;
---
>       ROOM_INDEX_DATA *destination;
1297,1298c1419,1421
<       CHAR_DATA *nextinroom;
<       CHAR_DATA *immortal;
---
>       CHAR_DATA *ChNext;
>       CHAR_DATA *ChList;
>       CHAR_DATA *ListIdx;
1310a1434,1439
>       if ( !ch->in_room )
>       {
>               progbug( "Mptransfer - ch in NULL room", ch );
>               return;
>       }
> 
1317a1447,1475
>        * Thanks to Grodyn for the optional location parameter.
>        */
> 
>       if ( arg2[0] == '\0' )
>       {
>               destination = ch->in_room;
>               if ( !destination )
>               {
>                       progbug( "MpTransfer - Null room destination", ch );
>                       return;
>               }
>       }
>       else
>       {
>               destination = find_location( ch, arg2 );
>               if ( !destination )
>               {
>                       progbug( "MPtransfer - Unable to find destination room", ch );
>                       return;
>               }
>               if ( room_is_private( destination ) )
>               {
>                       progbug( "Mptransfer - Destination is a private room", ch );
>                       return;
>               }
>       }
> 
>       ChList = NULL;
>       /*
1322c1480
<               for ( victim = ch->in_room->first_person; victim; victim = nextinroom )
---
>               for ( victim = ch->in_room->last_person; victim; victim = ChNext )
1324,1325c1482,1485
<                       nextinroom = victim->next_in_room;
<                       if ( IS_IMMORTAL( ch ) && ch->master != NULL )
---
>                       ChNext = victim->prev_in_room;
> 
>                       if ( victim == ch
>                               || NOT_AUTHED( victim ) || !can_see( ch, victim ) || !in_hard_range( victim, destination->area ) )
1327,1331c1487,1492
<                       if ( victim != ch && !NOT_AUTHED( victim ) && can_see( ch, victim ) )
<                       {
<                               sprintf( buf, "%s %s", victim->name, arg2 );
<                               do_mptransfer( ch, buf );
<                       }
---
> 
>                       if ( victim->fighting )
>                               stop_fighting( victim, TRUE );
>                       char_from_room( victim );
>                       victim->next_in_room = ChList;
>                       ChList = victim;
1333d1493
<               return;
1338c1498
<       if ( !str_cmp( arg1, "area" ) )
---
>       else if ( !str_cmp( arg1, "area" ) )
1342,1344c1502,1507
<                       if ( !d->character || ( d->connected != CON_PLAYING &&
<                                       d->connected != CON_EDITING ) || !can_see( ch, d->character )
<                               || ch->in_room->area != d->character->in_room->area || NOT_AUTHED( d->character ) )
---
>                       if ( !d->character
>                               || ( d->connected != CON_PLAYING && d->connected != CON_EDITING )
>                               || !can_see( ch, d->character )
>                               || !d->character->in_room
>                               || ch->in_room->area != d->character->in_room->area
>                               || NOT_AUTHED( d->character ) || !in_hard_range( d->character, destination->area ) )
1346,1347c1509,1513
<                       sprintf( buf, "%s %s", d->character->name, arg2 );
<                       do_mptransfer( ch, buf );
---
>                       if ( d->character->fighting )
>                               stop_fighting( d->character, TRUE );
>                       char_from_room( d->character );
>                       d->character->next_in_room = ChList;
>                       ChList = d->character;
1349,1357d1514
<               return;
<       }
< 
<       /*
<        * Thanks to Grodyn for the optional location parameter.
<        */
<       if ( arg2[0] == '\0' )
<       {
<               location = ch->in_room;
1361c1518
<               if ( ( location = find_location( ch, arg2 ) ) == NULL )
---
>               if ( ( victim = get_char_world( ch, arg1 ) ) == NULL )
1363c1520
<                       progbug( "Mptransfer - No such location", ch );
---
>                       progbug( "Mptransfer - No such person", ch );
1367c1524
<               if ( room_is_private( location ) )
---
>               if ( !victim->in_room )
1369c1526
<                       progbug( "Mptransfer - Private room", ch );
---
>                       progbug( "Mptransfer - Victim in Limbo", ch );
1372d1528
<       }
1374,1378c1530,1535
<       if ( ( victim = get_char_world( ch, arg1 ) ) == NULL )
<       {
<               progbug( "Mptransfer - No such person", ch );
<               return;
<       }
---
>               if ( NOT_AUTHED( victim ) && destination->area != victim->in_room->area )
>               {
>                       sprintf( buf, "Mptransfer - unauthed char (%s)", victim->name );
>                       progbug( buf, ch );
>                       return;
>               }
1380,1384c1537,1544
<       if ( !victim->in_room )
<       {
<               progbug( "Mptransfer - Victim in Limbo", ch );
<               return;
<       }
---
>               /*
>                * If victim not in area's level range, do not transfer 
>                */
>               if ( !in_hard_range( victim, destination->area ) && !xIS_SET( destination->room_flags, ROOM_PROTOTYPE ) )
>                       return;
> 
>               if ( victim->fighting )
>                       stop_fighting( victim, TRUE );
1386c1546,1550
<       if ( NOT_AUTHED( victim ) && location->area != victim->in_room->area )
---
>               char_from_room( victim );
>               victim->next_in_room = ChList;
>               ChList = victim;
>       }
>       for ( ListIdx = ChList; ListIdx; ListIdx = ListIdx->next_in_room )
1388,1390c1552,1562
<               sprintf( buf, "Mptransfer - unauthed char (%s)", victim->name );
<               progbug( buf, ch );
<               return;
---
>               for ( victim = ListIdx->was_in_room->last_person; victim; victim = ChNext )
>               {
>                       ChNext = victim->prev_in_room;
>                       if ( IS_NPC( victim ) || get_trust( victim ) <= LEVEL_AVATAR || victim->master != ListIdx )
>                               continue;
>                       if ( victim->fighting )
>                               stop_fighting( victim, TRUE );
>                       char_from_room( victim );
>                       victim->next_in_room = ChList;
>                       ChList = victim;
>               }
1393,1414c1565,1569
< 
< /* If victim not in area's level range, do not transfer */
<       if ( !in_hard_range( victim, location->area ) && !IS_SET( location->room_flags, ROOM_PROTOTYPE ) )
<               return;
< 
<       if ( victim->fighting )
<               stop_fighting( victim, TRUE );
< 
< /* hey... if an immortal's following someone, they should go with a mortal
<  * when they're mptrans'd, don't you think?
<  *  -- TRI
<  */
< 
<       for ( immortal = victim->in_room->first_person; immortal; immortal = nextinroom )
<       {
<               nextinroom = immortal->next_in_room;
<               if ( IS_NPC( immortal ) || get_trust( immortal ) < LEVEL_IMMORTAL || immortal->master != victim )
<                       continue;
<               if ( immortal->fighting )
<                       stop_fighting( immortal, TRUE );
<               char_from_room( immortal );
<               char_to_room( immortal, location );
---
>       for ( ; ChList; ChList = ChNext )
>       {
>               ChNext = ChList->next_in_room;
>               ChList->next_in_room = NULL;
>               char_to_room( ChList, destination );
1417,1419d1571
<       char_from_room( victim );
<       char_to_room( victim, location );
< 
1428a1581
>       sh_int drunk = 0, mst;
1450c1603,1611
<                       if ( get_trust( vch ) < get_trust( ch ) && can_see( ch, vch ) )
---
>                       if ( !IS_IMMORTAL( vch ) && can_see( ch, vch ) )
>                       {
>                               mst = vch->mental_state;
>                               vch->mental_state = 0;
>                               if ( !IS_NPC( vch ) )
>                               {
>                                       drunk = vch->pcdata->condition[COND_DRUNK];
>                                       vch->pcdata->condition[COND_DRUNK] = 0;
>                               }
1451a1613,1616
>                               vch->mental_state = mst;
>                               if ( !IS_NPC( vch ) )
>                                       vch->pcdata->condition[COND_DRUNK] = drunk;
>                       }
1475c1640,1646
< 
---
>               mst = victim->mental_state;
>               victim->mental_state = 0;
>               if ( !IS_NPC( victim ) )
>               {
>                       drunk = victim->pcdata->condition[COND_DRUNK];
>                       victim->pcdata->condition[COND_DRUNK] = 0;
>               }
1476a1648,1651
>               victim->mental_state = mst;
>               if ( !IS_NPC( victim ) )
>                       victim->pcdata->condition[COND_DRUNK] = drunk;
> 
1939c2114
<     if ( low_vnum < 1 || high_vnum < low_vnum || low_vnum > high_vnum || low_vnum == high_vnum || high_vnum > 32767 ) {
---
>     if ( low_vnum < 1 || high_vnum < low_vnum || low_vnum > high_vnum || low_vnum == high_vnum || high_vnum > MAX_VNUM ) {
2013c2188
<       if ( low_vnum < 1 || high_vnum < low_vnum || low_vnum > high_vnum || low_vnum == high_vnum || high_vnum > 32767 )
---
>       if ( low_vnum < 1 || high_vnum < low_vnum || low_vnum > high_vnum || low_vnum == high_vnum || high_vnum > MAX_VNUM )
2026,2029c2201,2204
< /*      if ( !IS_SET(pRoomIndex->room_flags, ROOM_PRIVATE)
<       &&   !IS_SET(pRoomIndex->room_flags, ROOM_SOLITARY)
<       &&   !IS_SET(pRoomIndex->room_flags, ROOM_NO_ASTRAL)
<       &&   !IS_SET(pRoomIndex->room_flags, ROOM_PROTOTYPE) )
---
> /*      if ( !xIS_SET(pRoomIndex->room_flags, ROOM_PRIVATE)
>       &&   !xIS_SET(pRoomIndex->room_flags, ROOM_SOLITARY)
>       &&   !xIS_SET(pRoomIndex->room_flags, ROOM_NO_ASTRAL)
>       &&   !xIS_SET(pRoomIndex->room_flags, ROOM_PROTOTYPE) )
2445c2620
<       if ( !IS_NPC( ch ) || IS_AFFECTED( ch, AFF_CHARM ) )
---
>       if ( !IS_NPC( ch ) || IS_AFFECTED( ch, AFF_CHARM ) || ch->desc )
2734a2910,2959
>                       switch ( class_table[ch->class]->attr_second )
>                       {
>                               case APPLY_STR:
>                                       ch->perm_str = 14;
>                                       break;
>                               case APPLY_INT:
>                                       ch->perm_int = 14;
>                                       break;
>                               case APPLY_WIS:
>                                       ch->perm_wis = 14;
>                                       break;
>                               case APPLY_DEX:
>                                       ch->perm_dex = 14;
>                                       break;
>                               case APPLY_CON:
>                                       ch->perm_con = 14;
>                                       break;
>                               case APPLY_CHA:
>                                       ch->perm_cha = 14;
>                                       break;
>                               case APPLY_LCK:
>                                       ch->perm_lck = 14;
>                                       break;
>                       }
>                       switch ( class_table[ch->class]->attr_deficient )
>                       {
>                               case APPLY_STR:
>                                       ch->perm_str = 9;
>                                       break;
>                               case APPLY_INT:
>                                       ch->perm_int = 9;
>                                       break;
>                               case APPLY_WIS:
>                                       ch->perm_wis = 9;
>                                       break;
>                               case APPLY_DEX:
>                                       ch->perm_dex = 9;
>                                       break;
>                               case APPLY_CON:
>                                       ch->perm_con = 9;
>                                       break;
>                               case APPLY_CHA:
>                                       ch->perm_cha = 9;
>                                       break;
>                               case APPLY_LCK:
>                                       ch->perm_lck = 9;
>                                       break;
>                       }
> 
> 
2749a2975
>                       victim->gold = 50000;
2963a3190,3249
>  * Make an object owned by a char. --Shaddai
>  */
> 
> void do_mpoowner( CHAR_DATA * ch, char *argument )
> {
>       OBJ_DATA *obj;
>       CHAR_DATA *victim = NULL;
>       char arg1[MAX_STRING_LENGTH];
>       char arg2[MAX_STRING_LENGTH];
> 
>       if ( !IS_NPC( ch ) || ch->desc || IS_AFFECTED( ch, AFF_CHARM ) )
>       {
>               send_to_char( "Huh?\n\r", ch );
>               return;
>       }
> 
>       argument = one_argument( argument, arg1 );
>       argument = one_argument( argument, arg2 );
> 
>       if ( arg1[0] == '\0' || arg2[0] == '\0' )
>       {
>               send_to_char( "Syntax: oowner <object> <player>\n\r", ch );
>               return;
>       }
> 
>       if ( str_cmp( arg2, "none" ) && ( victim = get_char_room( ch, arg2 ) ) == NULL )
>       {
>               send_to_char( "No such player is in the room.\n\r", ch );
>               return;
>       }
> 
>       if ( ( obj = get_obj_here( ch, arg1 ) ) == NULL )
>       {
>               send_to_char( "No such object exists.\n\r", ch );
>               return;
>       }
> 
>       separate_obj( obj );
> 
>       if ( !str_cmp( "none", arg2 ) )
>       {
>               STRFREE( obj->owner );
>               obj->owner = STRALLOC( "" );
>               send_to_char( "Done.\n\r", ch );
>               return;
>       }
> 
>       if ( IS_NPC( victim ) )
>       {
>               send_to_char( "A mob can't be an owner of an item.\n\r", ch );
>               return;
>       }
>       STRFREE( obj->owner );
>       obj->owner = STRALLOC( victim->name );
>       send_to_char( "Done.\n\r", ch );
>       return;
> }
> 
> 
> /*
3114,3116c3400,3404
<                       log_string( log_buf );
<                       to_channel( log_buf, CHANNEL_MONITOR, "Monitor", LEVEL_IMMORTAL );
< 
---
>                       log_string_plus( log_buf, LOG_ALL, 65 );
> /*
>             append_to_file( LOG_FILE, log_buf );
> */
>                       to_channel( log_buf, CHANNEL_DEATH, "Death", LEVEL_IMMORTAL );
3173a3462,3524
> 
> /* mphunt/mphate - by Leart 09/01 */
> void do_mphunt( CHAR_DATA * ch, char *argument )
> {
>       char arg[MAX_INPUT_LENGTH];
>       CHAR_DATA *victim;
> 
> 
>       if ( !IS_NPC( ch ) || ch->desc || IS_AFFECTED( ch, AFF_CHARM ) )
>       {
>               send_to_char( "Huh?\n\r", ch );
>               return;
>       }
> 
>       argument = one_argument( argument, arg );
> 
>       if ( arg[0] == '\0' )
>       {
>               send_to_char( "Which player to hunt?\n\r", ch );
>               progbug( "Mphunt: invalid argument", ch );
>               return;
>       }
> 
>       if ( ( victim = get_char_world( ch, arg ) ) == NULL )
>       {
>               progbug( "Mphunt - No such person", ch );
>               return;
>       }
> 
> 
>       start_hunting( ch, victim );
>       return;
> }
> 
> void do_mphate( CHAR_DATA * ch, char *argument )
> {
>       char arg[MAX_INPUT_LENGTH];
>       CHAR_DATA *victim;
> 
>       if ( !IS_NPC( ch ) || ch->desc || IS_AFFECTED( ch, AFF_CHARM ) )
>       {
>               send_to_char( "Huh?\n\r", ch );
>               return;
>       }
> 
>       argument = one_argument( argument, arg );
> 
>       if ( arg[0] == '\0' )
>       {
>               send_to_char( "Which player to hate?\n\r", ch );
>               progbug( "Mphate: invalid argument", ch );
>               return;
>       }
> 
>       if ( ( victim = get_char_world( ch, arg ) ) == NULL )
>       {
>               progbug( "Mphate - No such person", ch );
>               return;
>       }
> 
>       start_hating( ch, victim );
>       return;
> }