[Tutorial] Efficient TriggerBot [Visual Basic] *Fixed a bug*

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Anomxus

Jr.Coder
Full Member
Nobleman
Jun 19, 2012
59
453
2
Im going to show you how you can make your own trigger bot.
This bot dosen't take screenshots, it scans the mouse position for colors (Super efficient).

First open up a new project, call it whatever you want.

Then add:
2 Pictureboxes.
1 NumbericUpDown.
1 Timer.
2 Button.
2 Labels.

Double click the toggle bot button.
Write this code in;
C++:
Timer1.Enabled = Not Timer1.Enabled
^Space efficient, don't you think?

Moving on...

Step 3.

Open the timer code.
Write this in;
C++:
Try
      Dim BMP As New Drawing.Bitmap(1, 1)
      Dim GFX As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(BMP)
      GFX.CopyFromScreen(New Drawing.Point(MousePosition.X, MousePosition.Y), _
      New Drawing.Point(0, 0), BMP.Size)
      Dim Pixel As Drawing.Color = BMP.GetPixel(0, 0)
      Me.PictureBox2.BackColor = Pixel
      If (Pixel.R <= PictureBox1.BackColor.R + NumericUpDown1.Value) And (Pixel.R >= PictureBox1.BackColor.R - NumericUpDown1.Value) Then
        If (Pixel.B <= PictureBox1.BackColor.B + NumericUpDown1.Value) And (Pixel.B >= PictureBox1.BackColor.B - NumericUpDown1.Value) Then
          If (Pixel.G <= PictureBox1.BackColor.G + NumericUpDown1.Value) And (Pixel.G >= PictureBox1.BackColor.G - NumericUpDown1.Value) Then
            LeftClick()
          End If
        End If
      End If
    Catch ex As Exception
      Timer1.Stop()
      MsgBox("Error: " & ex.Message)
    End Try
This code is getting the color of the mouse position and both paste the color to the picturebox and checking if its similar to your coosen color (which we havent done yet. You should have an errors but were going to fix them).

Step 4.
Declare MouseEventF.

Put this bit of code after "Public Class Form1"
C++:
Public Const MOUSEEVENTF_LEFTDOWN = &H2
  Public Const MOUSEEVENTF_LEFTUP = &H4
  Private Const MOUSEEVENTF_RIGHTDOWN = &H8
  Private Const MOUSEEVENTF_RIGHTUP = &H10

  Declare Function apimouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean
Step 5.
Create the "Click Sub".

Write this bit of code;
C++:
Private Sub LeftClick()
    Call apimouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
    Call apimouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
  End Sub
Step 6.

Almost done!

On the secound button, write:

C++:
Dim ColorPre As New ColorDialog
    ColorPre.ShowDialog()
    PictureBox1.BackColor = ColorPre.Color
CONGRATULATIONS YOU HAVE MADE AN EFFICIENT TRIGGERBOT!

The NumericUpDown is to check similar colors to the selected color. Hmm... Not the best way of explaining it :/
 

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
Great addition Anomxus, Im sure many will benefit from this. sorry about the delay in posting.

Once you have 5+ posts you will be able to post your own links.

Fleep
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
Nice thank you for this post! I will definitely try this.

Can I get vac banned if I use this?
 

Helios

Coder
Meme Tier VIP
May 24, 2012
207
1,113
4
Anunymux said:
Nice thank you for this post! I will definitely try this.

Can I get vac banned if I use this?
No, it's 100% VAC secure! :) The reason is that it doesn't modify any memory, it simply looks for a color under the cursor.
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
Okay I tried it but I can not get it to work. First I start the program, then I push the second button to chose a color. Then I click on the first button and nothing happens. What could I made wrong?
 

Anomxus

Jr.Coder
Full Member
Nobleman
Jun 19, 2012
59
453
2
Anunymux said:
Okay I tried it but I can not get it to work. First I start the program, then I push the second button to chose a color. Then I click on the first button and nothing happens. What could I made wrong?
Does it crash?
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
No no it works great with no error messages. Whether it doesn´t shoot or it shoots all the time :/

 

Anomxus

Jr.Coder
Full Member
Nobleman
Jun 19, 2012
59
453
2
Anunymux said:
No no it works great with no error messages. Whether it doesn´t shoot or it shoots all the time :/
Oh i think i spotted the problem.
Try reverse the bot.
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
No the problem is if it shoots it shoots all the time and the color does not matter where it shoots at. I tried to play in windowed mode.
Or what did you mean by "try it reverse"?

 

Anomxus

Jr.Coder
Full Member
Nobleman
Jun 19, 2012
59
453
2
Anunymux said:
No the problem is if it shoots it shoots all the time and the color does not matter where it shoots at. I tried to play in windowed mode.
Or what did you mean by "try it reverse"?
Nothing, can i have your skype?
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
Yes ofcourse, it´s like my name here,

Anunymux =)

Edit:

Anomxus helped me to get this program to work. Now it works great ;) With chams you can achieve the best results.
 

guru

Coder
Full Member
Nobleman
Jun 8, 2012
115
673
1
Could you please post how did he fix the problem?
 

konsowa

Coder
Full Member
Nobleman
May 24, 2012
178
753
2
U wanna post that fix for the rest of the people that need it?
 

Anomxus

Jr.Coder
Full Member
Nobleman
Jun 19, 2012
59
453
2
Konsowa said:
U wanna post that fix for the rest of the people that need it?
I just removed the 'Not' in the code that checks after the color.
C++:
Try
      Dim BMP As New Drawing.Bitmap(1, 1)
      Dim GFX As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(BMP)
      GFX.CopyFromScreen(New Drawing.Point(MousePosition.X, MousePosition.Y), _
      New Drawing.Point(0, 0), BMP.Size)
      Dim Pixel As Drawing.Color = BMP.GetPixel(0, 0)
      Me.PictureBox2.BackColor = Pixel
      If (Pixel.R <= PictureBox1.BackColor.R + NumericUpDown1.Value) And (Pixel.R >= PictureBox1.BackColor.R - NumericUpDown1.Value) Then
        If (Pixel.B <= PictureBox1.BackColor.B + NumericUpDown1.Value) And (Pixel.B >= PictureBox1.BackColor.B - NumericUpDown1.Value) Then
          If (Pixel.G <= PictureBox1.BackColor.G + NumericUpDown1.Value) And (Pixel.G >= PictureBox1.BackColor.G - NumericUpDown1.Value) Then
            LeftClick()
          End If
        End If
      End If
    Catch ex As Exception
      Timer1.Stop()
      MsgBox("Error: " & ex.Message)
    End Try
 

Anunymux

Newbie
Full Member
Jun 12, 2012
9
232
0
Yes I wanted to write that everybody just needs to remove the 3 "nots" but then I saw that the code was already fixed.

 

Gam3rr0rZ

Newbie
Full Member
Jan 7, 2013
10
458
0
Not bad idea, it can be even more improved, but yeah this requires chams and/or wallhack for game to work properly (i do not mean on flash games...).

8/10. +rep
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods