• Welcome to Valhalla Legends Archive.
 

Packet 0x70 Information

Started by Arthas, December 18, 2003, 05:39 PM

Previous topic - Next topic

Arthas

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


UserLoser.

#1
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.

Arthas

#2
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)

UserLoser.

Yes, split up the data by 0x0

Arthas

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

Soar

#5
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.

Arthas

#6
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?

DarkMinion

QuoteYes, split up the data by 0x0

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

Spht

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.

UserLoser.

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?