Beispiel #1
0
/* random room generation procedure */
ROOM_INDEX_DATA  *get_random_room(CHAR_DATA *ch)
{
    ROOM_INDEX_DATA *room;
    long i;

    for ( i = 0; i < 60000 ; i++)
    {
        room = get_room_index( number_range( 0, 65535 ) );
        if ( room != NULL )
        if ( can_see_room(ch,room)
        &&   !ENTRE_INC(20000,room->vnum,20999)
	&&   !IS_SET(room->area->area_flags, AREA_NOPLAYERS)
	&&   !IS_SET(room->area->area_flags, AREA_NOTELEPORT)
	&&   !room_is_private(ch,room)
        &&   !IS_SET(room->room_flags, ROOM_PRIVATE)
        &&   !IS_SET(room->room_flags, ROOM_SOLITARY) 
	&&   !IS_SET(room->room_flags, ROOM_LOCKED)
	&&   !IS_SET(room->room_flags, ROOM_SAFE) 
	&&   !IS_SET(room->room_flags, ROOM_NO_RECALL) 
	&&   (IS_NPC(ch) || IS_SET(ch->act,ACT_AGGRESSIVE) 
	||   !IS_SET(room->room_flags,ROOM_LAW)))
            break;
    }

    return room;
}
Beispiel #2
0
/*
 * Lets the mobile transfer people.  The 'all' argument transfers
 *  everyone in the current room to the specified location
 *
 * Syntax: mob transfer [target|'all'] [location]
 */
void do_mptransfer(CHAR_DATA * ch, char *argument)
{
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];
    ROOM_INDEX_DATA *location;
    CHAR_DATA *victim;

    argument = one_argument(argument, arg1);
    argument = one_argument(argument, arg2);

    if (arg1[0] == '\0') {
	bug("Mptransfer - Bad syntax from vnum %d.",
	    IS_NPC(ch) ? ch->pIndexData->vnum : 0);
	return;
    }
    if (!str_cmp(arg1, "all")) {
	CHAR_DATA *victim_next;

	for (victim = ch->in_room->people; victim != NULL; victim = victim_next) {
	    victim_next = victim->next_in_room;
	    if (!IS_NPC(victim)) {
		sprintf(buf, "%s %s", victim->name, arg2);
		do_mptransfer(ch, buf);
	    }
	}
	return;
    }
    /*
     * Thanks to Grodyn for the optional location parameter.
     */
    if (arg2[0] == '\0') {
	location = ch->in_room;
    } else {
	if ((location = find_location(ch, arg2)) == NULL) {
	    bug("Mptransfer - No such location from vnum %d.",
		IS_NPC(ch) ? ch->pIndexData->vnum : 0);
	    return;
	}
	if (room_is_private(location))
	    return;
    }

    if ((victim = get_char_world(ch, arg1)) == NULL)
	return;

    if (victim->in_room == NULL)
	return;

    if (victim->fighting != NULL)
	stop_fighting(victim, TRUE);
    char_from_room(victim);
    char_to_room(victim, location);
    do_look(victim, "auto");

    return;
}
Beispiel #3
0
/* random room generation procedure */
ROOM_INDEX_DATA *get_random_room (CHAR_DATA * ch)
{
    ROOM_INDEX_DATA *room;

    for (;;)
    {
        room = get_room_index (number_range (0, 65535));
        if (room != NULL)
            if (can_see_room (ch, room)
                && !room_is_private (room)
                && !IS_SET (room->room_flags, ROOM_PRIVATE)
                && !IS_SET (room->room_flags, ROOM_SOLITARY)
                && !IS_SET (room->room_flags, ROOM_SAFE)
                && (IS_NPC (ch) || IS_SET (ch->act, ACT_AGGRESSIVE)
                    || !IS_SET (room->room_flags, ROOM_LAW)))
                break;
    }

    return room;
}
Beispiel #4
0
void do_bladejump( CHAR_DATA *ch, char *argument)
{
  CHAR_DATA *victim;
  char arg[MAX_INPUT_LENGTH];

  if ( IS_NPC(ch) )
    return;

  argument = one_argument (argument, arg);

  if (!IS_CLASS(ch, CLASS_SKYBLADE) )
  {
    send_to_char("Huh?\n\r",ch);
    return;
  }

  if ( arg[0] == '\0' )
  {
    send_to_char( "BladeJump to whom?\n\r", ch );
    return;
  }

  if ( ( victim = get_char_world( ch, arg ) ) == NULL )
  {
    send_to_char( "You cannot find them.\n\r", ch );
    return;
  }

  if( ch->move < 1000)
  {
    stc( "You don't have enough movement points to bladejump to them.\n\r",ch);
    return;
  }

  if( IS_SET(victim->in_room->room_flags, ROOM_ASTRAL))
  {
    stc( "You can't find it's room.\n\r",ch);
    return;
  }

  if( IS_SET(ch->in_room->room_flags, ROOM_ASTRAL))
  {
    stc( "Your body can't go there.\n\r",ch);
    return;
  }
    if (IS_SET(victim->act, ACT_NOTRAVEL))
  {
  	send_to_char("No Can Do.\n\r", ch);
  	return;
  }
  if (ch == victim)
  {
    send_to_char("But you're already at yourself!\n\r",ch);
    return;
  }

  if ( room_is_private(victim->in_room ) )
  {
    send_to_char( "That room is private right now.\n\r", ch );
    return;
  }
  if (!IS_NPC(victim) && ch->move < victim->max_move)
  {
    if ( !IS_NPC(victim) && !IS_IMMUNE(victim, IMM_SUMMON) )
    {
      send_to_char( "They are hiding from you.\n\r", ch );
      return;
    }
    else
    send_to_char("You need more move than you're opponent.\n\r",ch);
  }
  if (victim->in_room == ch->in_room)
  {
    send_to_char("But you're already there!\n\r",ch);
    return;
  }

  act("You jump into the clouds", ch, NULL, victim, TO_CHAR);
  act("$n jumps into the clouds", ch, NULL, victim, TO_ROOM);
  char_from_room(ch);
  char_to_room(ch,victim->in_room);
  ch->move -= 1000;
  act("$n jumps out of the clouds and lands infront of $N.", ch, NULL, victim, TO_NOTVICT);
  act("$n jumps out of the clouds and lands infront of you.", ch, NULL, victim, TO_VICT);
  do_look(ch,"auto");
  return;
}
Beispiel #5
0
void do_stalk( CHAR_DATA *ch, char *argument)
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];

    if ( IS_NPC(ch) )
        return;

    argument = one_argument (argument, arg);

    if (!IS_CLASS(ch, CLASS_NINJA) )
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }

    if ( arg[0] == '\0' )
    {
        send_to_char( "Stalk whom?\n\r", ch );
        return;
    }

    if ( ( victim = get_char_world( ch, arg ) ) == NULL )
    {
        send_to_char( "You cannot find them.\n\r", ch );
        return;
    }

    if( ch->move < 500)
    {
        stc( "You don't have enough movement points to stalk them.\n\r",ch);
        return;
    }

    if( IS_SET(victim->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "You can't find it's room.\n\r",ch);
        return;
    }

    if( IS_SET(ch->in_room->room_flags, ROOM_ASTRAL))
    {
        stc( "Your body can't go there.\n\r",ch);
        return;
    }

    if (ch == victim)
    {
        send_to_char("But you're already at yourself!\n\r",ch);
        return;
    }

    if ( room_is_private(victim->in_room ) )
    {
        send_to_char( "That room is private right now.\n\r", ch );
        return;
    }
    if ( !IS_NPC(victim) && !IS_IMMUNE(victim, IMM_SUMMON) )
    {
        send_to_char( "They are hiding from you.\n\r", ch );
        return;
    }
    if (victim->in_room == ch->in_room)
    {
        send_to_char("But you're already there!\n\r",ch);
        return;
    }

    act("You pick up the trail of $N, and quickly find them.", ch, NULL, victim, TO_CHAR);
    act("$n slides into the shadows, stalking someone.", ch, NULL, victim, TO_ROOM);
    char_from_room(ch);
    char_to_room(ch,victim->in_room);
    ch->move -= 500;
    act("$n walks out of nowhere behind $N.", ch, NULL, victim, TO_NOTVICT);
    act("$n walks out of nowhere from behind.", ch, NULL, victim, TO_VICT);
    do_look(ch,"scry");
    return;
}
Beispiel #6
0
/* RT Enter portals */
void do_enter( CHAR_DATA *ch, char *argument)
{    
    ROOM_INDEX_DATA *location; 

    if ( ch->fighting != NULL ) 
	return;

    /* nifty portal stuff */
    if (argument[0] != '\0')
    {
        ROOM_INDEX_DATA *old_room;
	OBJ_DATA *portal;
	CHAR_DATA *fch, *fch_next;

        old_room = ch->in_room;

	portal = get_obj_list( ch, argument,  ch->in_room->contents );
	
	if (portal == NULL)
	{
	    send_to_char("You don't see that here.\n\r",ch);
	    return;
	}

	if (portal->item_type != ITEM_PORTAL 
        ||  (IS_SET(portal->value[1],EX_CLOSED) && !IS_TRUSTED(ch,KNIGHT)))
	{
	    send_to_char("You can't seem to find a way in.\n\r",ch);
	    return;
	}

	if (!IS_TRUSTED(ch,KNIGHT) && !IS_SET(portal->value[2],GATE_NOCURSE)
	&&  IS_AFFECTED(ch,AFF_CURSE) )
	{
	    send_to_char("Something prevents you from leaving...\n\r",ch);
	    return;
	}

	if (IS_SET(portal->value[2],GATE_RANDOM) || portal->value[3] == -1)
	{
	    location = get_random_room(ch);
	    portal->value[3] = location->vnum; /* for record keeping :) */
	}
	else if (IS_SET(portal->value[2],GATE_BUGGY) && (number_percent() < 5))
	    location = get_random_room(ch);
	else
	    location = get_room_index(portal->value[3]);

	if (location == NULL
	||  location == old_room
	||  !can_see_room(ch,location) 
	||  (room_is_private(ch,location) && !IS_TRUSTED(ch,IMPLEMENTOR)))
	{
	   act("$p doesn't seem to go anywhere.",ch,portal,NULL,TO_CHAR);
	   return;
	}

        if (IS_NPC(ch) && IS_SET(ch->act,ACT_AGGRESSIVE)
        &&  IS_SET(location->room_flags,ROOM_LAW))
        {
            send_to_char("Something prevents you from leaving...\n\r",ch);
            return;
        }

	act("$n steps into $p.",ch,portal,NULL,TO_ROOM);
	
	if (IS_SET(portal->value[2],GATE_NORMAL_EXIT))
	    act("You enter $p.",ch,portal,NULL,TO_CHAR);
	else
	    act("You walk through $p and find yourself somewhere else...",
	        ch,portal,NULL,TO_CHAR); 

	char_from_room(ch);
	char_to_room(ch, location);

	if (IS_SET(portal->value[2],GATE_GOWITH)) /* take the gate along */
	{
	    obj_from_room(portal);
	    obj_to_room(portal,location);
	}

	if (IS_SET(portal->value[2],GATE_NORMAL_EXIT))
	    act("$n has arrived.",ch,portal,NULL,TO_ROOM);
	else
	    act("$n has arrived through $p.",ch,portal,NULL,TO_ROOM);

	do_look(ch,"auto");

	/* charges */
	if (portal->value[0] > 0)
	{
	    portal->value[0]--;
	    if (portal->value[0] == 0)
		portal->value[0] = -1;
	}

	/* protect against circular follows */
	if (old_room == location)
	    return;

    	for ( fch = old_room->people; fch != NULL; fch = fch_next )
    	{
            fch_next = fch->next_in_room;

            if (portal == NULL || portal->value[0] == -1) 
	    /* no following through dead portals */
                continue;
 
            if ( fch->master == ch && IS_AFFECTED(fch,AFF_CHARM)
            &&   fch->position < POS_STANDING)
            	do_stand(fch,"");

            if ( fch->master == ch && fch->position == POS_STANDING)
            {
 
                if (IS_SET(ch->in_room->room_flags,ROOM_LAW)
                &&  (IS_NPC(fch) && IS_SET(fch->act,ACT_AGGRESSIVE)))
                {
                    act("You can't bring $N into the city.",
                    	ch,NULL,fch,TO_CHAR);
                    act("You aren't allowed in the city.",
                    	fch,NULL,NULL,TO_CHAR);
                    continue;
            	}
 
            	act( "You follow $N.", fch, NULL, ch, TO_CHAR );
		do_enter(fch,argument);
            }
    	}

 	if (portal != NULL && portal->value[0] == -1)
	{
	    act("$p fades out of existence.",ch,portal,NULL,TO_CHAR);
	    if (ch->in_room == old_room)
		act("$p fades out of existence.",ch,portal,NULL,TO_ROOM);
	    else if (old_room->people != NULL)
	    {
		act("$p fades out of existence.", 
		    old_room->people,portal,NULL,TO_CHAR);
		act("$p fades out of existence.",
		    old_room->people,portal,NULL,TO_ROOM);
	    }
	    extract_obj(portal);
	}

	/* 
	 * If someone is following the char, these triggers get activated
	 * for the followers before the char, but it's safer this way...
	 */
	if ( IS_NPC( ch ) && HAS_TRIGGER( ch, TRIG_ENTRY ) )
	    mp_percent_trigger( ch, NULL, NULL, NULL, TRIG_ENTRY );
	if ( !IS_NPC( ch ) )
	    mp_greet_trigger( ch );

	return;
    }

    send_to_char("Nope, can't do it.\n\r",ch);
    return;
}
Beispiel #7
0
void do_at(struct char_data *ch, const char *argument)
{
    struct room_index_data *location = NULL;
    struct room_index_data *original;
    struct char_data *wch = NULL;
    struct char_data *vch = NULL;
    struct gameobject *on;
    char arg[MAX_INPUT_LENGTH];
    char cmd[MAX_STRING_LENGTH];

    DENY_NPC(ch)

        argument = one_argument(argument, arg);
    if (arg[0] == '\0' || argument[0] == '\0'
        || arg[0] == '?' || !str_cmp(arg, "help")) {
        show_help(ch->desc, "at_imm_command", NULL);
        return;
    }

    if (!str_prefix(arg, "random")) {
        struct area_data *area;
        char check[MAX_INPUT_LENGTH];

        argument = one_argument(argument, arg);
        area = NULL;
        one_argument(argument, check);
        if (!str_prefix(check, "area")) {
            argument = one_argument(argument, check);
            area = ch->in_room->area;
        }

        if (!str_prefix(arg, "room")) {
            location = get_random_room(ch, area);
        } else if (!str_prefix(arg, "mob")) {
            vch = get_random_npc(ch, area);
            location = vch->in_room;
        } else if (!str_prefix(arg, "char") || !str_prefix(arg, "player")) {
            vch = get_random_pc(ch, area);
            location = vch->in_room;
        }
    } else {
        location = find_location(ch, arg);
    }

    if (location == NULL) {
        send_to_char("No such location.\n\r", ch);
        return;
    }

    if (!is_room_owner(ch, location) && room_is_private(location) && get_trust(ch) < LEVEL_IMMORTAL) {
        send_to_char("That room is private right now.\n\r", ch);
        return;
    }

    original = ch->in_room;
    on = ch->on;

    char_from_room(ch);
    char_to_room(ch, location);
    if (vch != NULL) {
        if (expand_cmd(vch, argument, cmd, '@'))
            interpret(ch, cmd);
    } else {
        interpret(ch, argument);
    }
    /*
     * See if 'ch' still exists before continuing!
     * Handles 'at XXXX quit' case.
     */
    for (wch = char_list; wch != NULL; wch = wch->next) {
        if (wch == ch) {
            char_from_room(ch);
            char_to_room(ch, original);
            ch->on = on;
            break;
        }
    }

    return;
}
Beispiel #8
0
void move_char (CHAR_DATA * ch, int door, bool follow)
{
    CHAR_DATA *fch;
    CHAR_DATA *fch_next;
    ROOM_INDEX_DATA *in_room;
    ROOM_INDEX_DATA *to_room;
    EXIT_DATA *pexit;

  
    if(ch->infight)
    {
    if(!TURN(ch))
    {
    printf_to_char(ch,"It's not your turn.\n");
    return;
    }

    refresh(ch->in_room);


    if(ch->MoveLeft == 0)
    {
    printf_to_char(ch,"You have no moves left.\n");
    return;
    }
    
    switch(door)
    {
    case DIR_EAST:
    if(find_char_xy(ch,ch->mposx+1,ch->mposy) == NULL)
    {
    if(hdif(ch,DIR_EAST) > ch->jump || hdif(ch,DIR_EAST) < -(ch->jump) || ch->mposx > 24) 
    {
    printf_to_char(ch,"You can't jump that high.\n");
    return;
    }
    ch->mposx++;
    ch->in_room->map.index[ch->mposy][ch->mposx].occupied = FALSE;
    ch->in_room->map.index[ch->mposy][ch->mposx+1].occupied = TRUE;
    announce_move(ch,"east");
    }
    else
    printf_to_char(ch,"Somebody's in the way.\n");
    break;
    case DIR_WEST:
    if(find_char_xy(ch,ch->mposx-1,ch->mposy) == NULL)
    {
    if(hdif(ch,DIR_WEST) > (ch->jump) || hdif(ch,DIR_WEST) < -(ch->jump) || ch->mposx < 1) 
    {
    printf_to_char(ch,"You can't jump that high.\n");
    return;
    }
    ch->in_room->map.index[ch->mposy][ch->mposx].occupied = FALSE;
    ch->in_room->map.index[ch->mposy][ch->mposx-1].occupied = TRUE;
    ch->mposx--;
    announce_move(ch,"west");
    }
    else
    printf_to_char(ch,"Somebody's in the way.\n");
    break;
    case DIR_NORTH:
    if(hdif(ch,DIR_NORTH) > (ch->jump) || hdif(ch,DIR_NORTH) < -(ch->jump) || ch->mposy < 1) 
    {
    printf_to_char(ch,"You can't jump that high.\n");
    return;
    }
    if(find_char_xy(ch,ch->mposx,ch->mposy-1) == NULL)
    {
    ch->in_room->map.index[ch->mposy][ch->mposx].occupied = FALSE;
    ch->in_room->map.index[ch->mposy-1][ch->mposx].occupied = TRUE;
    ch->mposy--;
    announce_move(ch,"north");
    }
    else
    printf_to_char(ch,"Somebody's in the way.\n");
    break;
    case DIR_SOUTH:
    if(hdif(ch,DIR_SOUTH) > (ch->jump) || hdif(ch,DIR_SOUTH) < -(ch->jump) || ch->mposy > 14) 
    {
    printf_to_char(ch,"You can't jump that high.\n");
    return;
    }
    if(find_char_xy(ch,ch->mposx,ch->mposy+1) == NULL)
    {
    ch->in_room->map.index[ch->mposy][ch->mposx].occupied = FALSE;
    ch->in_room->map.index[ch->mposy+1][ch->mposx].occupied = TRUE;
    ch->mposy++;
    announce_move(ch,"south");
    }
    else
    printf_to_char(ch,"Somebody's in the way.\n");
    break;
    }

return;
}


    if (door < 0 || door > 5)
    {
        bug ("Do_move: bad door %d.", door);
        return;
    }

    /*
     * Exit trigger, if activated, bail out. Only PCs are triggered.
     */

    in_room = ch->in_room;
    if ((pexit = in_room->exit[door]) == NULL
        || (to_room = pexit->u1.to_room) == NULL
        || !can_see_room (ch, pexit->u1.to_room))
    {
        send_to_char ("Alas, you cannot go that way.\n\r", ch);
        return;
    }

    if (IS_SET (pexit->exit_info, EX_CLOSED)
            || IS_SET (pexit->exit_info, EX_NOPASS))
    {
        act ("The $d is closed.", ch, NULL, pexit->keyword, TO_CHAR);
        return;
    }

    if (!is_room_owner (ch, to_room) && room_is_private (to_room))
    {
        send_to_char ("That room is private right now.\n\r", ch);
        return;
    }

    if ( ch->invis_level < LEVEL_HERO)
        act ("$n leaves $T.", ch, NULL, dir_name[door], TO_ROOM);


    char_from_room (ch);
    char_to_room (ch, to_room);


    if ( ch->invis_level < LEVEL_HERO)
        act ("$n has arrived.", ch, NULL, NULL, TO_ROOM);

    do_function (ch, &do_look, "auto");

    if (in_room == to_room)        /* no circular follows */
        return;

    for (fch = in_room->people; fch != NULL; fch = fch_next)
    {
        fch_next = fch->next_in_room;

        if (fch->master == ch && fch->position == POS_STANDING
            && can_see_room (fch, to_room))
        {

            if (IS_SET (ch->in_room->room_flags, ROOM_LAW)
                && (IS_NPC (fch) && IS_SET (fch->act, ACT_AGGRESSIVE)))
            {
                act ("You can't bring $N into the city.",
                     ch, NULL, fch, TO_CHAR);
                act ("You aren't allowed in the city.",
                     fch, NULL, NULL, TO_CHAR);
                continue;
            }

            act ("You follow $N.", fch, NULL, ch, TO_CHAR);
            move_char (fch, door, TRUE);
        }
    }

    /* 
     * If someone is following the char, these triggers get activated
     * for the followers before the char, but it's safer this way...
     */
   // if(number_range(1,10) > 2)
 //   gen_random_battle(ch);

    return;
}
Beispiel #9
0
void do_hologramtransfer( CHAR_DATA *ch, char *argument)
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];

    if ( IS_NPC(ch) )
	return;

    argument = one_argument (argument, arg);

    if (!IS_CLASS(ch, CLASS_SAMURAI) )
	{
         send_to_char("Huh?\n\r",ch);
	   return;
	}

    if ( arg[0] == '\0' )
    {
	send_to_char( "Walk the ancestrial path to whom?\n\r", ch );
	return;
    }

    if ( ( victim = get_char_world( ch, arg ) ) == NULL )
    {
	send_to_char( "They are not of this world.\n\r", ch );
	return;
    }
    
   if( ch->move < 1000) 
    {
     stc( "The path escapes your senses as you loose control over your inner energies.\n\r",ch);
     return;
    }

 if( IS_SET(victim->in_room->room_flags, ROOM_ASTRAL))
  { 
    stc( "You can't find it's room.\n\r",ch);
    return; 
  } 
    if (IS_SET(victim->act, ACT_NOTRAVEL))
  {
  	send_to_char("No Can Do.\n\r", ch);
  	return;
  }
  if( IS_SET(ch->in_room->room_flags, ROOM_ASTRAL))
  {
    stc( "You cannot sense any paths leading from this room.\n\r",ch);
    return;
  }

    if (ch == victim)
    {
        send_to_char("But you're already at yourself!\n\r",ch);
	  return;
    }
    if ( room_is_private(victim->in_room ) )
    {
        send_to_char( "That room is private right now.\n\r", ch );
        return;
    }
    if ( !IS_NPC(victim) && !IS_IMMUNE(victim, IMM_SUMMON) )
    {	
	send_to_char( "They don't want you near them.\n\r", ch );
        return;
    }
    if (victim->in_room == ch->in_room)
    {
	send_to_char("But you're already there!\n\r",ch);
        return;
    }

    act("You follow the path to $N.", ch, NULL, victim, TO_CHAR);
    act("$n steps into the air, leaving behind no trace whatsoever.", ch, NULL, victim, TO_ROOM);
    char_from_room(ch);
    char_to_room(ch,victim->in_room);
    ch->move -= 1000;
    act("$n steps out of the air in front of $N.", ch, NULL, victim, TO_NOTVICT);
    act("$n steps out of the air in front of you.", ch, NULL, victim, TO_VICT);
    do_look(ch,"auto");
    return;
}
Beispiel #10
0
void do_mptransfer(CHAR_DATA * ch, char *argument)
{
	char arg1[MAX_INPUT_LENGTH];
	char arg2[MAX_INPUT_LENGTH];
	ROOM_INDEX_DATA *location;
	DESCRIPTOR_DATA *d;
	CHAR_DATA *victim;

	if (!IS_NPC(ch)) {
		send_to_char(C_DEFAULT, "Huh?\n\r", ch);
		return;
	}

	if (IS_SET(ch->act, ACT_PET) || IS_AFFECTED(ch, AFF_CHARM))
		return;

	argument = one_argument(argument, arg1);
	argument = one_argument(argument, arg2);

	if (arg1[0] == '\0') {
		sprintf(log_buf,
			"Mptransfer - Bad syntax: vnum %d name %s short %s.",
			ch->pIndexData->vnum, ch->name, ch->short_descr);
		bug(log_buf, -1);
		return;
	}

	if (!str_cmp(arg1, "all")) {
		for (d = descriptor_list; d != NULL; d = d->next) {
			if (d->connected == CON_PLAYING
			    && d->character != ch
			    && d->character->in_room != NULL
			    && can_see(ch, d->character)) {
				char buf[MAX_STRING_LENGTH];
				sprintf(buf, "%s %s", d->character->name, arg2);
				do_transfer(ch, buf);
			}
		}
		return;
	}

	if (!str_cmp(arg1, "room")) {
		for (d = descriptor_list; d != NULL; d = d->next) {
			if (d->connected == CON_PLAYING
			    && d->character != ch
			    && d->character->in_room != NULL
			    && can_see(ch, d->character)
			    && d->character->in_room == ch->in_room) {
				char buf[MAX_STRING_LENGTH];
				sprintf(buf, "%s %s", d->character->name, arg2);
				do_transfer(ch, buf);
			}
		}
		return;
	}

	/*
	 * Thanks to Grodyn for the optional location parameter.
	 */
	if (arg2[0] == '\0') {
		location = ch->in_room;
	} else {
		if ((location = find_location(ch, arg2)) == NULL) {
			sprintf(log_buf,
				"Mptransfer - No such location: vnum %d name %s short %s.",
				ch->pIndexData->vnum, ch->name,
				ch->short_descr);
			bug(log_buf, -1);
			return;
		}

		if (room_is_private(location)) {
			sprintf(log_buf,
				"Mptransfer - Private room: vnum %d name %s short %s.",
				ch->pIndexData->vnum, ch->name,
				ch->short_descr);
			bug(log_buf, -1);
			return;
		}
	}

	if ((victim = get_char_world(ch, arg1)) == NULL) {
		sprintf(log_buf,
			"Mptransfer - No such person: vnum %d name %s short %s.",
			ch->pIndexData->vnum, ch->name, ch->short_descr);
		bug(log_buf, -1);
		return;
	}

	if (victim->in_room == NULL) {
		sprintf(log_buf,
			"Mptransfer - Victim in Limbo: vnum %d name %s short %s.",
			ch->pIndexData->vnum, ch->name, ch->short_descr);
		bug(log_buf, -1);
		return;
	}

	if (victim->in_room == location)
		return;

	if (victim->fighting != NULL)
		stop_fighting(victim, TRUE);

	char_from_room(victim);
	char_to_room(victim, location);

	return;
}