From 2ae65c5347371dbcf290d4fcbec515299f16083e Mon Sep 17 00:00:00 2001 From: UCPr <2032385471@qq.com> Date: Sat, 27 Jul 2024 01:14:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E`=E5=BC=80=E5=85=B3=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E6=97=A5=E5=BF=97=E5=BC=B9=E7=AA=97`=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++-- components/choose.ahk | 2 +- components/common.ahk | 6 +-- components/fight.ahk | 2 +- ...6\345\217\267\344\270\232\347\273\251.ahk" | 44 ++++++++++++------- 5 files changed, 41 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7cc1e6f..6e1d11f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ - 针对零号空洞 **旧都列车·前线** 关卡设计 - 基于 **AutoHotKey v2** 像素点识别定位实现的 **零号业绩** 和 **零号空洞银行存款** 快速刷取 + > 实测约3分钟一把,20业绩+存款到手,3~4小时就能刷满一周零号业绩上限 - 简单轻量易用,对 **分辨率、帧率、HDR、游戏内字体粗细等** 基本无要求 ## 使用前提 @@ -18,11 +19,12 @@ ## 使用方法 - Alt+Z :启动脚本(自动循环刷取,默认情况下会一直刷取直至零号业绩达到周上限) -- Alt+P :暂停脚本 -- Alt+Q :退出脚本 +- Alt+T :查看/关闭刷取统计 +- Alt+L :关闭/开启日志弹窗 +- Alt+P :暂停/恢复脚本 - Alt+R :重启脚本 -- Alt+T :查看刷取统计 -- Alt+B :银行模式(开启此模式并Alt+Z启动脚本后,不论零号业绩是否达到周上限,都无限循环刷取,用于刷取银行存款) +- Alt+Q :退出脚本 +- Alt+B :银行模式(开启此模式并启动脚本后,不论零号业绩是否达到周上限,都会无限循环刷取,用于刷取银行存款) ## 下载、打开方法 @@ -39,6 +41,7 @@ 2. 由于实现原理较简易,此脚本无法保证在所有情况下都能稳定运行,若出现失效、意外报错,请尝试重启脚本后于主界面重新运行。若仍存在问题,请提issue截图描述 3. 战斗按照鲨鱼妹设计,其他角色只要哪怕一直a都能S评价即可,第一位建议带主C + > 战斗时长一般在20~50s以内,超过50s建议换个角色试试 4. 为避免消息弹窗等的影响,建议在脚本运行期间开启免打扰模式 diff --git a/components/choose.ahk b/components/choose.ahk index 590df54..e0d844e 100644 --- a/components/choose.ahk +++ b/components/choose.ahk @@ -64,6 +64,6 @@ choose() { } else { clickFnc() } - Press("Space", 3) + Press("Space", 8) return true } \ No newline at end of file diff --git a/components/common.ahk b/components/common.ahk index 7c34ee4..7e59825 100644 --- a/components/common.ahk +++ b/components/common.ahk @@ -9,10 +9,10 @@ activateZZZ() { } } -global variation := 40 - debugLog(str) { - MsgBox(str, "调试信息", "T1") + if (isDebugLog) { + MsgBox(str, "调试信息", "T1") + } } /** 随机休眠,默认50~100ms */ diff --git a/components/fight.ahk b/components/fight.ahk index 50ca9ec..af3dd48 100644 --- a/components/fight.ahk +++ b/components/fight.ahk @@ -42,7 +42,7 @@ fight() { } Sleep(10) } - MsgBox("【战斗】战斗结束", , "T2") + debugLog("【战斗】战斗结束") RandomSleep() ; 点击确定 SimulateClick(FoundX, FoundY, 2) diff --git "a/\351\233\266\345\217\267\344\270\232\347\273\251.ahk" "b/\351\233\266\345\217\267\344\270\232\347\273\251.ahk" index 10ecb1d..32cda10 100644 --- "a/\351\233\266\345\217\267\344\270\232\347\273\251.ahk" +++ "b/\351\233\266\345\217\267\344\270\232\347\273\251.ahk" @@ -2,8 +2,8 @@ * @description 绝区零零号空洞零号业绩自动刷取、自动银行存款脚本 * @file 零号业绩.ahk * @author UCPr - * @date 2024/07/26 - * @version v1.2.0 + * @date 2024/07/27 + * @version v1.2.1 * @link https://github.com/UCPr251/zzzAuto * @warning 请勿用于任何商业用途,仅供学习交流使用 ***********************************************************************/ @@ -33,7 +33,10 @@ SetMouseDelay(-1) /** Alt+q 退出程序 */ !q:: { - ExitApp() + result := MsgBox("确定关闭零号业绩自动刷取脚本?Y/N", , "0x1") + if (result = "OK") { + ExitApp() + } } /** Ctrl+s 保存并重载程序 */ @@ -51,15 +54,22 @@ SetMouseDelay(-1) Reload() } -/** Alt+p 暂停线程 */ +/** Alt+L 开关日志弹窗 */ +!l:: { + global isDebugLog + isDebugLog := !isDebugLog + MsgBox("已" (isDebugLog ? "开启" : "关闭") "调试日志弹窗,再次Alt+L可切换状态", , "T1") +} + +/** Alt+p 暂停/恢复线程 */ !p:: { - MsgBox("脚本已" (A_IsPaused ? "恢复" : "暂停") ",再次Alt+P可切换状态", , "T2") + MsgBox("脚本已" (A_IsPaused ? "恢复" : "暂停") ",再次Alt+P可切换状态", , "T1") Pause(-1) } /** Alt+z 运行程序 */ !z:: { - MsgBox("【开始运行】绝区零零号空洞自动刷取脚本", , "T2") + MsgBox("【开始运行】绝区零零号空洞自动刷取脚本", , "T1") main() } @@ -104,7 +114,7 @@ SetMouseDelay(-1) } init() { - MsgBox("`t`t绝区零零号空洞自动刷取脚本`n`n注意:此脚本必须在管理员模式下运行才能使用`n`n使用方法:`n Alt+Z :启动脚本(默认情况下会循环刷取直至零号业绩达到周上限)`n Alt+P :暂停脚本`n Alt+Q :退出脚本`n Alt+R :重启脚本`n Alt+T :查看刷取统计`n Alt+B :银行模式(开启此模式后,无论是否达到上限都会一直刷取)`n`n仓库地址:https://gitee.com/UCPr251/zzzAuto", "UCPr", "0x40000") + MsgBox("`t`t绝区零零号空洞自动刷取脚本`n`n注意:此脚本必须在管理员模式下运行才能使用`n`n使用方法:`n Alt+Z :启动脚本(默认情况下会循环刷取直至零号业绩达到周上限)`n Alt+T :查看/关闭刷取统计`n Alt+L :关闭/开启日志弹窗`n Alt+P :暂停/恢复脚本`n Alt+R :重启脚本`n Alt+Q :退出脚本`n Alt+B :银行模式(开启此模式后,无论是否达到上限都会一直刷取)`n`n仓库地址:https://gitee.com/UCPr251/zzzAuto", "UCPr", "0x40000") if (A_ScreenWidth / A_ScreenHeight != 16 / 9) { MsgBox("检测到当前显示器分辨率为" A_ScreenWidth "x" A_ScreenHeight "`n若此脚本无法正常运行,请尝试更改显示器分辨率比例为16:9", "警告", "Icon! 0x40000") } @@ -112,8 +122,14 @@ init() { init() +/** 是否开启调试日志信息输出 */ +global isDebugLog := true +/** RGB颜色搜索允许的渐变值 */ +global variation := 40 /** 是否处于银行模式 */ global bank := 0 +/** 刷取统计数据 */ +global statistics := [] /** 开始,检测所在页面 */ main() { @@ -152,16 +168,14 @@ main() { if (!mode) { return MsgBox("请位于 <零号空洞关卡选择界面> 或 <角色操作界面> 重试", "错误", "Iconx") } else if (mode = 1) { - MsgBox("【开始】模式:角色操作界面", , "T2") + debugLog("【开始】模式:角色操作界面") } else { - MsgBox("【开始】模式:零号空洞关卡选择界面", , "T2") + debugLog("【开始】模式:零号空洞关卡选择界面") } RandomSleep() run(mode) } -global statistics := [] - /** 运行刷取脚本,1:角色操作界面,2:关卡选择界面 */ run(mode) { if (mode = 1) { @@ -198,18 +212,18 @@ run(mode) { end := A_Now statistics.Push(DateDiff(end, start, "s")) if (bank) { - MsgBox("银行模式,无限循环。已刷取" statistics.Length "次", , "T2") + debugLog("银行模式,无限循环。已刷取" statistics.Length "次") } else { ; 判断是否达到上限 if (isLimited()) { return MsgBox("已达到上限,脚本结束。共刷取" statistics.Length "次") } - MsgBox("未达到上限,继续刷取。已刷取" statistics.Length1 "次", , "T2") + debugLog("未达到上限,继续刷取。已刷取" statistics.Length1 "次") } - RandomSleep() + RandomSleep(800, 1000) ; 点击完成 pixelSearchAndClick(1670, 970, 1730, 1038, 1699, 1027, 0xffffff) - RandomSleep(3800, 4000) + RandomSleep(4500, 4800) ; 继续循环 run(2) } \ No newline at end of file