m765555 发表于 2011-2-13 14:39:53

关于黄金矿工游戏[已解决]

本帖最后由 m765555 于 2011-3-6 11:36 编辑

呵呵,高手莫笑,无聊写了个脚本,无法定位方向,只能随机,代码如下,有兴趣的朋友指点一下,谢谢!
游戏下载地址:http://u.115.com/file/f221f5cd6fRun("C:\Program Files\黄金矿工中文版\黄金矿工中文版.exe","",@SW_MAXIMIZE)
        Sleep(2000)
If ProcessExists("iexplore.exe") Then
        ProcessClose("iexplore.exe")
        Sleep(500)
EndIf
WinActivate("黄金矿工中文版","")
MouseClick("left",255,233,1)
Sleep(3000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
WinActivate("黄金矿工中文版","")
MouseClick("left",125, 493,1)
MouseClick("left",636, 503,1)
MouseClick("left",855, 169,1)
Sleep(3000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")
Sleep(5000)
Send("{down 1}")

wsfda 发表于 2011-2-13 15:20:18

沙发,站位

papapa314 发表于 2011-2-13 15:31:09

完全是随机乱仍,呵呵

m765555 发表于 2011-2-13 16:46:07

呵呵,真还不知道怎么定位那个方向的问题?哎

bingxing8000 发表于 2011-2-14 14:38:37

很乱的哦 ~~!!

pcbar 发表于 2011-4-29 17:40:58

楼主是如何解决的,能否共享?

pcbar 发表于 2011-4-29 17:48:42

我弄了一个,不是非常准确,聊胜于无吧#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
        $y = $_y + $wxy
       
        $mxy = MouseGetPos()
        If $mxy <= $x Then
                $a = 8 * ($x - $mxy) / Sqrt(($x - $mxy) ^ 2 + ($mxy - $y) ^ 2)
                $b = 8 * ($mxy - $y) / Sqrt(($x - $mxy) ^ 2 + ($mxy - $y) ^ 2)
                $nx = $x - $a
                $ny = $y + $b
               
        Else
                $a = 8 * ($mxy - $x) / Sqrt(($mxy - $x) ^ 2 + ($mxy - $y) ^ 2)
                $b = 8 * ($mxy - $y) / Sqrt(($mxy - $x) ^ 2 + ($mxy - $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

m765555 发表于 2011-4-29 17:49:04

呵呵,多谢p版关心,提问后我试过解决,但由本人能力有限,无法解决,有空的时候再继续,娱乐嘛,呵呵

pcbar 发表于 2011-4-29 18:02:03

有更好的方法,欢迎交流

m765555 发表于 2011-5-2 09:24:26

呵呵,谢谢P版分享代码,有空再研究下.
页: [1]
查看完整版本: 关于黄金矿工游戏[已解决]