Valhalla Legends Forums Archive | Battle.net Bot Development References | Packet 0x7D Information

AuthorMessageTime
Arthas
I have no problems peiceing the split packets together, but I am a newbie with the GetDword function. So now I use this(Dont laugh, I laughed too much at it):
[code]
'Recieve Clan list
If ClanRoomList.ListItems.Count > 0 Then ClanRoomList.ListItems.Clear
Dim X As Integer, xS As Integer, vS As Integer, splClanList() As String, strClan As String
splClanList = Split(Mid$(data, 6), Chr(0), -1)

For X = 0 To UBound(splClanList)
If Not Len(splClanList(X)) = 0 Then
If Not Mid(StrToHex(splClanList(X)), 1, 1) = "0" Or splClanList(X) = "" Then

If Mid(StrToHex(splClanList(X + 1)), 1, 2) = "04" Then
strUser = Mid(splClanList(X), 2, Len(splClanList(X)))
Else
strUser = splClanList(X)
End If

If Not Mid(StrToHex(splClanList(X + 1)), 1, 1) = "0" Then
If splClanList(X + 2) = "" Then
usrFlag = "0000"
With ClanRoomList
.ListItems.Add .ListItems.Count + 1, , , , GetW3ClanIconCode(usrFlag, True)
.ListItems(.ListItems.Count).ListSubItems.Add 1, , , GetW3ClanIconCode(usrFlag, False)
.ListItems(.ListItems.Count).ListSubItems.Add 2, , strUser
End With
End If
End If
Else
usrFlag = StrToHex(splClanList(X))
If usrFlag = "01" Then usrFlag = "0101"
Select Case GetW3ClanIconCode(usrFlag, True)
Case "66"
nInd67 = nInd67 + 1
nInd68 = nInd68 + 1
nIndElse = nIndElse + 1
vS = nInd66
Case "67"
nInd68 = nInd68 + 1
nIndElse = nIndElse + 1
vS = nInd67
Case "68"
nIndElse = nIndElse + 1
vS = nInd68
Case Else
vS = nIndElse
End Select
ClanRoomList.ListItems.Add vS, , , , GetW3ClanIconCode(usrFlag, True)
ClanRoomList.ListItems(vS).ListSubItems.Add 1, , , GetW3ClanIconCode(usrFlag, False)
ClanRoomList.ListItems(vS).ListSubItems.Add 2, , strUser
End If
End If
Next X
nInd66 = 1
nInd67 = 1
nInd68 = 1
nIndElse = 1
[/code]
nInd** is just list values to sort the peons//grunts//shamans//cheiftains from greatest rank to least rank.

The code for GetW3ClanIconCode:
[code]
Public Function GetW3ClanIconCode(ByVal Flag As String, Online As Boolean)
If Online Then
Select Case Mid$(Flag, 1, 2)
Case "04": GetW3ClanIconCode = 66
Case "03": GetW3ClanIconCode = 67
Case "02": GetW3ClanIconCode = 68
Case "01": GetW3ClanIconCode = 69
Case Else
GetW3ClanIconCode = 69
End Select
Else
Select Case Mid$(Flag, 3, 2)
Case "04": GetW3ClanIconCode = 70
Case "03": GetW3ClanIconCode = 70
Case "02": GetW3ClanIconCode = 70
Case "01": GetW3ClanIconCode = 71
Case Else
GetW3ClanIconCode = 70
End Select
End If
End Function
[/code]

Feel free to laugh :P I'd appreciate information on a new way of parsing this list, same with the friends list. Thanks...
February 5, 2004, 3:19 AM
Myndfyr
I'm using Pocket Internet Explorer on my iPaq right now, so it's somewhat difficult to evaluate your code. However, in my generally limited experience, you don't need to put packets together. I've never lost anybody on the list.

That said, there is a limit Bnet will send in a single packet. However, I just fire off an event when it receives the packet, and any clan members are added to the list.

Since my clan isn't full, that could be the case. But I haven't yet had to deal with problems such as putting the clan list together.
February 6, 2004, 4:49 PM
Zakath
You definitely need to be able to "piece packets together," as Arthas puts it. You can and will receive partial packets on occasion. If you're lucky, you can still get some sort of functionality out of it even if you're losing packets, but more likely something will break.

So he's justified in talking about putting pieces of packets together, because it is something that must be dealt with.
February 7, 2004, 1:18 AM
o.OV
[quote author=Myndfyre link=board=17;threadid=5092;start=0#msg42798 date=1076086154]
I'm using Pocket Internet Explorer on my iPaq right now, so it's somewhat difficult to evaluate your code. However, in my generally limited experience, you don't need to put packets together. I've never lost anybody on the list.

That said, there is a limit Bnet will send in a single packet. However, I just fire off an event when it receives the packet, and any clan members are added to the list.

Since my clan isn't full, that could be the case. But I haven't yet had to deal with problems such as putting the clan list together.
[/quote]

If you need an example of Packets coming in two parts instead of a Whole.. you should packet log while a flood is in progress..

Or you could visit Brood War Ladder on Asia/West at busy hours.. lol..
February 11, 2004, 8:34 PM

Search