Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Dayclone on February 12, 2004, 04:29 PM

Title: Need Help
Post by: Dayclone on February 12, 2004, 04:29 PM
Hello, I don't know exactly how to do this but. WHne i try connecting my bot it Connects then Disconnects does anyone know what mgiht cause this problem? and I'm using hashes. Too complicated to work with BNLS. Please help thanks.
Title: Re:Need Help
Post by: effect on February 12, 2004, 04:30 PM
Im so good at solving unspecific problems , let me just load up my ESP

dude show some code , tell us whats going on when you are trying to connect , what your sending etc.
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 06:17 PM
What kinda coding you want lol I got lots theirs packetclass gameclass config classs and loginclass and a public module.
Title: Re:Need Help
Post by: effect on February 12, 2004, 06:26 PM
The code that is revolving around where you are getting your area?

How long into your connection till u get an error? w

What are you doing when you get the error?

What are you sending to battle.net when you get the error?

What are you receiving from battle.net when you get the error?
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 06:37 PM
Well I dunno what i'm sending or reciving but I can show you my codes to everything if you want and it's like instantly when i connect the bot.
Title: Re:Need Help
Post by: UserLoser. on February 12, 2004, 06:41 PM
Quote from: Dayclone on February 12, 2004, 06:37 PM
Well I dunno what i'm sending or reciving but I can show you my codes to everything if you want and it's like instantly when i connect the bot.

Then it's not your code

Try using a packet logger, and see everything that's being sent between the connection
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 06:42 PM
I can show you everything in my coding if you want but it's gonna be long.
Title: Re:Need Help
Post by: effect on February 12, 2004, 06:42 PM
Add some error handling to your code and pin-point exactly where your bot stops then post up that code segment if you cant figure it out yourself.
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 06:47 PM
See if you look under my name it says i'm a newbie, I hope you don't mind helping me out. How do i add a error handler to it?
Title: Re:Need Help
Post by: effect on February 12, 2004, 06:51 PM
I dont mind helping you out otherwise i wouldnt of posted at all.

I sometimes just add stuff to my RTB so i can pinpoint where / what is getting done.

eg When an event fires off just add

Addchat "EventName Fired now" , vbred etc , you could use a number of things to accomplish this task.

So on your Socket.Connect event , Output something thats says you have successfully connected , when ever you send or receieve something add it to your RTB and so forth. This way you can pin-point shit happening in Real Time.
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 06:54 PM
RTB?

Ok I get the connected message then this is the coding for what apperas next

Private Sub Socket_Close(Index As Integer)

   Socket(Index).Close
   
   Display OutputText(Index), True, True, vbRed, "Disconnected"
   
End Sub
Title: Re:Need Help
Post by: Newby on February 12, 2004, 07:00 PM
Quote from: Dayclone on February 12, 2004, 06:37 PM
Well I dunno what i'm sending or reciving but I can show you my codes to everything if you want and it's like instantly when i connect the bot.

I guess you found Shadowbot?

Show us some CODING

On what happens on connect

What header you send / what packet you send.

Debug.Print is very good too.
Title: Re:Need Help
Post by: effect on February 12, 2004, 07:02 PM
your RichTextBox

that isnt the cause of your problem thought , something is causing that to fire.

If you are using the binary interface then possibly your version byte? there could be a number of things a miss , and its kind of hard for me to even speculate without getting some decent feedback.
Title: Re:Need Help
Post by: Dayclone on February 12, 2004, 07:03 PM
No it's a winbot lol here's the coding.

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal numbytes As Long)

Private Buffer As String

Public Function InsertDWORD(Data As Long)

   Buffer = Buffer & MakeDWORD(Data)
   
End Function

Public Function InsertWORD(Data As Integer)

   Buffer = Buffer & MakeWORD(Data)
   
End Function

Public Function InsertBYTE(Data As Integer)

   Buffer = Buffer & Chr(Data)
   
End Function

Public Function InsertNTString(Data As String)

   Buffer = Buffer & Data & Chr(0)
   
End Function

Public Function InsertNonNTString(Data As String)

   Buffer = Buffer & Data
   
End Function

Function MakeDWORD(Value As Long) As String

   Dim Result As String * 4
   CopyMemory ByVal Result, Value, 4
   MakeDWORD = Result
   
End Function

Function MakeWORD(Value As Integer) As String

   Dim Result As String * 2
   CopyMemory ByVal Result, Value, 2
   MakeWORD = Result
   
End Function

Public Function Clear()

   Buffer = ""
   
End Function

Public Function SendPacket(Index As Integer, PacketID As Byte)

   If MainForm.Socket(Index).State <> sckConnected Then: Exit Function
   
   MainForm.Socket(Index).SendData Chr(&HFF) & Chr(PacketID) & MakeWORD(Len(Buffer) + 4) & Buffer
   Clear

End Function

Public Function SendAuthPacket(PacketID As Byte)

   If MainForm.AuthSocket.State <> sckConnected Then: Exit Function
   
   MainForm.AuthSocket.SendData Chr(PacketID) & Buffer
   Clear

End Function



This is all the packetsclass
Title: Re:Need Help
Post by: Eli_1 on February 13, 2004, 02:27 PM
...Useless  :-\
Title: Re:Need Help
Post by: Fr0z3N on February 13, 2004, 03:20 PM
Sad to say but that coding is stolen from TCP Winbot aka GamerBot by Networkz or Barumonk.
Title: Re:Need Help
Post by: Spht on February 13, 2004, 03:43 PM
Quote from: Fr0z3N on February 13, 2004, 03:20 PM
Sad to say but that coding is stolen from TCP Winbot aka GamerBot by Networkz or Barumonk.

Actually, it looks much like the public packet buffer class that DarkMinion wrote, which many Visual Basic bots use.
Title: Re:Need Help
Post by: Fr0z3N on February 14, 2004, 07:20 AM
Quote from: Dayclone on February 12, 2004, 06:54 PM

Private Sub Socket_Close(Index As Integer)

   Socket(Index).Close
   
   Display OutputText(Index), True, True, vbRed, "Disconnected"
   
End Sub


Is by Networkz/Barumonk.
Title: Re:Need Help
Post by: Soul Taker on February 14, 2004, 09:07 AM
Do you work for SCO?
Title: Re:Need Help
Post by: Spht on February 14, 2004, 09:10 AM
Quote from: Soul Taker on February 14, 2004, 09:07 AM
Do you work for SCO?

Does your bot use the Close method to close sockets? If so, you must be using Networkz's code!
Title: Re:Need Help
Post by: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?
Title: Re:Need Help
Post by: Eric on February 14, 2004, 11:39 AM
QuoteI don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ).

Denial* didn't code anything in that bot except for the Me.Caption = "Gamer Bot v1.0 By Denial"

QuoteWell I dunno what i'm sending or reciving but I can show you my codes to everything if you want and it's like instantly when i connect the bot.
Usally people on this forum are reluctant to help copy/paste coders.
Title: Re:Need Help
Post by: Fr0z3N on February 14, 2004, 12:13 PM
Quote from: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?

Spht...  ;D
Title: Re:Need Help
Post by: Dayclone on February 14, 2004, 02:18 PM
Waht's that suppsoed to mean?
Title: Re:Need Help
Post by: Dyndrilliac on February 14, 2004, 02:52 PM
Quote from: Fr0z3N on February 14, 2004, 12:13 PM
Quote from: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?

Spht...  ;D

You missed the point entirely, just because That is the method in which was used for that author doesn't mean in every instance you see that code that he infact wrote it.
Title: Re:Need Help
Post by: Spht on February 14, 2004, 03:56 PM
Quote from: Fr0z3N on February 14, 2004, 12:13 PM
Quote from: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?

Spht...  ;D

I hereby copyright AddChat vbRed, "Disconnected" as my code. No one's allowed to use it!

(It's not worth your while to point out that someone's using the same method of closing a socket and telling the user. I'm sure there a many programs which load a form and update its caption the same way -- no one cares.)
Title: Re:Need Help
Post by: Newby on February 14, 2004, 04:15 PM
Quote from: Spht on February 14, 2004, 03:56 PM
Quote from: Fr0z3N on February 14, 2004, 12:13 PM
Quote from: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?

Spht...  ;D

I hereby copyright AddChat vbRed, "Disconnected" as my code. No one's allowed to use it!

(It's not worth your while to point out that someone's using the same method of closing a socket and telling the user. I'm sure there a many programs which load a form and update its caption the same way -- no one cares.)


So, can I still go AddChat vbGreen, "Disconnected" ? :) :P
Title: Re:Need Help
Post by: Spht on February 14, 2004, 04:37 PM
Quote from: Newby on February 14, 2004, 04:15 PM
Quote from: Spht on February 14, 2004, 03:56 PM
Quote from: Fr0z3N on February 14, 2004, 12:13 PM
Quote from: Dayclone on February 14, 2004, 10:17 AM
I don't work for anyone, and Fr0z3N is right the coding is done by Daneil
( Gamerbot ). I have gave him credit for it too. I fixed this problem but I have appeared with another problem with his coding. When I log on and everything it creates game and the other one joins but nothing happens. Would anyone like to see the gameclass coding?

Spht...  ;D

I hereby copyright AddChat vbRed, "Disconnected" as my code. No one's allowed to use it!

(It's not worth your while to point out that someone's using the same method of closing a socket and telling the user. I'm sure there a many programs which load a form and update its caption the same way -- no one cares.)


So, can I still go AddChat vbGreen, "Disconnected" ? :) :P

Sure, Mr. Positive.
Title: Re:Need Help
Post by: Dayclone on February 14, 2004, 04:39 PM
Eh heh sorry for the ocmotion i've cause, but I jsut need help with the game sequence. This is not my coding either you can help me do the right thing and help me write my own or soem pointers in what to change. I did change what Spht had origianlly created instead of Red I put it a different color.
Title: Re:Need Help
Post by: Spht on February 14, 2004, 04:50 PM
Quote from: Dayclone on February 14, 2004, 04:39 PM
I did change what Spht had origianlly created instead of Red I put it a different color.

It was a joke.
Title: Re:Need Help
Post by: Networks on February 14, 2004, 06:09 PM
QuoteDenial* didn't code anything in that bot except for the Me.Caption = "Gamer Bot v1.0 By Denial"

^ thats the funniest shit i've ever heard...
Title: Re:Need Help
Post by: hismajesty on February 14, 2004, 06:26 PM
Quote from: Fr0z3N on February 13, 2004, 03:20 PM
Sad to say but that coding is stolen

You have NO room to talk when it comes to issues of stealing coding.

To whoever started this topic: www.vbtutor.net
Title: Re:Need Help
Post by: Hamtaro on February 14, 2004, 07:02 PM
Quote from: hismajesty on February 14, 2004, 06:26 PM
Quote from: Fr0z3N on February 13, 2004, 03:20 PM
Sad to say but that coding is stolen

You have NO room to talk when it comes to issues of stealing coding.

To whoever started this topic: www.vbtutor.net
ooh is there one of those for c++?
Title: Re:Need Help
Post by: hismajesty on February 14, 2004, 10:56 PM
I'm sure there is, just use google. I've never looked for one really since I usually just use my C++ book when I need to look something up. =\
Title: Re:Need Help
Post by: Dayclone on February 15, 2004, 09:53 AM
=/ I'll see what I can do about my limited VB skills.
Title: Re:Need Help
Post by: Grok on February 16, 2004, 11:17 AM
Quote from: Spht on February 14, 2004, 03:56 PMI hereby copyright AddChat vbRed, "Disconnected" as my code. No one's allowed to use it!

Hey!!!

:p
Title: Re:Need Help
Post by: K on February 16, 2004, 03:37 PM
Quote from: Spht on February 14, 2004, 03:56 PM
I hereby copyright AddChat vbRed, "Disconnected" as my code. No one's allowed to use it!

Uhoh -- Now that I've seen your copyrighted code, any similar code I write will be an infringment.
this->AppendText(Color("Disconnected.", "#FF0000"), true);DAMN.
this.WriteTextF(Color.Red, "Disconnected.");DAMN.
Title: Re:Need Help
Post by: MrRaza on February 21, 2004, 05:01 PM
Quote from: iago on February 11, 2004, 08:28 AM
Get a game and a packetsniffer (hint: www.ethereal.com) and a compiler (VS6, VS.net, gcc, dev-c++, etc).  Get a disassembler/debugger (IDA, W32Dasm, Softice, windbg, even VS or gdb).  That's all you need.

Use your packetsniffer to watch the game connect.  Do this a few times, and find out what changes.  Try changing your password and connecting again, see what changes.  Try connecting from your friends computer, or with a different cdkey.  Send various chat messages in the channel and see what happens.  

After that, you should be able to tell the basic protocol of the game.  Then take your debugger, and find where data is send and recieved (send() and recv()).  From there, look for where the sent data is created, or where the recieved data is processed.  

One you've found that, use your disassembler to go through the create/process functions and find out how they work, and, eventually, write your own software to imitate them.

That's all it takes!!

Of course, there's the option of using other people's work, like BNLS or CSB, but that's not fun.

What you need to know:
- some language, your choice.  You also need to know sockets programming.
- assembly

That's it!

iago said it perfectly. Starting a project like this isn't good, you won't complete because you don't know how. This has been said many times before, all you have to do is learn the language, try some simple projects out that you can add to your bot when you've learned everything, and see where you are from there.