********* 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)
}
}
}