I want to make a bot that joins Diablo II games.
Does warden apply to D2 in-game?
Is the data on the bnetdocs cache accurate/up-to-date?
What is the sequence for joining/creating a game? How do I get the IP of MCP?
Is this difficult?
Clicky (http://forum.valhallalegends.com/index.php?topic=11756.0)
And yeah, warden is in D2 game servers to.
Hope this helps
Looks useful, but all the links are broken.
Depends if you mean realm or open Battle.net. I rather doubt that Warden applies on open Battle.net, since there's no actual link to Battle.net servers.
Quote from: iago on June 09, 2007, 01:40 PM
Depends if you mean realm or open Battle.net. I rather doubt that Warden applies on open Battle.net, since there's no actual link to Battle.net servers.
Not only that but all the hacked characters that are on open, if there were much of the d2 players would be canned.
So, could someone answer the following again?
Do we have sufficient documentation for warden?
What is the sequence for joining/creating a game? How do I get the IP of MCP?
Is this difficult?
What if I only wanted to make a bot that listed games (no D2GS involvement)?
Quote from: raylu on June 11, 2007, 08:52 AM
So, could someone answer the following again?
Do we have sufficient documentation for warden?
What is the sequence for joining/creating a game? How do I get the IP of MCP?
Is this difficult?
What if I only wanted to make a bot that listed games (no D2GS involvement)?
no sufficient public documentation for warden. (not sure about private)
look into packet SID_LOGONREALMEX (0x3E), that's where the MCP IP can be retreived.
no it's not difficult, just implement the protocol correctly.
warden for d2 is only enabled on the game servers, so you don't have to worry about it while in the chat room.
[09:45:59]Attempting to connect...
[09:45:59]BNET: Connecting (213.248.106.204)...
[09:45:59]BNET: Connected!
[09:45:59][Bot] Using hardcoded VerByte (0xB)
[09:45:59]
0000: FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 32 44 ÿP:.....68XIPX2D
0010: 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
0020: 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69 74 ........USA.Unit
0030: 65 64 20 53 74 61 74 65 73 00 ed States.......
[09:45:59]0000: FF 25 08 00 00 00 00 00 ÿ%.............
[09:45:59]0000: FF 25 08 00 C1 01 E2 EE ÿ%.âî........
[09:45:59]
0000: FF 50 68 00 00 00 00 00 B1 AF 31 21 33 00 AA 00 ÿPh.....±¯1!3.ª.
0010: 00 20 58 7D 99 CB C6 01 76 65 72 2D 49 58 38 36 . X}™ËÆver-IX86
0020: 2D 31 2E 6D 70 71 00 43 3D 31 30 33 32 36 38 39 -1.mpq.C=1032689
0030: 30 36 31 20 41 3D 31 32 35 38 31 37 35 32 34 39 061 A=1258175249
0040: 20 42 3D 34 30 38 34 31 37 30 30 32 38 20 34 20 B=4084170028 4
0050: 41 3D 41 2B 53 20 42 3D 42 2D 43 20 43 3D 43 2B A=A+S B=B-C C=C+
0060: 41 20 41 3D 41 2B 42 00 A A=A+B.........
[09:45:59]
0000: FF 51 92 00 24 C2 3F 00 00 0B 00 01 EF 07 AC C6 ÿQ'.$Â?...ï¬Æ
0010: 02 00 00 00 00 00 00 00 10 00 00 00 06 00 00 00 .............
0020: C9 58 A7 00 00 00 00 00 C9 52 B9 59 B6 30 E6 74 ÉX§.....ÉR¹Y¶0æt
0030: 87 E3 10 3C 2C 08 BF 95 1B 4F 2B F9 10 00 00 00 ‡ã<,¿•O+ù...
0040: 0A 00 00 00 F4 B2 69 00 00 00 00 00 20 2D C1 11 ....ô²i..... -
0050: AF 86 9D 46 76 AE 32 8A FC 2B 4D 81 51 17 CC 61 ¯†?Fv®2Šü+M?QÌa
0060: 47 61 6D 65 2E 65 78 65 20 30 33 2F 31 39 2F 30 Game.exe 03/19/0
0070: 37 20 30 37 3A 32 32 3A 34 37 20 32 31 32 39 39 7 07:22:47 21299
0080: 32 30 00 46 4F 20 50 2E 41 2E 57 2D 52 61 79 4C 20.FO P.A.W-RayL
0090: 75 00 u...............
[09:46:00]
0000: FF 51 09 00 00 00 00 00 00 ÿQ..............
[09:46:00]BNET: Version and CD-key check passed! (0x51)
[09:46:00]0000: FF 14 08 00 74 65 6E 62 ÿ.tenb........
[09:46:00]
0000: FF 3A 2C 00 24 C2 3F 00 B1 AF 31 21 5F FF 3F C0 ÿ:,.$Â?.±¯1!_ÿ?À
0010: E3 0A CA B7 74 A7 09 F0 EE 3E 40 FB CF C2 DD 07 ã.Ê·t§.ðî>@ûÏÂÝ
0020: 50 2E 41 2E 57 2D 52 61 79 4C 75 00 P.A.W-RayLu.....
[09:46:00]0000: FF 4C 16 00 49 58 38 36 4D 69 6E 64 53 69 67 68 ÿL.IX86MindSigh
0010: 74 2E 6D 70 71 00 t.mpq...........
[09:46:00]0000: FF 3A 08 00 00 00 00 00 ÿ:.............
[09:46:00]BNET: (0x3A-0x00) Login passed!
[09:46:00]0000: FF 40 04 00 ÿ@.............
[09:46:00]
0000: FF 40 28 00 00 00 00 00 01 00 00 00 01 00 00 00 ÿ@(...........
0010: 45 75 72 6F 70 65 00 52 65 61 6C 6D 20 66 6F 72 Europe.Realm for
0020: 20 45 75 72 6F 70 65 00 Europe.........
[09:46:00]Found realm Europe,
0000: FF 3E 23 00 00 00 00 00 3E 76 A6 77 4D 0D 84 1F ÿ>#.....>v¦wM.,,
0010: 84 0E 89 6A 95 A2 50 C3 C6 98 19 BE 45 75 72 6F ,,‰j•¢PÃÆ˜¾Euro
0020: 70 65 00 pe..............
[09:46:00]Logging in...
[09:46:00]0000: FF 3E 0C 00 00 00 00 00 02 00 00 80 ÿ>.......€....
Help :(
with..?
Quote[09:46:00]0000: FF 3E 0C 00 00 00 00 00 02 00 00 80 ÿ>.......€....
means that my login failed.
I suspect (and I could be wrong) that the issue is that your login failed.
Quote from: iago on June 15, 2007, 11:11 AM
I suspect (and I could be wrong) that the issue is that your login failed.
ROFL.
Raylu, please label S->C and vice versa. Specifically, C->S for the realm login packet.
I considered labeling it but I assumed they were self-explanatory...
C->S
0000: FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 32 44 ÿP:.....68XIPX2D
0010: 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
0020: 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69 74 ........USA.Unit
0030: 65 64 20 53 74 61 74 65 73 00 ed States.......
C->S (spoofing ping)
0000: FF 25 08 00 00 00 00 00 ÿ%.............
S->C
0000: FF 25 08 00 C1 01 E2 EE ÿ%.âî........
S->C
0000: FF 50 68 00 00 00 00 00 B1 AF 31 21 33 00 AA 00 ÿPh.....±¯1!3.ª.
0010: 00 20 58 7D 99 CB C6 01 76 65 72 2D 49 58 38 36 . X}™ËÆver-IX86
0020: 2D 31 2E 6D 70 71 00 43 3D 31 30 33 32 36 38 39 -1.mpq.C=1032689
0030: 30 36 31 20 41 3D 31 32 35 38 31 37 35 32 34 39 061 A=1258175249
0040: 20 42 3D 34 30 38 34 31 37 30 30 32 38 20 34 20 B=4084170028 4
0050: 41 3D 41 2B 53 20 42 3D 42 2D 43 20 43 3D 43 2B A=A+S B=B-C C=C+
0060: 41 20 41 3D 41 2B 42 00 A A=A+B.........
C->S
0000: FF 51 92 00 24 C2 3F 00 00 0B 00 01 EF 07 AC C6 ÿQ'.$Â?...ï¬Æ
0010: 02 00 00 00 00 00 00 00 10 00 00 00 06 00 00 00 .............
0020: C9 58 A7 00 00 00 00 00 C9 52 B9 59 B6 30 E6 74 ÉX§.....ÉR¹Y¶0æt
0030: 87 E3 10 3C 2C 08 BF 95 1B 4F 2B F9 10 00 00 00 ‡ã<,¿•O+ù...
0040: 0A 00 00 00 F4 B2 69 00 00 00 00 00 20 2D C1 11 ....ô²i..... -
0050: AF 86 9D 46 76 AE 32 8A FC 2B 4D 81 51 17 CC 61 ¯†?Fv®2Šü+M?QÌa
0060: 47 61 6D 65 2E 65 78 65 20 30 33 2F 31 39 2F 30 Game.exe 03/19/0
0070: 37 20 30 37 3A 32 32 3A 34 37 20 32 31 32 39 39 7 07:22:47 21299
0080: 32 30 00 46 4F 20 50 2E 41 2E 57 2D 52 61 79 4C 20.FO P.A.W-RayL
0090: 75 00 u...............
S->C (B.net figuratively gives me a literal cookie here.)
0000: FF 51 09 00 00 00 00 00 00 ÿQ..............
S->C, I think
0000: FF 14 08 00 74 65 6E 62 ÿ.tenb........
C->S
0000: FF 3A 2C 00 24 C2 3F 00 B1 AF 31 21 5F FF 3F C0 ÿ:,.$Â?.±¯1!_ÿ?À
0010: E3 0A CA B7 74 A7 09 F0 EE 3E 40 FB CF C2 DD 07 ã.Ê·t§.ðî>@ûÏÂÝ
0020: 50 2E 41 2E 57 2D 52 61 79 4C 75 00 P.A.W-RayLu.....
S->C
0000: FF 4C 16 00 49 58 38 36 4D 69 6E 64 53 69 67 68 ÿL.IX86MindSigh
0010: 74 2E 6D 70 71 00 t.mpq...........
S->C
0000: FF 3A 08 00 00 00 00 00 ÿ:.............
C->S (requesting realm list)
0000: FF 40 04 00 ÿ@.............
S->C (response with list of realms)
0000: FF 40 28 00 00 00 00 00 01 00 00 00 01 00 00 00 ÿ@(...........
0010: 45 75 72 6F 70 65 00 52 65 61 6C 6D 20 66 6F 72 Europe.Realm for
0020: 20 45 75 72 6F 70 65 00 Europe.........
C->S (logging in)
0000: FF 3E 23 00 00 00 00 00 3E 76 A6 77 4D 0D 84 1F ÿ>#.....>v¦wM.,,
0010: 84 0E 89 6A 95 A2 50 C3 C6 98 19 BE 45 75 72 6F ,,‰j•¢PÃÆ˜¾Euro
0020: 70 65 00 pe..............
S->C (no, go die)
0000: FF 3E 0C 00 00 00 00 00 02 00 00 80 ÿ>.......€....
Could the issue be not responding to the UDP test packet?
well first of all there is no UDP in d2, so there is no 0x14 packet or udp data exchange...
second of all your client token is 0 in your sending of 0x3E.
I was just discussing this with Spht over MSN about 1 minute ago (literally). You cannot use 0 as a client key for any kind of hashing in the logon
Quote from: UserLoser on June 15, 2007, 08:35 PM
I was just discussing this with Spht over MSN about 1 minute ago (literally). You cannot use 0 as a client key for any kind of hashing in the logon
yeah, but to anyone else: note he's not using 0 for the hash, his hash is correct. the problem lies in the actual number sent. So then server does if hash(clienttoken & servertoken & hash("password")) = senthash then good login. his hash uses different token than the one he sends to the server to use.
o.0, but it's a cookie, not a client token... As far as I can tell, the first DWORD is a cookie.
Or is it actually the client token I'm doing the double hashing with?
Quote from: raylu on June 16, 2007, 01:10 AM
o.0, but it's a cookie, not a client token... As far as I can tell, the first DWORD is a cookie.
Or is it actually the client token I'm doing the double hashing with?
its not a cookie, i just explained what happens in the previous post...
Oh!
You could have just said "Yes" to my second question.
http://ersan.us/src/bnetdocs/contentafa6.html?Section=m&Code=93
So...what are the 16 DWORDs?
http://ersan.us/src/bnetdocs/content7515.html?Section=m&Code=15
says that
QuoteThe first part of the MCP Chunk that must be sent to the MCP server includes the Status and Cookie DWORDS, making MCP Chunk 1 the first 4 DWORDS of the packet.
I assume that this actually means
"The first 4 DWORDS of the MCP Chunk that must be sent to the MCP server are the Status, Cookie, and MCP Chunk 1 DWORDs."
Does this mean that the 16 DWORDs are Status, Cookie, MCP 1, MCP 2?
It also says that
QuoteAny other value indicates failure.
with regard to the Status field. I assume this is a mistake?
And finally, even though I've used it before, I can't find the Win32 API for DWORD to IP conversion.
Quote from: raylu on June 16, 2007, 10:10 PM
Does this mean that the 16 DWORDs are Status, Cookie, MCP 1, MCP 2?
Yes, sent in the same order as received from 0x3E. You can always packet log the client and see exactly what goes on though.
Quote from: raylu on June 16, 2007, 10:10 PM
And finally, even though I've used it before, I can't find the Win32 API for DWORD to IP conversion.
Clicky (http://msdn2.microsoft.com/en-us/library/ms738564.aspx)
if you are coding in VB and are using the mswinsck.ocx control, it is much easier to just write your own little function for it.
I'm going to assume I'm parsing the port wrong here.
rCookie = .GetDWORD
rStatus = .GetDWORD
MCP1 = .GetFixedString(8)
frmMain.sckMCP.RemoteHost = GetInetStrFromPtr(.GetDWORD)
frmMain.sckMCP.RemotePort = .GetDWORD
And since when is a port 4 bytes anyway?
Try getword instead then? I'm fairly certain MCP uses 6112, so just debug.print the result and see what you get.
Quote from: raylu on June 23, 2007, 03:13 AM
I'm going to assume I'm parsing the port wrong here.
rCookie = .GetDWORD
rStatus = .GetDWORD
MCP1 = .GetFixedString(8)
frmMain.sckMCP.RemoteHost = GetInetStrFromPtr(.GetDWORD)
frmMain.sckMCP.RemotePort = .GetDWORD
And since when is a port 4 bytes anyway?
it's a 16-bit integer sent in TCP/IP byte order, which is big-endian, you have to convert it to little-endian first.
OK...got that working. Thanks for the help so far.
S->C
0000: 3A 00 19 08 00 01 00 00 00 01 00 A4 64 F8 46 72 :......¤døFr
0010: 54 77 6F 4D 75 6C 65 00 84 80 FF FF FF FF FF FF TwoMule.,,€ÿÿÿÿÿÿ
0020: FF FF FF FF FF 05 FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0030: FF 01 E0 80 FF FF 03 FF FF 00 ÿà€ÿÿÿÿ.......
And also
0000: C9 00 19 08 00 04 00 00 00 04 00 18 4C 8C 46 72 É......LŒFr
0010: 61 79 6C 75 00 84 80 FF FF FF FF FF FF FF FF FF aylu.,,€ÿÿÿÿÿÿÿÿÿ
0020: FF FF 02 FF FF FF FF FF FF FF FF FF FF FF 01 E1 ÿÿÿÿÿÿÿÿÿÿÿÿÿá
0030: 80 80 80 03 FF FF 00 03 51 8C 46 74 6F 74 61 6C €€€ÿÿ.QŒFtotal
0040: 72 65 67 00 84 80 FF FF FF FF FF FF FF FF FF FF reg.,,€ÿÿÿÿÿÿÿÿÿÿ
0050: FF 02 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 ÿÿÿÿÿÿÿÿÿÿÿÿ?€
0060: 80 80 FF FF FF 00 1B 51 8C 46 63 6C 61 73 73 69 €€ÿÿÿ.QŒFclassi
0070: 63 6C 61 64 00 84 80 FF FF FF FF FF FF FF FF FF clad.,,€ÿÿÿÿÿÿÿÿÿ
0080: FF FF 02 FF FF FF FF FF FF FF FF FF FF FF 01 C1 ÿÿÿÿÿÿÿÿÿÿÿÿÿ
0090: 80 80 80 03 FF FF 00 29 51 8C 46 65 78 70 68 61 €€€ÿÿ.)QŒFexpha
00A0: 72 64 63 6F 72 65 00 84 80 FF FF FF FF FF FF FF rdcore.,,€ÿÿÿÿÿÿÿ
00B0: FF FF FF FF 02 FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00C0: 01 A5 80 80 80 FF FF FF 00 ¥€€€ÿÿÿ........
rTwoMule is an expansion ladder character.
raylu is exp ladder, totalreg is classic non-ladder, classiclad is classic ladder, and exphardcore is expansion and the only hardcore.
Correct me if I'm wrong, but all my flags are 0x8480...
You're not wrong, BNetDocs is. That's not a flags field. See http://forum.valhallalegends.com/index.php?topic=16240.0
Quote from: Andy on June 23, 2007, 09:32 PM
You're not wrong, BNetDocs is. That's not a flags field. See http://forum.valhallalegends.com/index.php?topic=16240.0
I think it is a flag, its just no longer used afaik.
There is also another flag deeper in, stateing if the character is Lod, HC, Exp, etc and for the characters act.
Quote from: Ringo on June 24, 2007, 07:00 AM
Quote from: Andy on June 23, 2007, 09:32 PM
You're not wrong, BNetDocs is. That's not a flags field. See http://forum.valhallalegends.com/index.php?topic=16240.0
I think it is a flag, its just no longer used afaik.
There is also another flag deeper in, stateing if the character is Lod, HC, Exp, etc and for the characters act.
If it's a flag, why is it exactly the same as the StatStrings you receive in channels if you count the two bytes as part of the string? The beginning of every account is [CHARNAME], 0x84, 0x80, 0xFF...
In that case...where is the flag data?
Where character flag data always is in Realm Character StatStrings.
It seems like the 25th character of the statstring is level (yay, easy to parse :D) and the 26th is flags.
0x01000000 or 0x40 is ladder, I think (that wasn't in your post) and 0x08 isn't dead.
You don't even have a statstring parser? And ladder is the 29th byte (30th for how you're counting... i think you have an extra byte in there).
I might have counted wrong, o.0. I stuck the number in and was one off, so I adjusted there, thinking I had the indices wrong.
FO's statstring parser doesn't do D2.
Well... I used to have my parse stats bas file in my uploads, but I guess I removed it. My bot's source code is still downloadable, but all you need is the parser...
Public Function ParseD2Stats(ByVal Stats As String)
Dim d2classes(0 To 7) As String
Dim statbuf As String
Dim P() As Byte
Dim Server As String
Dim Name As String
Dim sLen As Byte
Dim CharClass As Byte
Dim Female As Boolean
Dim CharLevel As Long
Dim Hardcore As Boolean
Dim Dead As Boolean
Dim Ladder As Boolean
Dim Expansion As Boolean
Dim D2Act As String
Dim D2Title As Integer
d2classes(0) = "Amazon"
d2classes(1) = "Sorceress"
d2classes(2) = "Necromancer"
d2classes(3) = "Paladin"
d2classes(4) = "Barbarian"
d2classes(5) = "Druid"
d2classes(6) = "Assassin"
d2classes(7) = "unknown class"
If Len(Stats) > 4 Then
sLen = GetServer(Stats, Server)
sLen = GetCharacterName(Stats, sLen, Name)
MakeArray Mid$(Stats, sLen), P()
End If
If Left$(Stats, 4) = "VD2D" Then
statbuf = statbuf & "Diablo II: "
Else
statbuf = statbuf & "Diablo II Lord of Destruction: "
End If
If Len(Stats) = 4 Then
statbuf = statbuf & "Open Character"
Else
CharClass = P(13) - 1
If (CharClass < 0) Or (CharClass > 6) Then
CharClass = 7
End If
If (CharClass = 0) Or (CharClass = 1) Or (CharClass = 6) Then
Female = True
End If
CharLevel = P(25)
Hardcore = P(26) And &H4
Dead = P(26) And &H8
Expansion = P(26) And &H20
Ladder = Not (P(30) = 255)
If Left$(Stats, 4) = "PX2D" And (P(26) And &H20) Then
Select Case P(27)
Case &H80
D2Act = "1 (Normal)"
D2Title = 0
Case &H82
D2Act = "2 (Normal)"
D2Title = 0
Case &H84
D2Act = "3 (Normal)"
D2Title = 0
Case &H86
D2Act = "4/5 (Normal)"
D2Title = 0
Case &H88
D2Act = "5 (Normal)"
D2Title = 0
Case &H8A
D2Act = "1 (Nightmare)"
D2Title = 1
Case &H8C
D2Act = "2 (Nightmare)"
D2Title = 1
Case &H8E
D2Act = "3 (Nightmare)"
D2Title = 1
Case &H90
D2Act = "4/5 (Nightmare)"
D2Title = 1
Case &H92
D2Act = "5 (Nightmare)"
D2Title = 1
Case &H94
D2Act = "1 (Hell)"
D2Title = 2
Case &H96
D2Act = "2 (Hell)"
D2Title = 2
Case &H98
D2Act = "3 (Hell)"
D2Title = 2
Case &H9A
D2Act = "4/5 (Hell)"
D2Title = 2
Case &H9C
D2Act = "5 (Hell)"
D2Title = 2
Case &H9E
D2Act = vbNullString
D2Title = 3
Case Else
D2Act = vbNullString
D2Title = P(27)
End Select
Select Case D2Title
Case &H0
'Nothing
Case &H1
If Hardcore Then
statbuf = statbuf & "Destroyer "
Else
statbuf = statbuf & "Slayer "
End If
Case &H2
If Hardcore Then
statbuf = statbuf & "Conquerer "
Else
statbuf = statbuf & "Champion "
End If
Case &H3
If Hardcore Then
statbuf = statbuf & "Guardian "
Else
If Not Female Then
statbuf = statbuf & "Patriarch "
Else
statbuf = statbuf & "Matriarch "
End If
End If
Case Else
statbuf = statbuf & "Unknown (0x" & Hex$(P(27)) & ")"
End Select
Else
Select Case P(27)
Case &H80
D2Act = "1 (Normal)"
D2Title = 0
Case &H82
D2Act = "2 (Normal)"
D2Title = 0
Case &H84
D2Act = "3 (Normal)"
D2Title = 0
Case &H86
D2Act = "4 (Normal)"
D2Title = 0
Case &H88
D2Act = "1 (Nightmare)"
D2Title = 1
Case &H8A
D2Act = "2 (Nightmare)"
D2Title = 1
Case &H8C
D2Act = "3 (Nightmare)"
D2Title = 1
Case &H8E
D2Act = "4 (Nightmare)"
D2Title = 1
Case &H90
D2Act = "1 (Hell)"
D2Title = 2
Case &H92
D2Act = "2 (Hell)"
D2Title = 2
Case &H94
D2Act = "3 (Hell)"
D2Title = 2
Case &H96
D2Act = "4 (Hell)"
D2Title = 2
Case &H98
D2Act = vbNullString
D2Title = 3
Case Else
D2Act = vbNullString
D2Title = 0
End Select
Select Case D2Title
Case &H0
'Nothing
Case &H1
If Not Female Then
If Hardcore Then
statbuf = statbuf & "Count "
Else
statbuf = statbuf & "Sir "
End If
Else
If Hardcore Then
statbuf = statbuf & "Countess "
Else
statbuf = statbuf & "Dame "
End If
End If
Case &H2
If Not Female Then
If Hardcore Then
statbuf = statbuf & "Duke "
Else
statbuf = statbuf & "Lord "
End If
Else
If Hardcore Then
statbuf = statbuf & "Duchess "
Else
statbuf = statbuf & "Lady "
End If
End If
Case &H3
If Not Female Then
If Hardcore Then
statbuf = statbuf & "King "
Else
statbuf = statbuf & "Baron "
End If
Else
If Hardcore Then
statbuf = statbuf & "Queen "
Else
statbuf = statbuf & "Baroness "
End If
End If
Case Else
statbuf = statbuf & "Unknown (0x" & Hex$(P(27)) & ")"
End Select
End If
statbuf = statbuf & Name & ", a "
If Hardcore Then
If Dead Then
statbuf = statbuf & "dead hardcore "
Else
statbuf = statbuf & "hardcore "
End If
End If
statbuf = statbuf & "level " & CharLevel & " "
If Ladder Then statbuf = statbuf & "ladder "
statbuf = statbuf & d2classes(CharClass) & IIf(LenB(D2Act) > 0, " in act " & D2Act, "") & " on realm " & Server & IIf(Expansion, " (Expansion)", "")
End If
ParseD2Stats = statbuf
End Function
Sorry for the length...
Edit: And yes, I know it's a bit weirdly written... but I'm lazy.
more like source ripped, what's the point of sprintf in VB6, use string concatenation...
EDIT: he edited his post lol.
Ya, I just realized how old that code was. Also, as far as I know, I'm the only one who bothered to find out what all the act values mean... The original code was part of another bot (some d1 bot I ran across years ago), yes, but it's been quite edited. The code I've reposted was my rewritten version.
Edit: Also, I've heard rumors of another title by the name of "Archangel"... I believe Paul (Hell-Lord) mentioned an account of his on east attained it and he didn't have a clue how... I have yet to run across anything of the sort, so I didn't include it of course ;) .
Edit2: wow, I beat you to the change by ~20 seconds...