Results 1 to 7 of 7
  1. #1
    BLURREDDOGE's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Posts
    122
    Reputation
    10
    Thanks
    130
    My Mood
    Sleepy

    [AHK] Trigger-bot and Anti-recoil

    Run with Windowed (Borderless) to see the GUI.
    Run at 1920x1080 for the Triggerbot to work best (how I designed it)

    (The script creates a Hidden text file at the script directory to store the recoil-reduce number, this can be viewed and edited by checking the "Hidden items" box in the View section of the File Explorer)



    To run this script you need AutoHotkey: https://autohotkey.com/
    1. Copy the script
    2. Create a text file anywhere, open it in a text editor
    3. Paste the copied code in
    4. Save the file as any_name_you_want_here.ahk
    5. Run the script
    - Only Tested on Windows 10


    Keys:
    - 5: Enable Triggerbot
    - Up Arrow: Enable recoil-reduce
    - NumpadSub: Decrease recoil-reduce number (The - on the keypad/numpad)
    - NumpadAdd: Increase recoil-reduce number (The + on the keypad/numpad)



    Triggerbot Preview (00:57):

    Recoil Reduce Preview (00:39):



    Script:
    Code:
    #NoEnv
    #SingleInstance, Force
    #Persistent
    #MaxThreadsPerHotkey, 10
    #InstallKeybdHook
    #KeyHistory, 0
    #UseHook
    Process, Priority,, High
    ListLines, Off
    SetBatchLines, -1
    SetWorkingDir %A_ScriptDir%
    SetWinDelay, -1
    SetMouseDelay, 0
    SetKeyDelay, 1, 2
    SendMode Input
    OnExit DoBeforeExit
    
    
    ;GUI variables
    recoil_offset  := 8
    counter_a      := 0
    counter_b      := 0
    recoil_status  := "Disabled"
    trigger_status := "Disabled"
    
    if (FileExist("TD.txt"))
    {
    	FileRead, readfile, TD.txt
    	if ((readfile < 100) AND (readfile > -100))
    	{
    		recoil_offset := readfile
    	}
    	else if (ErrorLevel)
    	{
    		recoil_offset := 8
    	}
    }
    else
    {
    	recoil_offset := 8
    }
    
    
    Gui, +AlwaysOnTop +ToolWindow -Caption +Owner +LastFound +E0x20  ;E0x20 - Windows form style to allow click-through to what is below
    Gui, Margin, 0, 0
    Gui, Color, Grey
    
    Gui, Font, cRed s30 bold q4, Arial
    Gui, Add, Text, x13  y0  w280 h40, Recoil Reduce
    Gui, Add, Text, x307 y0  w14  h50, |
    Gui, Add, Text, x330 y0  w170 h40 vrecoil_status, %recoil_status%
    Gui, Font, cWhite s30 bold q4, Arial
    Gui, Add, Text, x510 y0  w80 h50 vrecoil_offset, s%recoil_offset%
    
    Gui, Font, cRed s30 bold q4, Arial
    Gui, Add, Text, x13  y50 w280 h50, Triggerbot
    Gui, Add, Text, x307 y50 w14  h50, |
    Gui, Add, Text, x330 y50 w170 h40 vtrigger_status, %trigger_status%
    
    WinSet, Transparent, 200
    Gui, Show, x0 y500 h100 w600 NoActivate
    
    
    Hotkey, $*~LButton, Toggle  ;Toggle hotkey off - starting state
    
    
    #IfWinActive, ahk_exe TheDivision.exe
    UP::
    {
    	Hotkey, $*~LButton, Toggle
    	returned := toggler(counter_a, 1)
    	tex := returned[1]
    	col := returned[2]
    	GuiControl, +%col%, recoil_status         ;set colour
    	GuiControl,       , recoil_status, %tex%  ;set text
    	counter_a += 1
    }
    return
    
    
    NumpadSub::
    {
    	if (recoil_offset > -99)
    	{
    		recoil_offset -= 1
    		GuiControl,, recoil_offset, s%recoil_offset%
    	}
    }
    return
    
    
    NumpadAdd::
    {
    	if (recoil_offset < 99)
    	{
    		recoil_offset += 1
    		GuiControl,, recoil_offset, s%recoil_offset%
    	}
    }
    return
    
    
    5::
    {
    	returned := toggler(counter_b, 2)
    	tex := returned[1]
    	col := returned[2]
    	GuiControl, +%col%, trigger_status         ;set colour
    	GuiControl,       , trigger_status, %tex%  ;set text
    	counter_b += 1
    }
    return
    
    
    $*~LButton::  ; Recoil-reduce
    {
    	if (WinActive("ahk_exe TheDivision.exe"))
    	{
    		while GetKeyState("LButton")
    		{
    			DllCall("mouse_event", uint, 1, int, 0, int, recoil_offset, uint, 1, int, 0)
    			Sleep, 25
    		}
    	}
    }
    return
    
    
    Trigger:
    {
    	Loop
    	{
    		if (Mod(counter_b, 2) = 0)
    		{
    			return
    		}
    		if (WinActive("ahk_exe TheDivision.exe"))
    		{
    			if (GetKeyState("RButton", "P"))
    			{
    				Loop                         ; 934, 538, 987, 542
    				{                            ; wider search: 
    					PixelSearch, outx, outy, 934, 538, 987, 544, 0xF93236, 10, FastRGB
    					if (outx)  ;match, crosshair is lit
    					{
    						DllCall("mouse_event", "UInt", 0x02) ; left mouse button down
    						Sleep, 1  ; enough time to register click in-game
    						DllCall("mouse_event", "UInt", 0x04) ; left mouse button up
    					}
    
    					Sleep, 2  ;delay to allow for RButton's un-pressing to register
    
    					if (GetKeyState("RButton", "T"))
    					{
    						break
    					}
    				}
    			}
    			else
    			{
    				Sleep, 100  ;No need to run key check so often
    			}
    		}
    		else
    		{
    			Sleep, 800  ;Enough for a tab-into the window and ESC to close the In-game GUI
    		}
    	}
    }
    return
    
    
    toggler(counter, option)
    {
    	if (Mod(counter, 2) = 0)
    	{
    		fstatus := "Enabled"
    		colour := "clime"
    		if (option = 2)
    		{
    			SetTimer, Trigger, -0
    		}
    	}
    	else
    	{
    		fstatus := "Disabled"
    		colour := "cred"
    	}
    	return [fstatus, colour]
    }
    
    
    DoBeforeExit:
    {
        FileDelete, TD.txt
        FileAppend, %recoil_offset%, TD.txt
        FileSetAttrib, +H, TD.txt
        ExitApp
    }



    Test Script:
     
    Code:
    Gui, +AlwaysOnTop -Caption +Owner +LastFound +E0x20
    WinSet, Trans, 50
    Gui, Show, x934 y538 h4 w53 NA
    SetTimer, reloadd, 2000
    return
    
    ;Other Test Co-ordinates
    ;933, 537, 987, 560
    ;934, 538, 987, 542
    
    reloadd:
    {
       reload
    }
    return
    Last edited by BLURREDDOGE; 07-20-2019 at 03:32 PM.
    Newest Trove-Multi-Account-Login:
    V2.3

    ☭☭☭☭☭☭☭☭☭☭☭☭☭👇☭☭☭☭☭☭☭☭☭☭☭☭☭
    ┏───────────────────────────┓
    ┗───────────────────────────┛
    ☭☭☭☭☭☭☭☭☭☭☭☭☭☝☭☭☭☭☭☭☭☭☭☭☭☭☭

  2. #2
    trigger_2309's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Posts
    61
    Reputation
    10
    Thanks
    5
    this the division 1 or 2?

  3. #3
    BLURREDDOGE's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Posts
    122
    Reputation
    10
    Thanks
    130
    My Mood
    Sleepy
    Quote Originally Posted by trigger_2309 View Post
    this the division 1 or 2?
    This is for The Division, not The Division 2.


    I have my script from the The Division 2 open beta if you want to use/optimize it by taking things from my The Divsion script. I do not have The Divison 2 so I cannot help you with any problems you may have.
    Code:
    #NoEnv
    #SingleInstance, Force
    #Persistent
    #MaxThreadsPerHotkey, 3
    Process, Priority,, High
    SetBatchLines, -1
    SetWorkingDir %A_ScriptDir%
    SetMouseDelay, 5
    SetWinDelay,-1
    ListLines, Off
    
    ;Dual option GUI variables
    counter_A := 0
    counter_B := 0
    counter_C := 0
    recoil_status := "Disabled"
    auto_fire_status := "Disabled"
    trigger_status := "Disabled"
    
    
    Gui, +AlwaysOnTop +ToolWindow -Caption +Owner +LastFound +E0x20
    Gui, Margin, 0, 0
    Gui, Color, Grey
    Gui, Font, cRed s30 bold, Arial
    Gui, Add, Text, x13 y0 w500 h40, Recoil Reduce
    Gui, Add, Text, x307 y0 w10 h45, |
    Gui, Add, Text, x330 y0 w200 h40 vrecoil_status, %recoil_status%
    
    Gui, Add, Text, x13 y50 w500 h40, Auto-Fire
    Gui, Add, Text, x307 y50 w10 h45, |
    Gui, Add, Text, x330 y50 w200 h40 vauto_fire_status, %auto_fire_status%
    
    Gui, Add, Text, x13 y100 w500 h45, TriggerBot
    Gui, Add, Text, x307 y100 w10 h45, |
    Gui, Add, Text, x330 y100 w200 h40 vtrigger_status, %trigger_status%
    
    WinSet, Transparent, 200
    Gui, Show, x0 y500 h150 w530 NoActivate
    ;##################################################################################
    Hotkey, $LButton, Toggle    ;Toggle off so not enabled
    Hotkey, $*~LButton, Toggle  ;Toggle off so not enabled
    
    UP::
    {
    	Hotkey, $*~LButton, Toggle
    	if (Mod(counter_A, 2) = 0)
    	{
    		recoil_status := "Enabled"
    		recoil_colour := "clime"
    	}
    	else
    	{
    		recoil_status := "Disabled"
    		recoil_colour := "cred"
    	}
    	GuiControl, +%recoil_colour%, recoil_status
    	GuiControl,      , recoil_status, %recoil_status%
    	counter_A += 1
    }
    return
    
    
    DOWN::
    {
    	Hotkey, $LButton, Toggle
    	if (Mod(counter_B, 2) = 0)
    	{
    		auto_fire_status := "Enabled"
    		auto_fire_colour := "clime"
    	}
    	else
    	{
    		auto_fire_status := "Disabled"
    		auto_fire_colour := "cred"
    	}
    	GuiControl, +%auto_fire_colour%, auto_fire_status
    	GuiControl,      ,auto_fire_status, %auto_fire_status%
    	counter_B += 1
    }
    return
    
    RIGHT::
    {
    	if (Mod(counter_C, 2) = 0)
    	{
    		trigger_status := "Enabled"
    		trigger_colour := "clime"
    		SetTimer, Trigger, -0
    	}
    	else
    	{
    		trigger_status := "Disabled"
    		trigger_colour := "cred"
    	}
    	GuiControl, +%trigger_colour%, trigger_status
    	GuiControl,      ,trigger_status, %trigger_status%
    	counter_C += 1
    }
    return
    
    *~LButton::  ; Recoil-reduce
    {
    	if (WinActive("ahk_exe TheDivision2.exe"))
    	{
    		while GetKeyState("LButton")
    		{
    			DllCall("mouse_event", uint, 1, int, 0, int, 5, uint, 1, int, 0)
    			Sleep, 25
    		}
    	}
    }
    return
    
    
    LButton::  ; Auto-clicker
    {
    	if (WinActive("ahk_exe TheDivision2.exe"))
    	{
    		Loop
    		{
    			SetMouseDelay 30
    			Click
    			If (GetKeyState("LButton","P")=0)
    			{
    				Break
    			}
    		}
    	}
    }
    return
    
    
    Trigger:
    {
    	Loop
    	{
    		if (Mod(counter_C, 2) = 0)
    		{
    			return
    		}
    		if (WinActive("ahk_exe TheDivision2.exe"))
    		{
    			if (GetKeyState("RButton", "P"))
    			{
    				Loop
    				{
    					;x932 y511 h40 w54
    					PixelSearch, outx, outy, 932, 511, 986, 551, 0x3636F4, 5, Fast
    
    					if (outx)
    					{
    						click
    					}
    
    					Sleep, 1
    
    					if (GetKeyState("RButton", "T"))
    					{
    						break
    					}
    				}
    			}
    			else
    			{
    				Sleep, 100
    			}
    			Sleep, 5
    		}
    		else
    		{
    			Sleep, 800
    		}
    	}
    }
    return
    Newest Trove-Multi-Account-Login:
    V2.3

    ☭☭☭☭☭☭☭☭☭☭☭☭☭👇☭☭☭☭☭☭☭☭☭☭☭☭☭
    ┏───────────────────────────┓
    ┗───────────────────────────┛
    ☭☭☭☭☭☭☭☭☭☭☭☭☭☝☭☭☭☭☭☭☭☭☭☭☭☭☭

  4. #4
    hallodrio's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    the for the good script...

    but one question, what means the test script? is this only for trigger-bot?
    if that so, how can i change the values for the trigger-bot?

  5. #5
    Maxell_13_rus's Avatar
    Join Date
    Aug 2013
    Gender
    female
    Posts
    6
    Reputation
    10
    Thanks
    0
    My Mood
    In Love
    Thx ! I check you script, next time convert script to exe. file pls))

  6. #6
    huseyin102's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    its work? td 2 ( not working key ? )
    Last edited by huseyin102; 12-02-2019 at 02:58 AM.

  7. #7
    Haiasdan's Avatar
    Join Date
    Apr 2020
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by BLURREDDOGE View Post
    Run with Windowed (Borderless) to see the GUI.
    Run at 1920x1080 for the Triggerbot to work best (how I designed it)

    (The script creates a Hidden text file at the script directory to store the recoil-reduce number, this can be viewed and edited by checking the "Hidden items" box in the View section of the File Explorer)



    To run this script you need AutoHotkey: https://autohotkey.com/
    1. Copy the script
    2. Create a text file anywhere, open it in a text editor
    3. Paste the copied code in
    4. Save the file as any_name_you_want_here.ahk
    5. Run the script
    - Only Tested on Windows 10


    Keys:
    - 5: Enable Triggerbot
    - Up Arrow: Enable recoil-reduce
    - NumpadSub: Decrease recoil-reduce number (The - on the keypad/numpad)
    - NumpadAdd: Increase recoil-reduce number (The + on the keypad/numpad)



    Triggerbot Preview (00:57):

    Recoil Reduce Preview (00:39):



    Script:
    Code:
    #NoEnv
    #SingleInstance, Force
    #Persistent
    #MaxThreadsPerHotkey, 10
    #InstallKeybdHook
    #KeyHistory, 0
    #UseHook
    Process, Priority,, High
    ListLines, Off
    SetBatchLines, -1
    SetWorkingDir %A_ScriptDir%
    SetWinDelay, -1
    SetMouseDelay, 0
    SetKeyDelay, 1, 2
    SendMode Input
    OnExit DoBeforeExit
    
    
    ;GUI variables
    recoil_offset  := 8
    counter_a      := 0
    counter_b      := 0
    recoil_status  := "Disabled"
    trigger_status := "Disabled"
    
    if (FileExist("TD.txt"))
    {
    	FileRead, readfile, TD.txt
    	if ((readfile < 100) AND (readfile > -100))
    	{
    		recoil_offset := readfile
    	}
    	else if (ErrorLevel)
    	{
    		recoil_offset := 8
    	}
    }
    else
    {
    	recoil_offset := 8
    }
    
    
    Gui, +AlwaysOnTop +ToolWindow -Caption +Owner +LastFound +E0x20  ;E0x20 - Windows form style to allow click-through to what is below
    Gui, Margin, 0, 0
    Gui, Color, Grey
    
    Gui, Font, cRed s30 bold q4, Arial
    Gui, Add, Text, x13  y0  w280 h40, Recoil Reduce
    Gui, Add, Text, x307 y0  w14  h50, |
    Gui, Add, Text, x330 y0  w170 h40 vrecoil_status, %recoil_status%
    Gui, Font, cWhite s30 bold q4, Arial
    Gui, Add, Text, x510 y0  w80 h50 vrecoil_offset, s%recoil_offset%
    
    Gui, Font, cRed s30 bold q4, Arial
    Gui, Add, Text, x13  y50 w280 h50, Triggerbot
    Gui, Add, Text, x307 y50 w14  h50, |
    Gui, Add, Text, x330 y50 w170 h40 vtrigger_status, %trigger_status%
    
    WinSet, Transparent, 200
    Gui, Show, x0 y500 h100 w600 NoActivate
    
    
    Hotkey, $*~LButton, Toggle  ;Toggle hotkey off - starting state
    
    
    #IfWinActive, ahk_exe TheDivision.exe
    UP::
    {
    	Hotkey, $*~LButton, Toggle
    	returned := toggler(counter_a, 1)
    	tex := returned[1]
    	col := returned[2]
    	GuiControl, +%col%, recoil_status         ;set colour
    	GuiControl,       , recoil_status, %tex%  ;set text
    	counter_a += 1
    }
    return
    
    
    NumpadSub::
    {
    	if (recoil_offset > -99)
    	{
    		recoil_offset -= 1
    		GuiControl,, recoil_offset, s%recoil_offset%
    	}
    }
    return
    
    
    NumpadAdd::
    {
    	if (recoil_offset < 99)
    	{
    		recoil_offset += 1
    		GuiControl,, recoil_offset, s%recoil_offset%
    	}
    }
    return
    
    
    5::
    {
    	returned := toggler(counter_b, 2)
    	tex := returned[1]
    	col := returned[2]
    	GuiControl, +%col%, trigger_status         ;set colour
    	GuiControl,       , trigger_status, %tex%  ;set text
    	counter_b += 1
    }
    return
    
    
    $*~LButton::  ; Recoil-reduce
    {
    	if (WinActive("ahk_exe TheDivision.exe"))
    	{
    		while GetKeyState("LButton")
    		{
    			DllCall("mouse_event", uint, 1, int, 0, int, recoil_offset, uint, 1, int, 0)
    			Sleep, 25
    		}
    	}
    }
    return
    
    
    Trigger:
    {
    	Loop
    	{
    		if (Mod(counter_b, 2) = 0)
    		{
    			return
    		}
    		if (WinActive("ahk_exe TheDivision.exe"))
    		{
    			if (GetKeyState("RButton", "P"))
    			{
    				Loop                         ; 934, 538, 987, 542
    				{                            ; wider search: 
    					PixelSearch, outx, outy, 934, 538, 987, 544, 0xF93236, 10, FastRGB
    					if (outx)  ;match, crosshair is lit
    					{
    						DllCall("mouse_event", "UInt", 0x02) ; left mouse button down
    						Sleep, 1  ; enough time to register click in-game
    						DllCall("mouse_event", "UInt", 0x04) ; left mouse button up
    					}
    
    					Sleep, 2  ;delay to allow for RButton's un-pressing to register
    
    					if (GetKeyState("RButton", "T"))
    					{
    						break
    					}
    				}
    			}
    			else
    			{
    				Sleep, 100  ;No need to run key check so often
    			}
    		}
    		else
    		{
    			Sleep, 800  ;Enough for a tab-into the window and ESC to close the In-game GUI
    		}
    	}
    }
    return
    
    
    toggler(counter, option)
    {
    	if (Mod(counter, 2) = 0)
    	{
    		fstatus := "Enabled"
    		colour := "clime"
    		if (option = 2)
    		{
    			SetTimer, Trigger, -0
    		}
    	}
    	else
    	{
    		fstatus := "Disabled"
    		colour := "cred"
    	}
    	return [fstatus, colour]
    }
    
    
    DoBeforeExit:
    {
        FileDelete, TD.txt
        FileAppend, %recoil_offset%, TD.txt
        FileSetAttrib, +H, TD.txt
        ExitApp
    }



    Test Script:
     
    Code:
    Gui, +AlwaysOnTop -Caption +Owner +LastFound +E0x20
    WinSet, Trans, 50
    Gui, Show, x934 y538 h4 w53 NA
    SetTimer, reloadd, 2000
    return
    
    ;Other Test Co-ordinates
    ;933, 537, 987, 560
    ;934, 538, 987, 542
    
    reloadd:
    {
       reload
    }
    return
    Does it still work? And can be used in multiplayer? I mean in DZ or in any mission with a group. Thanks!

Similar Threads

  1. [Outdated] AHK Trigger Bot V1 (The most effective of all tested by me)
    By 4xing in forum Counter-Strike 2 Scripts
    Replies: 95
    Last Post: 01-09-2018, 07:53 AM
  2. [Detected] Rapid Fire and Anti-Recoil scripts VAC proof [AutoHotKey]
    By MeepDarknessMeep in forum Call of Duty 9 - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 61
    Last Post: 06-29-2013, 05:27 AM
  3. [Request] Sudden attack anti spread,anti recoil and aimbot for SASEA.
    By 0125972799 in forum Sudden Attack General
    Replies: 1
    Last Post: 05-05-2011, 11:38 AM
  4. [Release] 1.0.177 Working Anti-Recoil Bot
    By ***JAMES*** in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 68
    Last Post: 01-26-2010, 07:59 AM
  5. [USF] Anti-recoil and anti-spread
    By Xeg in forum Soldier Front Hacks
    Replies: 16
    Last Post: 08-23-2009, 09:18 AM