Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: Arthas on December 18, 2003, 05:39 PM

Title: Packet 0x70 Information
Post by: Arthas on December 18, 2003, 05:39 PM
Here's what I send:
With pBuffer
   .InsertNonNTString Cookie
   .InsertNonNTString Tag
   .SendPacket frmMain.sckBnet, &H70
End With


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 :)

Title: Re:Packet 0x70
Post by: UserLoser. on December 18, 2003, 06:25 PM
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.
Title: Re:Packet 0x70
Post by: Arthas on December 18, 2003, 07:01 PM
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)
Title: Re:Packet 0x70
Post by: UserLoser. on December 18, 2003, 07:18 PM
Yes, split up the data by 0x0
Title: Re:Packet 0x70
Post by: Arthas on December 18, 2003, 07:36 PM
So then, theoretically this should work:

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
Title: Re:Packet 0x70
Post by: Soar on December 18, 2003, 08:04 PM
Quote from: Arthas on December 18, 2003, 05:39 PM
Here's what I send:
With pBuffer
   .InsertNonNTString Cookie
   .InsertNonNTString Tag
   .SendPacket frmMain.sckBnet, &H70
End With


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 :)



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.
Title: Re:Packet 0x70
Post by: Arthas on December 18, 2003, 11:45 PM
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...

With pBuffer
   .InsertNonNTString txtCookie
   .InsertNonNTString StrReverse(txtTag)
   .SendPacket frmMain.sckBnet, &H70
End With

And txtTag is 2 or 3, I get disconnected, but NOT IP banned. whats up with that?
Title: Re:Packet 0x70
Post by: DarkMinion on December 19, 2003, 07:34 AM
QuoteYes, split up the data by 0x0

Using delimiters with binary protocols is a bad, bad idea.
Title: Re:Packet 0x70
Post by: Spht on December 19, 2003, 09:03 AM
Quote from: Arthas on December 18, 2003, 11:45 PM
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...

With pBuffer
   .InsertNonNTString txtCookie
   .InsertNonNTString StrReverse(txtTag)
   .SendPacket frmMain.sckBnet, &H70
End With

And txtTag is 2 or 3, I get disconnected, but NOT IP banned. whats up with that?

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:

   '// ...
   Static Cookie As Long
   Cookie = Cookie + 1
   .InsertDWORD Cookie
   .InsertDWORD Tag ' tag which the user is looking up
   '// ...


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.
Title: Re:Packet 0x70
Post by: UserLoser. on December 19, 2003, 10:34 AM
Quote from: DarkMinion on December 19, 2003, 07:34 AM
QuoteYes, split up the data by 0x0

Using delimiters with binary protocols is a bad, bad idea.

Split(Mid$(Data, 5), Chr(0))

How's that a bad idea specifically for this packet?