Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <MsgBoxConstants.au3>
- #include <GUIConstantsEx.au3>
- Opt("WinTitleMatchMode", 3)
- Opt("TrayAutoPause", 0)
- Opt("TrayMenuMode", 3)
- Opt("TrayOnEventMode", 1)
- HotKeySet("{PgDn}", "toggle")
- Local $bluePlayer = [0.10885, 0.094]
- Local $lockIn = [0.5, 0.724074]
- $searching = False
- $pixelColor = 0
- $screenSize = WinGetClientSize ("DOTA 2")
- $windowPos = WinGetPos("DOTA 2")
- $heroName = "tec"
- $yInt = 0
- $xSearch = 0
- $ySearch = 0
- TrayCreateItem("Restore")
- TrayItemSetOnEvent(-1, "restore")
- TrayCreateItem("")
- TrayCreateItem("Exit")
- TrayItemSetOnEvent(-1, "exitScript")
- $hGUI = GUICreate("PickTechies 0.1", 200, 70)
- $idLabel = GUICtrlCreateLabel("Aspect Ratio:", 35, 10, 70)
- $idComboBox = GUICtrlCreateCombo("16:9", 105, 6, 60, 20, 0x0003)
- $idHide = GUICtrlCreateButton("Hide", 10, 35, 85, 25)
- $idExit = GUICtrlCreateButton("Exit", 105, 35, 85, 25)
- GUICtrlSetData($idComboBox, "16:10|4:3", "16:9")
- $sComboRead = ""
- GUISetState(@SW_SHOW, $hGUI)
- Func toggle()
- If WinExists("DOTA 2") Then
- $screenSize = WinGetClientSize ("DOTA 2")
- $windowPos = WinGetPos("DOTA 2")
- $searching = Not($searching)
- ToolTip("")
- Else
- MsgBox($MB_SYSTEMMODAL, "Error", "Start DOTA2 first!")
- EndIf
- EndFunc
- Func restore()
- GUISetState(@SW_SHOW, $hGUI)
- EndFunc
- Func exitScript()
- Exit
- EndFunc
- Func aspectSwitch()
- If $sComboRead = "16:9" Then
- $bluePlayer[0] = 0.10885
- ElseIf $sComboRead = "16:10" Then
- $bluePlayer[0] = 0.09642
- ElseIf $sComboRead = "4:3" Then
- $bluePlayer[0] = 0.068125
- EndIf
- EndFunc
- While(1)
- Switch GUIGetMsg()
- Case $GUI_EVENT_CLOSE, $idExit
- Exit
- Case $idHide
- GUISetState(@SW_HIDE, $hGUI)
- Case $idComboBox
- $sComboRead = GUICtrlRead($idComboBox)
- aspectSwitch()
- EndSwitch
- If $searching = True Then
- $yInt = Mod ($yInt + 1, 20)
- $xSearch = $windowPos[0] + Ceiling(($bluePlayer[0] * $screenSize[0]))
- $ySearch = $windowPos[1] + Ceiling(($bluePlayer[1] * $screenSize[1]) + $yInt - 10)
- $pixelColor = PixelGetColor($xSearch, $ySearch)
- ToolTip("Searching, pixel color: " & $pixelColor, $windowPos[0] + ($screenSize[0] * 0.5), $windowPos[1] + ($screenSize[1] * 0.5))
- If $pixelColor > 3200000 And $pixelColor < 3400000 Then
- Sleep(250)
- Send($heroName)
- Sleep(250)
- MouseClick("left", ($windowPos[0] + $lockIn[0] * $screenSize[0]), ($windowPos[1] + $lockIn[1] * $screenSize[1]), 10, 1)
- $searching = False
- ToolTip("")
- EndIf
- EndIf
- Sleep(50)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement