--- tags: 按鍵精靈 2014.6 --- [YouTube](https://youtube.com/shorts/YiGbMd7CVqI) # ROX新世代 自動看板任務 一、使用工具: 1.[按鍵精靈2014.6](http://download.myanjian.com/) ([簡體中文版Window](https://www.microsoft.com/zh-cn/software-download/windows10)安裝使用較無問題。) 2.[雷電模擬器](https://www.ldplayer.tw/?gad_source=1) 2-1.雷電設置: ![image](https://hackmd.io/_uploads/HyQf2fYP0.png) ![image](https://hackmd.io/_uploads/HkC1tfKPR.png) ![image](https://hackmd.io/_uploads/Skp-KMtv0.png) ![image](https://hackmd.io/_uploads/SyxQKMtvR.png) ![image](https://hackmd.io/_uploads/HJjmtMtD0.png) 3.遊戲設定: ![image](https://hackmd.io/_uploads/rkq33MKDC.png) 4.我的電腦配置: ``` 作業系統: Microsoft Windows 10 64位元 CPU型號: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz 主機板: ASUSTeKCOMPUTERINC. TUFZ370-PLUSGAMING 總記憶體: 可用記憶體(34.4GB) 總記憶體(47.9GB) 螢幕: 1920x1080 顯卡型號: Intel(R) UHD Graphics 630(20220719)【當前使用】 顯卡型號: Microsoft Remote Display Adapter(20060621) OpenGL: 4.6.0 - Build 31.0.101.2111 VT: 已開啟 HyperV: 已關閉 Root: 關閉 以系統管理員身分執行: 否 安裝磁碟: C磁碟(-) 可用空間(134GB) 總空間(238GB) 模擬器版本: 9.0.71.3(64) 執行參數: CPU(4核) 記憶體(8192M) 解析度(960x540 DPI 160) FPS(60) 多開參數: 當前編號(1) 正在執行(2) 高速模式(1) FPS限制(60) 硬碟訊息: 類型(自動擴充) 可用空間(22GB) 總空間(27GB) 機型: 品牌(Xiaomi) 型號(SM-G975N) ASTC: 開啟 Root權限: 關閉 模擬器路徑: C:\LDPlayer\LDPlayer9\ 日誌路徑: C:\Users\0976370081\AppData\Roaming\XuanZhi9\log ``` 這個配置頂多同時支援雙開釣魚,否則會卡頓,單開釣魚成功率在95%以上,雙開在90%以上,四開在80%以下。 二、按鍵精靈程式碼: 1.程式碼: ``` State(3) = 1 End If End If End Sub //自動打怪開 Sub W(x, y, w, h, n) FindPic x + 273, y + 212, x + 288, y + 229, "C:\Users\0976370081\Pictures\ROX\ZDDGK.bmp", 0.9, intWX, intWY If intWX < 0 And intWY < 0 Then XY=Plugin.Color.FindMultiColor(x,y,x+w,y+h,"FF9E4A","6|0|FF9E4A,3|3|FF9D4D,0|6|F8A452,6|6|F8AC63",1) ZB = InStr(XY,"|") xX = Clng(Left(XY, ZB - 1)): yY = Clng(Right(XY, Len(XY) - ZB)) If xX > 0 And yY > 0 Then intWX = 1 intWY = 1 End If End If If intWX > 0 And intWY > 0 Then If n = 1 Then ZDDGKState1 = 0 ElseIf n = 2 Then ZDDGKState2 = 0 ElseIf n = 3 Then ZDDGKState3 = 0 ElseIf n = 4 Then ZDDGKState4 = 0 End If Else If n = 1 Then ZDDGKState1 = 1 ElseIf n = 2 Then ZDDGKState2 = 1 ElseIf n = 3 Then ZDDGKState3 = 1 ElseIf n = 4 Then ZDDGKState4 = 1 End If End If End Sub //發呆偵測抓圖 Sub X(x, y, w, h, n) Call Plugin.Pic.PrintScreen(Split(sRect1, "|")(0)+20, Split(sRect1, "|")(1)+102, Split(sRect1, "|")(0)+94, Split(sRect1, "|")(1)+178, "C:\Users\0976370081\Pictures\PIC1.bmp") Call Plugin.Pic.PrintScreen(Split(sRect2, "|")(0)+20, Split(sRect2, "|")(1)+102, Split(sRect2, "|")(0)+94, Split(sRect2, "|")(1)+178, "C:\Users\0976370081\Pictures\PIC2.bmp") Call Plugin.Pic.PrintScreen(Split(sRect3, "|")(0)+20, Split(sRect3, "|")(1)+102, Split(sRect3, "|")(0)+94, Split(sRect3, "|")(1)+178, "C:\Users\0976370081\Pictures\PIC3.bmp") Call Plugin.Pic.PrintScreen(Split(sRect4,"|")(0)+20, Split(sRect4,"|")(1)+102, Split(sRect4,"|")(0)+94, Split(sRect4,"|")(1)+178, "C:\Users\0976370081\Pictures\PIC4.bmp") End Sub //發呆偵測 Sub Y(x, y, w, h, n) If ZDDGKState1 Then FindPic Split(sRect1, "|")(0)+19, Split(sRect1, "|")(1)+101, Split(sRect1, "|")(0)+95, Split(sRect1, "|")(1)+179,"C:\Users\0976370081\Pictures\PIC1.bmp",0.9,int1X,int1Y If int1X > 0 And int1Y > 0 Then State(0) = 1 ZDDGKState1 = 0 End If End If If ZDDGKState2 Then FindPic Split(sRect2, "|")(0)+19, Split(sRect2, "|")(1)+101, Split(sRect2, "|")(0)+95, Split(sRect2, "|")(1)+179,"C:\Users\0976370081\Pictures\PIC2.bmp",0.9,int2X,int2Y If int2X > 0 And int2Y > 0 Then State(1) = 1 ZDDGKState2 = 0 End If End If If ZDDGKState3 Then FindPic Split(sRect3, "|")(0)+19, Split(sRect3, "|")(1)+101, Split(sRect3, "|")(0)+95, Split(sRect3, "|")(1)+179,"C:\Users\0976370081\Pictures\PIC3.bmp",0.9,int3X,int3Y If int3X > 0 And int3Y > 0 Then State(2) = 1 ZDDGKState3 = 0 End If End If If ZDDGKState4 Then FindPic Split(sRect4, "|")(0)+19, Split(sRect4, "|")(1)+101, Split(sRect4, "|")(0)+95, Split(sRect4, "|")(1)+179,"C:\Users\0976370081\Pictures\PIC4.bmp",0.9,int4X,int4Y If int4X > 0 And int4Y > 0 Then State(3) = 1 ZDDGKState4 = 0 End If End If End Sub //點擊第一个任務 Sub Z(x,y,w,h,n) FindColorEx x+23,y+106,x+38,y+112,"D85CB9",0,0.5,intX,intY If intX > 0 And intY > 0 Then MoveTo x+37, y+111 LeftClick 1 If n = 1 Then State(0) = 1 ElseIf n = 2 Then State(1) = 1 ElseIf n = 3 Then State(2) = 1 ElseIf n = 4 Then State(3) = 1 End If End If End Sub StarTime1 = Time StarTime2 = Time StarTime3 = Time StarTime4 = Time PhotographState = True While True //求余數 DateMod = DateDiff("s", StarTime, Time) If DateMod > 20 Then DateMod = DateMod Else DateMod = DateMod-(Fix(DateMod/20)*20) End If If (DateDiff("s", StarTime, Time) >= 0 And DateDiff("s", StarTime, Time) < 1) OR PhotographState Then Call X(win1x, win1y, winw, winh,1) Call X(win2x, win2y, winw, winh,2) Call X(win3x, win3y, winw, winh,3) Call X(win4x, win4y, winw, winh, 4) PhotographState = False End If Call A(win1x, win1y, winw, winh,1) Call A(win2x, win2y, winw, winh,2) Call A(win3x, win3y, winw, winh,3) Call A(win4x, win4y, winw, winh,4) Call B(win1x, win1y, winw, winh,1) Call B(win2x, win2y, winw, winh,2) Call B(win3x, win3y, winw, winh,3) Call B(win4x, win4y, winw, winh,4) Call C(win1x, win1y, winw, winh,1) Call C(win2x, win2y, winw, winh,2) Call C(win3x, win3y, winw, winh,3) Call C(win4x, win4y, winw, winh, 4) Call D(win1x, win1y, winw, winh,1) Call D(win2x, win2y, winw, winh,2) Call D(win3x, win3y, winw, winh,3) Call D(win4x, win4y, winw, winh, 4) Call E(win1x, win1y, winw, winh,1) Call E(win2x, win2y, winw, winh,2) Call E(win3x, win3y, winw, winh,3) Call E(win4x, win4y, winw, winh, 4) Call F(win1x, win1y, winw, winh,1) Call F(win2x, win2y, winw, winh,2) Call F(win3x, win3y, winw, winh,3) Call F(win4x, win4y, winw, winh, 4) Call G(win1x, win1y, winw, winh,1) Call G(win2x, win2y, winw, winh,2) Call G(win3x, win3y, winw, winh,3) Call G(win4x, win4y, winw, winh, 4) If State(0) Then Call Z(win1x, win1y, winw, winh, 1) StarTime1 = Time Delay 500 End If If State(1) Then Call Z(win2x, win2y, winw, winh, 2) StarTime2 = Time Delay 500 End If If State(2) Then Call Z(win3x, win3y, winw, winh, 3) StarTime3 = Time Delay 500 End If If State(3) Then Call Z(win4x, win4y, winw, winh, 4) StarTime4 = Time Delay 500 End If Call W(win1x, win1y, winw, winh,1) Call W(win2x, win2y, winw, winh,2) Call W(win3x, win3y, winw, winh,3) Call W(win4x, win4y, winw, winh, 4) If ZDDGKState1 And DateDiff("s", StarTime1, Time) > 5 Then Call Y(win1x, win1y, winw, winh, 1) StarTime1 = Time PhotographState = True End If If ZDDGKState2 And DateDiff("s", StarTime2, Time) > 5 Then Call Y(win2x, win2y, winw, winh, 2) StarTime2 = Time PhotographState = True End If If ZDDGKState3 And DateDiff("s", StarTime3, Time) > 5 Then Call Y(win3x, win3y, winw, winh, 3) StarTime3 = Time PhotographState = True End If If ZDDGKState4 And DateDiff("s", StarTime4, Time) > 5 Then Call Y(win4x, win4y, winw, winh, 4) StarTime4 = Time PhotographState = True End If Wend ``` 2.1圖片資料夾: ![image](https://hackmd.io/_uploads/SJzf8bGu0.png) ![image](https://hackmd.io/_uploads/SJQmLWzOR.png) 2.2附件: ![image](https://hackmd.io/_uploads/BkxhRZTDA.png) 3.附件中的圖片檔: 復活![復活](https://hackmd.io/_uploads/BkTJ1MTw0.bmp) 查看![查看](https://hackmd.io/_uploads/r1pkJMpwR.bmp) 定向![定向](https://hackmd.io/_uploads/rJpk1zTD0.bmp) 上交![上交](https://hackmd.io/_uploads/Hy6y1fpv0.bmp) 上交B![上交B](https://hackmd.io/_uploads/H1ayyMpw0.bmp) 提交![提交](https://hackmd.io/_uploads/ByTJyf6vC.bmp) 跳過![跳過](https://hackmd.io/_uploads/SkTJkMTvR.bmp) ZDDGK![ZDDGK](https://hackmd.io/_uploads/ryhtBbGuR.bmp)