AHK Triggerbot AKA Color Extension ( By Pean )

Posts 115 of 20 · Page 1 of 2
AHK Triggerbot AKA Color Extension ( By Pean )
********* Not mine, I took it from another forum **************

Pean's AHK "Triggerbot" extension


How to Use
Download AHK
If you want to use this in fullscreen, YOU HAVE TO DISABLE WINOWS AERO

Features
Enable "Triggerbot" - Insert
Disable "Triggerbot" - F11
Panic button - F10 (terminates autohotkey)

Settings
sens:=10 --> color tolerance for each color in RGB 0-255 model
delz:=10 --> delay before shot is fired when color changes
holdtiem:=400 --> how long you want left mouse held down after shot (really good with my norecoil ahk thingy)
crossset:=1 --> X and Y crosshair offset in pixels

How it works
This detects color changes, lock your crosshair on desired spot and hold Mouse button 4 (or the key if you changed it), if someone crosses it will shoot at him

Don't have mouse button 4? Just change every XButton1 to for example LShift or T or any other key from ahk key list


Detection
VAC - Undetected
ESEA - Undetected, use with caution
CEVO - Undetected, use with caution



Code :
Code:
sens:=10
delz:=10
holdtiem:=400
crossset:=1
;color split
SplitRGBColor(RGBColor, ByRef Red, ByRef Green, ByRef Blue)
{
    Red := RGBColor >> 16 & 0xFF
    Green := RGBColor >> 8 & 0xFF
    Blue := RGBColor & 0xFF
}
 
SplitBGRColor(BGRColor, ByRef Red, ByRef Green, ByRef Blue)
{
    Red := BGRColor & 0xFF
    Green := BGRColor >> 8 & 0xFF
    Blue := BGRColor >> 16 & 0xFF
}
 
;Menu loop
loop
{
GetKeyState, state, F10
if state = D
{
SoundPlay, %A_ScriptDir%\8.mp3
sleep 2000
ExitApp
}
 
GetKeyState, state, F11
if state = D
{
trigger:=false
}
 
GetKeyState, state, Insert
if state = D
{
trigger:=true
}
 
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
sleep 50
MouseGetPos, oneX, oneY
PixelGetColor, colorone, oneX+crossset, oneY+crossset
SplitRGBColor(colorone, oneRed, oneGreen, oneBlue)
}
 
if GetKeyState("XButton1") && trigger==true
{
sleep 1
MouseGetPos, twoX, twoY
PixelGetColor, colortwo, twoX+crossset, twoY+crossset
SplitRGBColor(colortwo, twoRed, twoGreen, twoBlue)
 
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
sleep delz
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
}
}
Moved to the "Script" section as it's a script release.
this is probably the third script rel on it
But i'm sure alot of people will learn alot from it! the more code the better!
Quote Originally Posted by _NightWare View Post
this is probably the third script rel on it
But i'm sure alot of people will learn alot from it! the more code the better!
I Agree this was posted alot but meh easier to just post it then just keep bumping a dead thread and just post on a new one
Is there any way that it would shot instantly after color change ? I changed the numbers saved and runned it but somehow it has still its delay. This is only good with awp becouse da headshots aint gona go with the delay.
Quote Originally Posted by Tomeo213 View Post
Is there any way that it would shot instantly after color change ? I changed the numbers saved and runned it but somehow it has still its delay. This is only good with awp becouse da headshots aint gona go with the delay.
In other scripts you can have the delay on 0 or change it to whatever you like, I don't know ahk but it doesn't take a lot to see how to do this here,
Code:
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
sleep delz
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
to
Code:
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
(just remove the "sleep delz")
Quote Originally Posted by _NightWare View Post
In other scripts you can have the delay on 0 or change it to whatever you like, I don't know ahk but it doesn't take a lot to see how to do this here,
Code:
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
sleep delz
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
to
Code:
if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
{
DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
sleep holdtiem
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
}
(just remove the "sleep delz")
Welp, Thanks !
Quote Originally Posted by Tomeo213 View Post
Welp, Thanks !
You can also change
Code:
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
sleep 50
...
to
Code:
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
...
This will cause the script to loop faster and thus detect changes earlyer then having to wait a whole 50 ms.
Quote Originally Posted by _NightWare View Post
You can also change
Code:
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
sleep 50
...
to
Code:
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
...
This will cause the script to loop faster and thus detect changes earlyer then having to wait a whole 50 ms.
Yeah its true, but if you got lag or something, because it loops too fast then i recommend to put this:

Code:
;Beta trigger
if !GetKeyState("XButton1") && trigger==true
{
sleep, 5
...
detected in EAC ???
thanks alot
How to use on fullscreen [siabled aero] ? i dont understand, on fullscreen windowed i think i get input lag or smthng
Quote Originally Posted by Linde69 View Post
How to use on fullscreen [siabled aero] ? i dont understand, on fullscreen windowed i think i get input lag or smthng
Just use borderless much easier to do it like that.
anyoen know how to disable windows aero
Posts 115 of 20 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?