Skip to content

Commit

Permalink
fix零号业绩确认窗口点击错误 fix未达上限弹窗读取次数错误 略微延长按键间隔避免吞键
Browse files Browse the repository at this point in the history
  • Loading branch information
UCPr251 committed Jul 27, 2024
1 parent ff85efa commit ec015fc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 25 deletions.
2 changes: 1 addition & 1 deletion components/choose.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ choose() {
debugLog("【step5】选择增益")
RandomSleep()
; 进入对话
Press("w")
Press("w", 3)
RandomSleep(1000, 1200)
; 对话
Press("Space", 16)
Expand Down
2 changes: 1 addition & 1 deletion components/common.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Press(key, times := 1) {
Send("{" key " Down}")
RandomSleep()
Send("{" key " Up}")
RandomSleep(150, 200)
RandomSleep(200, 220)
}
}

Expand Down
16 changes: 5 additions & 11 deletions components/getMoney.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,10 @@ getMoney() {
if (has) {
; 加载动画
RandomSleep(2500, 3000)
; 点击确定零号业绩
loop(5) {
; 避免误操作
if (PixelSearchPre(&X, &Y, 720, 750, 1200, 810, 0xffffff, variation // 2)) {
SimulateClick(X, Y)
Sleep(3000)
Press('w', 2)
}
Sleep(100)
}
RandomSleep(1200, 1500)
X := 1800, Y := 1000
preprocess(&X, &Y)
SimulateClick(X, Y, 2)
RandomSleep(1600, 1800)
}
RandomSleep()
}
7 changes: 4 additions & 3 deletions components/saveBank.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ saveBank() {
}
; 存款
Coords := pixelSearchAndClick(1360, 440, 1390, 500, 1640, 470, 0x296bfd)
loop (6) {
loop (8) {
SimulateClick(Coords[1], Coords[2], 2)
Press('Space', 3)
Press('Space', 2)
; 如果有礼包
if (PixelSearchPre(&X, &Y, 1340, 540, 1380, 600, 0xaa7cff)) {
pixelSearchAndClick(1400, 660, 1460, 690, 1653, 678, 0xffffff) ; 不要礼包
Press('Space', 2)
}
; 如果弹出选择铭徽界面
MingHui(true)
Press('Space', 3)
Press('Space', 2)
}
}
18 changes: 9 additions & 9 deletions 零号业绩.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @file 零号业绩.ahk
* @author UCPr
* @date 2024/07/27
* @version v1.2.1
* @version v1.2.2
* @link https://github.com/UCPr251/zzzAuto
* @warning 请勿用于任何商业用途,仅供学习交流使用
***********************************************************************/
Expand Down Expand Up @@ -101,7 +101,7 @@ SetMouseDelay(-1)
msg := title msg
g := Gui("AlwaysOnTop", "零号业绩刷取统计")
g.SetFont('s15', '微软雅黑')
g.Add('Edit', 'w300 r' Min(20, statistics.Length + 3) ' ReadOnly', msg)
g.Add('Edit', 'w300 r' Min(20, statistics.Length + 4) ' ReadOnly', msg)
g.Show()
g.OnEvent("Close", (MyGui) => MyGui.Destroy() || (!paused && Pause(0)) || g := 0)
}
Expand Down Expand Up @@ -173,14 +173,14 @@ main() {
debugLog("【开始】模式:零号空洞关卡选择界面")
}
RandomSleep()
run(mode)
}
/** 运行刷取脚本,1:角色操作界面,2:关卡选择界面 */
run(mode) {
if (mode = 1) {
charOperation()
}
run()
}
/** 运行刷取脚本,1:角色操作界面,2:关卡选择界面 */
run() {
; 时长统计
start := A_Now
status := 0
Expand Down Expand Up @@ -218,12 +218,12 @@ run(mode) {
if (isLimited()) {
return MsgBox("已达到上限,脚本结束。共刷取" statistics.Length "次")
}
debugLog("未达到上限,继续刷取。已刷取" statistics.Length1 "次")
debugLog("未达到上限,继续刷取。已刷取" statistics.Length "次")
}
RandomSleep(800, 1000)
; 点击完成
pixelSearchAndClick(1670, 970, 1730, 1038, 1699, 1027, 0xffffff)
RandomSleep(4500, 4800)
; 继续循环
run(2)
run()
}

0 comments on commit ec015fc

Please sign in to comment.