The binary Battle.net protocol is well-documented at
BnetDocs. Battle.net's protocol is an Application-layer protocol on top of standard TCP/IP.
I assume "RB" means "RealBasic." You should be more clear about that in the future.
I highly recommend you do not look at other peoples' source code. Especially VB source code. Generally, VB programmers don't write good code and then make it public (I'm not saying this is true about people here... necessarily...), and you'll have problems especially if you just try to convert it. Instead, focus on making a bot by breaking it into tasks that you need to handle:
1.) Be able to read from and write to a network stream. This can be handled by a control or object of your own choosing, but ultimately, if you're using Windows, you'll have to incorporate the Winsock API; for non-Windows development, you'll want to use the platform-specific socket libraries (most likely the basic Berkeley sockets implementation). It would be wise to encapsulate this into some kind of class -- I believe classes can be instantiated more than once, as well. Plus, your classes can hide how the receive and send data from the parts of your program that use the class, so you could have something like this (if RB allows conditional compilation):
Public Sub Send(ByVal data As DataBuffer)
#If Windows
' do Windows-specific calls like send() here.
#ElseIf Linux
' do Linux-specific calls here.
#ElseIf MacOSX
' do Mac OS-X specific calls here.
#EndIf
End Sub
2.) Be able to manage threads, if RB supports them. Windows controls only allow updating on the thread that created the controls, and so you'll need to ensure that, if you're using multiple threads, you're only updating the controls on the proper thread.
3.) Understand the events appropriate to Battle.net. Events are not necessary for every Server->Client message, and some S->C messages define multiple events (SID_CHATEVENT is one such message).
To get yourself up-and-running somewhat quikly, I would suggest using
BNLS to get started. Buy an extra CD key for $5 if it makes you feel better, and use an account that you don't care about the password for. It's another protocol to learn, but the BNLS logon sequence is fairly straightforward if you can read through the protocol specification.
You may not like CSB, but if you're an OOP-aware programmer, you should appreciate its application. It does a good job of encapsulating and shielding the end-user from the intracacies of Battle.net, which is what a good component is supposed to do.
Hope that helps.
[edit]
To address other concerns:
BnetDocs has descriptions about the types of data used in Battle.net. WORDs are 16-bit unsigned integers, and DWORDs are 32-bit unsigned integers. You should also understand what
signed and unsigned, as well has hex and binary representations are.
Endian-ness too.