You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HotKeySet("{F9}", "test")
While True
Sleep(10)
WEnd
Func test()
Local $Result
$Result = FindAllColor(517, 241, 548, 254, "16777215")
If $Result[0][0] <> 0 Then
For $i = 1 To $Result[0][0] Step +1
MouseMove($Result[$i][0], $Result[$i][1], 0)
Sleep(10)
Next
Else
ConsoleWrite("在指定区域未找到目标颜色. " & @CR)
EndIf
EndFunc ;==>test
Func FindAllColor($iLeft, $iTop, $iRight, $iBottom, $iColor)
Local $Rnum[1][1], $s = 0
For $Top = $iTop To $iBottom Step +1
For $Left = $iLeft To $iRight Step +1
$Color = PixelGetColor($Left, $Top)
ConsoleWrite($Color & @CR)
If $Color = $iColor Then
$s += 1
ReDim $Rnum[$s + 1][2]
$Rnum[$s][0] = $Left
$Rnum[$s][1] = $Top
EndIf
Next
Next
$Rnum[0][0] = $s
Return $Rnum
EndFunc ;==>FindAllColor
$dm.FindColorE(0,0,$R,$B,"406666",1,0,$x1,$y1)
$dm.FindColorE($x1,$y1,$x1+$R/2,$y1+$B/2,"406666",1,3,$x2,$y2)
If x2>0 then
$dm.MoveTo x1+3,y1+3
x1nj=x1
y1nj=y1
x2nj=x2
y2nj=y2
x1ys=x1
y1ys=y1
x2ys=x2
y2ys=y2
While 1 = 1
If DateDiff("s",CheckFrame,Now) >= 1 then
$dm.FindColorE(0,0,R,B,"406666",1,0,xc1,yc1)
$dm.FindColorE(xc1,yc1,xc1+R/22.767,yc1+B/12.8,"406666",1,3,xc2,yc2)
If yc1=y1 and yc2>y2 then
;框体增大
x2=xc2
y2=yc2
End If
If yc1=y1 and yc2<y2
;框体减小
x2=xc2
y2=yc2
End If
If xc2-xc1 <= R/85.375 and yc2-yc1 <= B/48 then
Team = 0
;不在队伍中
End if
$dm.FindColorE(x1,y1,x2,y2,"3B7286|14328F|70573E|607740|894F68|8F8F8F|008F54|534971|6E1121|8F893B",1,0,x,y)
If x>0
Team=1
;在队伍中
End if
CheckFrame=Now
End If
;实时框架检测
$dm_ret = $dm.FindColorE(x1,y1,x2,y2,"FF0033",1,0,x3,y3)
;危险血量
If x3>0
dm.MoveTo x3, y3
dm.LeftClick
Else
$dm_ret = $dm.FindColorE(x1,y1,x2,y2,"FF0000",1,0,x,y)
;仇恨目标
$dm_ret = $dm.FindColorE(x,y,x+9,y+11,"FF0033",1,0,x3,y3)
;危险血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"FF0033",1,0,x3,y3)
;危险血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"FF1AFF",1,0,x3,y3)
;低血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"FF0000",1,0,x,y)
;仇恨目标
$dm_ret = dm.FindColorE(x,y,x+9,y+11,"FF1AFF",1,0,x3,y3)
;低血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"FF1AFF",1,0,x3,y3)
;低血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"FF0000",1,0,x,y)
;仇恨目标
$dm_ret = dm.FindColorE(x,y,x+9,y+9,"1A1AFF",1,0,x3,y3)
;损失血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
Else
$dm_ret = dm.FindColorE(x1,y1,x2,y2,"1A1AFF",1,0,x3,y3)
;损失血量
If x3>0
dm.MoveTo x3,y3
dm.LeftClick
End If
End If
End If
End If
End If
End If
End If
End If
Wend
Else
MessageBox "初始化失败,请重新安装“插件包”"
ExitScript
End If
The text was updated successfully, but these errors were encountered:
AutoIt3Wrapper_UseX64=n
$dll_path=@ScriptDir & '\dm.dll'
Global $DM = _RegDM($dll_path)
If IsObj($DM) Then
$ver = $DM.Ver()
;~ MsgBox(0,0,'> 插件版本:' & $ver & @crlf)
Else
MsgBox(64, '提示:', '注册大漠插件失败!!!')
Exit
EndIf
Func _RegDM($dll_path)
Local $obj = ObjCreate("dm.dmsoft")
If Not IsObj($obj) Then
RunWait(@comspec & ' /c regsvr32 /s ' & FileGetShortName($dll_path), '', @SW_HIDE)
$obj = ObjCreate("dm.dmsoft")
EndIf
Return $obj
EndFunc
;************************以上是注册插件命令,需要使用时,直接复制上面的代码即可**
$R = @DesktopWidth;
$B = @DesktopHeight;
;R为游戏窗口宽度x
;B为游戏窗口高度y
$dm.FindColorE(0,0,$R,$B,"406666",1,0,$x1,$y1)
$dm.FindColorE($x1,$y1,$x1+$R/2,$y1+$B/2,"406666",1,3,$x2,$y2)
If x2>0 then
$dm.MoveTo x1+3,y1+3
x1nj=x1
y1nj=y1
x2nj=x2
y2nj=y2
x1ys=x1
y1ys=y1
x2ys=x2
y2ys=y2
Else
MessageBox "初始化失败,请重新安装“插件包”"
ExitScript
End If
The text was updated successfully, but these errors were encountered: