Created
May 22, 2016 18:34
-
-
Save Skyross/957f2fb0c0464d9fd51a2af316ea0f73 to your computer and use it in GitHub Desktop.
Dota 2 AutoIt tree cutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <AutoItConstants.au3> | |
HotKeySet("{PAUSE}", "LoopFlagToggle") | |
$loopflag = False | |
$random = False | |
$only_clicks = False | |
$dx = 50 | |
$dy = 50 | |
$minX = 270 | |
$maxX = 1270 | |
$minY = 250 | |
$maxY = 875 | |
$x = $minX | |
$y = $maxY | |
While True | |
If $loopflag Then | |
IF Not $only_clicks Then | |
If $random Then | |
$x = Random($minX, $maxX, 1) | |
$y = Random($minY, $maxY, 1) | |
EndIf | |
MouseClick($MOUSE_CLICK_LEFT, $x, $y, 1, 0) | |
Else | |
MouseClick($MOUSE_CLICK_LEFT) | |
EndIf | |
If Not $random And Not $only_clicks Then | |
$x = $x + $dx | |
If ($x > $maxX) Or ($x < $minX) Then | |
$dx = -$dx | |
$y = $y + $dy | |
EndIf | |
If ($x > $maxX) And ($y > $maxY) Then | |
$x = $minX | |
$y = $minY | |
EndIf | |
EndIf | |
Sleep(10) | |
Else | |
Sleep(5000) | |
EndIf | |
WEnd | |
Func LoopFlagToggle() | |
$loopflag = Not $loopflag | |
EndFunc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment