• Welcome to Valhalla Legends Archive.
 

Battlenet Connection

Started by MindArchon, August 26, 2004, 02:43 AM

Previous topic - Next topic

UserLoser.

#15
Quote from: MindArchon on August 26, 2004, 05:22 PM
In what packet does BNET send you the challenge?

And with Visual Basic, is it better to put two winsock controls on the form, or just one and connect with the index or whatever (its in bnet reference)

Probably doesn't matter (no big difference) if you add two separate controls to the form, or create an array of them.

R.a.B.B.i.T

2 controls, however, are a little easier to manage.  And BNLS will automatically disconnect after about 30 seconds.

MyndFyre

Quote from: R.a.B.B.i.T on August 26, 2004, 06:32 PM
And BNLS will automatically disconnect after about 30 seconds.

Unless you send BNLS_NULL (0x00) consistently.  ;)
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

UserLoser.

Quote from: MyndFyre on August 26, 2004, 06:33 PM
Quote from: R.a.B.B.i.T on August 26, 2004, 06:32 PM
And BNLS will automatically disconnect after about 30 seconds.

Unless you send BNLS_NULL (0x00) consistently.  ;)

The document says 1 minute, not 30 seconds.

MindArchon

Bah, does the packetbuffer  at http://www.valhallalegends.com/docs/PacketBuffer.htm work for BNLS packets too?

If so, then it doesnt seem to be working. I send something and get no data recieved back.

BaDDBLooD

It does, however the "SEND PACKET" Function will not.

You need to Change it to +3, and it should be Length + packetID
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

MindArchon

#21
Quote from: BaDDBLooD on August 27, 2004, 12:50 AM
It does, however the "SEND PACKET" Function will not.

You need to Change it to +3, and it should be Length + packetID

er..

Public Function SendPacket(SOCKET As Winsock, PacketID As Byte)

SOCKET.SendData Chr(&HFF)
SOCKET.SendData Chr(PacketID)
SOCKET.SendData MakeWORD (Len(Buffer) + 4)
SOCKET.SendData
BufferClear

End Function


was how it came.

So I change it to:

Public Function SendPacket(SOCKET As Winsock, PacketID As Byte)

SOCKET.SendData Chr(&HFF)
SOCKET.SendData Chr(PacketID)
SOCKET.SendData MakeWORD (Len(Buffer) + PacketID + 3)
BufferClear

End Function


?

prck

The header is 3 bytes. The first part of the packet is a word, so you would want something like Makeword(len(Buffer)+3) then you would want to include the packetID which is a byte and the rest of the data to send.

l2k-Shadow

I would suggest you getting a basic winsock connection source code. That will help you see how everything works and then you can just work off of that, If you never made a bot w/o an ocx then just getting a source is much easier then starting from scratch and getting 99% chance that the bot won't work
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Sorc.Polgara

#24
Quote from: MindArchon on August 27, 2004, 01:34 AM
Quote from: BaDDBLooD on August 27, 2004, 12:50 AM
It does, however the "SEND PACKET" Function will not.

You need to Change it to +3, and it should be Length + packetID
So I change it to:

Public Function SendPacket(SOCKET As Winsock, PacketID As Byte)

SOCKET.SendData Chr(&HFF)
SOCKET.SendData Chr(PacketID)
SOCKET.SendData MakeWORD (Len(Buffer) + PacketID + 3)
BufferClear

End Function


?

Errr, no that isn't correct I don't think.  This is mine

Public Function SendBNLS(socket As Winsock, PacketID As Byte)
'//
'(WORD) Message size, including this 3-byte header
'(BYTE) Message ID
'(....) Message-dependant data
   
   socket.SendData MakeWORD(Len(Buffer) + 3)
   socket.SendData Chr(PacketID)
   socket.SendData Buffer
   Clear
End Function

UserLoser.

Quote from: bethra on August 27, 2004, 03:05 PM
Errr, no that isn't correct I don't think.  This is mine

I think he was talking about his BNCS packet buffer, not BNLS one.

Sorc.Polgara

Quote from: UserLoser. on August 27, 2004, 03:07 PM
Quote from: bethra on August 27, 2004, 03:05 PM
Errr, no that isn't correct I don't think.  This is mine

I think he was talking about his BNCS packet buffer, not BNLS one.

Quote from: MindArchon on August 26, 2004, 10:25 PM
Bah, does the packetbuffer  at http://www.valhallalegends.com/docs/PacketBuffer.htm work for BNLS packets too?

If so, then it doesnt seem to be working. I send something and get no data recieved back.

hmmm I dunno, maybe I'm wrong... he said this so I thought maybe he was talking about BNLS =\

MindArchon

Quote from: UserLoser. on August 27, 2004, 03:07 PM
Quote from: bethra on August 27, 2004, 03:05 PM
Errr, no that isn't correct I don't think.  This is mine

I think he was talking about his BNCS packet buffer, not BNLS one.

BNLS packet buffer. However will that packet buffer I linked to previously work on BNCS packets without tweaking?

BaDDBLooD

Quote from: MindArchon on August 27, 2004, 03:23 PM
Quote from: UserLoser. on August 27, 2004, 03:07 PM
Quote from: bethra on August 27, 2004, 03:05 PM
Errr, no that isn't correct I don't think.  This is mine

I think he was talking about his BNCS packet buffer, not BNLS one.

BNLS packet buffer. However will that packet buffer I linked to previously work on BNCS packets without tweaking?

Read Over the posts, Figure it out for yourself.  It's pretty easy if you just Concentrate!
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Sorc.Polgara

#29
This one I use to send a BNCS packet buffer.  It is the one that is already in the DarkMinion's Packet buffer class

Public Function SendBNCS(socket As Winsock, PacketID As Byte)
   socket.SendData Chr(&HFF)
   socket.SendData Chr(PacketID)
   socket.SendData MakeWORD(Len(Buffer) + 4)
   socket.SendData Buffer
   Clear
End Function


This one I used to send a BNLS packet buffer.

Public Function SendBNLS(socket As Winsock, PacketID As Byte)
'//
'(WORD) Message size, including this 3-byte header
'(BYTE) Message ID
'(....) Message-dependant data
   
   socket.SendData MakeWORD(Len(Buffer) + 3)
   socket.SendData Chr(PacketID)
   socket.SendData Buffer
   Clear
End Function

|