Three things:
1) This code ignores doors. You'll have to add that functionality yourself.
2) This code ignores NPCS.
3) This code uses ch_printf. If you don't have it, or something similar, then you'll have to rewrite those lines.

void do_pull (CHAR_DATA * ch, char *argument)
{
   char arg[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH];
   CHAR_DATA *victim;
   argument = one_argument (argument, arg);
   bool success = FALSE;
   int door;
if (arg[0] == '\0' || argument[0] == '\0')
   {
       send_to_char ("Pull whom to your room?\n\r", ch);
       return;
   }

   if ((victim = get_char_world (ch, arg)) == NULL || (IS_NPC (victim))
   {
       send_to_char ("They aren't here.\n\r", ch);
       return;
   }
for (door = 0; door < 6; door++)
   {
       if ((pExit = ch->in_room->exit[door]) != NULL) &&
                   pExit->to_room == victim->in_room)
{ char_from_room (victim);
           char_to_room (victim, ch->in_room);
           success = TRUE;
} } if (success)
       ch_printf("Pulled %s to your room.\n\r", victim->name);
   else
ch_printf("%s isn't nearby.\n\r", victim->name); }

Reply via email to