Battle.net Documentation generated by BNETDocs Redux ======================================================= Notes: ------- A Battle.net server usually listens on TCP/IP port 6112. A BNLS server usually listens on TCP/IP port 9367. A message and its response have the same ID. (The response to BNLS_CDKEY is BNLS_CDKEY, etc) =============================== Begin Generated Documentation =============================== Battle.net Messages ------------------------------ S > C [0x00] SID_NULL ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: [blank] Remarks: Keeps the connection alive. Clients do not need to respond to this message. ~~~~~~~~~~~~~~~~ C > S [0x00] SID_NULL ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III, Format: [blank] Remarks: Keeps the connection alive. This message should be sent to the server every 8 minutes (approximately). ~~~~~~~~~~~~~~~~ C > S [0x02] SID_STOPADV ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: [blank] Remarks: This message is sent to inform the server that a game should no longer be advertised to other users. It is sent when a game starts, or when a game is aborted (the host leaves). All Battle.snp clients (DRTL, DSHR, STAR/SEXP, JSTR, SSHR, and W2BN) always send this message when logging off, even if it not in a game. ~~~~~~~~~~~~~~~~ S > C [0x04] SID_SERVERLIST ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) Server version (STRING) [] Server list Remarks: Client should set the internal Battle.net server list from the contents of this message. This packet is supported by all Battle.snp games and Diablo II and its expansion. ~~~~~~~~~~~~~~~~ S > C [0x05] SID_CLIENTID ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Registration Version (DWORD) Registration Authority (DWORD) Account Number (DWORD) Registration Token Remarks: The following information is historical: This message used to be used to issue new values to the client for the above fields. New values were issued when the values supplied in SID_CLIENTID were found to be invalid. Since these fields are no longer used, the server now sets them to zero. ~~~~~~~~~~~~~~~~ C > S [0x05] SID_CLIENTID ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese Format: (DWORD) Registration Version (DWORD) Registration Authority (DWORD) Account Number (DWORD) Registration Token (STRING) LAN Computer Name (STRING) LAN Username Remarks: This packet was used to ensure that the client's account number was valid. All but the last two fields in this message are now ignored, and may be set to zero. The 'LAN Computer Name' field is the NetBIOS name of the computer. It can be retrieved using the GetComputerName [1] API. The 'Lan Username' field is the name of the currently logged on user, and may be retrieved using the GetUsername [2] API. The following information is historical: The client would supply this data as issued by a Battle.net server. If the Registration Version, Registration Authority, and Client Token values equated to the account number supplied (Client ID), as determined by an unknown formula, the server would respond with the same values. If they were invalid, the server would assign new values. Registration Version was always 1, Authority was the IP address of the server that issued the account number. Thus, the Client Token was the secret value, used to prove that the client really owned the account in question. ~~~~~~~~~~~~~~~~ S > C [0x06] SID_STARTVERSIONING ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (FILETIME) MPQ Filetime (STRING) MPQ Filename (STRING) ValueString Remarks: Contains CheckRevision values. ~~~~~~~~~~~~~~~~ C > S [0x06] SID_STARTVERSIONING ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Platform ID (DWORD) Product ID (DWORD) Version Byte (DWORD) Unknown (0) Remarks: This message is sent to the server to start the process of checking the game files. This message is part of the old logon process for products before Starcraft. ~~~~~~~~~~~~~~~~ S > C [0x07] SID_REPORTVERSION ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Result (STRING) Patch path Remarks: Reports success/failure on challenge. Result: 0: Failed version check 1: Old game version 2: Success 3: Reinstall required ~~~~~~~~~~~~~~~~ C > S [0x07] SID_REPORTVERSION ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Platform ID (DWORD) Product ID (DWORD) Version Byte (DWORD) EXE Version (DWORD) EXE Hash (STRING) EXE Information Remarks: Contains CheckRevision response, version & EXE info. ~~~~~~~~~~~~~~~~ S > C [0x08] SID_STARTADVEX ************************************** Used By: Starcraft Shareware Format: (DWORD) Status Remarks: Status 0x00: Failed 0x01: Success ~~~~~~~~~~~~~~~~ C > S [0x08] SID_STARTADVEX ************************************** Used By: Starcraft Shareware Format: (BOOLEAN) Password protected (32-bit) (DWORD) Unknown (DWORD) Unknown (DWORD) Unknown (DWORD) Unknown (DWORD) Port (STRING) Game name (STRING) Game password (STRING) Game stats - flags, creator, statstring (STRING) Map name - 0x0d terminated Remarks: Creates a game in a manner similar to SID_STARTADVEX2 and SID_STARTADVEX3. This is only used by Starcraft Shareware. ~~~~~~~~~~~~~~~~ S > C [0x09] SID_GETADVLISTEX ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Number of games If count is 0: (DWORD) Status Otherwise, games are listed thus: For each list item: (WORD) Game Type (WORD) Parameter (DWORD) Language ID (WORD) Address Family (Always AF_INET) (WORD) Port (DWORD) Host's IP (DWORD) sin_zero (0) (DWORD) sin_zero (0) (DWORD) Game Status (DWORD) Elapsed time (in seconds) (STRING) Game name (STRING) Game password (STRING) Game statstring Remarks: Returns a list of available games and their information. Varies depending on product. Note that fields from Address Family to sin_zero form a sockaddr_in structure. Valid status codes: 0x00: OK 0x01: Game doesn't exist 0x02: Incorrect password 0x03: Game full 0x04: Game already started 0x06: Too many server requests ~~~~~~~~~~~~~~~~ C > S [0x09] SID_GETADVLISTEX ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (WORD) Product-specific condition 1 (WORD) Product-specific condition 2 (DWORD) Product-specific condition 3 (DWORD) Product-specific condition 4 (DWORD) List count (STRING) Game name (STRING) Game password (STRING) Game stats Remarks: Retrieves a list of games. CONDITION 1: For STAR/SEXP/SSHR/JSTR and W2BN, Condition 1 is used to specify a game type. A value of 0 indicates that any type is acceptable. Possible game types: 0x00: All 0x02: Melee 0x03: Free for all 0x04: one vs one 0x05: CTF 0x06: Greed 0x07: Slaughter 0x08: Sudden Death 0x09: Ladder 0x10: Iron man ladder 0x0A: Use Map Settings 0x0B: Team Melee 0x0C: Team FFA 0x0D: Team CTF 0x0F: Top vs Bottom For DRTL/DSHR, Condition 1 is used to specify a 'level range'. This ensures that clients receive a list of games containing players whose experience is similar to their own. Possible ranges: 0x00: Level 1 0x01: 2 - 3 0x02: 4 - 5 0x03: 6 - 7 0x04: 8 - 9 0x05: 10 - 12 0x06: 13 - 16 0x07: 17 - 19 0x08: 20 - 24 0x09: 25 - 29 0x0A: 30 - 34 0x0B: 35 - 39 0x0C: 40 - 47 0x0D: 48 - 50 For all other games, this can be set to 0x00. CONDITION 2: Unknown. Set to 0x00. CONDITION 3: For STAR/SEXP/SSHR/JSTR, Condition 3 is set to 0x30. For DRTL/DSHR, Condition 3 is set to 0xFFFF by the game, but setting it to 0x00 will disable any viewing limitations, letting you view all games. CONDITION 4: Unknown. Set to 0x00. LIST COUNT: By default, DRTL/DSHR set this to 0x19. This is the number of games to list. For a full listing, it's safe to use 0xFF. ~~~~~~~~~~~~~~~~ S > C [0x0A] SID_ENTERCHAT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (STRING) Unique name (STRING) Statstring (STRING) Account name Remarks: Contains Client product, realm, statstring, and is sent as the response when the client sends SID_ENTERCHAT. Unique name is the users unique name in chat (Which may be Arta, Arta#2, Arta#3, etc). Account name is the users account name (Which in all 3 previous examples would be Arta). ~~~~~~~~~~~~~~~~ C > S [0x0A] SID_ENTERCHAT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (STRING) Username * (STRING) Statstring ** Remarks: Joins Chat. * Null on WAR3/W3XP. ** Null on CDKey Products, except for D2DV and D2XP when on realm characters.. ~~~~~~~~~~~~~~~~ S > C [0x0B] SID_GETCHANNELLIST ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (STRING) [] Channel names, each terminated by a null string. Remarks: Contains a list of available channels. For some reason, Diablo II adds extra data to the channel list (as can be seen in game), and older clients list blocked channels, such as Warez and Backstage. ~~~~~~~~~~~~~~~~ C > S [0x0B] SID_GETCHANNELLIST ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Product ID Remarks: Requests a list of channels that the client is permitted to enter. In the past this packet returned a product list for the specified Product ID, however, the Product ID field is now ignored -- it need not be a valid Product ID, and can be set to zero. The list of channels returned will be for the client's product, as specified during the client's logon. ~~~~~~~~~~~~~~~~ C > S [0x0C] SID_JOINCHANNEL ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Flags (STRING) Channel Remarks: Joins a channel after entering chat. The flags field may contain the following values: 0x00: NoCreate join 0x01: First join 0x02: Forced join 0x05: D2 first join NoCreate Join: This will only join the channel specified if it is not empty, and is used by clients when selecting a channel from the channels menu. If the channel is empty, Battle.net sends a SID_CHATEVENT of type EID_CHANNELDOESNOTEXIST, upon which official clients prompt for confirmation that the user wishes to create the channel, in which case, it resends this packet with Flags set to Forced Join (0x02). First Join: Places user in a channel starting with their product and country, followed by a number, ie 'Brood War GBR-1'. Also automatically sends MOTD after entering the channel. When using this type, the Channel variable has no effect, but must be present anyway to avoid an IP ban. This is sent when first logging onto Battle.net Forced Join: This is sent when leaving a game, and joins the specified channel without an supplying an MOTD. D2 First Join: The same as First join, but is used for D2DV/D2XP clients. ~~~~~~~~~~~~~~~~ C > S [0x0E] SID_CHATCOMMAND ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (STRING) Text Remarks: Send text or a command to Battle.net using this packet. For STAR/SEXP/SSHR/JSTR, Text is UTF-8 encoded (WIDESTRING). It is generally accepted as unwise to send any character below a space (0x20): this includes line feeds, carriage returns & control characters. The maximum number of characters is 223 per message. ~~~~~~~~~~~~~~~~ S > C [0x0F] SID_CHATEVENT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Event ID (DWORD) User's Flags (DWORD) Ping (DWORD) IP Address (Defunct) (DWORD) Account number (Defunct) (DWORD) Registration Authority (Defunct) (STRING) Username (STRING) Text Remarks: Contains all chat events. For STAR/SEXP/SSHR/JSTR, Text is UTF-8 encoded (WIDESTRING). Event IDs: [0x01] EID_SHOWUSER: User in channel [0x02] EID_JOIN: User joined channel [0x03] EID_LEAVE: User left channel [0x04] EID_WHISPER: Recieved whisper [0x05] EID_TALK: Chat text [0x06] EID_BROADCAST: Server broadcast [0x07] EID_CHANNEL: Channel information [0x09] EID_USERFLAGS: Flags update [0x0A] EID_WHISPERSENT: Sent whisper [0x0D] EID_CHANNELFULL: Channel full [0x0E] EID_CHANNELDOESNOTEXIST: Channel doesn't exist [0x0F] EID_CHANNELRESTRICTED: Channel is restricted [0x12] EID_INFO: Information [0x13] EID_ERROR: Error message [0x17] EID_EMOTE: Emote EID_SHOWUSER: This is sent for each user who is already in a channel when you join it, as opposed to EID_JOIN, which is sent when a user joins a channel you have already joined. It is also sent when logged on using D2XP/D2DV and a user requires an update to their statstring - for example, by logging a different character onto a realm. EID_JOIN: This is sent when a user enters the channel you are currently in. EID_LEAVE: This is sent when a user exits the channel you are currently in. EID_WHISPER: This is sent when a user whispers you. EID_TALK: This is sent when a user (excluding self) in chat speaks. EID_BROADCAST: The username supplied for this event is now always 'Battle.net'. Historically, username contained the name of the Battle.net Administrator who sent the broadcast. EID_CHANNEL: The flags field for this event is used and indicates what special conditions exist for the channel in question. See [Battle.net Flags] for more information. EID_USERFLAGS: This is sent to inform the client of an update to one or more user's flags. Battle.net usually sends this event for every user in the channel, even if only one user's flags have changed. This behavior can be exploited to detect invisible users, by performing an action (such as an unsquelch) to provoke a flags update. Users included in the flags update whose presence has not been indicated by EID_JOIN or EID_SHOWUSER can then be added to the userlist as invisible. Care should be taken, however, to account for the possibility that an asynchronous send error has occurred. Should an EID_JOIN or EID_SHOWUSER event occur for an invisible user, they should be marked as a normal user, not readded to the userlist. EID_WHISPERSENT: The Flags and Ping fields in this packet is equal to the originating user - the one who sent the whisper. In other words, EID_WHISPERSENT contains your flags & ping, not those of the person you whispered. EID_CHANNELDOESNOTEXIST: See info on NoCreate Join in SID_JOINCHANNEL. EID_CHANNELRESTRICTED: This is sent when attempting to join a channel which your client is not allowed to join. EID_INFO: This is information supplied by Battle.net. This text is usually displayed by clients in yellow. EID_Error: This is error information supplied by Battle.net. This text is usually displayed by clients in red. EID_Emote: This is sent when any user (including self) uses the emote feature in chat. ~~~~~~~~~~~~~~~~ C > S [0x10] SID_LEAVECHAT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: [blank] Remarks: Leaves chat mode but does not disconnect. Generally sent when entering a game. This is also sent by D2DV/D2XP when switching characters, and by all products when logging off. ~~~~~~~~~~~~~~~~ C > S [0x12] SID_LOCALEINFO ************************************** Used By: Diablo Shareware, Warcraft II, Diablo I Format: (FILETIME) System time (FILETIME) Local time (DWORD) Timezone bias (DWORD) SystemDefaultLCID (DWORD) UserDefaultLCID (DWORD) UserDefaultLangID (STRING) Abbreviated language name (STRING) Country name (STRING) Abbreviated country name (STRING) Country (English) Remarks: Informs the server of the client's locale information. Much of this functionality has been incorporated into SID_AUTH_INFO, and more in-depth remarks can be found there. ~~~~~~~~~~~~~~~~ S > C [0x13] SID_FLOODDETECTED ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: [blank] Remarks: Sent prior to a disconnect along with SID_MESSAGEBOX to indicate that the client has flooded off. ~~~~~~~~~~~~~~~~ C > S [0x14] SID_UDPPINGRESPONSE ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Warcraft II, Starcraft, Starcraft Japanese, Diablo I Format: (DWORD) UDPCode Remarks: Enables UDP support. Server supplies code via UDP packet PKT_SERVERPING (0x05). Usually 'bnet'. Not responding will give you a UDP Plug in chat. ~~~~~~~~~~~~~~~~ S > C [0x15] SID_CHECKAD ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III, World of Warcraft Format: (DWORD) Ad ID (DWORD) File extension (FILETIME) Local file time (STRING) Filename (STRING) Link URL Remarks: Contains information needed to download and display an ad banner. ~~~~~~~~~~~~~~~~ C > S [0x15] SID_CHECKAD ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Platform ID (DWORD) Product ID (DWORD) ID of last displayed banner (DWORD) Current time Remarks: Requests ad banner information from battle.net. ~~~~~~~~~~~~~~~~ C > S [0x16] SID_CLICKAD ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Ad ID (DWORD) Request type Remarks: The clients send this when an ad is clicked. Request Type is 0 if the client used SID_QUERYADURL to get the ad's data, 1 otherwise. ~~~~~~~~~~~~~~~~ S > C [0x18] SID_REGISTRY ************************************** Format: (DWORD) Cookie (DWORD) HKEY (STRING) Registry path (STRING) Registry key Remarks: HKEY is the registry key root.The values are standard: 0x80000000: HKEY_CLASSES_ROOT 0x80000001: HKEY_CURRENT_USER 0x80000002: HKEY_LOCAL_MACHINE 0x80000003: HKEY_USERS 0x80000004: HKEY_PERFORMANCE_DATA 0x80000005: HKEY_CURRENT_CONFIG 0x80000006: HKEY_DYN_DATA ~~~~~~~~~~~~~~~~ C > S [0x18] SID_REGISTRY ************************************** Format: (DWORD) Cookie (STRING) Key Value Remarks: Returns the requested registry value ~~~~~~~~~~~~~~~~ S > C [0x19] SID_MESSAGEBOX ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Style (STRING) Text (STRING) Caption Remarks: Displays a message to the user. This message's fields are used as parameters for the Win32 API MessageBox [3], and can be passed directly to it. For more information about these parameters, see the documentation for MessageBox [4] at MSDN. ~~~~~~~~~~~~~~~~ C > S [0x1A] SID_STARTADVEX2 ************************************** Used By: Diablo Shareware, Diablo I Format: (DWORD) Password Protected (DWORD) Unknown (DWORD) Unknown (DWORD) Unknown (DWORD) Unknown (DWORD) Port (STRING) Game name (STRING) Game password (STRING) Unknown (STRING) Game stats - Flags, Creator, Statstring Remarks: This message is used by Diablo to create a game. ~~~~~~~~~~~~~~~~ C > S [0x1B] SID_GAMEDATAADDRESS ************************************** Used By: Diablo I Format: (SOCKADDR) Address Remarks: Specifies host & port that a game creator is using for a game. ~~~~~~~~~~~~~~~~ S > C [0x1C] SID_STARTADVEX3 ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) Status Remarks: Possible values for Status: 0x00: Ok 0x01: Failed ~~~~~~~~~~~~~~~~ C > S [0x1C] SID_STARTADVEX3 ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) State (DWORD) Time since creation (WORD) Game Type (WORD) Parameter (DWORD) Unknown (1F) (DWORD) Ladder (STRING) Game name (STRING) Game password (STRING) Game Statstring Remarks: Used by clients to inform the server that a game has been created, or that the state of a created game has changed. Bitwise flags for State: 0x01: Game is private 0x02: Game is full 0x04: Game contains players (other than creator) 0x08: Game is in progress Possible values for Game Type: 0x02: Melee 0x03: Free for All 0x04: 1 vs 1 0x09: Ladder 0x0A: Use Map Settings 0x0F: Top vs Bottom 0x10: Iron Man Ladder (W2BN only) Possible values for Ladder: 0x00: Game is NonLadder 0x01: Game is Ladder 0x03: Game is Iron Man Ladder (W2BN only) It could be that the ladder is bitwise as well, and that 0x02 means Iron Man and 0x03 just means Iron Man + Ladder. Parameter appears to be 1 for all games except Top vs Bottom, where it seems to depend on the size of each team. More research will be needed to confirm. ~~~~~~~~~~~~~~~~ S > C [0x1D] SID_LOGONCHALLENGEEX ************************************** Used By: Warcraft II Format: (DWORD) UDP Token (DWORD) Server Token Remarks: Informs the client of the UDP Token and the Server Token. ~~~~~~~~~~~~~~~~ C > S [0x1E] SID_CLIENTID2 ************************************** Used By: Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Server VersionFor server version 1: (DWORD) Registration Version (DWORD) Registration Authority For server version 0: (DWORD) Registration Authority (DWORD) Registration Version (DWORD) Account Number (DWORD) Registration Token (STRING) LAN computer name (STRING) LAN username Remarks: See related link for more information. ~~~~~~~~~~~~~~~~ C > S [0x1F] SID_LEAVEGAME ************************************** Used By: Diablo II, Diablo II LOD Format: [blank] Remarks: Notifies Battle.net that you have left a game. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x21] SID_DISPLAYAD ************************************** Format: (DWORD) Platform ID (DWORD) Product ID (DWORD) Ad ID (STRING) Filename (STRING) URL Remarks: Sent when an ad is displayed. Perhaps for statistics? Null strings are now sent in place of Filename and URL, since the need to truncate long strings to 128 characters was causing inaccuracies. ~~~~~~~~~~~~~~~~ C > S [0x22] SID_NOTIFYJOIN ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) Product ID (DWORD) Product version (STRING) Game Name (STRING) Game Password Remarks: Notifies bnet that Client has joined a game. ~~~~~~~~~~~~~~~~ S > C [0x25] SID_PING ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Ping Value Remarks: Used to calculate Client's ping. The received DWORD should be sent directly back to Battle.net. The ping displayed when in chat can be artificially inflated by delaying before sending this packet, or deflated by responding before requested. Ping can be set to -1 (Strictly speaking, 0xFFFFFFFF, since ping is unsigned) by not responding to this packet at all. ~~~~~~~~~~~~~~~~ C > S [0x25] SID_PING ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Ping Value Remarks: Ping response. Ping Value is the DWORD received in the server's initial ping message. ~~~~~~~~~~~~~~~~ S > C [0x26] SID_READUSERDATA ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) Number of accounts (DWORD) Number of keys (DWORD) Request ID (STRING) [] Requested Key Values Remarks: Contains profile information as requested by the client. ~~~~~~~~~~~~~~~~ C > S [0x26] SID_READUSERDATA ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Number of Accounts (DWORD) Number of Keys (DWORD) Request ID (STRING)[] Requested Accounts (STRING)[] Requested Keys Remarks: Requests an extended profile. Profile Keys: * USER PROFILES: profilesex ** profileage †profilelocation profiledescription ACCOUNT INFO: SystemAccount Created SystemLast Logon SystemLast Logoff SystemTime Logged NORMAL GAMES: recordGAMEwins recordGAMElosses recordGAMEdisconnects recordGAMElast GAME recordGAMElast GAME result LADDER GAMES: recordGAME1wins recordGAME1losses recordGAME1disconnects recordGAME1last game recordGAME1last game result recordGAME1rating recordGAME1high rating DynKeyGAME1rank IRONMAN LADDER GAMES: ‡ recordGAME3wins recordGAME3losses recordGAME3disconnects recordGAME3last game recordGAME3last game result recordGAME3rating recordGAME3high rating DynKeyGAME3rank * This list is not complete, and could use adding to. ** This field is defunct in STAR/SEXP/WAR3/W3XP. †This field is defunct. ‡ W2BN only. ~~~~~~~~~~~~~~~~ C > S [0x27] SID_WRITEUSERDATA ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Number of accounts (DWORD) Number of keys (STRING) [] Accounts to update (STRING) [] Keys to update (STRING) [] New values Remarks: Updates the Client's profile. Currently, the allowed keys for this are Sex, Location, and Description. The maximum length for the values is 512, including the null terminator. See SID_READUSERDATA for more information. ~~~~~~~~~~~~~~~~ S > C [0x28] SID_LOGONCHALLENGE ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Server Token Remarks: Contains server token. ~~~~~~~~~~~~~~~~ S > C [0x29] SID_LOGONRESPONSE ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Result Remarks: Reports success/fail on password authentication. Result: 0x00: Invalid password 0x01: Success ~~~~~~~~~~~~~~~~ C > S [0x29] SID_LOGONRESPONSE ************************************** Used By: Starcraft Shareware, Diablo Shareware, Warcraft II, Starcraft Japanese, Diablo I Format: (DWORD) Client Token (DWORD) Server Token (DWORD) [5] Password Hash (STRING) Username Remarks: Contains Client's username & hashed password. Battle.net password hashes are hashed twice. First, the password is hashed by itsself, then the following data is hashed again and sent to Battle.net: Client Token Server Token First password hash (20 bytes) Passwords should be converted to lower case before hashing. ~~~~~~~~~~~~~~~~ S > C [0x2A] SID_CREATEACCOUNT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) Result Remarks: Results: 0x00: Fail 0x01: Success Reports success/fail on account creation. ~~~~~~~~~~~~~~~~ C > S [0x2A] SID_CREATEACCOUNT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD Format: (DWORD) [5] Hashed password (STRING) Username Remarks: Creates an account. Usernames longer than 15 characters are truncated, and the password is only hashed once (unlike SID_LOGONRESPONSE). This packet is identical to SID_CREATEACCOUNT2, but the response is limited to success/fail. Developers who wish to provide a reason for account creation failure should use SID_CREATEACCOUNT2. Currently, SID_CREATEACCOUNT2 may be used with any product, but the protocol-correct packet to use depends on the product you are emulating. ~~~~~~~~~~~~~~~~ C > S [0x2B] SID_SYSTEMINFO ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Starcraft, Starcraft Japanese, Diablo I Format: (DWORD) Number of processors (DWORD) Processor architecture (DWORD) Processor level (DWORD) Processor timing (DWORD) Total physical memory (DWORD) Total page file (DWORD) Free disk space Remarks: Contains system information. This packet was sent during the connection process for STAR/SEXP/DRTL/DSHR clients prior to version 1.07. It is now only used by JSTR and SSHR. For information on how to emulate this system, please see this topic [5]. ~~~~~~~~~~~~~~~~ C > S [0x2C] SID_GAMERESULT ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Warcraft II, Starcraft, Starcraft Japanese Format: (DWORD) Game type (DWORD) Number of results - always 8 (DWORD) [8] Results (STRING) [8] Game players - always 8 (STRING) Map name (STRING) Player score Remarks: Contains end-of-game statistics. Player Score is a string containing right-aligned lines separated by 0x0A. The positions in the 'Results' array and the 'Players' array are equivalent. Possible values for Game type: 0x00: Normal 0x01: Ladder 0x03: Ironman (W2BN only) Possible values for Result: 0x00: No player 0x01: Win 0x02: Loss 0x03: Draw 0x04: Disconnect ~~~~~~~~~~~~~~~~ S > C [0x2D] SID_GETICONDATA ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Warcraft III Format: (FILETIME) Filetime (STRING) Filename Remarks: Returns filename and filetime of default icons file. ~~~~~~~~~~~~~~~~ C > S [0x2D] SID_GETICONDATA ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Warcraft III Format: [blank] Remarks: Requests the filename developers should use the SID_CHECKDATAFILE2 message. Status: 0x00: Rejected 0x01: Approved 0x02: Ladder approved ~~~~~~~~~~~~~~~~ C > S [0x32] SID_CHECKDATAFILE ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Warcraft II, Starcraft, Starcraft Japanese Format: (DWORD) [5] File checksum (STRING) File name Remarks: This message was used to check a digest of a game file. This message is no longer used; developers should use the SID_CHECKDATAFILE2 message. The digest is created by using the broken SHA-1 hash on the first 64-bytes of the (filesize % 64) times. This due to a bug in the client. ~~~~~~~~~~~~~~~~ S > C [0x33] SID_GETFILETIME ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III, World of Warcraft Format: (DWORD) Request ID (DWORD) Unknown (FILETIME) Last update time (STRING) Filename Remarks: Contains the latest filetime for the requested file. If the file does not exist, the returned filetime is null. ~~~~~~~~~~~~~~~~ C > S [0x33] SID_GETFILETIME ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Diablo Shareware, Diablo II, Warcraft II, Warcraft III: TFT, Starcraft, Starcraft Japanese, Diablo I, Diablo II LOD, Warcraft III Format: (DWORD) Request ID (DWORD) Unknown (STRING) Filename Remarks: This packet seems to request the current filetime for the specified file. Purpose of first 2 DWORDs is unknown, however, both are echoed back to the client by Battle.net and do not seem to affect the reply. Because of this it is reasonable to assume that first DWORD at least is a request ID of some kind. This is called into question, however, by the fact that the replying packet also contains the requested filename. The game (STAR/SEXP) always sends the same number in DWORD 1 for the file in question. DWORD 2 seems to be null. Known codes for DWORD 1: 0x01: tos_usa.txt 0x03: bnserver-WAR3.ini 0x1A: tos_USA.txt 0x1B: bnserver.ini 0x1D: icons_STAR.bni 0x80000005: IX86ExtraWork.mpq 0x80000004: bnserver-D2DV.ini ~~~~~~~~~~~~~~~~ S > C [0x34] SID_QUERYREALMS ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Unknown (DWORD) Count For Each Realm: (DWORD) Unknown (STRING) Realm title (STRING) Realm description Remarks: Realm list. The first Unknown is usually 0. The second [and subsequent] Unknown is usually 1. This packet is no longer used. SID_QUERYREALMS2 is used instead. ~~~~~~~~~~~~~~~~ C > S [0x34] SID_QUERYREALMS ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Unused (0) (DWORD) Unused (0) (STRING) Unknown (empty) Remarks: Requests a realm listing. This packet is no longer used. SID_QUERYREALMS2 is used instead. ~~~~~~~~~~~~~~~~ S > C [0x35] SID_PROFILE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Success (STRING) ProfileDescription value (STRING) ProfileLocation value (DWORD) Clan Tag Remarks: If the status code is 0, the request was successful; otherwise, the lookup failed and the message length will be five bytes long (not counting the four byte header). Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x35] SID_PROFILE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) Username Remarks: This requests a profile for a user. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x36] SID_CDKEY2 ************************************** Used By: Warcraft II Format: (DWORD) Result (STRING) Key owner Remarks: This packet is identical to SID_CDKEY (0x30) Possible values for Result: 0x01: OK 0x02: Invalid key 0x03: Bad product 0x04: Banned 0x05: In use In addition, the Key Owner field has two special values: * 'TOO MANY SPAWNS': Exceeded spawn limit for this CD-Key * 'NO SPAWNING': Spawns are not supported for this CD-Key ~~~~~~~~~~~~~~~~ C > S [0x36] SID_CDKEY2 ************************************** Used By: Warcraft II Format: (DWORD) Spawn (0/1) (DWORD) Key Length (DWORD) CDKey Product (DWORD) CDKey Value1 (DWORD) Server Token (DWORD) Client Token (DWORD) [5] Hashed Data (STRING) Key owner Remarks: This packet is an updated version of SID_CDKEY (0x30), designed to prevent CDKeys from being stolen, by sending them hashed instead of plain-text. The data that should be hashed is: * Client Token * Server Token * Key Product (from decoded CD key) * Key Value1 (from decoded CD key) * Key Value2 (from decoded CD key) ~~~~~~~~~~~~~~~~ S > C [0x3A] SID_LOGONRESPONSE2 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result (STRING) Reason Remarks: Status: 0x00: Success 0x01: Account Does Not Exist 0x02: Invalid Password 0x06: Account Closed The string containing the reason is only present when your account is closed, if not, it should be empty. ~~~~~~~~~~~~~~~~ C > S [0x3A] SID_LOGONRESPONSE2 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Client Token (DWORD) Server Token (DWORD) [5] Password Hash (STRING) Username Remarks: This packet is the same as SID_LOGONRESPONSE, but has additional response codes. ~~~~~~~~~~~~~~~~ S > C [0x3C] SID_CHECKDATAFILE2 ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Warcraft II, Starcraft, Starcraft Japanese Format: (DWORD) Result Remarks: Result of file integrity query. Result: 0x00: Not approved 0x01: Blizzard approved 0x02: Approved for ladder ~~~~~~~~~~~~~~~~ C > S [0x3C] SID_CHECKDATAFILE2 ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Warcraft II, Starcraft, Starcraft Japanese Format: (DWORD) File size in bytes (DWORD) File hash [5] (STRING) Filename Remarks: Verifies that a file is authentic, by producing a hash of that file and sending it to the server for comparison to the original. The hash is produced by hashing 64-byte chunks of the file. Each time after the first, the result of the previous hash is used to initialize for example, "Orc Peon" is 'opeo') (BYTE) Number of ladder records to read; this will be between 0 and 3. For each ladder record: (DWORD) Ladder type; valid types are 'SOLO', 'TEAM', or 'FFA ' (where the last character of 'FFA ' is a space, 0x20). (WORD) Number of wins (WORD) Number of losses (BYTE) Level (BYTE) Hours until XP decay, if applicable* (WORD) Experience (DWORD) Rank (will be 0 if unranked) (BYTE) Number of race records to read; this will be 5 for WAR3 and 6 for W3XP. For each race record: (WORD) Wins (WORD) Losses (BYTE) Number of team records to read. For each team record: (DWORD) Type of team; valid types are '2VS2', '3VS3', and '4VS4'. (WORD) Number of wins (WORD) Number of losses (BYTE) Level (BYTE) Hours until XP decay, if applicable* (WORD) Experience (DWORD) Rank (will be 0 if unranked) (FILETIME) Time of last game played (BYTE) Number of partners (STRING)[] Names of partners For subcommand 0x08 (Clan stats request): (DWORD) Cookie (BYTE) Number of ladder records to read; this will be between 0 and 3. For each ladder record: (DWORD) Ladder type; valid types are 'SOLO', 'TEAM', or 'FFA ' (where the last character of 'FFA ' is a space, 0x20). (WORD) Number of wins (WORD) Number of losses (BYTE) Level (BYTE) Hours until XP decay, if applicable* (WORD) Experience (DWORD) Rank (will be 0 if unranked) (BYTE) Number of race records to read; this will be 5 for WAR3 and 6 for W3XP. For each race record: (WORD) Wins (WORD) Losses For subcommand 0x09 (Icon list request): (DWORD) Cookie (DWORD) Unknown (BYTE) Tiers (BYTE) Count For each Icon: (DWORD) Icon (DWORD) Name (BYTE) Race (WORD) Wins required (BYTE) Unknown Remarks: This message is still being researched! This message is used for multiple purposes on Warcraft III. Known and validated purposes are listed here. * The field "Hours until XP decay" is unconfirmed; however, testing numbers correspond to values expected within the "Days until XP decay" displayed on the live Battle.net ladder website. It is also included but unused (ignored) in the Clan Stats Request command (0x08). ~~~~~~~~~~~~~~~~ C > S [0x44] SID_WARCRAFTGENERAL ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) Subcommand ID For subcommand 0x02 (Request ladder map listing): (DWORD) Cookie (BYTE) Number of types requested (DWORD)[] Request data * For subcommand 0x03 (Cancel ladder game search): [blank] For subcommand 0x04 (User stats request): (DWORD) Cookie (STRING) Account name (DWORD) Product ID For subcommand 0x08 (Clan stats request): (DWORD) Cookie (DWORD) Clan Tag (DWORD) Product ID ('WAR3' or 'W3XP') For subcommand 0x09 (Icon list request): (DWORD) Cookie For subcommand 0x0A (Change icon): (DWORD) Icon Remarks: This packet is used for multiple purposes on Warcraft III. Known and validated purposes are listed here. *Not fully known yet. ~~~~~~~~~~~~~~~~ C > S [0x45] SID_NETGAMEPORT ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (WORD) Port Remarks: Sets the port used by the client for hosting WAR3/W3XP games. This value is retreived from HKCUSoftwareBlizzard EntertainmentWarcraft IIIGameplaynetgameport, and is sent after the user logs on. ~~~~~~~~~~~~~~~~ S > C [0x46] SID_NEWS_INFO ************************************** Used By: Diablo II, Warcraft III: TFT, Diablo II LOD, Warcraft III Format: (BYTE) Number of entries (DWORD) Last logon timestamp (DWORD) Oldest news timestamp (DWORD) Newest news timestamp For each entry:(DWORD) Timestamp (STRING) News Remarks: This packet contains news from battle.net. Timestamps are in C/Unix format, biased for UTC. Multiple separate news messages can be received. These should be treated the same as if one message was sent with several news entries. If the 'Timestamp' field for an entry is zero, then that entry is the message of the day (and not a news entry in the normal respect). ~~~~~~~~~~~~~~~~ C > S [0x46] SID_NEWS_INFO ************************************** Used By: Diablo II, Warcraft III: TFT, Diablo II LOD, Warcraft III Format: (DWORD) News timestamp Remarks: Requests news and MOTD from battle.net. The news timestamp specifies the starting date for the news. To retrieve all available news entries, set this to zero. Timestamps are given in C/Unix format -- that is, the number of seconds since January 1, 1970 0:00:00.000 -- and should be biased to UTC. This message should be sent when you receive SID_ENTERCHAT. The official client stops processing messages after the user joins a game or enters a channel, and discards messages with more than 127 entries. News can be requested for older products, but Battle.net will only return the server's Message-of-the-Day. However, this behavior has not been observed in official clients, and for an accurate protocol emulation, its use is not recommended. ~~~~~~~~~~~~~~~~ S > C [0x4A] SID_OPTIONALWORK ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (STRING) MPQ Filename Remarks: Using SID_GETFILETIME with request ID 0x80000005, the client should download this file and call the ExtraWork function inside of it. Generally, this message is used for the optional ExtraWork DLL. The client will only execute this entirely if the registry key HKCUSoftwareBattle.netOptimizeSysDesc [REG_DWORD] is set to 1. ~~~~~~~~~~~~~~~~ C > S [0x4B] SID_EXTRAWORK ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (WORD) Game type (WORD) Length (STRING) Work returned data Remarks: Response for both SID_OPTIONALWORK and SID_REQUIREDWORK. Game type: 0x01: Diablo II 0x02: Warcraft III 0x03: Starcraft 0x04: World of Warcraft (Reason for this is not known, but most recent libraries have included it) Length:The length is returned from the call to ExtraWork in the ExtraWork DLL. Traditionally, the library responsible for all ExtraWork requests has been IX86ExtraWork.dll. Work returned data:This data is based on a 1024-byte buffer. The call to ExtraWork takes in a structure and returns the length and buffer based on the game type. ~~~~~~~~~~~~~~~~ S > C [0x4C] SID_REQUIREDWORK ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (STRING) ExtraWork MPQ FileName Remarks: Using SID_GETFILETIME with request ID 0x80000006, the client should download the specified MPQ file, extract ExtraWork.dll and call the ExtraWork function inside of it. ~~~~~~~~~~~~~~~~ S > C [0x4E] SID_TOURNAMENT ************************************** Used By: Starcraft Broodwar, Starcraft Format: (BYTE) Unknown (BYTE) Unknown, maybe number of non-null strings sent? (STRING) Description (STRING) Unknown (STRING) Website (DWORD) Unknown (STRING) Name (STRING) Unknown (STRING) Unknown (STRING) Unknown (DWORD[5]) Unknown Remarks: RESEARCH REQUESTED. Sent after a successful logon to an account in a WCG tournament. The 0x0C packet sent with 0x01 flags would automatically have the user join channel WCG planetname #. PACKET LOG FF 4E 58 00 01 03 57 6F 72 6C 64 20 43 79 62 65 72 20 47 61 6D 65 73 20 28 53 61 74 75 72 6E 29 00 00 68 74 74 70 3A 2F 2F 77 77 77 2E 77 63 67 2E 63 6F 6D 00 57 43 47 00 00 00 00 00 80 07 01 00 00 00 00 00 01 01 00 02 02 00 00 00 00 01 05 00 00 00 00 32 00 00 00 ~~~~~~~~~~~~~~~~ S > C [0x50] SID_AUTH_INFO ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (DWORD) Logon Type (DWORD) Server Token (DWORD) UDPValue * (FILETIME) MPQ filetime (STRING) IX86ver filename (STRING) ValueString WAR3/W3XP Only: (VOID) 128-byte Server signature Remarks: Contains the Server Token, and the values used in CheckRevision. Possible Logon Type values:0x00: Broken SHA-1 (STAR/SEXP/D2DV/D2XP) S [0x50] SID_AUTH_INFO ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (DWORD) Protocol ID (0) (DWORD) Platform ID (DWORD) Product ID (DWORD) Version Byte (DWORD) Product language (DWORD) Local IP for NAT compatibility* (DWORD) Time zone bias* (DWORD) Locale ID* (DWORD) Language ID* (STRING) Country abreviation (STRING) Country Remarks: Sends information about the Client to Battle.net. *These fields can be set to zero without breaking logon. Protocol ID:Battle.net's current Protocol ID is 0. Platform ID:A DWORD specifying the client's platform (IX86, PMAC, XMAC, etc). Product ID:A DWORD specifying the client's game. Version:The client's version byte. Product Language:This field is under investigation. It can safely be set to 0. MPQ Locale ID:This field is part of Blizzards multi-lingual MPQ system. Is used to specify which version of an MPQ should be used when the MPQ is available in multiple languages. Local IP:This is the local network IP of the client, in network byte order. Timezone bias:The difference, in minutes, between UTC and local time. The client calculates this value by subtracting the Local Time from the System Time, having converted both to Filetime structures, and then converting the resultant offset to minutes by diving it by 600,000,000. If you wish to understand the mechanism involved, read Microsoft's documentation on File times. Language ID, Country Abbreviation, and Country:These values can be retrieved by querying the system's locale information. Language ID can be retrieved using the GetUserDefaultLangID [6] API. Country Abbreviation & Country can be retrieved using the GetLocaleInfo [7] API to request the LOCALE_SABBREVCTRYNAME and LOCALE_SENGCOUNTRY, respectively. ~~~~~~~~~~~~~~~~ S > C [0x51] SID_AUTH_CHECK ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (DWORD) Result (STRING) Additional Information Remarks: Reports success/failure on version & CD Key check. Result: 0x000: Passed challenge 0x100: Old game version (Additional info field supplies patch MPQ filename) 0x101: Invalid version 0x102: Game version must be downgraded (Additional info field supplies patch MPQ filename) 0x0NN: (where NN is the version code supplied in SID_AUTH_INFO): Invalid version code (note that 0x100 is not set in this case). 0x200: Invalid CD key 0x201: CD key in use (Additional info field supplies name of user) 0x202: Banned key 0x203: Wrong product The last 4 codes also apply to the second CDKey, as indicated by a bitwise combination with 0x010. If a patch file cannot be found, additional info is set to 'non-existent'. If either the executable size/date or the version code is wrong, the server will typically return a failure status. More: While doing a little research on how Battle.net autoupdates it's clients, I found that it (STAR, anyway) does not use the provisions of the SID_AUTH login system to tell clients which update file to download. Instead, it sends a SID_REPORTVERSION (from the previous logon system) containing the equivalent error code and the name of the patch file to download. This seems strange, and makes me think that the part of Battle.net responsible for updating clients is isolated from the part responsible for processing logon requests. If this is the case, it makes sense that that system was never updated, since it must still support legacy clients. In addition, this would explain why most Blizzard clients retain obsolete packet processing code. ~~~~~~~~~~~~~~~~ C > S [0x51] SID_AUTH_CHECK ************************************** Used By: Starcraft Broodwar, Diablo II, Warcraft III: TFT, Starcraft, Diablo II LOD, Warcraft III Format: (DWORD) Client Token (DWORD) EXE Version (DWORD) EXE Hash (DWORD) Number of CD-keys in this packet (BOOLEAN) Spawn CD-key For Each Key:(DWORD) Key Length (DWORD) CD-key's product value (DWORD) CD-key's public value (DWORD) Unknown (0) (DWORD) [5] Hashed Key Data (STRING) Exe Information (STRING) CD-Key owner name Remarks: Contains the EXE Version and Hash as reported by CheckRevision(), and CDKey values. Spawn may only be used for STAR and W2BN. The data that should be hashed for 'Hashed Key Data' is: * Client Token * Server Token * Key Product (from decoded CD key) * Key Public (from decoded CD key) * (DWORD) 0 * Key Private (from decoded CD key) ~~~~~~~~~~~~~~~~ S > C [0x52] SID_AUTH_ACCOUNTCREATE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status Remarks: The message reports the success or failure of an account creation attempt. Status:0x00: Successfully created account name. 0x04: Name already exists. 0x07: Name is too short/blank. 0x08: Name contains an illegal character. 0x09: Name contains an illegal word. 0x0a: Name contains too few alphanumeric characters. 0x0b: Name contains adjacent punctuation characters. 0x0c: Name contains too many punctuation characters. Any other: Name already exists. ~~~~~~~~~~~~~~~~ C > S [0x52] SID_AUTH_ACCOUNTCREATE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) [32] Salt (s) (BYTE) [32] Verifier (v) (STRING) Username Remarks: This message is sent to create an NLS-style account. It contains the client's salt and verifier values, which are saved by the server for use with future logons. See the [NLS/SRP Protocol] page for more information. ~~~~~~~~~~~~~~~~ S > C [0x53] SID_AUTH_ACCOUNTLOGON ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status (BYTE) [32] Salt (s) (BYTE) [32] Server Key (B) Remarks: Reports the success or failure of the logon request. Possible status codes:0x00: Logon accepted, requires proof. 0x01: Account doesn't exist. 0x05: Account requires upgrade. Other: Unknown (failure). See the [NLS/SRP Protocol] document for more information. ~~~~~~~~~~~~~~~~ C > S [0x53] SID_AUTH_ACCOUNTLOGON ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) [32] Client Key ('A') (STRING) Username Remarks: This message is sent to the server to initiate a logon. It consists of the client's public key and their UserName. The client's public key is a value calculated by the client and used for a single logon. For more information, see [NLS/SRP Protocol]. ~~~~~~~~~~~~~~~~ S > C [0x54] SID_AUTH_ACCOUNTLOGONPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status (BYTE) [20] Server Password Proof (M2) (STRING) Additional information Remarks: Status0x00: Logon successful. S [0x54] SID_AUTH_ACCOUNTLOGONPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) [20] Client Password Proof (M1) Remarks: This message is sent to the server after a successful SID_AUTH_ACCOUNTLOGON. It contains the client's password proof. See [NLS/SRP Protocol] for more information. ~~~~~~~~~~~~~~~~ S > C [0x55] SID_AUTH_ACCOUNTCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status (BYTE) [32] Salt (s) (BYTE) [32] Server key (B) Remarks: Reports success or failure on a password change operation. Status Codes:0x00: Change accepted, requires proof. 0x01: Account doesn't exist. 0x05: Account requires upgrade - see SID_AUTH_ACCOUNTUPGRADE Other: Unknown (failure). If an error occurs, the salt and server key values are set to zero. ~~~~~~~~~~~~~~~~ C > S [0x55] SID_AUTH_ACCOUNTCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) [32] Client key (A) (STRING) Username Remarks: This message is used to change the client's password. ~~~~~~~~~~~~~~~~ S > C [0x56] SID_AUTH_ACCOUNTCHANGEPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status code (BYTE) [20] Server password proof for old password (M2) Remarks: This message reports success or failure for a password change operation. Status codes:0x00: Password changed 0x02: Incorrect old password ~~~~~~~~~~~~~~~~ C > S [0x56] SID_AUTH_ACCOUNTCHANGEPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) [20] Old password proof (BYTE) [32] New password's salt (s) (BYTE) [32] New password's verifier (v) Remarks: This message is sent after receiving a successful SID_AUTH_ACCOUNTCHANGE message, and contains the proof for the client's new password. See [NLS/SRP Protocol] for more information. ~~~~~~~~~~~~~~~~ S > C [0x57] SID_AUTH_ACCOUNTUPGRADE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status (DWORD) Server Token Remarks: Status Codes:0x00: Upgrade request accepted. Other: Upgrade request denied. ~~~~~~~~~~~~~~~~ C > S [0x57] SID_AUTH_ACCOUNTUPGRADE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: [blank] Remarks: This message is sent to upgrade an old account to an NLS-style account. It should be sent when SID_AUTH_ACCOUNTLOGON or SID_AUTH_ACCOUNTCHANGE indicates that an account upgrade is required. ~~~~~~~~~~~~~~~~ S > C [0x58] SID_AUTH_ACCOUNTUPGRADEPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Status (DWORD) [5] Password proof Remarks: Status codes:0x00: Password changed 0x02: Incorrect old password ~~~~~~~~~~~~~~~~ C > S [0x58] SID_AUTH_ACCOUNTUPGRADEPROOF ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Client Token (DWORD) [5] Old Password Hash (BYTE) [32] New Password Salt (BYTE) [32] New Password Verifier Remarks: Old Password Hash: Broken SHA-1 Double password hash as seen in SID_LOGONRESPONSE(2) OLS. New Password Salt the client sends two CDKey hashes in SID_AUTH_CHECK and uses 'W3XP' as the Product Id in SID_AUTH_INFO. After a successful SID_AUTH_CHECK, the client then sends this packet with the Product ID set to 'WAR3' to make the switch from expansion to non-expansion. ~~~~~~~~~~~~~~~~ S > C [0x5E] SID_WARDEN ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (VOID) Encrypted Packet Contents of encrypted data (BYTE) Packet Code 0x00 - Warden Module Info (DWORD)[4] MD5 Hash of the current Module (DWORD)[4] Decryption key for Module (DWORD) Length of Module 0x01 - Warden Module Data (WORD) Length of data (without 3-byte header) (VOID) Data 0x02 - Data Checker (BYTE) String Length (Usually 0) (VOID) String Data (BYTE) Check ID MEM_CHECK: (BYTE) String Index (Usually 0) (DWORD) Address (BYTE) Length to Read PAGE_CHECK_A: (DWORD) Unknown (Seed?) (DWORD)[5] SHA1 (DWORD) Address (BYTE) Length to Read (BYTE) IDXor 0x03 - Library Loader (WORD) Length of data (without 7-byte header) (DWORD) Checksum of data (without 7-byte header) (BYTE) Unknown (0x01) (BYTE) Unknown (Usually 0x00) (BYTE) Unknown (Usually 0x01) (STRING) Library Name (DWORD) Funct1 (DWORD) Funct2 (DWORD) Funct3 (DWORD) Funct4 0x05 - Initialization (DWORD)[5] Unknown Remarks: This packet is received after successfully logging onto Battle.net and usually after receiving the first initial chat events. If the client does not respond to this packet, the client gets dropped two minutes later (give or take about 10 seconds). The packet is encrypted via standard RC4 hashing, using one key for outbound data and another for inbound. Its purpose is to download and execute Warden modules. Full information on how to handle this packet may be found at the Rudimentary Warden information [8] topic. Documentation provided by iago and Ringo. ~~~~~~~~~~~~~~~~ C > S [0x5E] SID_WARDEN ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (VOID) Encrypted Packet Contents of encrypted data (BYTE) Packet Code 0x00 - Warden Module Info (BYTE) Success (0x00 = Don't have the module, 0x01 = Have the module) 0x01 - Warden Module Data (BYTE) Success (0x00 = MD5 doesn't match, 0x01 = MD5 matches) 0x02 - Data Checker (WORD) String Length (DWORD) String Checksum (VOID) String Data MEM_CHECK: (BYTE) Success (0x00 = Read data, 0x01 = Unable to read) (VOID) Data (0x00 only) PAGE_CHECK_A: (BYTE) Success (0x00 = SHA1s match, 0x01 = SHA1s don't match) (BYTE) IDXor 0x04 - Initialization (DWORD)[4] Unknown Remarks: The packet is encrypted via standard RC4 hashing, using one key for outbound data and another for inbound. Its purpose is to return executable data and checksum information from various Warden modules. Full information on how to handle this packet may be found at the Rudimentary Warden information [9] topic. Documentation provided by iago and Ringo. ~~~~~~~~~~~~~~~~ S > C [0x60] SID_GAMEPLAYERSEARCH ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) Number of players (STRING) [] Player names Remarks: Returns a list of available players for an arranged team ladder game. Players who are considered available: have no away message on, are mutual friends in the chat environment, or non-friend listed users in the same channel as you. ~~~~~~~~~~~~~~~~ C > S [0x60] SID_GAMEPLAYERSEARCH ************************************** Used By: Warcraft III: TFT, Warcraft III Format: [blank] Remarks: This message requests a list of players for an arranged team game. ~~~~~~~~~~~~~~~~ S > C [0x65] SID_FRIENDSLIST ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (BYTE) Number of Entries For each entry: (STRING) Account (BYTE) Status (BYTE) Location (DWORD) ProductID (STRING) Location name Remarks: This packet contains the current user's Friends List. If the friend is offline, their ProductID is 0. Location is only supplied when it is relevant - for example, if Status is set to offline (0x00), the location string will be empty. Possible bitwise values for Status: 0x01: Mutual 0x02: DND 0x04: Away Possible values for Location: 0x00: Offline 0x01: Not in chat 0x02: In chat 0x03: In a public game 0x04: In a private game, and you are not that person's friend. 0x05: In a private game, and you are that person's friend. Whether you are a particular user's friend causes different behavior when receiving information about the type of game the user is in (this is true when receiving friend updates, too). When the Location field is 0x04, the user is in a password-protected game, and you are not on that user's friends list. When it is 0x05, the user is in a password-protected game, and you are on that user's friends list. For example, let's say MyndFyre is logging on and Arta[vL] is on his friends list. Arta[vL] is also in a password-protected game. MyndFyre is not on Arta[vL]'s friends list. MyndFyre will receive location 0x04 for Arta[vL] and the Channel parameter will be a NULL string. And, if MyndFyre were to type in /f l, Battle.net would respond with SID_CHATEVENT saying "1. Arta[vL] is in a private game." On the other hand, if Arta[vL] had listed MyndFyre as a friend, then on logon, MyndFyre will receive location 0x05 for Arta[vL] and the name of the password-protected game will come through the Channel parameter of the message. If MyndFyre were to type in /f l, Battle.net would respond with "1. Arta[vL] is in the private game vL." ~~~~~~~~~~~~~~~~ C > S [0x65] SID_FRIENDSLIST ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: [blank] Remarks: Requests a friends list. ~~~~~~~~~~~~~~~~ S > C [0x66] SID_FRIENDSUPDATE ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (BYTE) Entry number (BYTE) Friend Location (BYTE) Friend Status (DWORD) ProductID (STRING) Location Remarks: Sent to clients supporting this packet when the friendlisted account's Status changes. The first friend is always entry 0. Note that there is a Battle.net server bug in which when you are automatically sent this packet, the Product ID is your own Product ID instead of your friend's. So if you were to be using WAR3, for example, and a friend signs on using SEXP, the Product ID in this packet will be WAR3. To receive the *correct* Product ID for the user, you may request another update for this user (by sending 0x66 back to the server with the same Entry Number), or request the full list again. In addition, this packet is not sent to you automatically if the friendship is not mutual. ~~~~~~~~~~~~~~~~ C > S [0x66] SID_FRIENDSUPDATE ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (BYTE) Friends list index Remarks: Friends List index is 0-based. (i.e.: friend #1 on friends list would have a value of 0 in this message, friend #2 would have a value of 1). This message requests a check for your friend to see if there are any updates. The server should immediately reply with SID_FRIENDUPDATE. ~~~~~~~~~~~~~~~~ S > C [0x67] SID_FRIENDSADD ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (STRING) Account (BYTE) Friend Type (BYTE) Friend Status (DWORD) ProductID (STRING) Location Remarks: Sent to clients supporting this packet when an account is added to the client's friendlist. New friends are appended to the list. Values and meanings for Friend Type: 0x00: Non-mutual 0x01: Mutual 0x02: Nonmutual, DND 0x03: Mutual, DND 0x04: Nonmutual, Away 0x05: Mutual, Away Value and meanings for Friend Status: 0x00: Offline 0x02: In chat 0x03: In public game 0x05: In private game See SID_FRIENDSLIST for more information. ~~~~~~~~~~~~~~~~ S > C [0x68] SID_FRIENDSREMOVE ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (BYTE) Entry Number Remarks: Sent to clients supporting this packet when an entry is removed from the client's friendlist. Accounts positioned after the specified Entry Number in the friendlist are moved up by one. See SID_FRIENDSLIST for more information. ~~~~~~~~~~~~~~~~ S > C [0x69] SID_FRIENDSPOSITION ************************************** Used By: Starcraft Broodwar, Warcraft III: TFT, Starcraft, Warcraft III Format: (BYTE) Old Position (BYTE) New Position Remarks: Sent to clients supporting this packet when a friend is promoted or demoted the friend's list. See SID_FRIENDSLIST for more information. ~~~~~~~~~~~~~~~~ S > C [0x70] SID_CLANFINDCANDIDATES ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Status (BYTE) Number of potential candidates (STRING) [] Usernames Remarks: Contains the list of potential candidates. Valid Status codes:0x00: Successfully found candidate(s) 0x01: Clan tag already taken 0x08: Already in clan 0x0a: Invalid clan tag specified ~~~~~~~~~~~~~~~~ C > S [0x70] SID_CLANFINDCANDIDATES ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Clan Tag Remarks: This message is sent to the server to check for viable candidates in the channel and friend list, and also to check the availability of the specified clan tag. If 9 or more candidates are found, the official client prompted with a selection of users that he wants to invite to start a clan. ~~~~~~~~~~~~~~~~ S > C [0x71] SID_CLANINVITEMULTIPLE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Result (STRING) [] Failed account names Remarks: Multiple invitation response. Result:0x00: Success (everyone accepted) 0x04: Declined 0x05: Not available (not in channel or already in a clan) Failed account names:A list of accountnames which failed to accept the invitation successfully. On complete success, this is null. ~~~~~~~~~~~~~~~~ C > S [0x71] SID_CLANINVITEMULTIPLE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) Clan name (DWORD) Clan tag (BYTE) Number of users to invite (STRING) [] Usernames to invite Remarks: This message is used to invite the initial 9 required members to a new clan. The users specified in this packet will receive 0x72. ~~~~~~~~~~~~~~~~ S > C [0x72] SID_CLANCREATIONINVITATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Clan Tag (STRING) Clan Name (STRING) Inviter's username (BYTE) Number of users being invited (STRING) [] List of users being invited Remarks: Received when a user is inviting you to create a new clan on Battle.net. ~~~~~~~~~~~~~~~~ C > S [0x72] SID_CLANCREATIONINVITATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Clan tag (STRING) Inviter name (BYTE) Status Remarks: This message is used to reply to an invitation to create a new clan. ~~~~~~~~~~~~~~~~ S > C [0x73] SID_CLANDISBAND ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Result Remarks: Result:0x00: Successfully disbanded the clan 0x02: Cannot quit clan, not one week old yet 0x07: Not authorized to disband the clan ~~~~~~~~~~~~~~~~ C > S [0x73] SID_CLANDISBAND ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie Remarks: Disbands the clan of which the client is a member. You must be a leader to send this packet. ~~~~~~~~~~~~~~~~ S > C [0x74] SID_CLANMAKECHIEFTAIN ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Status Remarks: Notifies the sending client of the success/failure of its request. Status:0x00: Success 0x02: Can't change until clan is a week old 0x04: Declined 0x05: Failed 0x07: Not Authorized 0x08: Not Allowed ~~~~~~~~~~~~~~~~ C > S [0x74] SID_CLANMAKECHIEFTAIN ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) New Cheiftain Remarks: Changes the clan's chieftain. ~~~~~~~~~~~~~~~~ S > C [0x75] SID_CLANINFO ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) Unknown (0) (DWORD) Clan tag (BYTE) Rank Remarks: This message is received when logging on, if you're a member of a clan. It is also sent when you join a clan. Possible values for Rank:0x00: Initiate that has been in the clan for less than one week 0x01: Initiate that has been in the clan for over one week 0x02: Member 0x03: Officer 0x04: Leader ~~~~~~~~~~~~~~~~ S > C [0x76] SID_CLANQUITNOTIFY ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) Status Remarks: The only known status code for this packet is 0x01 (Removed from clan). ~~~~~~~~~~~~~~~~ S > C [0x77] SID_CLANINVITATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Result Remarks: This packet is sent to inform the client of the reply to an invitation. Result:0x00: Invitation accepted 0x04: Invitation declined 0x05: Failed to invite user 0x09: Clan is full ~~~~~~~~~~~~~~~~ C > S [0x77] SID_CLANINVITATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) Target User Remarks: This message is used when a leader or officer invites a user to join their clan. ~~~~~~~~~~~~~~~~ S > C [0x78] SID_CLANREMOVEMEMBER ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Status Remarks: Response when removing a member from your clan. Status constants:0x00: Removed 0x01: Removal failed 0x02: Can not be removed yet 0x07: Not authorized to remove 0x08: Not allowed to remove ~~~~~~~~~~~~~~~~ C > S [0x78] SID_CLANREMOVEMEMBER ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) Username Remarks: Kick a member out of the clan. Only clan leaders and officers may perform this action successfully. Members can only be removed if they've been in the clan for over one week. ~~~~~~~~~~~~~~~~ S > C [0x79] SID_CLANINVITATIONRESPONSE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Clan tag (STRING) Clan name (STRING) Inviter Remarks: This packet is recieved when someone invites you to join a clan. ~~~~~~~~~~~~~~~~ C > S [0x79] SID_CLANINVITATIONRESPONSE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Clan tag (STRING) Inviter (BYTE) Response Remarks: This packet is sent to accept or decline an invitation to a clan. Response: 0x04: Decline 0x06: Accept ~~~~~~~~~~~~~~~~ S > C [0x7A] SID_CLANRANKCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Status Remarks: This message returns the result of the clan rank change request. Result:0x00: Successfully changed rank 0x01: Failed to change rank 0x02: Cannot change user's rank yet 0x07: Not authorized to change user rank * 0x08: Not allowed to change user rank ** * This will be received when you are not a shaman/chieftain and you're trying to change the rank of another user. ** This will be received when you are trying to change rank of someone who is higher than you, i.e. chieftain, or an initiate. ~~~~~~~~~~~~~~~~ C > S [0x7A] SID_CLANRANKCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) Username (BYTE) New rank Remarks: Used by leaders and officers to change the rank of a clan member. New rank:0x01: Initiate that has been in the clan for over one week 0x02: Member 0x03: Officer ~~~~~~~~~~~~~~~~ C > S [0x7B] SID_CLANSETMOTD ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (STRING) MOTD Remarks: Sets your clan's Message of the Day. ~~~~~~~~~~~~~~~~ S > C [0x7C] SID_CLANMOTD ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) Unknown (0) (STRING) MOTD Remarks: This message contains the clan's Message of the Day. ~~~~~~~~~~~~~~~~ C > S [0x7C] SID_CLANMOTD ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie Remarks: Requests the clan's MOTD. ~~~~~~~~~~~~~~~~ S > C [0x7D] SID_CLANMEMBERLIST ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Number of Members For each member:(STRING) Username (BYTE) Rank (BYTE) Online Status (STRING) Location Remarks: Contains the members of a clan. Online Status:0x00: Offline 0x01: Online Rank:0x00: Initiate that has been in the clan for less than one week 0x01: Initiate that has been in the clan for over one week 0x02: Member 0x03: Officer 0x04: Leader Location:Where the user is, i.e., game name, channel name, or this may be null if the user is not online. ~~~~~~~~~~~~~~~~ C > S [0x7D] SID_CLANMEMBERLIST ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie Remarks: Requests a clan memberlist. ~~~~~~~~~~~~~~~~ S > C [0x7E] SID_CLANMEMBERREMOVED ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (STRING) Clan member name Remarks: Notifies the members of a clan that a user has been removed. ~~~~~~~~~~~~~~~~ S > C [0x7F] SID_CLANMEMBERSTATUSCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (STRING) Username (BYTE) Rank (BYTE) Status (STRING) Location Remarks: This message is received when a member changes their status (by going online, offline, being promoted, etc). Username:The name of the member whose status is changing (by going online, offline, being promoted, etc). Rank:0x00: Initiate that has been in the clan for less than one week 0x01: Initiate that has been in the clan for over one week 0x02: Member 0x03: Officer 0x04: Leader Status:0x00: Offline 0x01: Online (not in either channel or game) 0x02: In a channel 0x03: In a public game 0x05: In a private game Location:This field is where the user is, i.e., game name, channel name. ~~~~~~~~~~~~~~~~ S > C [0x81] SID_CLANMEMBERRANKCHANGE ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (BYTE) Old rank (BYTE) New rank (STRING) Clan member who changed your rank Remarks: Received from the server when a user is promoted or demoted. For information about the allowed values for the old and new rank fields, see [Clan Message Codes]. ~~~~~~~~~~~~~~~~ S > C [0x82] SID_CLANMEMBERINFORMATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (BYTE) Status code (STRING) Clan name (BYTE) User's rank (FILETIME) Date joined Remarks: Status code: This message follows the same status codes as listed on the Clan Message Codes page. 0x00 = success 0x0C = user not found in that clan ~~~~~~~~~~~~~~~~ C > S [0x82] SID_CLANMEMBERINFORMATION ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Cookie (DWORD) User's clan tag (STRING) Username Remarks: This packet requests information about a user and their current status within their clan. If the user is in a clan, it'll return what clan they're in, their rank, along with the time they joined it in a FILETIME structure. ~~~~~~~~~~~~~~~~ Battle.net UDP Messages ------------------------------ C > S [0x03] PKT_CLIENTREQ ************************************** Used By: Starcraft Shareware, Starcraft Broodwar, Warcraft II, Starcraft, Starcraft Japanese Format: (DWORD) Code Remarks: This message is used to determine the latency to a game on Battle.net. If code is zero, then the message is a ping request from another client (and this client should respond with a PKT_CLIENTREQ using a non-zero code). Otherwise, the message is a ping response. In previous versions of UDP enabled clients they would use GetTickCount() as the return value (the recieving end would then do math on that value to get the latency). Clients now use 0x01 for the value and do all the math locally, this resolves time zone issues and other stuffs. ~~~~~~~~~~~~~~~~ S > C [0x05] PKT_SERVERPING ************************************** Format: (DWORD) UDP Code Remarks: This packet contains the UDP code to be sent to Battle.net in SID_UDPPINGRESPONSE (0x14). ~~~~~~~~~~~~~~~~ C > S [0x07] PKT_KEEPALIVE ************************************** Format: (DWORD) Tick count Remarks: This packet is used to keep firewalls happy and improve NAT support. It should be sent every 3-5 minutes. ~~~~~~~~~~~~~~~~ C > S [0x08] PKT_CONNTEST ************************************** Used By: Starcraft Broodwar, Warcraft II, Starcraft Format: (DWORD) Server Token Remarks: This packet is sent to establish that the client supports UDP. In particular, when the client is using a non-standard port (e.g. not port 6112), this message is used to tell the server where it should send PKT_CONNTEST messages. This message should be sent in response to SID_LOGONCHALLENGE. ~~~~~~~~~~~~~~~~ C > S [0x09] PKT_CONNTEST2 ************************************** Format: (DWORD) Server Token (DWORD) UDP Token* Remarks: This packet is sent to establish that the client supports UDP. In particular, when the client is using a non-standard port (e.g. not port 6112), this message is used to tell the server where it should send PKT_CONNTEST2 messages. * UDP Value is received from Battle.net in DWORD 3 of SID_AUTH_INFO, or DWORD 1 of SID_LOGONCHALLENGEEX. This message should be sent in response to either SID_LOGONCHALLENGEEX or SID_AUTH_INFO. ~~~~~~~~~~~~~~~~ Realm Messages ------------------------------ S > C [0x01] MCP_STARTUP ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result Remarks: Contains the return value from MCP Startup. Known return values: 0x02, 0x0A-0x0D: Realm Unavailable: No Battle.net connection detected. 0x7E: CDKey banned from realm play. 0x7F: Temporary IP ban "Your connection has been temporarily restricted from this realm. Please try to log in at another time." Else: Success. ~~~~~~~~~~~~~~~~ C > S [0x01] MCP_STARTUP ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) MCP Cookie (DWORD) MCP Status (DWORD) [2] MCP Chunk 1 (DWORD) [12] MCP Chunk 2 (STRING) Battle.net Unique Name Remarks: This packet authenticates the client with the MCP and allows character querying and logon to proceed. All 16 DWORDs (Cookie, Status, Chunk 1, and Chunk 2) are received from the server via SID_LOGONREALMEX. Not much information is known about the DWORD values, other than that they're received from the server. The following information needs work: MCP Cookie: Client Token MCP Status: Unknown MCP Chunk 1 [01]: Server IP (BNCS) MCP Chunk 1 [02]: UDP Value * MCP Chunk 2 [01]: Unknown MCP Chunk 2 [02]: Unknown MCP Chunk 2 [03]: Something to do with the gateway MCP Chunk 2 [04]: Product (D2DV/D2XP) MCP Chunk 2 [05]: Platform (IX86/PMAC/XMAC) MCP Chunk 2 [06]: Unknown MCP Chunk 2 [07]: Language ID (1033 [0x409] for enUS) MCP Chunk 2 [08]: Unknown MCP Chunk 2 [09]: Unknown MCP Chunk 2 [10]: Unknown MCP Chunk 2 [11]: Unknown MCP Chunk 2 [12]: Unknown This is purely speculation, but as there are 5 unknown DWORDs at the end of this chunk, it is possible that it is actually a hash of something. * UDPValue: No one really knows what this is, however, it is used in 2nd DWORD of the UDP packet PKT_CONNTEST2. The client receives it in SID_AUTH_INFO. ~~~~~~~~~~~~~~~~ S > C [0x02] MCP_CHARCREATE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result Remarks: The return value for character creation. Known values: 0x00: Success 0x14: Character already exists, or maximum number of characters (currently 8) reached. 0x15: Invalid name ~~~~~~~~~~~~~~~~ C > S [0x02] MCP_CHARCREATE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Character class (WORD) Character flags (STRING) Character name Remarks: Creates a character on the Realm. Character Classes are the same as in D2 users' Statstrings: 0x00: Amazon 0x01: Sorceress 0x02: Necromancer 0x03: Paladin 0x04: Barbarian 0x05: Druid 0x06: Assassin Flag values should be OR'd together. The only flags that can be set for character creation are classic, hardcore, expansion, and ladder, but the other flags are included here for completeness: 0x00: Classic 0x04: Hardcore 0x08: Dead 0x20: Expansion 0x40: Ladder Sending 0x05 or 0x06 in character class or 0x20 in character flags while on D2DV will disconnect and temporarily ban you from the realm. Likewise, sending 0x05 or 0x06 in character class without setting 0x20 in character flags will result in a disconnect and ban. ~~~~~~~~~~~~~~~~ S > C [0x03] MCP_CREATEGAME ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request Id (WORD) Game token (WORD) Unknown (0) (DWORD) Result Remarks: Result: 0x00: Game creation succeeded. This does NOT automatically join the game - the client must also send packet MCP_JOINGAME. 0x1E: Invalid game name. 0x1F: Game already exists. 0x20: Game servers are down. 0x6E: A dead hardcore character cannot create games. ~~~~~~~~~~~~~~~~ C > S [0x03] MCP_CREATEGAME ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request Id * (DWORD) Difficulty (BYTE) Unknown - 1 (BYTE) Player difference ** (BYTE) Maximum players (STRING) Game name (STRING) Game password (STRING) Game description Remarks: Difficulty: 0x0000: Normal 0x1000: Nightmare 0x2000: Hell * This value starts at 0x02 at first game creation, and increments by 0x02 each consecutive game creation. ** A value of 0xFF indicates that the game is not restricted by character difference. Before sending the game name and password, Diablo II automatically changes their case. For example if the string "aBc DeF" is typed in Diablo II, then the string sent is "Abc Def". This does not apply to the game description. ~~~~~~~~~~~~~~~~ S > C [0x04] MCP_JOINGAME ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request ID (WORD) Game token (WORD) Unknown (0) (DWORD) IP of D2GS Server (DWORD) Game hash (DWORD) Result Remarks: Possible values for result: 0x00: Game joining succeeded. In this case, Diablo 2 terminates the connection with the MCP and initiates the connection with the D2GS. 0x29: Password incorrect. 0x2A: Game does not exist. 0x2B: Game is full. 0x2C: You do not meet the level requirements for this game. 0x6E: A dead hardcore character cannot join a game. 0x71: A non-hardcore character cannot join a game created by a Hardcore character. 0x73: Unable to join a Nightmare game. 0x74: Unable to join a Hell game. 0x78: A non-expansion character cannot join a game created by an Expansion character. 0x79: A Expansion character cannot join a game created by a non-expansion character. 0x7D: A non-ladder character cannot join a game created by a Ladder character. ~~~~~~~~~~~~~~~~ C > S [0x04] MCP_JOINGAME ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request ID (STRING) Game name (STRING) Game Password Remarks: This must be sent after a successful game creation. ~~~~~~~~~~~~~~~~ S > C [0x05] MCP_GAMELIST ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request Id (DWORD) Index (BYTE) Number of players in game (DWORD) Status (STRING) Game name (STRING) Game description Remarks: Instead of receiving a single response that has a list of all the games, the client will receive this packet once for every game listed by the server. Request Id: Like a cookie. This value will be whatever you sent the server in MCP_GAMELIST. Index: The game's index on the server. Number of players in game: Self explanatory. Status: 0x00300004: Game is available to join 0xFFFFFFFF: Server is down ~~~~~~~~~~~~~~~~ C > S [0x05] MCP_GAMELIST ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request ID (DWORD) Unknown (0) (STRING) Search String * Remarks: Requests a game listing. * Normally blank. If a non-empty string is sent, games will be returned that include this string in their names. This is not used by the client, but still exists. ~~~~~~~~~~~~~~~~ S > C [0x06] MCP_GAMEINFO ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request ID (DWORD) Status * (DWORD) Game Uptime (seconds) (WORD) Unknown (BYTE) Maximum players allowed (BYTE) Number of characters in the game (BYTE) [16] Classes of ingame characters ** (BYTE) [16] Levels of ingame characters ** (BYTE) Unused (0) (STRING) [16] Character names ** Remarks: * Usually 0x00300004, but rarely 0. If it is 0, the packet contains no useful information and the server is probably down. ** Internally, there are 16 character slots, but the last 8 are always empty. This value sometimes includes some empty character slots. Then, some empty strings are added to the end of the packet. To determine the number of characters really in the game: CharsInGameReal = CharsInGameFake - AmountOfEmptyCharNames; Byte N here refers to character in slot N, or 0 if the slot is empty. ~~~~~~~~~~~~~~~~ C > S [0x06] MCP_GAMEINFO ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Request ID (STRING) Game name Remarks: Requests information about a game. ~~~~~~~~~~~~~~~~ S > C [0x07] MCP_CHARLOGON ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result Remarks: Logon response. Known values: 0x00: Success 0x46: Player not found 0x7A: Logon failed 0x7B: Character expired ~~~~~~~~~~~~~~~~ C > S [0x07] MCP_CHARLOGON ************************************** Used By: Diablo II, Diablo II LOD Format: (STRING) Character name Remarks: Logs onto the realm. Note that attempting to log on using an expansion character on D2DV will result in an IPBan by both Battle.net and the Realm. ~~~~~~~~~~~~~~~~ S > C [0x0A] MCP_CHARDELETE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result Remarks: Deletion response. Known values: (Diablo II v1.10 or later) 0x00: Success 0x49: Character doesn't exist (Diablo II v1.09 or earlier) 0x00: Character doesn't exist 0x49: Success ~~~~~~~~~~~~~~~~ C > S [0x0A] MCP_CHARDELETE ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Unknown (0) (STRING) Character name Remarks: Deletes a character. ~~~~~~~~~~~~~~~~ S > C [0x11] MCP_REQUESTLADDERDATA ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Ladder type The 10-byte header: (WORD) Total response size (WORD) Current message size (WORD) Total size of unreceived messages (WORD) Rank of first entry (WORD) Unknown (0) Message data: (DWORD)Number of entries (DWORD)Unknown (0x10) For each entry: (QWORD) Character experience (BYTE) Character Flags (BYTE) Character title (WORD) Character level (BYTE) [16] Character name Remarks: Total Response Size: The size of the entire batch of SID_REQUESTLADDERDATA messages, excluding their headers and first bytes. Current Message Size: The size of the current message, excluding its header and first byte. Total size of unreceived messages: The total size of all the unreceived messages in the batch, excluding their headers and first bytes. In the last packet, this value is 0, since there are no unreceived messages. Rank of first entry: Always zero, except in the last message. In the last message, this specifies the zero-based rank of the first entry. (For example if this is 17 in the last packet, then ladder entries 18-33 were retrieved.) Character Flags: 0x00: Amazon 0x01: Sorceress 0x02: Necromancer 0x03: Paladin 0x04: Barbarian 0x05: Druid 0x06: Assassin +0x60 to this field if it's a living hardcore character. +0x70 to this field if it's a dead hardcore character. The character is softcore by default. Character Name: The character name is always 16 bytes. If the name is shorter than 16 bytes, the string is padded with nulls. The last byte is always null, since character names are limited to 15 chars. General Remarks: The server may respond to this packet with one or more of these messages. The client must not handle the data until the last packet in the batch is received. The messages' data should be concatenated backwards. For example, if 3 packets were received, then the data buffer should contain the data of the 3rd packet, followed by the data of the 2nd packet, followed by the data of the 1st packet. Only after the last packet was received, the data buffer should be parsed. IMPORTANT NOTE: If the entry is the last entry in the packet, the character name might be smaller than 16 bytes.In this case, the client MUST add null bytes to the end of the packet, BEFORE adding it to the data buffer. Ladder packets are NOT SENT IN ANY ORDER - They are often sent completely out of order and must be placed back into the proper order. You have to infer the sequencing based on the 'how big' fields in the 10 byte header. ~~~~~~~~~~~~~~~~ C > S [0x11] MCP_REQUESTLADDERDATA ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Ladder type (WORD) Starting position Remarks: This will request 16 ladder entries, starting at a zero-based location specified in 'Starting position'. For example if this is 0, then ladder entries 1-16 are retrieved. If this is 17, then ladder entries 18-33 are retrieved. Note: The values that Diablo 2 sends for this are always perfectly divisible by 16. This might be a requirement. Possible ladder types: 0x00: standard hardcore overall ladder 0x01: standard hardcore amazon ladder 0x02: standard hardcore sorceress ladder 0x03: standard hardcore necromancer ladder 0x04: standard hardcore paladin ladder 0x05: standard hardcore barbarian ladder 0x09: standard softcore overall ladder 0x0A: standard softcore amazon ladder 0x0B: standard softcore sorceress ladder 0x0C: standard softcore necromancer ladder 0x0D: standard softcore paladin ladder 0x0E: standard softcore barbarian ladder 0x13: expansion hardcore overall ladder 0x14: expansion hardcore amazon ladder 0x15: expansion hardcore sorceress ladder 0x16: expansion hardcore necromancer ladder 0x17: expansion hardcore paladin ladder 0x18: expansion hardcore barbarian ladder 0x19: expansion hardcore druid ladder 0x1A: expansion hardcore assassin ladder 0x1B: expansion softcore overall ladder 0x1C: expansion softcore amazon ladder 0x1D: expansion softcore sorceress ladder 0x1E: expansion softcore necromancer ladder 0x1F: expansion softcore paladin ladder 0x20: expansion softcore barbarian ladder 0x21: expansion softcore druid ladder 0x22: expansion softcore assassin ladder ~~~~~~~~~~~~~~~~ S > C [0x12] MCP_MOTD ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Unknown (STRING) MOTD Remarks: Contains the realm's MOTD. The Byte at the beginning is apparently ignored. ~~~~~~~~~~~~~~~~ C > S [0x12] MCP_MOTD ************************************** Used By: Diablo II, Diablo II LOD Format: [blank] Remarks: Requests the realm's MOTD. ~~~~~~~~~~~~~~~~ C > S [0x13] MCP_CANCELGAMECREATE ************************************** Used By: Diablo II, Diablo II LOD Format: [blank] Remarks: Notifies the server that you want to cancel the creation of your game. ~~~~~~~~~~~~~~~~ S > C [0x14] MCP_CREATEQUEUE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Position Remarks: Position in line to create a game. ~~~~~~~~~~~~~~~~ S > C [0x17] MCP_CHARLIST ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Number of characters requested (DWORD) Number of characters that exist on this account (WORD) Number of characters returned For each character: (STRING) Character name (STRING) Character statstring Remarks: Lists characters. The statstrings in this packet do not contain the product or character name. Everything else is the same as a character statstring you would receive from a character entering the channel. ~~~~~~~~~~~~~~~~ C > S [0x17] MCP_CHARLIST ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Number of characters to list Remarks: Requests a character list. ~~~~~~~~~~~~~~~~ S > C [0x18] MCP_CHARUPGRADE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Result Remarks: Converts a non-expansion character to expansion. Known return values: 0x00: Success 0x46: Character not found 0x7A: Upgrade failed 0x7B: Character is expired 0x7C: Already expansion character ~~~~~~~~~~~~~~~~ C > S [0x18] MCP_CHARUPGRADE ************************************** Used By: Diablo II, Diablo II LOD Format: (STRING) Character Name Remarks: Converts a non-expansion character to expansion. ~~~~~~~~~~~~~~~~ S > C [0x19] MCP_CHARLIST2 ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Number of characters requested (DWORD) Number of characters that exist on this account (WORD) Number of characters returned For each character: (DWORD) Expiration Date (STRING) Character name (STRING) Character statstring Remarks: Lists characters. The expiration date is a second count. To determine when the character will expire, add this time to January 1 00:00:00 UTC 1970 and determine the difference between that value and now (all in seconds). The statstrings in this packet do not contain the product or character name. Everything else is the same as a character statstring you would receive from a character entering the channel. ~~~~~~~~~~~~~~~~ C > S [0x19] MCP_CHARLIST2 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Number of characters to list. Remarks: Requests a character list. Up to a maximum of 8 characters can be requested. ~~~~~~~~~~~~~~~~ D2GS Messages ------------------------------ C > S [0x01] D2GS_WALKTOLOCATION ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Walk to a specified (X,Y) map coordinate. ~~~~~~~~~~~~~~~~ C > S [0x02] D2GS_WALKTOENTITY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) *Entity Type (DWORD) Entity ID *Entity Types ------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Makes your character walk to the Entity specified in Entity ID. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x03] D2GS_RUNTOLOCATION ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Run to a specified (X,Y) map coordinate. ~~~~~~~~~~~~~~~~ C > S [0x04] D2GS_RUNTOENTITY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) *Entity Type (DWORD) Entity ID *Entity Types ------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Makes your character run to the Entity specified in Entity ID. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x05] D2GS_LEFTSKILLONLOCATION ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Uses Left skill on specified (X,Y) map coordinate. ~~~~~~~~~~~~~~~~ C > S [0x06] D2GS_LEFTSKILLONENTITY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) *Entity Type (DWORD) Entity ID *Entity Types ------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your left skill on the Entity specefied in Entity ID. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x07] D2GS_LEFTSKILLONENTITYEX ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Remarks: Uses your left skill on the Entity specefied in Entity ID, while holding the hotkey for standing still(shift). Entity types --------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x08] D2GS_LEFTSKILLONLOCATIONEX ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Uses Left skill on specified (X,Y) map coordinate. This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x09] D2GS_LEFTSKILLONENTITYEX2 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) *Entity Type (DWORD) Entity ID *Entity Types ------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your left skill on the Entity specified in Entity ID. This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x0A] D2GS_LEFTSKILLONENTITYEX3 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) *Entity Type (DWORD) Entity ID *Entity Types ------------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your left skill on the Entity specefied in Entity ID, while holding the hotkey for standing still(shift). This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. Refer to the D2GS Entity Types document for more information. ~~~~~~~~~~~~~~~~ C > S [0x0C] D2GS_RIGHTSKILLONLOCATION ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Uses the currently selected skill at the specified location. This packet is sent when the location is first clicked with the mouse. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x0D] D2GS_RIGHTSKILLONENTITY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your right skill on the Entity specefied in Entity ID Refer to the D2GS Entity Types document for more information about Entities ~~~~~~~~~~~~~~~~ C > S [0x0E] D2GS_RIGHTSKILLONENTITYEX ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your right skill on the Entity specefied in Entity ID, while holding the hotkey for standing still(shift). Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x0F] D2GS_RIGHTSKILLONLOCATIONEX ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) X coordinate (WORD) Y coordinate Remarks: Uses the currently selected skill at the specified location. This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x10] D2GS_CHARTOOBJ ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Unknown (DWORD) Player ID (BYTE) Movement Type (BYTE) Destination Type *(DWORD) Object ID *(WORD) X Coordinate *(WORD) Y Coordinate Remarks: A character moves to an object within your view range. * - These are what the player is moving to. Possible values for Destination Type: 0x00 - Another player 0x01 - NPC or Monster 0x02 - Object such as Stash, Waypoint, or a Town Portal 0x04 - Item 0x05 - Doorway Possible value for Movement Type: 0x18 - Run 0x00 - Walk Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x10] D2GS_RIGHTSKILLONENTITYEX2 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your right skill repeatedly on the Entity specefied in Entity ID. This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x11] D2GS_RIGHTSKILLONENTITYEX3 ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity Types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Uses your right skill on the Entity specefied in Entity ID, while holding the hotkey for standing still(shift). This packet is sent repeatedly when the mouse button is held down after the initial packet has been sent. ~~~~~~~~~~~~~~~~ C > S [0x13] D2GS_INTERACTWITHENTITY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Interacts with the specified Entity. For players and npc's, it will send a request to interact. The interaction depends on the type of the unit or object. For others it will trigger the object, for example using a shrine, looting a corpse you have permission to loot, or opening and closing a door. This packet is always followed by other's that relate to the type of interaction. ~~~~~~~~~~~~~~~~ C > S [0x14] D2GS_OVERHEADMESSAGE ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Unknown - 0x00, 0x00 (STRING) Message (BYTE) Unused - 0x00 (WORD) Unknown - 0x00, 0x00 Remarks: This message is used when you'd like to put a message above a character's head as used in the client as "![message]". Restrictions: Total size of packet cannot be greater than 275 bytes. Message cannot be greater than 255 bytes. Please note: This message's official name is not known, and has been invented. Extra Info: The status of this information is: Public Colors can be created by adding hex FF 63 and a character 30 to 3C. Example: To make red, use FF 63 31. ~~~~~~~~~~~~~~~~ C > S [0x15] D2GS_CHATMESSAGE ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Message Type (BYTE) Unknown (STRING) Message (BYTE) Unknown *(WORD) Unknown - Only if normal chat **(STRING) Player to whisper to - Only if whispering **(BYTE) Unknown - Only if whispering Remarks: Sends a chat message in the game. Possible Message Types: 0x01 - Send to all 0x02 - Whisper Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x16] D2GS_PICKUPITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Unit Type (DWORD) Unit ID (DWORD) Action ID Remarks: Pick up a ground item to cursor buffer/inventory. Possible action IDs: 0x00 - Move item to inventory 0x01 - Move item to cursor buffer Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x17] D2GS_DROPITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID Remarks: Drops the item in the player's cursor buffer to the ground. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x18] D2GS_ITEMTOBUFFER ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) X coordinate (DWORD) Y coordinate (DWORD) Buffer Type Possible Buffer Types: 0x00 - Character's inventory (backpack) 0x01 - NPC and other Trade Windows 0x02 - Trade window 0x03 - Horadric Cube 0x04 - Stash Remarks: Moves item from the player's cursor buffer to an inventory space. Please note: This message's official name is not known, and has been invented. Inventory coordinates: (0,0) - Top left (9,3) - Bottom right ~~~~~~~~~~~~~~~~ S > C [0x19] D2GS_SMALLGOLDPICKUP ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Amount Remarks: Sent when you pick up a BYTE (255) of gold(254 or less). Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x19] D2GS_PICKUPBUFFERITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID Remarks: Pickup an item from the possible buffers below, moving it to the cursor buffer. Possible Buffers: 0 - Inventory 1 - NPC Trade & Other player's Trade Window? 2 - Trade Screen 3 - Horadric Cube 4 - Stash Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x1A] D2GS_ITEMTOBODY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) Body Location Remarks: Moves item from player's cursor buffer to body location. Body locations are identified by the line number in the data file bodylocs.txt. Possible Body Locations: 0x01 - Helm 0x02 - Amulet 0x03 - Armor 0x04 - Left-hand weapon 0x05 - Right-hand weapon 0x06 - Left-hand ring 0x07 - Right-hand ring 0x08 - Belt 0x09 - Boots 0x0A - Gloves These values have been recorded for mercenary body locations, but aren't confirmed: (Note, each location ID is prefixed with 0x61) Example: 1A 64 00 00 00 61 02 00 00 (Move item 0x64 to Mercenary Right-hand weapon) 0x01 - Mercenary Helm 0x02 - Mercenary Right-hand Weapon 0x03 - Mercenary Armor 0x04 - Mercenary Left-hand Weapon Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x1B] D2GS_SWAP2HANDEDITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID *(DWORD) Body Location *0x04 is left hand *0x05 is right hand Remarks: Moves item from body location to player's cursor buffer. Body locations are the same as in D2GS_ITEMTOBODY Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x1C] D2GS_PICKUPBODYITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Body Location Remarks: Pickup an item from a Body Location to you're cursor buffer. Possible Body Locations: 0x01 - Helm 0x02 - Amulet 0x03 - Armor 0x04 - Left-hand weapon 0x05 - Right-hand weapon 0x06 - Left-hand ring 0x07 - Right-hand ring 0x08 - Belt 0x09 - Boots 0x0A - Gloves ~~~~~~~~~~~~~~~~ S > C [0x1D] D2GS_SETBYTEATTR ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Attribute (BYTE) Amount Remarks: Sets the current (base) amount of the specified attribute. Note: Since these are only base amounts, items that give increase/decrease the attribute should be added/subtracted to/from the base value sent in the message. Possible Attributes: 0x00 - Strength 0x01 - Energy 0x02 - Dexterity 0x03 - Vitality 0x04 - Stat remaining 0x05 - Skill remaining 0x0C - Level 0x0D - Experience 0x0E - Gold on Person 0x0F - Gold in Stash 0x10 - Defense 0x11 - Max Attack Damage 0x12 - Min Attack Damage 0x13 - Attack Rating 0x15 - Min Attack Damage 0x16 - Max Attack Damage 0x19 - Damage 0x1f - Defense 0x27 - Fire Resistance 0x28 - +Max Fire Resistance 0x29 - Cold Resistance 0x2A - +Max Cold Resistance 0x2B - Lightning Resistance 0x2C - +Max Lightning Resistance 0x2D - Poison Resistance 0x2E - +Max poison Resistance 0x31 - Add Fire Damage 0x33 - Add Lightning damage 0x35 - Add Damage for Weapon/Items probably (one of these may be cold damage) 0x37 - Add Damage for Weapon/Items probably (one of these may be cold damage) 0x3A - Add Poison Damage 0x4C - Add Max Health for Weapon/Items probably 0x4D - Add Max Mana for Weapons/Items probably 0xA2 - Add Max Stamina for Weapons/Items probably 0xA3 - Add Max Stamina for Weapons/Items probably 0xAB - Add to Defense Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x1D] D2GS_SWITCHBODYITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) Body Location Remarks: Swaps item in player's cursor buffer with item in the body location. Possible Body Locations: 0x01 - Helm 0x02 - Amulet 0x03 - Armor 0x04 - Left-hand weapon 0x05 - Right-hand weapon 0x06 - Left-hand ring 0x07 - Right-hand ring 0x08 - Belt 0x09 - Boots 0x0A - Gloves Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x1E] D2GS_SETWORDATTR ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Attribute (WORD) Amount Remarks: Sets the current (base) amount of the specified attribute. Note: Since these are only base amounts, items that give increase/decrease the attribute should be added/subtracted to/from the base value sent in the message. For attributes, see D2GS_SETBYTEATTR. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x1F] D2GS_SETDWORDATTR ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Attribute - D2GS_SETWORDATTR (DWORD) Amount Remarks: Updates an attribute and sets it to the value sent, 4 bytes max. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x1F] D2GS_SWITCHINVENTORYITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID - Item to place in inventory (cursor buffer) (DWORD) Item ID - Item to be replaced (DWORD) X coordinate for replace (DWORD) Y coordinate for replace Remarks: Swaps the item in the player's cursor buffer with one in the player's inventory. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x20] D2GS_USEITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) X coordinate (DWORD) Y coordinate Remarks: Uses the specified item (such as a potion, town portal scroll, etc.). Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x21] D2GS_STACKITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID - Stack item (DWORD) Item ID - Target item Remarks: Stacks one item such as a key onto another item. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x22] D2GS_REMOVESTACKITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID Remarks: Removes an item from the stack Please note: This message's official name is not known, and has been invented. The contents of this packet may be incomplete or incorrect, and your comments and contributions are requested. ~~~~~~~~~~~~~~~~ C > S [0x23] D2GS_ITEMTOBELT ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) Belt Location Remarks: Moves an item into the player's belt. Extra Info: The status of this information is: Public Belt locations start at 0x00 and go from right to left, starting at the lowest row and moving across, then going up one row. For example, location 0x03 would be at the bottom right hand corner and location 0x0C would be at the top left corner in a 4-slot belt. This can be calculated as (row*4+column). Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x24] D2GS_REMOVEBELTITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID Remarks: Moves the specified item from the belt to the player's cursor buffer. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x25] D2GS_SWITCHBELTITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID - Cursor buffer (DWORD) Item ID - Item to be replaced Remarks: Replaces item in belt with item in player's cursor buffer. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x26] D2GS_USEBELTITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) Unknown - Possibly unused (DWORD) Unknown - Possibly unused Remarks: Uses the specified item in the player's belt. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x28] D2GS_INSERTSOCKETITEM ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID - Item to place in socket (DWORD) Item ID - Socketed item Remarks: Inserts the specified item into a socketed item. ~~~~~~~~~~~~~~~~ C > S [0x29] D2GS_SCROLLTOTOME ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID - Scroll (DWORD) Item ID - Tome Remarks: Places a scroll into a tome of scrolls. Note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x2A] D2GS_ITEMTOCUBE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Item ID (DWORD) Cube ID Remarks: Moves item from player's cursor buffer into Horadric cube. ~~~~~~~~~~~~~~~~ C > S [0x2D] D2GS_UNSELECTOBJ ************************************** Used By: Diablo II, Diablo II LOD Format: blank Remarks: Unselects the selected object. Please note: This message's official name is not known, and has been invented. The contents of this packet may be incomplete or incorrect, and your comments and contributions are requested. ~~~~~~~~~~~~~~~~ C > S [0x2F] D2GS_NPCINIT ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) Entity ID Entity types -------- 00 - Players 01 - Monsters, NPCs, and Mercenaries 02 - Stash, Waypoint, Chests, Portals, others. 03 - Missiles 04 - Items 05 - Entrances Remarks: Initiate an NPC sesstion, sent following: C->S 0x13 It indicates that you are now interacting with an NPC, and a dialog window is opened. This is prior to any choices being made to talk or trade etc. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x30] D2GS_NPCCANCEL ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Entity Type (DWORD) NPC ID Remarks: Stops interacting with an NPC Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x32] D2GS_NPCBUY ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) NPC ID - Unconfirmed (DWORD) Item ID - Unconfirmed (DWORD) Buffer Type - Unconfirmed (DWORD) Cost Remarks: Buys an item from a Non Player Character. Possible Buffer Types: 0x00 - Regular (ordinary item) 0x02 - Gambled Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x33] D2GS_NPCSELL ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) NPC ID - Unconfirmed (DWORD) Item ID - Unconfirmed (DWORD) Buffer ID - Unconfirmed - Possible value 0x04 (DWORD) Cost Remarks: Sell an item to a Non Player Character. The Buffer ID refers to the windows in the NPC trade screen, depending on what you are selling the Buffer ID will match the item type. After selling the item it will appear in the given Buffer ID. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x38] D2GS_NPCTRADE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Trade Type - Unconfirmed (DWORD) NPC ID - Unconfirmed (DWORD) Unknown - Unconfirmed - Possible value 0x00 Remarks: This packet's use is currently unconfirmed. Possible Trade Types: 0x01 - Trade 0x02 - Gamble Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x3F] D2GS_CHARACTERPHRASE ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Phrase ID Remarks: All phrases sent to the server will be heard by all players in your vicinity. Phrase IDs: (Note: The deciding of which of the two phrases are used is random) [0x19] "Help!" / "Help me!" [0x1A] "Follow me!" / "Come on!" [0x1B] "This is yours." / "This is for you." [0x1C] "Thanks!" / "Thank you." [0x1D] "Uh, oops." / "Forgive me." [0x1E] "Bye!" / "Good Bye!" [0x1F] "Die!" / "Time to die!" [0x20] "Run!" / "Run away!" Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x49] D2GS_WAYPOINT ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Waypoint ID (BYTE) Unknown - Appears to be random (WORD) Unknown - 0x00 (BYTE) Level number (WORD) Unknown - 0x00 Remarks: Requests to go to a waypoint if it was already activated. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x4F] D2GS_TRADE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Request ID (WORD) Gold Amount Remarks: This message should be used for manipulating the trading window, the Horadric Cube item window, and the Stash window. Possible Request ID's: [0x02] Cancel trade request [0x03] Accept trade request [0x04] Press Accept button (accept) [0x07] Press Accept button (unaccept) - This should be sent when placing items in the trade window as well. [0x08] Refresh window (See below for examples on usage) [0x12] Close stash window [0x13] Move gold (stash to inventory) [0x14] Move gold (inventory to stash) [0x17] Close Horadric Cube window Examples of using Refresh ID: Item has been picked up to mouse cursor buffer. Item has been placed in the trade screen. Accepted or closed a trade window. Manual unclick of Accept button. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x50] D2GS_DROPGOLD ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) PlayerID (DWORD) GoldAmount Remarks: Drops a pile of gold to the ground. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x51] D2GS_WORLDOBJECT ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Object Type - Any information appreciated (DWORD) Object ID (WORD) Object unique code (WORD) X Coordinate (WORD) Y Coordinate (BYTE) State * (BYTE) Interaction Condition Remarks: Server-assigned coordinate, object ID, and state/interaction properties. States: 0x00 - Object's state can be changed. (Confirm?) 0x02 - Object's state cannot be changed with (0x13) interaction. (Confirm?) Interaction Conditions: 0x00 - General object. E.G.: Stash, chests, etc. 0x01 - Refresh shrine 0x02 - Health shrine 0x05 - Chest will catch fire (upon interaction) 0x08 - Monster contained within chest (sarcophagus) 0x0D - Mana recharge shrine 0x0E - Stamina shrine 0x0F - Experience shrine 0x13 - Fire shrine 0x80 - Chest is locked (State will be 0) *If this value is 0, expect no packet 0x0E (status) to follow, if 2, then there will be. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x5C] D2GS_(COMP)STARTGAME ************************************** Used By: Diablo II, Diablo II LOD Format: Blank Remarks: This packet is part of the logon sequence, not to be confused with the other 0x5C. This packet is originally received compressed, so the message ID will correspond with [Protocol Headers] D2GS compressed format. This message is received with the 'OK' that you can go ahead and enter the gaming environment. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x5E] D2GS_PARTY ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Action ID (DWORD) Player ID Remarks: Possible Action IDs: 0x06 - Invite player to party with you 0x07 - Cancel invite to player 0x08 - Accept invite from player 0x09 - Leave party ~~~~~~~~~~~~~~~~ C > S [0x61] D2GS_POTIONTOMERCENARY ************************************** Used By: Diablo II, Diablo II LOD Format: (WORD) Unknown - 0x00 Remarks: Takes the potion your cursor holds and gives it to the mercenary. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x68] D2GS_GAMELOGON ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) D2GS Server Hash (WORD) D2GS Server Token (BYTE) Character ID (DWORD) Version byte (Currently 0x0B) (DWORD) Unknown - Suggested Const (0xED5DCC50) (DWORD) Unknown - Suggested Const (0x91A519B6) (BYTE) Unknown - Suggested (0x00) (STRING) Character name (VOID) *See user-comment below Remarks: Possible Character IDs: 0x00 - Amazon 0x01 - Sorceress 0x02 - Necromancer 0x03 - Paladin 0x04 - Barbarian 0x05 - Druid 0x06 - Assassin The "Character name" field is a buffer of 15 characters with a null-terminator. This string should always be filled with 15 characters (plus terminator), padded with 0's for unused bytes. Note: If the character ID does not match the type of character you're attempting to logon with, and the character is nealy created (with 0 play time), then that character will automatically be changed or "morphed" into the character ID sent. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x6A] D2GS_ENTERGAMEENVIRONMENT ************************************** Used By: Diablo II, Diablo II LOD Format: blank Remarks: This byte should be sent in order to start receiving in-game messages and to interact with the world itself. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ C > S [0x6D] D2GS_PING ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Tick Count (DWORD) Null (DWORD) Null Remarks: This packet should be sent every five to seven seconds to avoid timeout. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x77] D2GS_TRADEACTION ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) Request Type Remarks: A character is trading with you. Possible Request Type values: 0x01 - Player requests trade initiation 0x05 - Player presses 'Accept' 0x06 - 'Accept' button disabled for both players 0x09 - Out of inventory space 0x0C - Player cancels trade 0x0D - You accepted the trade agreement 0x0E - Your 'Accept' button is disabled 0x0F - 'Accept' buttons re-enabled Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x7A] D2GS_LOGONRESPONSE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Unknown - Possible acceptance/request ID Remarks: This message is originally received compressed, so the message ID will correspond with D2GS compressed format. This message is received if your logon is accepted by the D2GS. Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ S > C [0x89] D2GS_UNIQUEEVENTS ************************************** Used By: Diablo II, Diablo II LOD Format: (BYTE) EventId // see below, Events known so far: 00 = Killed all the monsters in the den. 01 = Tristram portal opening for the first time. 03 = Staff being put into the oriface in act2 06 = Ammy being poped in clawviper temple. 07 = Summoner area? death or when the tome is clicked unsure which. 08 = Duriel just died 0b = Meph just died. 0c = The last seal in cs was hit diablo is now released. 0d = Diablo was killed or is dead. Remarks: I'm sure there are many others by looking at the gaps here. Note1: Unsure what to name this any suggestions will be taken into account. Note2: This seems to relate to various events that relate directly or indirectly to key quest states//events. ~~~~~~~~~~~~~~~~ S > C [0xAF] D2GS_STARTLOGON ************************************** Used By: Diablo II, Diablo II LOD Format: blank* Remarks: Permission to initiate Game Server Logon. * - Although this packet is blank, the data received will still be compressed. Meaning the actual message size will be two bytes in length. (See [Sizes & Types]) Please note: This message's official name is not known, and has been invented. ~~~~~~~~~~~~~~~~ W3GS Messages ------------------------------ BotNet Messages ------------------------------ S > C [0x00] PACKET_IDLE ************************************** Format: [blank] Remarks: BotNet sends this to the client when the connection has been idle. No response is needed. ~~~~~~~~~~~~~~~~ C > S [0x00] PACKET_IDLE ************************************** Format: [blank] Remarks: There is no response to this packet. You should send it once every 2-3 minutes. ~~~~~~~~~~~~~~~~ S > C [0x01] PACKET_LOGON ************************************** Format: (DWORD) Result Remarks: Possible values: 0: Failed 1: Succeeded ~~~~~~~~~~~~~~~~ C > S [0x01] PACKET_LOGON ************************************** Format: (STRING) BotID (STRING) Bot Password Remarks: This message is sent in order to identify the client to the Botnet server. In order to get a BotID and password, contact Skywing[vL] by visiting op [vL] on Battle.net (USEast). ~~~~~~~~~~~~~~~~ S > C [0x02] PACKET_STATSUPDATE ************************************** Format: (DWORD) Result Remarks: Possible values: 0: Failed 1: Succeeded ~~~~~~~~~~~~~~~~ C > S [0x02] PACKET_STATSUPDATE ************************************** Format: (STRING) Unique username on Battle.net (STRING) Current channel on Battle.net (DWORD) Battle.net server IP address (STRING) DatabaseID (DWORD) Cycle status (0: Not Cycling, 1: Cycling) Remarks: This should be sent when any of the values in the format change. The DatabaseID field also includes database password - use the format: 'name password'. With the demise of Operators in private channels, Cycling is now defunct. The Username and Channel fields in this packet cannot be blank, and are limited to 16 characters in length, including the null-terminator. There is currently no provision in the protocol to notify Botnet that you are not logged on. The generally accepted standard is to set Server IP to the last Battle.net server you successfully connected to, Channel to '', and Username to the last username the client used to log onto Battle.net. The DatabaseID field may be blank, in which case Botnet places the user in the Public Database. ~~~~~~~~~~~~~~~~ S > C [0x03] PACKET_DATABASE ************************************** Format: (DWORD) command Command 2: (STRING) usermask (STRING) flags Command 3: (STRING) usermask Remarks: Response to C>0x03. Possible values for Command: 2: New access list user/modify existing access list user. 3: Remove a database entry ~~~~~~~~~~~~~~~~ C > S [0x03] PACKET_DATABASE ************************************** Format: (DWORD) Command Commands 1 clients could completely bypass using messages BNLS_AUTHORIZE and BNLS_AUTHORIZEPROOF to log on, and BNLS would validate any client that logged in via these methods. On August 14, 2004, BNLS was again changed so that, while clients can still bypass using messages BNLS_AUTHORIZE and BNLS_AUTHORIZEPROOF to log on, clients that do support these messages will be validated against the bot ID database, which allows those users who still own bot IDs to disable old versions by changing the password on the account. Related Links: [C>0x0E] BNLS_AUTHORIZE, [C>0x0F] BNLS_AUTHORIZEPROOF, [S>0x0E] BNLS_AUTHORIZE ~~~~~~~~~~~~~~~~ S > C [0x0F] BNLS_AUTHORIZEPROOF ************************************** Used By: All Products Format: (DWORD) Status code. Remarks: If the client sent a valid account name, but the password checksum is incorrect, the connection is terminated. Otherwise, this response is sent. The following status codes are defined: 0x00: Authorized 0x01: Unauthorized View consts: [pas cpp vb] Authorized means the login was performed as a registered account. Unauthorized means the bot ID provided was invalid, so an anonymous login was performed instead. This indicates a success condition, and the client is now allowed to send other messages. More status codes may be added in the future. Related Links: [C>0x0F] BNLS_AUTHORIZEPROOF ~~~~~~~~~~~~~~~~ C > S [0x0F] BNLS_AUTHORIZEPROOF ************************************** Used By: Warcraft II Format: (DWORD) Checksum. Remarks: This is sent to the server when receiving the status code in BNLS_AUTHORIZE (0x0E). For more info, see the [BNLS Checksum Algorithm] document. This message is no longer required. See BNLS_AUTHORIZE for more information. Related Links: [S>0x0E] BNLS_AUTHORIZE, [C>0x0E] BNLS_AUTHORIZE, [S>0x0F] BNLS_AUTHORIZEPROOF ~~~~~~~~~~~~~~~~ S > C [0x10] BNLS_REQUESTVERSIONBYTE ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Productif Product is nonzero:(DWORD) Version byte Remarks: On failure, Product is 0. On success, this is equal to the requested Product. If Product is 0, the Version byte DWORD is not included in the message. Possible values for Product: View consts: [pas cpp vb] Related Links: [C>0x10] BNLS_REQUESTVERSIONBYTE ~~~~~~~~~~~~~~~~ C > S [0x10] BNLS_REQUESTVERSIONBYTE ************************************** Used By: Starcraft Shareware, Starcraft Japanese, Starcraft, Starcraft Broodwar, Diablo Shareware, Diablo I, Diablo II, Diablo II LOD, Warcraft II Format: (DWORD) ProductID Remarks: This message requests the latest version byte for a given product. The version byte is sent to Battle.net in SID_AUTH_INFO (0x50). Valid Product IDs are: 0x01: Starcraft 0x02: Starcraft Brood War 0x03: Warcraft II Battle.net Edition 0x04: Diablo II 0x05: Diablo II: Lord of Destruction 0x06: Starcraft Japanese 0x07: Warcraft III 0x08: Warcraft III: The Frozen Throne View consts: [pas cpp vb] Related Links: [C>0x50] SID_AUTH_INFO, [S>0x10] BNLS_REQUESTVERSIONBYTE ~~~~~~~~~~~~~~~~ C > S [0x10] BNLS_REQUESTVERSIONBYTE ************************************** Used By: Starcraft Shareware, Starcraft Japanese, Starcraft, Starcraft Broodwar, Diablo Shareware, Diablo I, Diablo II, Diablo II LOD, Warcraft II Format: (DWORD) ProductID Remarks: This message requests the latest version byte for a given product. The version byte is sent to Battle.net in SID_AUTH_INFO (0x50). Valid Product IDs are: 0x01: Starcraft 0x02: Starcraft Brood War 0x03: Warcraft II Battle.net Edition 0x04: Diablo II 0x05: Diablo II: Lord of Destruction 0x06: Starcraft Japanese 0x07: Warcraft III 0x08: Warcraft III: The Frozen Throne View consts: [pas cpp vb] Related Links: [C>0x50] SID_AUTH_INFO, [S>0x10] BNLS_REQUESTVERSIONBYTE ~~~~~~~~~~~~~~~~ S > C [0x11] BNLS_VERIFYSERVER ************************************** Used By: Diablo II, Diablo II LOD Format: (BOOLEAN) Success. (32-bit) Remarks: If Success is TRUE, the signature matches the server's IP - if FALSE, it does not. Related Links: [C>0x11] BNLS_VERIFYSERVER ~~~~~~~~~~~~~~~~ C > S [0x11] BNLS_VERIFYSERVER ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Server IP (BYTE[128]) Signature Remarks: This message verifies a server's signature, which is based on the server's IP. The signature is optionally (currently sent only with Warcraft 3) sent in SID_AUTH_INFO (0x50). ~~~~~~~~~~~~~~~~ S > C [0x12] BNLS_RESERVESERVERSLOTS ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Number of slots reserved Remarks: This may be equal to the number of slots requested, although it does not necessarily have to be the same value. Valid slot indicies are in the range of [0, Number of slots reserved - 1]. Each slot stores state information about a NLS checking operation. A logon checking session must be finished on the same slot on which it was started. If a logon checking session is abandoned before it is completed, no special action is required. Starting a new logon checking session on a slot overwrites all previous state information. A logon checking session cannot be resumed if the connection to BNLS is interrupted before it is completed. Related Links: [C>0x12] BNLS_RESERVESERVERSLOTS ~~~~~~~~~~~~~~~~ C > S [0x12] BNLS_RESERVESERVERSLOTS ************************************** Used By: Diablo II, Diablo II LOD Format: (DWORD) Number of slots to reserve Remarks: This message reserves a number of slots for concurrent NLS checking operations. No other NLS checking messages can be sent before this message has been sent.This message cannot be sent more than once per connection. BNLS may limit the number of slots to a reasonable value. Related Links: [S>0x12] BNLS_RESERVESERVERSLOTS ~~~~~~~~~~~~~~~~ S > C [0x13] BNLS_SERVERLOGONCHALLENGE ************************************** Used By: Warcraft III, Warcraft III: TFT Format: (DWORD) Slot index.(DWORD[16]) Data for server's SID_AUTH_ACCOUNTLOGON (0x53) response. Remarks: The slot index is returned since individual operations may be returned in a different order than they are requested. This message can also be used to calculate the server's SID_AUTH_ACCOUNTCHANGE (0x55) response. Simply substitute the SID_AUTH_ACCOUNTLOGON (0x53) data with the SID_AUTH_ACCOUNTCHANGE (0x55) data. Related Links: [C>0x13] BNLS_SERVERLOGONCHALLENGE ~~~~~~~~~~~~~~~~ C > S [0x13] BNLS_SERVERLOGONCHALLENGE ************************************** Used By: Starcraft Shareware, Starcraft Japanese, Diablo Shareware, Diablo I, Warcraft II Format: (DWORD) Slot index.(DWORD) NLS revision number.(DWORD[16]) Data from account database.(DWORD[8]) Data client's SID_AUTH_ACCOUNTLOGON (0x53) request. Remarks: This message initializes a new logon checking session and calculates the values needed for the server's reply to SID_AUTH_ACCOUNTLOGON (0x53). BNLS_RESERVESERVERSLOTS(0x12) must be sent before this message to reserve slots for logon checking sessions. Both the slot indicies and the NLS revision number follow their respective conventions covered in this documentation. The account database data is first received from the client's SID_AUTH_ACCOUNTCREATE (0x04) message. This information must be stored by the server's account database for logon checking. If the account database data is invalid, then the logon checking session will not succeed. This message initializes a slot with all the information required for it to operate, including the NLS revision. Although BNLS supports switching the NLS revision of a given slot, it can respond to requests slightly faster if the same NLS revision is used for the same slots in a given connection. Related Links: [S>0x53] SID_AUTH_ACCOUNTLOGON, [C>0x12] BNLS_RESERVESERVERSLOTS, [C>0x52] SID_AUTH_ACCOUNTCREATE, [S>0x13] BNLS_SERVERLOGONCHALLENGE ~~~~~~~~~~~~~~~~ S > C [0x14] BNLS_SERVERLOGONPROOF ************************************** Used By: Diablo II LOD, Diablo II Format: (DWORD) Slot index.(BOOLEAN) Success. (32-bit)(DWORD[5]) Data server's SID_AUTH_ACCOUNTLOGONPROOF (0x54) response. Remarks: After this message is received, the logon checking sequence for a particular logon session is complete. This message can also be used to calculate the server's SID_AUTH_ACCOUNTCHANGEPROOF (0x56) response, and check the client's change password request. Simply substitute the SID_AUTH_ACCOUNTLOGONPROOF (0x54) data with the SID_AUTH_ACCOUNTCHANGEPROOF (0x56) data. If the Success code is TRUE, then the client's logon information was valid. Otherwise, if it is FALSE, the client's logon information was invalid, and the logon request must be denied. Related Links: [S>0x56] SID_AUTH_ACCOUNTCHANGEPROOF, [S>0x54] SID_AUTH_ACCOUNTLOGONPROOF, [C>0x14] BNLS_SERVERLOGONPROOF ~~~~~~~~~~~~~~~~ C > S [0x14] BNLS_SERVERLOGONPROOF ************************************** Used By: All Products Format: (DWORD) Slot index.(DWORD[5]) Data from client's SID_AUTH_ACCOUNTLOGONPROOF (0x54).(STRING) Client's account name. Remarks: This message performs two operations. First, it checks if the client's logon was successful. Second, it calculates the data for the server's reply to SID_AUTH_ACCOUNTLOGONPROOF (0x54). If this data is not correct, then the client will not accept the logon attempt as valid. Related Links: [S>0x54] SID_AUTH_ACCOUNTLOGONPROOF, [S>0x14] BNLS_SERVERLOGONPROOF ~~~~~~~~~~~~~~~~ S > C [0x18] BNLS_VERSIONCHECKEX ************************************** Used By: Diablo II, Diablo II LOD Format: (BOOL) Success*(DWORD) Version.(DWORD) Checksum.(STRING) Version check stat string.(DWORD) Cookie.(DWORD) The latest version code for this product. Remarks: * Success is TRUE if successful, FALSE otherwise. If this is FALSE, the next DWORD is the provided cookie, following which the message ends. Related Links: [C>0x18] BNLS_VERSIONCHECKEX ~~~~~~~~~~~~~~~~ C > S [0x18] BNLS_VERSIONCHECKEX ************************************** Used By: Diablo II LOD, Diablo II Format: (DWORD) Product ID.*(DWORD) Version DLL digit(DWORD) Flags.**(DWORD) Cookie.(STRING) Checksum formula. Remarks: This message will request a fast version check. Now works with all products. Version DLL Digit must be in the range 0-7. (For example, for IX86Ver1.mpq this is 1) * Valid Product IDs are: 0x01: Starcraft 0x02: Starcraft: Broodwar 0x03: Warcraft II: BNE 0x04: Diablo II 0x05: Diablo II: LoD 0x06: Starcraft: Japanese 0x07: Warcraft III 0x08: Warcraft III: The Frozen Throne View consts: [pas cpp vb] ** Currently there are no flags defined, this must be set to zero. Related Links: [S>0x18] BNLS_VERSIONCHECKEX ~~~~~~~~~~~~~~~~ S > C [0x1A] BNLS_VERSIONCHECKEX2 ************************************** Format: (BOOL) Success* (DWORD) Version. (DWORD) Checksum. (STRING) Version check stat string. (DWORD) Cookie. (DWORD) The latest version code for this product. Remarks: * Success is TRUE if successful, FALSE otherwise. If this is FALSE, the next DWORD is the provided cookie, following which the message ends. ~~~~~~~~~~~~~~~~ C > S [0x1A] BNLS_VERSIONCHECKEX2 ************************************** Used By: Warcraft III: TFT, Warcraft III Format: (DWORD) Product ID.* (DWORD) Flags.** (DWORD) Cookie. (ULONGLONG) Timestamp for version check archive. (STRING) Version check archive filename. (STRING) Checksum formula. Remarks: This message will request a fast version check and parses the version check filename so the client does not have to. Now works with all products. * Valid Product IDs are: 0x01: Starcraft 0x02: Starcraft: Broodwar 0x03: Warcraft II: BNE 0x04: Diablo II 0x05: Diablo II: LoD 0x06: Starcraft: Japanese 0x07: Warcraft III 0x08: Warcraft III: The Frozen Throne View consts: [pas cpp vb] ** Currently there are no flags defined, this must be set to zero. ~~~~~~~~~~~~~~~~ =============================== End of Generated Documentation =============================== ======================================================= Battle.net Documentation generated by BNETDocs Redux ======================================================= Links: ------ [1] http://msdn2.microsoft.com/en-us/library/ms724295.aspx [2] http://msdn2.microsoft.com/en-us/library/ms724432.aspx [3] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunctions/messagebox.asp [4] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunctions/messagebox.asp [5] http://forum.valhallalegends.com/index.php?topic=16255.0 [6] http://msdn2.microsoft.com/en-us/library/ms776265.aspx [7] http://msdn2.microsoft.com/en-us/library/ms776270.aspx [8] http://forum.valhallalegends.com/index.php?topic=17356.0 [9] http://forum.valhallalegends.com/index.php?topic=17356.0