• Welcome to Valhalla Legends Archive.
 

[0x70] SID_CLANFINDCANDIDATES

Started by topaz, January 08, 2006, 04:17 AM

Previous topic - Next topic

topaz

C -> S:

Format:
Quote(DWORD)       Cookie
(DWORD)       Clan Tag

With pBuffer
    .InsertDWORD &H5
    .InsertNTString strReverse(ClanName)
    .SendPacket BNCS, &H70
End With


S->C:

Format:
Quote(DWORD)       Cookie
(BYTE)       Status
(BYTE)       Number of potential candidates
(STRING[])    Usernames

'//Author: Topaz
Private Function Parse0x70(data As String)
Dim bytStatus As Byte, bytCandidates As Byte
Dim aryUsernames() As String
Dim lngCookie As Long
Dim i As Integer
   
    lngCookie = Asc(Mid(data, 5, 1))
    bytStatus = Asc(Mid(data, 7, 1))
    bytCandidates = Asc(Mid(data, 10, 1))
    aryUsernames() = Split(Mid(data, 11), Chr(0))
   
Select Case bytStatus
    Case 0: AddC vbGreen, "Successfully found candidate(s)."
    Case 1: AddC vbRed, "Clan tag has already been taken."
    Case 8: AddC vbRed, "You are already in a clan."
    Case 9: AddC vbRed, "Invalid clan tag specified."
End Select

For i = 1 To bytCandidates
    AddC vbBlue, "Candidate found: " & aryUsernames(i - 1)
Next i
End Function
RLY...?