• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Abolition

#1
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 05:47 PM
Here is my ParseData sub.
It was just a test to see if I received the packets correctly.

Public Sub ParseData(PacketID As Long)
'Parsing
Select Case PacketID
Case &H25
AddChat vbYellow, "Received: 0x25"
Case &H50
AddChat vbYellow, "Received: 0x50"
End Select
End Sub
#2
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 05:40 PM
Quote from: l2k-Shadow on September 24, 2006, 05:38 PM
you have an extra ) at the end ::)

Sorry, I made a mistake in my post. It was supposed be:

ParseData (Left(PktBuff, PacketLength))


I still get the same error.
#3
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 05:36 PM
Eh, I found that that was my Data_Arrival sub...

I got this(I found this sub on this forum):

Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
    Static PktBuff As String 'Packet Buffer
    Dim Incoming As String
    Dim PacketLength As Long
    Winsock2.GetData Incoming, vbString, bytesTotal
    PktBuff = PktBuff & Incoming
   
    While Len(PktBuff) > 3
        PacketLength = GetWord(Mid$(PktBuff, 3, 2))
        If Len(PktBuff) < PacketLength Then Exit Sub
        ParseData Left(PktBuff, PacketLength))
        PktBuff = Mid(PktBuff, PacketLength + 1)
    Wend
End Sub


When I run it, I get a type mismatch error... it highlights this line:

ParseData Left(PktBuff, PacketLength))


ParseData is another sub that takes my packets and, like the name explains, parse packets.
#4
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 02:15 PM
I used DarkMinion's packet buffer   ???
#5
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 02:01 PM
Quote from: Mystical on September 24, 2006, 02:00 PM
Winsock2 is your sck_BNET or sck_BNLS?

Winsock2 is my winsock to BNET.
#6
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 01:12 PM
Quote from: l2k-Shadow on September 24, 2006, 01:03 PM
probably sending your 0x50 wrong then, showing the code would help us pinpoint the error.

PacketBuf.InsertDWORD &H0
PacketBuf.InsertDWORD &H49583836 'IX86
PacketBuf.InsertDWORD &H53455850 'SEXP
PacketBuf.InsertDWORD &HCF 'Verbyte
PacketBuf.InsertDWORD &H0
PacketBuf.InsertDWORD &H0
PacketBuf.InsertDWORD &H0
PacketBuf.InsertDWORD &H0
PacketBuf.InsertDWORD &H0
PacketBuf.InsertNTString "CAN" 'Country Abbr.
PacketBuf.InsertNTString "Canada" 'Country Name
PacketBuf.SendPacket Winsock2, &H50
AddChat vbYellow, "Sent: 0x50"

PacketBuf is my Packet Buffer.
#7
Battle.net Bot Development / Re: S -> C 0x50?
September 24, 2006, 12:43 PM
Quote from: Warrior on September 24, 2006, 12:41 PM
It's going to be difficult to help you out unless you atleast post what order you're sending your packets in.
I've connected to BNLS.
Sent 0x0E to BNLS.
Received a response.
I connected to Bnet..sent 0x01.
I then sent 0x50.
I received 0x25.
That's where I'm stuck.
#8
Battle.net Bot Development / S -> C 0x50?
September 24, 2006, 12:40 PM
Hey!
I've been learning for some time (Visual Basic) now and decided to make a bot some weeks ago.
I know how to read and send packets and etc.
My problem: I don't seem to receive 0x50 back from B.net.
I receive 0x25 but not 0x50.
Maybe packets are merging together or something is wrong?

Help would be appreciated.