• Welcome to Valhalla Legends Archive.
 

Visual Basic.NET and BNLS

Started by BaDDBLooD, August 22, 2004, 05:05 PM

Previous topic - Next topic

BaDDBLooD



           Case &H50

               Dim MpqName As String, Checksum As String, ServerToken As Long

               Packet.ReadWord()

               Packet.ReadDword()
               ServerToken = Packet.ReadDword()
               Packet.ReadDword()
               Dim MpqVersion As Date = DateTime.FromFileTime(Packet.ReadQword)
               MpqName = Packet.ReadNTString
               Checksum = Packet.ReadNTString

               AddChat(rtbChat, Color.Yellow, "Mpq Version: " & MpqVersion)
               AddChat(rtbChat, Color.Yellow, "Mpq Name: " & MpqName)
               AddChat(rtbChat, Color.Yellow, "Checksum: " & Checksum)

               sckBNLS.SendData(Packets.BNLS_VERSIONCHECK(MpqName, Checksum))



This is where i send 0x09



       Public Function BNLS_VERSIONCHECK(ByVal MpqName As String, ByVal Checksum As String) As Byte()

           Dim Packet As New BaDDChaT.BNLSPacket(&H9)

           Dim MpqVersion As Char = MpqName.Chars(7)
           Dim mpqVersionNumber As Integer = Integer.Parse(MpqVersion.ToString)

           Packet.InsertDWORD(GetBNLSByte)
           Packet.InsertDWORD(mpqVersionNumber)
           Packet.InsertNTString(Checksum)

           Return Packet.Data

       End Function



I Don't even get disconnected from BNLS, nothing.

I Don't send the auth, the only thing i send to BNLS is 0x09.

I debugged,  i obviously missed something.

There is several more parts that cause a problem, if you want any other piece of code posted, just ask.

Thanks in advance, i really apreciate it!

- BaDDBLooD
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

ChR0NiC

#1
BNLS usually disconnects you, when you send incorrect data or the wrong length of data. You should look over your code and compare it with the spec to make sure you didn't miss or add a few bytes or a DWORD somewhere.

Edit: Also remember, BNLS only requires the MPQName DIGIT not the whole name, for example 1, 2, 3, 4, etc...so maybe fix that.

Edit2: And for future!!

Quote from: MyndFyre on August 18, 2004, 08:55 PM
Also, please do not use this forum for talking about general bot-development-related issues.  If you're working on a bot and can't get a particular piece of code correct, then fine -- but if you're working on a bot and getting IP banned, take it to the botdev forum.