Author | Message | Time |
---|---|---|
Arthas | Here's what I send: [code]With pBuffer .InsertNonNTString Cookie .InsertNonNTString Tag .SendPacket frmMain.sckBnet, &H70 End With[/code] Here's what I receive FF 70 0A 00 37 38 39 34 02 00 | | | | First DWord A B A: Isnt a valid byte for the response B: Means there's 0 people while there's actually 1 person. What am I doing wrong here?(Sorry, havent touched my bot in ages). -Arthas PS: Myndfyre, I'm no longer a llama :) | December 18, 2003, 11:39 PM |
UserLoser. | A is the response code, 0x2 seems to be rejected for some reason - Not sure on what the real meaning of it is though. But, Soar did post a few threads down his findings which might be able to help you B is an empty stringlist, so there's no users available. | December 19, 2003, 12:25 AM |
Arthas | Yes, was just really curious why it was responding with &H2... Thanks. However, to create a CLAN, in the string array for the users, what char do I use to sepperate them? Chr(0)? -Arthas (Edited, spell check lol) | December 19, 2003, 1:01 AM |
UserLoser. | Yes, split up the data by 0x0 | December 19, 2003, 1:18 AM |
Arthas | So then, theoretically this should work: [code]With pBuffer .InsertNonNTString txtCookie.Txt .InsertNTString txtName.text .InsertNonNTString txtTag.text Dim xF As String, i As Integer For i = 0 To lstCM.ListItems.Count xF = xF & lstCM.ListItems.Item(i) & &H0 Next i .InsertBYTE lstCM.ListItems.Count .InsertNTString xF .SendPacket frmMain.sckBnet, &H71 End With[/code] | December 19, 2003, 1:36 AM |
Soar | [quote author=Arthas link=board=17;threadid=4340;start=0#msg36269 date=1071790799] Here's what I send: [code]With pBuffer .InsertNonNTString Cookie .InsertNonNTString Tag .SendPacket frmMain.sckBnet, &H70 End With[/code] Here's what I receive FF 70 0A 00 37 38 39 34 02 00 | | | | First DWord A B A: Isnt a valid byte for the response B: Means there's 0 people while there's actually 1 person. What am I doing wrong here?(Sorry, havent touched my bot in ages). -Arthas PS: Myndfyre, I'm no longer a llama :) [/quote] Please don't use InsertNTString to add Tag directly. Tag is an unsigned long value in packet, so you should reverse the Tag string and InsertNTString or just convert string to unsigned long and then insert. | December 19, 2003, 2:04 AM |
Arthas | WILL the code in my last post work? Because I can mass invite people, and not get IP banned, receive 0x71, but it's not the "accepted" packet. Help. EDIT: By the way, whenever I send... [code] With pBuffer .InsertNonNTString txtCookie .InsertNonNTString StrReverse(txtTag) .SendPacket frmMain.sckBnet, &H70 End With [/code] And txtTag is 2 or 3, I get disconnected, but NOT IP banned. whats up with that? | December 19, 2003, 5:45 AM |
DarkMinion | [quote]Yes, split up the data by 0x0[/quote] Using delimiters with binary protocols is a bad, bad idea. | December 19, 2003, 1:34 PM |
Spht | [quote author=Arthas link=board=17;threadid=4340;start=0#msg36321 date=1071812703] WILL the code in my last post work? Because I can mass invite people, and not get IP banned, receive 0x71, but it's not the "accepted" packet. Help. EDIT: By the way, whenever I send... [code] With pBuffer .InsertNonNTString txtCookie .InsertNonNTString StrReverse(txtTag) .SendPacket frmMain.sckBnet, &H70 End With [/code] And txtTag is 2 or 3, I get disconnected, but NOT IP banned. whats up with that? [/quote] I'm not sure why you're having the user enter in a cookie. In order for your code to work (assuming you're using DarkMinion's InsertNonNTString function), the user would have to enter in the missing nulls if not all spaces are taken up. You should be doing something like this: [code] '// ... Static Cookie As Long Cookie = Cookie + 1 .InsertDWORD Cookie .InsertDWORD Tag ' tag which the user is looking up '// ...[/code] Cookie is incremented with each request, and the request should then be added to a queue so that the cookie can be verified when the server responds. | December 19, 2003, 3:03 PM |
UserLoser. | [quote author=DarkMinion link=board=17;threadid=4340;start=0#msg36343 date=1071840881] [quote]Yes, split up the data by 0x0[/quote] Using delimiters with binary protocols is a bad, bad idea. [/quote] Split(Mid$(Data, 5), Chr(0)) How's that a bad idea specifically for this packet? | December 19, 2003, 4:34 PM |