• Welcome to Valhalla Legends Archive.
 

Problems with &HA Packet (Enter chat)

Started by Elneroth, June 29, 2005, 01:34 PM

Previous topic - Next topic

Elneroth

::After receiving &H3A::
    Case &H3A
    AddChat vbCyan, " >> Packet &H3A received."
    Select Case PB.GetDWORD(Mid(Data, 5))
        Case &H0
         AddChat vbGreen, " >> Login accepted."
         SendP14
         SendPA
        Case &H1
         AddChat vbRed, " >> Account already exists.": Disconnect
       Case &H2
         AddChat vbRed, " >> Invalid password.": Disconnect
     End Select


::Sending UDP::
Public Sub SendP14()
PB.InsertNonNTString "tenb"
AddChat vbYellow, " >> Sending packet &H14..."
PB.SendPacket &H14
frmMain.StatBar.Panels(1).text = "Packet &H14 Sent. (UDP Ping) Awaiting reply..."
End Sub


::Sending "Enter Chat"::
Public Sub SendPA()
PB.InsertNTString VarUsername
PB.InsertNTString ""
AddChat vbYellow, " >> Sending packet &HA..."
PB.SendPacket &HA
frmMain.StatBar.Panels(1).text = "Packet &HA Sent. (Enter Chat) Awaiting reply (&HA)..."
End Sub


Both D2DV and D2XP (w/out Realm Support) both work (Enters Chat- Can join other channels after). But starcraft/broodwar don't. (Still appear offline, can't whisper them)
Also: I have it set to send a packet to join the chat environment after &HA is received (Only for D2/D2XP)

Any help will greatly be appreciated.

TYVM




P.S (Edit), here's the bot logs.

Starcraft/Brood War::
[2:38:49 PM] >> Welcome to Chaos Bot Reborn!
[2:38:50 PM]  >> Attempting to connect to: europe.battle.net:6112
[2:38:51 PM]  >> Connected!
[2:38:51 PM]  >> Sending protocal byte: Chr$(1)
[2:38:51 PM]  >> Sending packet &H50... Client: PXES Version Bye: CB
[2:38:51 PM]  >> Packet &H50 received.
[2:38:51 PM]  >> Sending packet &H51...
[2:38:51 PM]  >> Packet &H51 received.
[2:38:51 PM]  >> CDKey / Hashes accepted.
[2:38:51 PM]  >> Sending packet &H3A
[2:38:51 PM]  >> Packet &H3A received.
[2:38:51 PM]  >> Login accepted.
[2:38:51 PM]  >> Sending packet &H14...
[2:38:51 PM]  >> Sending packet &HA...



D2DV/D2XP::
[2:39:44 PM] >> Welcome to Chaos Bot Reborn!
[2:39:44 PM]  >> Attempting to connect to: europe.battle.net:6112
[2:39:44 PM]  >> Connected!
[2:39:44 PM]  >> Sending protocal byte: Chr$(1)
[2:39:44 PM]  >> Sending packet &H50... Client: PX2D Version Bye: A
[2:39:45 PM]  >> Packet &H50 received.
[2:39:45 PM]  >> Sending packet &H51...
[2:39:45 PM]  >> Packet &H51 received.
[2:39:45 PM]  >> CDKey / Hashes accepted.
[2:39:45 PM]  >> Sending packet &H3A
[2:39:45 PM]  >> Packet &H3A received.
[2:39:45 PM]  >> Login accepted.
[2:39:45 PM]  >> Sending packet &H14...
[2:39:45 PM]  >> Sending packet &HA...
[2:39:45 PM]  >> Packet &HA received.
[2:39:45 PM]  >> Connection successfully. Currently connected under: elneroth.
[2:39:45 PM]  >> Sending packet &HC.
[2:39:45 PM] Channel: Diablo II USA-1
[2:39:45 PM] >> *elneroth is in the channel.
[2:39:45 PM] Welcome to Battle.net!
[2:39:45 PM] This server is hosted by Telia.
[2:39:45 PM] There are currently 61131 users playing 26069 games of Diablo II Lord of Destruction, and 189809 users playing 41843 games on Battle.net.
[2:39:45 PM] Last logon: Wed Jun 29  6:38 PM


QwertyMonster

#1
For starcaft, you need to send &HB and &HC too.

Edit:


       '0x0a
           Packet.InsertNonNTString frmConfig.Username
           Packet.InsertWORD 0
           Packet.SendPacket bnetsocket, &HA
       '0x0b
           Packet.InsertNonNTString frmConfig.Product.Text
           Packet.SendPacket bnetsocket, &HB
           Display Chatroom, True, True, vbGreen, "Successfully Connected to Battle.net"
           Display Chatroom, True, True, vbYellow, "You are connected to " & frmConfig.server.Text & " on the username " & frmConfig.Username.Text & " In channel " & frmConfig.Channel.Text & "."

       '0x0c
           Packet.InsertDWORD 2
           Packet.InsertNonNTString frmConfig.Channel.Text
           Packet.InsertBYTE 0
           Packet.SendPacket bnetsocket, &HC



Edit2:

0x0a - Username (NEEDED)
0x0b - Product (NEEDED)
0x0C - Home Channel (NEEDED)

Elneroth

[2:58:39 PM] >> Welcome to Chaos Bot Reborn!
[2:58:40 PM]  >> Attempting to connect to: europe.battle.net:6112
[2:58:41 PM]  >> Connected!
[2:58:41 PM]  >> Sending protocal byte: Chr$(1)
[2:58:41 PM]  >> Sending packet &H50... Client: PXES Version Bye: CB
[2:58:41 PM]  >> Packet &H50 received.
[2:58:41 PM]  >> Sending packet &H51...
[2:58:41 PM]  >> Packet &H51 received.
[2:58:41 PM]  >> CDKey / Hashes accepted.
[2:58:41 PM]  >> Sending packet &H3A
[2:58:41 PM]  >> Packet &H3A received.
[2:58:41 PM]  >> Login accepted.
[2:58:41 PM]  >> Sending packet &H14...
[2:58:41 PM]  >> Sending packet &HA...
[2:58:41 PM]  >> Unknown packet received: B.
[2:58:41 PM]  >> Packet &HA received.
[2:58:41 PM]  >> Connection successfully. Currently connected under: elneroth.
[2:58:41 PM] Channel: op []
[2:58:41 PM] >> elneroth is in the channel.


Thank you for the help.
I'm guessing &HB is the channel list.

One last question:
Can &HB be repeated anytime during the connection?
Like later on, to show the user the updated channel list.

Ringo

Quote from: Elneroth on June 29, 2005, 01:56 PM
One last question:
Can &HB be repeated anytime during the connection?
Like later on, to show the user the updated channel list.
I tihnk u can send it at any time why logged on, but it will always return the same list (for the client ur on)
D2 clients also wont send 0x14 on logon, so the server is ignoreing that packet when u logon d2/d2LOD, where as SC/BW would normaly send it just before sending 0x3A.
Iv never tryed sending 0x14 afterwards, but by your bot logs, it would seem the server doesnt mind

Blaze

Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

UserLoser.


Lenny

That really depends on how far you want to be 'logged in' or your definition of being 'logged in'
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.