Date: Wed, 18 Sep 2002 20:23:31 -0500
From: Mike Dillon <gsvalore@lordlegacy.org>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
To: Gary <gary.hartzell@verizon.net>
Subject: Re: Programming Help

Gary,

I believe you are correct with the mail codes.  I think mailxx.dat is
actually formatted to the node the player is on.  For example mail1.dat
for node 1, etc.  Note with account # it's just another meaning for
record entry.  So basically all you'd need to do is seek to
account # * sizeof(player_structure) in the file and read the player
entry at that location.  I'm not entirely sure if the account # is 0
based but by all means it should be.  Testing can verify this, basically
compare the name of the retrieved entry to the name of the player that
was given to you in the INFOx.dat file.

I hope this clarifies your most recent questions.

Mike

P.S. If you're using OpenDoors, you might find it a good idea to
     use the most recent CVS of the toolkit which has been recently
     verified (and refixed) to work with non-blocking sockets on win32.
     I know this doesn't help with IGMs much, but it might help in the
     long run should LORD eventually release as a win32 binary in need
     of win32 IGMs.

     Location of the CVS is at cvs.synchro.net (src/odoors)

     If you have a CVS util this line will work:
     cvs -d:pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co
src/odoors

Gary wrote:
>
> Mike,
>
>  >>Should you need more extensive information than what is available in
> the INFO.? and NODE?.DAT files, you can take the account number given
> and open the player.dat file and read the player's structure directly
> from the datafile itself.  When your door is done, you can pass back
> a mailxx.dat file that will change stats (the code are documented
> in lordstrc.pas).  I highly recommend against writing the player.dat
> file from an IGM as this can cause serious problems; or at least the
> potential for some.  I do hope this was a bit helpful to you.>>
>
> Actually, it was helpful; and Gordon L, happen to send me a file named
> LORDSTRC.H, which I see you authored.
>
> The way I'm thinking this would be done if you needed to read in the
> player's record is you read in the player's account number from INFOx.dat
> and then do an array search on players.dat to find a match.  The problem
> with this theory is that there didn't appear to be a variable for the
> player's account number in the structure.  So, I'm wondering how this would
> be done.  I guess a search could be done on player's handle, but that
> wouldn't be as easy.
>
> What I think I have a pretty good grasp on is altering a player's sats.  If
> I understand correctly, you would open/create the MAILx.dat file for that
> player, then put a mail code per line, and LORD handles the rest when the
> player is returned to the game.
>
> So, if an event in an IGM was to give a player 1000 experience and 2
> defense, the mail file would look like this:
>
> `E1000
> `D2
>
> Do I have at least that much right?
>
> Thanks again,
> Gary
>