Re: [Newbie] quit

From: DJ Pure (
Date: 02/01/97

Interesting One this.

What I did was I did a trace on do_quit. It eventually lead to the
following. It has to save the character before it leaves the game. This is
done in db.c.  Now, there is a line that saves the actual char, and i think
it's save_char (ch), or something like that. Now. This obviously calles the
save_char (..) function. In this it sets somes variables and saves these
variables then writes it to the disk.  One of the lines is this.

    if (load_room == NOWHERE)
      st.player_specials_saved.load_room = NOWHERE;
      st.player_specials_saved.load_room = world[load_room].number;

So what you need to do is add this into ALL the save_char calls in the mud
[do a global find on the string save_char]

save_char(d->character, IN_ROOM(d->character));

The new varaible is now the CURRENT room the player is. If you DON'T want
the player to keep their current room (ie. when they die, etc), then change
the second varaible to NOWHERE, not the room.

This means that the function save_char needs to be changed to something
like this

void save_char(struct char_data * ch, sh_int load_room)

I would say that's all there is (basically).

Try that .. but i cannot promise you that this will 100% work, as i did it
a while back and writing this in my mailer.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST