This is from my newest bot HileBot.
Send:
With Buffer
.iDWord &H0
.sBNCSPacket &H7D
End With
Declares:
Public ClanUsers() As ClanList
Private Type ClanList
Username As String
Rank As Byte
Status As Byte
Unknown As Byte
End Type
Parse:
' Module : clsClanMemberList
' Date : 19/04/2005
' Author : ArchAngel
' Packet : CLANMEMBERLIST (0X7D)
'---------------------------------------------------------------------------------------
Public Function Recv0x7D(data As String, index As Integer)
Dim i As Integer, p As Integer
ReDim Preserve ClanUsers(Asc(Mid(data, 9, 1)))
Debug.Print "Clan List"
Debug.Print "Count: " & UBound(ClanUsers())
p = 10
For i = 1 To UBound(ClanUsers())
With ClanUsers(i)
.Username = Mid(data, p, InStr(Mid(data, p), vbNullChar) - 1)
Debug.Print "Username: " & .Username
p = p + Len(.Username) + 1
.Rank = Asc(Mid(data, p, 1))
Debug.Print "Rank: " & GetUserRank(.Rank)
p = p + 1
.Status = Asc(Mid(data, p, 1))
Debug.Print "Status: " & GetUserStatus(.Status)
p = p + 1
.Unknown = Asc(Mid(data, p, 1))
Debug.Print "Unknown: " & .Unknown
p = p + 1
End With
Next i
End Function
Function GetUserStatus(Status As Byte) As String
Select Case Status
Case &H0
GetUserStatus = "Offline"
Case &H1
GetUserStatus = "Online"
End Select
End Function
Function GetUserRank(Rank As Byte) As String
Select Case Rank
Case &H0
GetUserRank = "New Peon"
Case &H1
GetUserRank = "Old Peon"
Case &H2
GetUserRank = "Grunt"
Case &H3
GetUserRank = "Shaman"
Case &H4
GetUserRank = "Cheftain"
End Select
End Function
* Remember, authors should get the credit for their work.