TriggerBot

Ask gaming related questions
zarioftw
Posts: 6
Joined: 18 Mar 2018, 08:37

TriggerBot

21 Apr 2018, 19:49

I want to make a script that scans one pixel, and when a slightest change happens inside that pixel is does a left click. (triggerbot) I have found a scirpt that i tried to adjust to my needs but i failed. Need help :oops:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
eventhorizon
Posts: 158
Joined: 27 Oct 2016, 14:22

Re: TriggerBot

22 Apr 2018, 18:34

1, first you need the xy address of the pixel on the screen
2 save that in an ini file or in your program as a variable so you can always find it again
3 then you need to read the color there and save it
4 on a hotkey command you can do a loop to read the color and compare it with the saved color to find out if it's different
you can use PixelGetColor for this or you cn use PixelSearch both will work
save the color you find as the new base color
then click on the desired screen location
you can then either go loop back with some way to break the loop when you want it to stop
or you can just exit the click routine and use the hotkey to restart it when you want to.
Here are a couple of routines that will help you locate and save the color you're looking for.
It's always better to go as simple as possible first then add complexity as your knowledge of the
problem grows. The header stuff is there to make sure you're in the proper screen mode to grab
the color. Being in True full screen will cause the mouse and pixel reads to fail. make sure your game
is in window mode or window full screen mode. you can tell the difference because window mode has
a title bar at the top of the screen. If you don't see that you're in the wrong video mode.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 9 guests