Valhalla Legends Forums Archive | .NET Platform | Visual Basic.NET and BNLS

AuthorMessageTime
BaDDBLooD
[code]

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

[/code]

This is where i send 0x09

[code]

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

[/code]

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
August 22, 2004, 10:05 PM
ChR0NiC
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 author=MyndFyre link=board=37;threadid=3983;start=0#msg76230 date=1092880525]
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.
[/quote]
August 23, 2004, 6:47 PM

Search