我弄了一个,不是非常准确,聊胜于无吧#include <GUIConstants.au3>
HotKeySet("{Space}", "ToggleAimbot")
Global $Aimbot = False
$title = "黄金矿工"
$oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
$GameForm = GUICreate($title, 820, 660, -1, -1)
$GUIActiveX = GUICtrlCreateObj($oGame, 10, 10, 800, 580)
$exitbutton = GUICtrlCreateButton("退出", 704, 624, 89, 25)
GUICtrlCreateLabel("将鼠标放到金块上,等待自动抓取。按动空格键可以切换状态", 16, 608, 400, 17)
$status = GUICtrlCreateLabel("作弊状态: 关", 16, 624, 500, 33)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
With $oGame
.bgcolor = "#000000"
.Movie = 'http://img.3366.com/fileupload/flash/58/15258.swf'
.ScaleMode = 2
.Loop = True
.wmode = "Opaque"
EndWith
$searchcolor = 0x333333
GUISetState()
$_x = 413
$_y = 109
Global $x = 0, $y = 0, $nx, $ny
While 1
$wxy = WinGetPos($title)
$x = $_x + $wxy[0]
$y = $_y + $wxy[1]
$mxy = MouseGetPos()
If $mxy[0] <= $x Then
$a = 8 * ($x - $mxy[0]) / Sqrt(($x - $mxy[0]) ^ 2 + ($mxy[1] - $y) ^ 2)
$b = 8 * ($mxy[1] - $y) / Sqrt(($x - $mxy[0]) ^ 2 + ($mxy[1] - $y) ^ 2)
$nx = $x - $a
$ny = $y + $b
Else
$a = 8 * ($mxy[0] - $x) / Sqrt(($mxy[0] - $x) ^ 2 + ($mxy[1] - $y) ^ 2)
$b = 8 * ($mxy[1] - $y) / Sqrt(($mxy[0] - $x) ^ 2 + ($mxy[1] - $y) ^ 2)
$nx = $x + $a
$ny = $y + $b
EndIf
$nx = Ceiling($nx)
$ny = Ceiling($ny)
;ToolTip($nx & ',' & $ny)
If PixelGetColor($nx, $ny) = $searchcolor Then
If $Aimbot Then
Send("{down}")
EndIf
EndIf
$msg = GUIGetMsg()
Select
Case $msg = $exitbutton
Exit
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
$oGame = 0
GUIDelete()
Exit
Func ToggleAimbot()
$Aimbot = Not $Aimbot
If $Aimbot = True Then
GUICtrlSetData($status, "作弊状态: 开")
Else
GUICtrlSetData($status, "作弊状态: 关")
EndIf
EndFunc ;==>ToggleAimbot
|