Valhalla Legends Forums Archive | Battle.net Bot Development | 0x17 MCP_CHARLIST Help

AuthorMessageTime
laurion
Hi all, its been awhile  :P

OK, I am using 0x17 to receive my character data. Now, at this time, I don't care about the majority of the statstring data except name and type. I used the data from http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=102 , but I suspect it is outdated.

So, what I do is when I receive the data, I read the STRING containing the name, then continue onto
character type, which is 25 spots later. Like so:


[code]
For i = 0 To intReturned - 1
            szName = Reader.DebuffNTString

            Debug.Print "Character name: " & szName
            Debug.Print "Data before advancing:"
            Debug.Print ToHex(Reader.Debuffer)
            Debug.Print "Advancing 25:"

            Reader.Advance 25
[/code]
Advancing 25 spots brings me to what I'm looking for, the type. Like so:

[code]
Dim nType As Integer
            nType = Reader.DebuffWORD
                Select Case nType
                    Case &H8101
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Non ladder Classic"
                        End With
                    Case &HA101
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Non ladder Expansion"
                        End With
                    Case &H8510
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Non ladder Hardcore"
                        End With
                    Case &HC101
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "D2 Classic Ladder"
                        End With
                    Case &HE101
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Expansion Ladder"
                        End With
                    Case &HA501
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Non ladder Hardcore Expansion"
                        End With
                    Case &HC501
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Classic Hardcore Ladder"
                        End With
                    Case &HE501
                        With frmCharSel.lvChars.ListItems.Add(, , szName)
                            .ListSubItems.Add , , "Hardcore Ladder Expansion"
                        End With
                    Case Else
                        AddText vbRed, "Unknown character type received: 0x" & Hex(nType)
                End Select
                Reader.RemoveNTString
            Next i
[/code]
Now, all that data is from bnetdocs, as previously stated. HOWEVER, it doesn't seem to matchup with what I'm receiving. I parse the names fine, and I advance to the 25th spot, but the WORD I extract doesn't match up with anything.. here is a log.

[I start with the whole packet and break it down]

[pre]
Character name: TazoFrost
Data before advancing:
8480FFFFFFFFFF04FF4FFFFFFF05FFFFFFFFFFFFFFFFFFFFFF01A080FFFFFFFFFF0048696363757073008480FFFFFFFFFFFFFFFFFFFFFF04FFFFFFFFFFFFFFFFFFFFFF5AA89EFFFFFFFFFF0057696C6462657272792D46726F7374008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
01A080FFFFFFFFFF0048696363757073008480FFFFFFFFFFFFFFFFFFFFFF04FFFFFFFFFFFFFFFFFFFFFF5AA89EFFFFFFFFFF0057696C6462657272792D46726F7374008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: Hiccups
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF04FFFFFFFFFFFFFFFFFFFFFF5AA89EFFFFFFFFFF0057696C6462657272792D46726F7374008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
5AA89EFFFFFFFFFF0057696C6462657272792D46726F7374008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: Wildberry-Frost
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
56A89EFFFFFFFFFF00426561647945796573008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: BeadyEyes
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
50A89AFFFFFFFFFF0054617A6F008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: Tazo
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
55A89EFFFFFFFFFF0054617A6F2D506E42008480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: Tazo-PnB
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF03FFFFFFFFFFFFFFFFFFFFFF50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
50A89AFFFFFFFFFF005468727554686557697265008480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00

Character name: ThruTheWire
Data before advancing:
8480FFFFFFFFFFFFFFFFFFFFFF02FFFFFFFFFFFFFFFFFFFFFF55A89EFFFFFFFFFF00
Advancing 25:
55A89EFFFFFFFFFF00

[/pre]
After I "Advance 25", the first 2 bytes are the type. I see the following:
TazoFrost: 0xA001
Hiccups: 0xA85A
Wildberry-Frost: 0xA856

etc..
Am I missing something?
Here is the weirdest part: On an account I just made, I made 1 character, and all the flags matchup fine, it shows Non Ladder Exp like it should. However, on this account, the flags seem to be different -- or am I doing something wrong?/

Thanks.
July 31, 2006, 3:56 PM
laurion
I just made 2 new chars on a different account and the flags match up fine. Did bnet change their flags recently or something?
July 31, 2006, 5:04 PM
UserLoser
[code]
Private Sub RecvCharList2()
    Dim NumberOfCharacterRequested As Long, NumberOfCharacterOnRecord As Long, NumberOfCharactersReturned As Long, _
            ExpirationDate() As Long, Flags() As Long, I As Long
    Dim CharacterName() As String, Statstring() As String
    'Get number of characters requested
    NumberOfCharacterRequested = ParseBuffer.NextWord
    'Get character count
    NumberOfCharacterOnRecord = ParseBuffer.NextDword
    'Get number of characters returned
    NumberOfCharactersReturned = ParseBuffer.NextWord
    'Resize arrays
    ReDim Flags(1 To NumberOfCharacterOnRecord), CharacterName(1 To NumberOfCharacterOnRecord), _
        Statstring(1 To NumberOfCharacterOnRecord), ExpirationDate(1 To NumberOfCharacterOnRecord)
    'Loop through and get character data
    For I = 1 To NumberOfCharacterOnRecord
        ExpirationDate(I) = ParseBuffer.NextDword
        CharacterName(I) = ParseBuffer.NextString
        Flags(I) = ParseBuffer.NextWord
        Statstring(I) = ParseBuffer.NextString
    Next I
    'Throw event
    RaiseEvent OnCharList2(NumberOfCharacterRequested, NumberOfCharacterOnRecord, NumberOfCharactersReturned, ExpirationDate, CharacterName, Flags, Statstring)
End Sub
[/code]
August 1, 2006, 5:00 AM
laurion
Yes, I am parsing it fine, the problem is that the flag values in the statstring are not remaining constant. They seem to change..
August 1, 2006, 11:49 AM

Search