我用按键精灵官方教程写了个魔域自动寻路打怪的脚本,大神帮忙看一下出错在哪里,为什么只往一个方向跑, 10
明明设置了4个方向Hwnd=Plugin.Window.Find(0,"魔域窗口")sRect=Plugin.Window.GetClientRect(Hwnd)DimM...
明明设置了4个方向
Hwnd = Plugin.Window.Find(0, "魔域窗口")
sRect = Plugin.Window.GetClientRect(Hwnd)
Dim MyArray
MyArray=Split(sRect,"|")
ux=CLng(MyArray(0))
uy = CLng(MyArray(1))
Randomize 数值
n = Int(rnd * 4)
Rem 寻路打怪
If n = 0 Then
MoveTo 298+ux, 173+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 1 Then
MoveTo 650+ux, 208+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 2 Then
MoveTo 634+ux, 431+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 3 Then
MoveTo 287+ux, 426+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
Goto 寻路打怪 展开
Hwnd = Plugin.Window.Find(0, "魔域窗口")
sRect = Plugin.Window.GetClientRect(Hwnd)
Dim MyArray
MyArray=Split(sRect,"|")
ux=CLng(MyArray(0))
uy = CLng(MyArray(1))
Randomize 数值
n = Int(rnd * 4)
Rem 寻路打怪
If n = 0 Then
MoveTo 298+ux, 173+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 1 Then
MoveTo 650+ux, 208+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 2 Then
MoveTo 634+ux, 431+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
If n = 3 Then
MoveTo 287+ux, 426+uy
Delay 100
LeftClick 1
Delay 1000
RightClick 1
Delay 1000
End If
Goto 寻路打怪 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询