From: Wout Mertens <Wout.Mertens@rug.ac.be>
Subject: Home Command

This is a do_home command that is similar to recall, but returns people
to their houses if they have one.  (I made this some time ago, and I
changed some save and load and newbie code, so I don't know if it is
totally working on stock circle, but you can try, right?  Besides, the
house stuff should work ok)

#include "structs.h"
#include "utils.h"     /* And I'm not sure if these are enough */

sh_int get_home(struct char_data *ch)
{
  extern sh_int r_mortal_start_room;
  extern sh_int r_immort_start_room;
  extern sh_int r_frozen_start_room;
  sh_int load_room, i;

  if (PLR_FLAGGED(ch, PLR_FROZEN))
    return r_frozen_start_room;

  if ((load_room = real_room(GET_LOADROOM(ch))) < 0) {
    /* small glitch: if char has non-grouped followers only, he will
       not go to his house */
    if (!(AFF_FLAGGED(ch, AFF_GROUP) && (ch->master || ch->followers))
        && num_of_houses) { /* Not in or in one-member group */
      for (i = 0; i < num_of_houses; i++) {
        if (GET_IDNUM(ch) == house_control[i].owner) {
          return real_room(house_control[i].vnum);
        }
      }
    }
    if (GET_LEVEL(ch) >= LVL_IMMORT)
      return r_immort_start_room;
    else
      return r_mortal_start_room;
  } else
    return load_room;
}

Gekke Eekhoorn of BUG.
