MousePoint 鼠标指向窗口 梦幻诛仙自动寻路打怪脚本

/*命令名称 MousePoint 鼠标指向窗口 
命令功能 得到鼠标指向的窗口句柄 
命令参数 无 
返 回 值 整数型,窗口句柄 
*/
//得到鼠标指向的窗口句柄
Hwnd = Plugin.Window.MousePoint()
//得到窗口句柄的客户区大小
sRect = Plugin.Window.GetClientRect(Hwnd)

 Dim Myarray
 Myarray=Split(sRect,"|")
ux = Clng(Myarray(0))
uy = Clng(Myarray(1))

Rem 走路
Call 加血()
IfColor 528+ux,22+uy,"1D97F7",0 Then
Call 战斗()
End If
MoveTo 357+ux, 545+uy
Delay 500
LeftClick 1
Delay 1000
MoveTo 722+ux,64+uy
Delay 500
LeftClick 1
Delay 1000
Goto 走路
Sub 战斗()
TracePrint "进入战斗"
    Delay 500
    IfColor 965+ux,523+uy,"394E6",1 Then
    Goto 走路
Else
End If
Rem 指令操作

 KeyDown 18, 1
KeyPress 81, 1
KeyUp 18, 1
KeyDown 18, 1
KeyPress 81, 1
KeyUp 18, 1

Call 战斗()
End Sub
Sub 加血()
//TracePrint "加血"
IfColor 840+ux,14+uy,"B00D9",1 Then
MoveTo  840+ux,14+uy
RightClick 1

End If

    IfColor 1002+ux,15+uy,"B00D9",1 Then
    MoveTo 1002+ux, 15+uy
        RightClick 1
End If
    IfColor 852+ux,26+uy,"D75A03",1 Then
    MoveTo 852+ux, 26+uy
        RightClick 1
End If
    IfColor 983+ux,28+uy,"D95D00",1 Then
    MoveTo 983+ux, 28+uy
        RightClick 1
End If
End Sub
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值