I'm giving you some browser code that should do the trick. You'll have to do some of the heavy lifting to make it all work, but you should be able to add the stuff you need.
the do_hometown command is untested and you'll need to add a few things to make it work.
Code:
ACMD(do_hometown)
{
if (IS_NPC(ch))
return;
else
{
/*
* You'll have to create this room flag
* See: room_flags in struct.h
*
* You'll need to add this to the room_bits in constant.c also.
*/
if (!ROOM_FLAGGED(IN_ROOM(ch), ROOM_HOMETOWN))
{
send_to_char(ch, "You cannot make this room your hometown!");
return;
}
else
{
send_to_char(ch, "You make %s your hometown!\r\n",world[IN_ROOM(ch)].name);
/*
* You'll have to create the GET_HOMETOWN macro and associated defines.
*
* See: GET_DAMROLL(ch) for an example.
* : int damroll; in structs.h
*
* This should save and load to/from the player file in players.c
*/
GET_HOMETOWN(ch) == IN_ROOM(ch);
return;
}
}
}
the do_recall command works for me and has been edited to include the check for GET_HOMETOWN().
Code:
ACMD(do_recall)
{
if (IS_NPC(ch))
return;
else
{
if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_NORECALL))
{
send_to_char(ch, "You cannot recall from this room!");
return;
}
act("$n disappears.", TRUE, ch, 0, 0, TO_ROOM);
char_from_room(ch);
if (GET_HOMETOWN(ch))
char_to_room(ch, GET_HOMETOWN(ch))
else
char_to_room(ch, r_mortal_start_room);
act("$n appears in the middle of the room.", TRUE, ch, 0, 0, TO_ROOM);
look_at_room(ch, 0);
entry_memory_mtrigger(ch);
greet_mtrigger(ch, -1);
greet_memory_mtrigger(ch);
}
}
Hope this helps.
Salty