赞
踩
- 多线程检测周围有无玩家或者怪物
-
- Dim h
- Sub test_thread(var1, var2)
- Dim shuijitime = 0
- Dim configtime = ReadUIConfig("无怪随机时长")
- configtime = configtime * 1000
- TracePrint configtime
- While True
- Dim intX,intY
- //在战斗状态
- FindMultiColor 355,1129,420,1208,"1A7581","14|-6|1F6773,-6|3|DAFFF8,-2|0|C5FAEE,4|33|0E3F48,-9|33|1E6670,-3|-4|B4FFF3,5|11|81BCC0,-21|30|65C3CD,9|29|42A6B1",0,0.9,intX,intY
- If intX > -1 And intY > -1 Then
-
- If ReadUIConfig("攻击敌人") Then
- Swipe 120, 1189, 193, 1260
- End If
-
- FindMultiColor 420,3,473,47,"BEF3FE","0|6|75B5D3,-12|17|386481,-13|8|72B6D0,0|1|9DD5E7,-10|11|599CBD,-3|10|63A5C7,0|1|9DD5E7",0,0.9,intX,intY
- If intX > -1 And intY > -1 Then
- ShowMessage "发现敌人", 4000, 350, 350
- If ReadUIConfig("见人就飞") Then
- 使用随机
- End If
- If ReadUIConfig("见人就砍") Then
- Tap 122, 1192
- Delay 500
- End If
- End If
- //无怪随机
- FindMultiColor 410,1,481,53,"7CBCD3","-9|10|4086A5,-15|-2|67A9BC,-1|5|5EA5C2,-11|11|3B809D,-1|1|65ACC8,-5|-8|AFE3ED",0,0.9,intX,intY
- If intX = -1 And intY = -1 Then
- shuijitime = shuijitime + 1000
- If shuijitime = configtime Then
- ShowMessage "无怪随机", 4000, 350, 350
- 使用随机
- shuijitime = 0
- End If
-
- Else
- shuijitime = 0
- End If
- TracePrint shuijitime
- TracePrint configtime
- End If
- TracePrint "线程中"
- Delay 1000
- Wend
- End Sub
- h=Thread.Start(test_thread,"执行检测任务","开始线程")
-
- //查找背包回城石,并拖动到快捷栏 方便使用
- Function 查找回城石()
- Rem 重新查找回城石
- Dim intX,intY
- FindPic 139,578,217,951,"Attachment:回城石.png","000000",0,0.8,intX,intY
- If intX > -1 And intY > -1 Then
- 查找回城石 = 1
- Tap intX,intY
- Exit Function
- End If
- //查询背包回城石
- While True
- Delay 1000
- Tap 461,1238
- Delay 2000
-
- FindPic 0,0,720,1028,"Attachment:关闭背包.png","000000",0,0.8,intX,intY
- If intX > -1 And intY > -1 Then
- Exit While
- End If
- Wend
- //拖动回城石
- FindPic 243,105,671,703,"Attachment:回城石.png","000000",0,0.8,intX,intY
- If intX > -1 And intY > -1 Then
- TouchDown intX, intY, 1
- TouchMove 181,907, 1, 700
- TouchUp 1
- End If
- Delay 1500
- FindPic 145,873,208,944,"Attachment:回城石.png","000000",0,0.8,intX,intY
- If intX > -1 And intY > -1 Then
- Tap intX, intY
- Exit Function
- Else
- 购买回城
- Goto 重新查找回城石
- End If
- 查找回城石 = 0
- End Function
控制界面编辑教程
按下图 一定要先布局 再设置标签页 再拖其他按钮 这样界面才比较简洁好看!!!
最后:如有不懂可以@我。需要代码也可以直接开源
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。