Ok decided to do Clan Creation because i have never done it Before
From what i understand .. this is the Format for Creating a Clan
C --> S ( 0x70 )
C <-- S ( 0x70 )
C --> S ( 0x71 )
C <-- S ( 0x71 )
Am Not sure where 0x72 Comes In.. if it comes in at all:
=================================================
Packet ID: 0x72
Direction: Client -> Server (Sent)
Format:
(DWORD) Cookie
(DWORD) Clan tag
(STRING[]) Clan creator
(BYTE) Result
Remarks: Create invitation response from client.
Possible values for Result:
0x04: Decline
0x05: Cannot contact(not in channel screen) or already in clan
0x06: Accept
=================================================
Packet ID: 0x72
Direction: Server -> Client (Received)
Format:
(DWORD) Cookie
(DWORD) Clan tag
(STRING) Clan name
(STRING) Clan creator
(BYTE) Number of users to invite
(STRING[]) Usernames to invite
Remarks: This message is sent to all invited members of new clan. All invited members name are recorded in this packet.
What exactly Do you send for Cookie in 0x70 .. Because the only time i could actually create, and not get a status byte of Not Enough Alternation i seem to have been disconnected on sending.
Thanks for your help =)
EDIT: Anyone have a Packetlog of 0x70 Along with Canidates etc..
Dump:
C -> S
0000: FF 70 0C 00 01 00 00 00 00 64 73 66 .p.......dsf
S -> C
0000: FF 70 38 00 01 00 00 00 00 09 44 4A 50 32 00 44 .p8.......DJP2.D
0010: 4A 50 33 00 44 4A 50 34 00 44 4A 50 35 00 44 4A JP3.DJP4.DJP5.DJ
0020: 50 36 00 44 4A 50 37 00 44 4A 50 38 00 44 4A 50 P6.DJP7.DJP8.DJP
0030: 39 00 44 4A 50 31 30 00 9.DJP10.
I am not sure if you need to send 0x66 after 0x70 S -> C.
Alright TY Binary!
Now i need someone with a few WC3 Keys!
I need to try my Check Canidate code to see if it displays all the canidates in the listview Correctly
Post here if you can help!
Nevermind.. i just went to Channel: Night Elf Tree of Life
EDIT: Here We Go!
Case &H70
AddChat vbRed, DebugOutput(Data)
Dim PotentialCanidates As Integer, Canidates() As String
Select Case Asc(Mid(Data, 9, 1))
Case &H0
PotentialCanidates = Asc(Mid(Data, 10, 1))
AddChat vbGreen, "Clan: Tag Accepted, Checking For Potential Canidates..."
If PotentialCanidates >= 9 Then
AddChat vbGreen, "Canidates Found!"
Canidates = Split(Mid(Data, 10, Len(Data) - 10), Chr(0))
For i = LBound(Canidates) To UBound(Canidates)
AddChat Canidates(i)
Next i
Answer = MsgBox("Do You Want To Create Clan?", vbYesNo + vbQuestion, "BaDD`ChaT")
If Answer = vbYes Then
AddChat vbYellow, "Clan: Attempting Clan Creation..."
ElseIf Answer = vbNo Then
AddChat vbRed, "Clan: Aborting Clan Creation!"
End If
Else
AddChat vbRed, "Clan: Not Enough Canidates Were Found!"
End If
does that look right?
I also need the format for inviting the Initial Clan Members and the Packet ID
You should display the candidates in some form, so you know who you're inviting. Other than that, you're missing responses 0x01, 0x08, and 0x0A.
i have 01 0A What is 08, isn't 02 a valid one as well?
I need a person to load 9 wc3 bots so i can attempt to make a clan ;\
EDIT:
I Seem to get ipbanned sending 0x71
Here's My Code:
Private Sub mnuClanCanidates_Click()
ClanTag = InputBox("What Will Your Clan Tag Be?", "BaDD`ChaT")
AddChat vbYellow, "Checking Status Of Clan: " & ClanTag & ", and Potential Canidates"
With Buffer
.InsertDWORD &H0
.InsertNonNTString ClanTag
.SendPacket frmMain.wsBNCS, BNCS, &H70
End With
End Sub
Case &H70
Dim Canidates() As String
Select Case Asc(Mid(Data, 9, 1))
Case &H0
AddChat vbGreen, "Clan Tag Accepted!, Canidates Found!"
Canidates = Split(Mid(Data, 11, Len(Data) - 11), Chr(0))
frmInvite.Show
For i = LBound(Canidates) To UBound(Canidates)
frmInvite.lstCanidates.ListItems.Add , , Canidates(i)
Next i
Case &H1
AddChat vbRed, "Clan: Clan Tag Taken!"
Case &H2
AddChat vbRed, "Clan: Request Failed!, Not Enough Alternation Since Last Creation Action"
Case &HA
AddChat vbRed, "Clan: Request Failed!, Invalid Tag Specified"
Case Else
AddChat vbRed, "Clan: Request Failed!"
End Select
Private Sub optInvite_Click()
ClanName = txtClanName
If lstCanidates.ListItems.Count >= 9 Then
Dim names As String
For i = 1 To lstCanidates.ListItems.Count
If lstCanidates.ListItems.Item(i).Checked = True Then
names = names & Chr(0) & lstCanidates.ListItems.Item(i).text
End If
Next i
With Buffer
.InsertDWORD &H0
.InsertNTString ClanName
.InsertNonNTString ClanTag
.InsertBYTE lstCanidates.ListItems.Count
.InsertNonNTString names
.SendPacket frmMain.wsBNCS, BNCS, &H71
End With
Else
MsgBox "You Need 9 Canidates To Create A Clan!", vbOKOnly + vbExclamation, "BaDD`ChaT"
End If
End Sub
Any Help Is Apreciated
This has been gone over a thousand times, strings are always null terminated on Battle.net, and ClanTag should be a DWORD
i thought a Non Null Terminated string was just a Bigger DWORD?
Quote from: BaDDBLooD on June 12, 2004, 07:26 PM
i thought a Non Null Terminated string was just a Bigger DWORD?
DWORD is four bytes, a string can be any amount of bytes