Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    makciek's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    My Mood
    Drunk

    Flash game bot - communication control

    Hello
    I want to make simple online flash game bot, it only need to read some data that is public for all players in game and provide me it within my app, so I won't have to be online in game whole time. I think that best way to achieve it would be through making client-simulator app for that game. My problem is that I don't have experience with web programing/flash/sniffing and I don't know how to start a session and maintain it, so my 'bot' would work properly. Can someone with more experience on those topics give me some links/advice how to make it?
    It doesn't have to control and read all options, I need only few actions to make and maintain session, which as I saw with wireshark doesn't require so much requests to server.
    I'd be gratefull for any advice as I don't know much about web protocols.

    I'm new here, so sorry if I did title the topic wrongly or sth.

  2. #2
    NastyAttraction's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Location
    Canada
    Posts
    71
    Reputation
    10
    Thanks
    5
    My Mood
    Drunk
    I dont think C# Is going to be the way to go about this man, I could be just str8 up stupid but I would go with Oracle for that... If its an online game, (I'm assuming your talking about an agario type game) then you would want to shoot for a browser ext, a client simulator would take up way to much CPU storage especially if you were running like 5-10 of them.

  3. #3
    ToxLP's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Maybe
    Posts
    298
    Reputation
    81
    Thanks
    3,789
    My Mood
    Twisted
    You can do it in C#

    Go ahead and link the game

    If the game uses encrypted packet that will be hard to decrypt for new comers....

    Anyway for C# you will need to open up a TCP Client connection set the ip and port to the game connection capture packets send them and receive the result check it send the packet you need

    To get the session depends on how game works might be set on game login you will need to capture that if the game sends it via http or socket.
    Last edited by ToxLP; 12-31-2015 at 09:19 AM.

  4. #4
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    You can either, A) Send packets of data to the game sort of like how LeBot works however its in FLASH or B) Invoke the mouse to perform botting, this method can be even more elaborated on by having Pixel detection.

    I've already created a Flash bot of that sort for EpicDuel in the Battleon section, you can get the source here - https://******.com/DetreRaison/GamePlayerBot

    - - - Updated - - -

    Also it's in Visual Basic with Option Explicit turned off.

  5. #5
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    You can either, A) Send packets of data to the game sort of like how LeBot works however its in FLASH or B) Invoke the mouse to perform botting, this method can be even more elaborated on by having Pixel detection.

    I've already created a Flash bot of that sort for EpicDuel in the Battleon section, you can get the source here - https://******.com/DetreRaison/GamePlayerBot

    - - - Updated - - -

    Also it's in Visual Basic with Option Explicit turned off.
    This is a spaghetti code.


    A plate of spaghetti is inextricably intertwined, hence it takes the name of spaghetti code.
    Last edited by maestro1994; 01-02-2016 at 05:11 AM.



  6. #6
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    Quote Originally Posted by maestro1994 View Post
    This is a spaghetti code.


    A plate of spaghetti is inextricably intertwined, hence it takes the name of spaghetti code.
    You don't know how to program, the code is organized.

  7. #7
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    You don't know how to program, the code is organized.
    Do I need to list the trash on your code?



  8. #8
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    Quote Originally Posted by maestro1994 View Post
    Do I need to list the trash on your code?
    Sure go ahead, I'd love to see you determine what is trash.

  9. #9
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    Sure go ahead, I'd love to see you determine what is trash.
    Code:
    Sub RunCodeWith(ByRef Lines As String(), ByVal isChecked As Boolean)
            If Lines.Count > 0 And isRunning Then
                For Each strLine As String In Lines
                    arr = {}
                    arr = strLine.Split(Space)
                    Select Case arr(Zero)
                        Case PixLeftClick
                            Dim a As New Drawing.Bitmap(1, 1)
                            a.SetPixel(0, 0, ColorTranslator.FromHtml("#" & arr(Five)))
                            PictureBox2.BackColor = a.GetPixel(0, 0)
                            a.Dispose()
                            Try : If isChecked Then
                                    Select RND.Next(Zero, Five)
                                        Case Zero : Windows.Forms.Cursor.Position = New Point(arr(One) + One, arr(Two)) : Case One : Windows.Forms.Cursor.Position = New Point(arr(One) - One, arr(Two)) : Case Two : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) + One) : Case Three : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) - One) : Case Four : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                    End Select
                                Else : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two)) : End If
                                Dim a2 As New Drawing.Bitmap(1, 1) : Dim b2 As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(a2)
                                Delay(RND.Next(Zero, arr(Three))) : mouse_event(ABSOLUTE, arr(One), arr(Two), 0, 0)
                                Application.DoEvents()
                                b2.CopyFromScreen(New Drawing.Point(arr(Six), arr(Seven)), New Drawing.Point(0, 0), a2.Size)
                                PictureBox1.BackColor = a2.GetPixel(0, 0)
                                If PictureBox1.BackColor = PictureBox2.BackColor Then
                                    mouse_event(LEFTDOWN + LEFTUP, Zero, Zero, Zero, One) : Delay(arr(Four))
                                Else
                                    Delay(arr(Three)) : Delay(arr(Four))
                                End If
                                b2.Dispose() : a2.Dispose()
                                PictureBox1.Dispose()
                                PictureBox2.Dispose()
                            Catch ex As Exception : End Try
                        Case PixRightClick
                            Dim a As New Drawing.Bitmap(1, 1)
                            a.SetPixel(0, 0, ColorTranslator.FromHtml("#" & arr(Five)))
                            PictureBox2.BackColor = a.GetPixel(0, 0)
                            a.Dispose()
                            Try : If isChecked Then
                                    Select Case RND.Next(Zero, Five)
                                        Case Zero : Windows.Forms.Cursor.Position = New Point(arr(One) + One, arr(Two)) : Case One : Windows.Forms.Cursor.Position = New Point(arr(One) - One, arr(Two)) : Case Two : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) + One) : Case Three : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) - One) : Case Four : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                    End Select
                                Else : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two)) : End If
                                Dim a2 As New Drawing.Bitmap(1, 1) : Dim b2 As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(a2)
                                Delay(RND.Next(Zero, arr(Three))) : mouse_event(ABSOLUTE, arr(One), arr(Two), 0, 0)
                                Application.DoEvents()
                                b2.CopyFromScreen(New Drawing.Point(arr(Six), arr(Seven)), New Drawing.Point(0, 0), a2.Size)
                                PictureBox1.BackColor = a2.GetPixel(0, 0)
                                If PictureBox1.BackColor = PictureBox2.BackColor Then
                                    mouse_event(RIGHTDOWN + RIGHTUP, Zero, Zero, Zero, One) : Delay(arr(Four))
                                Else
                                    Delay(arr(Three)) : Delay(arr(Four))
                                End If
                                b2.Dispose() : a2.Dispose()
                                PictureBox1.Dispose()
                                PictureBox2.Dispose()
                            Catch ex As Exception : End Try
                        Case LeftClick
                            Try : If isChecked Then
                                    Select Case RND.Next(Zero, Five)
                                        Case Zero : Windows.Forms.Cursor.Position = New Point(arr(One) + One, arr(Two))
                                        Case One : Windows.Forms.Cursor.Position = New Point(arr(One) - One, arr(Two))
                                        Case Two : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) + One)
                                        Case Three : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) - One)
                                        Case Four : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                    End Select
                                Else
                                    Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                End If
                                Delay(arr(Three)) : mouse_event(LEFTDOWN, Zero, Zero, Zero, One)
                                Delay(arr(Four)) : mouse_event(LEFTUP, Zero, Zero, Zero, One)
                            Catch ex As Exception : End Try
                        Case RightClick
                            Try : If isChecked Then
                                    Select Case RND.Next(Zero, Five)
                                        Case Zero : Windows.Forms.Cursor.Position = New Point(arr(One) + One, arr(Two))
                                        Case One : Windows.Forms.Cursor.Position = New Point(arr(One) - One, arr(Two))
                                        Case Two : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) + One)
                                        Case Three : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two) - One)
                                        Case Four : Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                        Case Else
                                    End Select
                                Else
                                    Windows.Forms.Cursor.Position = New Point(arr(One), arr(Two))
                                End If
                                Delay(RND.Next(Zero, arr(Three))) : mouse_event(RIGHTDOWN, Zero, Zero, Zero, One)
                                Delay(RND.Next(Zero, arr(Four))) : mouse_event(RIGHTUP, Zero, Zero, Zero, One)
                            Catch ex As Exception
                            End Try
                        Case EndCmd : If Loops > arr(1) Then : isRunning = False : Application.DoEvents() : End If
                        Case SendENT : SendKeys.SendWait("{ENTER}")
                        Case SendUp : If CheckBox4.Checked = True Then : HoldKeyDown(Keys.Up, arr(1))
                            ElseIf CheckBox4.Checked = False Then : SendKeys.SendWait("{UP}") : End If
                        Case SendDown : If CheckBox4.Checked = True Then : HoldKeyDown(Keys.Down, arr(1))
                            ElseIf CheckBox4.Checked = False Then : SendKeys.SendWait("{DOWN}") : End If
                        Case SendLeft : If CheckBox4.Checked = True Then : HoldKeyDown(Keys.Left, arr(1))
                            ElseIf CheckBox4.Checked = False Then : SendKeys.SendWait("{LEFT}") : End If
                        Case SendRight : If CheckBox4.Checked = True Then : HoldKeyDown(Keys.Up, arr(1))
                            ElseIf CheckBox4.Checked = False Then : SendKeys.SendWait("{RIGHT}") : End If
                        Case SendKey : If strLine.StartsWith(SendKey) Then : Dim str As String = strLine.Remove(0, 8) : Dim arr() As String = str.Split(CChar(" "))
                                For L As Integer = 0 To arr.Length - 1
                                    If L < arr.Length - 1 Then : SendKeys.SendWait(arr(L) & " ") : Else : SendKeys.SendWait(arr(L)) : End If
                                Next : End If
                        Case Else : End Select
                    Delay(15)
                    If isRunning = False Then : Exit For : End If : Next
                Loops += 1
                If CheckBox5.Checked = True Then
                    If Loops > TextBox6.Text Then
                        CancelWork()
                    End If : End If : Else
                CancelWork()
            End If
    - Oh my god, my eyes hurt. An unreadable code, a spaghetti code!!
    - To make it readable you should follow VB.NET standard control naming convention.
    - You are MsgBox instead of MessageBox.Show (MsgBox ends up delegating MessageBox.Show)
    - My eyes hurt (2x)! Use newline to separate each routine
    Code:
    Sub hello()
    ..
    End Sub
    ' separate! you let confound people!! use spaces
    
    Sub hellotwo()
    
    End Sub
    - Call keyword is implied if you need to call a function in VB.NET!
    - Dim sourcecode As String = String.Empty
    - On the catch clause, always specify the exception: a generic exception is hard to debug.
    - Be coherent with .NET style coding! Don't use the old vbNewLine instead of Environment.NewLine!
    - Use always Select Case when you can!
    - Declaring variables with numbers is the worst thing you can do.
    - Much other...

    Always appreciate other people opinion, don't be rude to who is trying to help you.
    Last edited by maestro1994; 01-02-2016 at 07:57 PM.



  10. #10
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    you mad? I said It had option explicits off

  11. #11
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    you mad? I said It had option explicits off
    Oh my god, you are an idiot. What's the point of setting Option Explicit statement off? You are out from the discussion.
    1. On the code there is no Option Explicit Off.
    2. You don't know what that statement is used for. Setting Option Explicit (by default set On) to Off means if you want to declare a variable you don't need to declare it, but just to initialize it:
    Code:
    Option Explicit Off
    Public Class Form1
        Sub routine()
            hello = "something" ' no errors
        End Sub
    End Class
    It's always a bad practice setting it Off because you generalize it (it will be as Object type, and this is not good to prevent some misinterpretations), this is a reason it's set by default to On.
    3. Another proof you don't use set nowhere Option Explicit, is you declare each variable with Dim/As keywords, e.g:
    Code:
    Dim Fst As Integer
    Edit: no random insults, thanks!
    Last edited by maestro1994; 01-03-2016 at 02:12 PM.



  12. #12
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    Quote Originally Posted by maestro1994 View Post
    Oh my god, you are an idiot. What's the point of setting Option Explicit statement off? You are out from the discussion.
    1. On the code there is no Option Explicit Off.
    2. You don't know what that statement is used for. Setting Option Explicit (by default set On) to Off means if you want to declare a variable you don't need to declare it, but just to initialize it:
    Code:
    Option Explicit Off
    Public Class Form1
        Sub routine()
            hello = "something" ' no errors
        End Sub
    End Class
    It's always a bad practice setting it Off because you generalize it (it will be as Object type, and this is not good to prevent some misinterpretations), this is a reason it's set by default to On.
    3. Another proof you don't use set nowhere Option Explicit, is you declare each variable with Dim/As keywords, e.g:
    Code:
    Dim Fst As Integer
    Edit: no random insults, thanks!
    Option Explicits causes tons of errors in my code because I didn't declare things right and a ton of other things. I know what it does, but you're right I have no idea what it's for and its on whatever by default I just didn't remember if it was true or false.

    Go jerk off to microsoft pleb.

  13. #13
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    I just didn't remember if it was true or false.
    Yes yes, and I want a cookie.

    Quote Originally Posted by Dab1996426 View Post
    Go jerk off to microsoft pleb.
    My brother is probably littler than a 12-year-old like you, but more intelligent than you.
    I'm surprised no moderators intervene. You are annoying the whole forum, in your profile I can see just insults to you.
    Be more generous and less prig my friend.
    Last edited by maestro1994; 01-03-2016 at 06:47 PM.



  14. #14
    Dab's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    5,426
    Reputation
    663
    Thanks
    9,874
    Quote Originally Posted by maestro1994 View Post
    My brother is probably littler than a 12-year-old like you, but more intelligent than you.
    Try talking to more people in English you filthy european pleb.

    - - - Updated - - -

    Also if your brother > 12 then you would say "younger", Littler isn't a word you would say smaller (A mouse is smaller than an Elphant).

  15. #15
    maestro1994's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Dab1996426 View Post
    Also if your brother > 12 then you would say "younger", Littler isn't a word you would say smaller (A mouse is smaller than an Elphant).
    I know you go on elementary school, but please kid! Learn math! brother < 12 = correct.

    I searched something about you, this is what I found - people also kid you:
    Dab: I was thinking about making a decent looking Trainer for all the AE games including packet sending for AQW and AutoClicking for EpicDuel / OvrSoul

    If anyone has any ideas for this let me know. I had the idea to add a DF PVP ID uploader type thing so it will automatically capture and get the text of your ID and send it to a php then display a list of ids of other people who used the trainer.

    Any ideas for features, design, etc.. let me know.

    chibizs: Lol, its like a mini me.
    ahuahuahauahuahauhauhaahahahauh
    Go to develop with your lovely VB.NET. Oh sorry, you don't even know how to code it.
    I suggest for children like you Lolcode!
    Last edited by maestro1994; 01-03-2016 at 07:45 PM.



Page 1 of 2 12 LastLast

Similar Threads

  1. WPE for Beginners (Flash Games)
    By Zededarian in forum Game Hacking Tutorials
    Replies: 9
    Last Post: 03-19-2016, 11:59 AM
  2. [Help] Bot being detected in a flash game...
    By letskill502 in forum Coders Lounge
    Replies: 1
    Last Post: 07-21-2013, 09:40 PM
  3. Creating a Flash Game Bot
    By GaugeDirector in forum Visual Basic Programming
    Replies: 2
    Last Post: 12-28-2009, 12:52 PM
  4. cheating on crap flash games
    By Hyperion in forum General Game Hacking
    Replies: 2
    Last Post: 12-26-2006, 11:01 AM
  5. Flash Games =]
    By neoRUS in forum Spammers Corner
    Replies: 30
    Last Post: 08-15-2006, 05:52 PM