i know vb good in my opinion and a bit of winsock so i wanted to try to write a B.net client (D2) i tried this code
http://botdev.valhallalegends.com/documents/vbwinsockhlp.html
At the homepage but how do i make it to log in and so on i dont get it >.< ???
Winsock just needs for you to connect to a server (includes the port number it uses) and send certain pieces of data to that server. You can look at open source projects from http://zeroforce.net to get an idea of how things work. I'd also recommend you check out http://bnetdocs.valhallalegends.com for a large variety of Battle.net packets which are neatly documented and explain how they work or what they do (most of them).
EmptyChat2 (http://www.liquid-server.org/sources/EmptyChat2), a relatively simple bot with not much more than a connection. Again, we stress you NOT copy & paste...
Also searching on this forum will provide you with information which you can learn off of and accomplish that goal of yours.
Stupid me!
BnetDocs (http://bnetdocs.valhallalegends.com) is essential! (How could I forget?)
tnx alot for the help ill look on the links when i got time (=
after reading the http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=2
i tryed to make some thing that sends the connection info but i just get disconnected )= can some one look what i did wrong? heres a link to my small test -> http://www.gamers-wish.com/wing/d2ringar/d2chat.zip
Quote from: Wing87 on April 25, 2006, 09:36 AM
after reading the http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=2
i tryed to make some thing that sends the connection info but i just get disconnected )= can some one look what i did wrong? heres a link to my small test -> http://www.gamers-wish.com/wing/d2ringar/d2chat.zip
hi
I dont think u was sending the 0x01 protocol byte before you were sending 0x50.
Try it now (http://www.geocities.com/ringomail712/D2Chat.zip), Iv added a quick send buffer class and a few functions to get you started.
Hope this helps
tnx alot looking on it you added a bit (=
one question must i do this evert time b4 i send some thing
With Buf
'put a byte into the buffer
.InsertBYTE &H1
'send and clear the buffer
.SendPacket Me.ws
No. The BNCS protocol is started by sending a protocol identifier as soon as you connect. This is a byte; 1 for binary, 2 for FTP, and 3 for Telnet (which is no longer supported).
ok tnx how do i get CheckRevision()?
and what does
(BOOLEAN) Using Spawn (32-bit)
(DWORD) CD key's product value
(DWORD) CD key's public value
(STRING) Exe Information
(DWORD[5]) Hashed Key Data
mean?
sorry for my noobies >.<
It means that the packet contains a 32-bit boolean value (1 or 0) about whether you are using a Spawned version of the game, 2 double-words (32 bit values) containing the CD key's product and public values, a null-terminated string containing the file information, and an array of 5 double-words containing a hash of the CD key's private value.
You might want to consider using BNCSUtil (http://bncsutil.ionws.com/) to do CheckRevision.
i meant what is a CD key's product value is that the CD in its own? or what and the public what is that how do i get these values?
and what exakty is Exe Information the diablo II.exe or what?
what is a Spawned version of the game?
RTFM. BNCSUtil (linked above) will get you the CD key and CheckRevision stuff. The .exe info is included also in BNCSUtil.
Spawn is a feature of Diablo Retail (DRTL) and Starcraft Retail (STAR) that allows you to install a subset of the game to play one map on multiplayer with the CD key owner.
It is very clear to me that you have not attempted a packet capture, because it would be plainly obvious from a packet capture what the .exe information is. Until you begin to help yourself, you will find very few people here who are willing to help you.
so what vaule do i put in the place then? ;D
and on what file do i run the getExeInfo on? ;D
i guess i sould use checkRevisionA but there are a lot of stuff it wants as input )=
Quote from: Wing87 on April 25, 2006, 02:27 PM
so what vaule do i put in the place then? ;D
and on what file do i run the getExeInfo on? ;D
i guess i sould use checkRevisionA but there are a lot of stuff it wants as input )=
You put the values which are correct for the current version. I'd hazard a guess that you should run the getExeInfo (whatever that is) on...an exe file!
Quote from: Kp on April 25, 2006, 09:17 PM
Quote from: Wing87 on April 25, 2006, 02:27 PM
so what vaule do i put in the place then? ;D
and on what file do i run the getExeInfo on? ;D
i guess i sould use checkRevisionA but there are a lot of stuff it wants as input )=
You put the values which are correct for the current version. I'd hazard a guess that you should run the getExeInfo (whatever that is) on...an exe file!
Kp, you're in far left field. That is CRAZY talk.
Quote from: MyndFyre[vL] on April 25, 2006, 02:25 PM
RTFM. BNCSUtil (linked above) will get you the CD key and CheckRevision stuff. The .exe info is included also in BNCSUtil.
Spawn is a feature of Diablo Retail (DRTL) and Starcraft Retail (STAR) that allows you to install a subset of the game to play one map on multiplayer with the CD key owner.
It is very clear to me that you have not attempted a packet capture, because it would be plainly obvious from a packet capture what the .exe information is. Until you begin to help yourself, you will find very few people here who are willing to help you.
Note, WarCraft II BNE (W2BN) supports Spawn as well.
Quote from: J on April 25, 2006, 09:43 PM
Quote from: MyndFyre[vL] on April 25, 2006, 02:25 PM
RTFM. BNCSUtil (linked above) will get you the CD key and CheckRevision stuff. The .exe info is included also in BNCSUtil.
Spawn is a feature of Diablo Retail (DRTL) and Starcraft Retail (STAR) that allows you to install a subset of the game to play one map on multiplayer with the CD key owner.
It is very clear to me that you have not attempted a packet capture, because it would be plainly obvious from a packet capture what the .exe information is. Until you begin to help yourself, you will find very few people here who are willing to help you.
Note, WarCraft II BNE (W2BN) supports Spawn as well.
While were on note's Japan SC can be spawned also.
so i just run the getExeInfo on my own exe or on some diablo 2 exe file?
RTFM.QuoteIn what order should the "hash files" be given to checkRevision?
These basically follow the order used by bnetauth.dll. The executable file is always first.
[...]
Diablo II / Lord of Destruction
Game.exe
Bnclient.dll
D2Client.dll
[...]
tnx ill try it
i did work some more at the "chat" looked abit on the 42oChat Source code just wanted to ask if some one can look if everything is right
http://www.gamers-wish.com/wing/d2ringar/d2chat.zip
tnx
I was gonna have a look at it, but your link don't work.
But if it works then everything should be fine?
then link works fine to me >.< ???
dont know if it works yet havent doen the rest of the stuff to get the msg back from the server just wanted to know if i did code it so it does work cus the mostly i just looked of the other bot >.<
Same, it's fine.
Quote[3:37:59 PM] Parseage() Unhandled packet 0x51
FF 51 09 00 01 01 00 00 00 .Q.......
You don't even handle 0x51 yet =\.
clsBuffy...lmfao, nice.
If Not ws.State = sckClosed Then ws.Close
Consider using
If ws.State <> sckClosed Then ws.Close
One less operation.
Um...naming conventions...
ie. cmdCon, cmdDiscon, txtLog, tmrStateup, lblState, etc.
Private Sub Form_Unload(Cancel As Integer): Call Killme: End Sub
should probably be
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
Call Killme
Cancel = 0
End Sub
Forget Terminate.
Killme:
If Not ws.State = sckClosed Then ws.Close
Once again, <> instead of Not; why do you even have it in the first place? It can't hurt to close an already-closed connection.
Everything else looks fine...
EDIT:
Version = Val("&H" & StrToHex(StrReverse(Mid(Data, 8, 4))))
WTF? There's a better way than that...CopyMemory, I believe.
Quote from: Wing87 on April 28, 2006, 07:26 PM
then link works fine to me >.< ???
dont know if it works yet havent doen the rest of the stuff to get the msg back from the server just wanted to know if i did code it so it does work cus the mostly i just looked of the other bot >.<
Link works for me now.
I had the same problem.. I made a bot way back when I first started learning VB an whatnot.. Got confused with things an took stuff from other people source code.. I found out later after it got going that some of it had errors in which I could not fix because it wasn't something I coded.. So I figured instead of taking someone elses code I would just look at their an see what is going on where an then code it myself in my own way so if an error were to arise I could fix it because I am the one that coded it.
So yea.. Don't take other peoples code(I am not saying you did, just a tip.) an just find out what is going on where an understand it. So you can just get it all together, an working alright. :) What raylu stated is just about it.. Try to handle 0x51 using BNet Docs (http://www.bnetdocs.com) an you should be alright.
ok i think your right with that and yes i did copy a few lines... and now i did add a few lines to do the 0x51 it returns 0x101 so i guess my error is
Version
Checksum
can some one tell me from were do i get those?, i dont really understand that yet!
tnx for all help (=
http://bncsutil.ionws.com/
You've probably been there, but look at the VB Example Bot. While you're doing that, have Bnetdocs open and see how the code matches the packet format.
Once you figure out how to parse it, replicate it in your bot.
Quote from: raylu on May 03, 2006, 08:44 PM
http://bncsutil.ionws.com/
You've probably been there, but look at the VB Example Bot. While you're doing that, have Bnetdocs open and see how the code matches the packet format.
Once you figure out how to parse it, replicate it in your bot.
We already provided that link, and it's already been ignored. Don't know what else to do. :P