Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: Maddox on November 04, 2003, 07:19 PM

Title: Diablo II Character Expiration Discussion
Post by: Maddox on November 04, 2003, 07:19 PM
Diablo II now shows the number of days until a character will expire. Does anyone have information on how this is done?
Title: Re:Character expiration
Post by: MyndFyre on November 04, 2003, 07:35 PM
Have you tried packetlogging it?

I can already anticipate what others will say.  Now, I'm at work right now, and unable to investigate the issue.  However, in the interest of good sense, you might consider looking into packetlogs from v1.09 and at new logs for v1.10.  Notice what is different.

Just out of curiousity (since I haven't noticed this), where does it say how soon a character will expire?

If it's in the chat room (which I think would make no sense), then it is almost certainly with BNCS packet 0x0f.

It seems more likely to me that the feature you're talking about is when choosing which character to log onto the realm with (because logging on with chat would reset a character's time-to-expire).  If that is the case, you might want to look into the realm Server-to-Client packet 17 (MCP_CHARLIST).  This might have changed from what is currently in BnetDocs.

The version 1.09 format provided in BnetDocs is:

(WORD)       Unknown. Always 8.
(DWORD)       Count
(WORD)       // Number of Characters in the list, again?

For each character:
 (STRING)       Name
 (WORD)       Flags
 (STRING)       Modified statstring

Like I said, I'm at work and am not able to investigate it myself.  This might be a good place for you to start, though.

--Rob
Title: Re:Character expiration
Post by: Skywing on November 04, 2003, 08:49 PM
Quote from: Maddox on November 04, 2003, 07:19 PM
Diablo II now shows the number of days until a character will expire. Does anyone have information on how this is done?
Yes.  The number of seconds from midnight, January 1st, 1970 to the character expiration date/time is returned to you in the message if you use the new realm request.
Title: Re:Character expiration
Post by: Maddox on November 05, 2003, 01:55 AM
Quote from: Skywing on November 04, 2003, 08:49 PM
Quote from: Maddox on November 04, 2003, 07:19 PM
Diablo II now shows the number of days until a character will expire. Does anyone have information on how this is done?
Yes.  The number of seconds from midnight, January 1st, 1970 to the character expiration date/time is returned to you in the message if you use the new realm request.

You're right, funny how I didn't notice that.
Title: Re:Character expiration
Post by: Skywing on November 05, 2003, 07:54 AM
Quote from: Maddox on November 05, 2003, 01:55 AM
Quote from: Skywing on November 04, 2003, 08:49 PM
Quote from: Maddox on November 04, 2003, 07:19 PM
Diablo II now shows the number of days until a character will expire. Does anyone have information on how this is done?
Yes.  The number of seconds from midnight, January 1st, 1970 to the character expiration date/time is returned to you in the message if you use the new realm request.

You're right, funny how I didn't notice that.
Also note that as is the standard for C timestamps, this is provided relative to UTC.

You may find this article (http://blogs.gotdotnet.com/raymondc/commentview.aspx/99c54993-5c5e-45b9-95c1-c20a0526ce0b) useful for identifying these types of things.
Title: Re:Character expiration
Post by: Skywing on November 05, 2003, 10:51 AM
Quote from: UserLoser. on November 05, 2003, 10:38 AM
Quote from: Skywing on November 04, 2003, 08:49 PM
Yes.  The number of seconds from midnight, January 1st, 1970 to the character expiration date/time is returned to you in the message if you use the new realm request.

New realm request being? 0x40?
No.  The chat server hasn't provided character information to clients since the early Diablo II beta.
Title: Re:Character expiration
Post by: Maddox on November 05, 2003, 08:31 PM
Quote from: UserLoser. on November 05, 2003, 10:38 AM
Quote from: Skywing on November 04, 2003, 08:49 PM
Yes.  The number of seconds from midnight, January 1st, 1970 to the character expiration date/time is returned to you in the message if you use the new realm request.

New realm request being? 0x40?

The new realm request is MCP 0x19. Since the names for realm packets are unknown, it would probably be best to name it MCP_CHARLIST2. The only change, I think, is the timestamp.