From 7cbede6aad6cd4242f62fe212993087e0bbf1c2c Mon Sep 17 00:00:00 2001 From: Zebartin <16185081+Zebartin@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:02:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20LIP=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NIKKE/CHANGELOG.md | 4 ++-- NIKKE/NIKKEutils.js | 12 +++++++++--- "NIKKE/NIKKE\350\256\276\347\275\256.js" | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/NIKKE/CHANGELOG.md b/NIKKE/CHANGELOG.md index eac353e..1e91df8 100644 --- a/NIKKE/CHANGELOG.md +++ b/NIKKE/CHANGELOG.md @@ -1,9 +1,9 @@ 修复以下问题: -无。 +- LIP签到。 新功能: -- 在必要时自动登录,需要配置游戏账号密码。 +无。 具体使用方式详见[README](https://github.com/Zebartin/autoxjs-scripts/blob/master/NIKKE/README.md)。 diff --git a/NIKKE/NIKKEutils.js b/NIKKE/NIKKEutils.js index 5ff04fa..666499f 100644 --- a/NIKKE/NIKKEutils.js +++ b/NIKKE/NIKKEutils.js @@ -192,7 +192,7 @@ function checkInLIP() { return false; } const entrance = res.find(e => - e.text.match(/[领取超值好礼签到领珠宝]{3,}/) != null && + e.text.match(/[领取超值好礼签到领珠宝送]{3,}/) != null && e.bounds != null && e.bounds.top > announcementBtn.bounds.bottom ); @@ -259,10 +259,15 @@ function checkInLIP() { function tryLogin() { const NIKKEstorage = storages.create("NIKKEconfig"); const { email, password } = NIKKEstorage.get('account', {}); + const launchMethod = NIKKEstorage.get('launchMethod', null); if (!email || !password) { console.error('未配置游戏账号密码,无法登录游戏'); return false; } + if (launchMethod != 'NIKKE') { + console.error('不是通过游戏本体启动,无法输入账号密码'); + return false; + } const 忘记密码 = { text: "忘记密码", regex: /[忘记]/ @@ -345,9 +350,9 @@ function tryLogin() { const dis = 输入确定.bounds.width() / 2; const mayBeEdit = { bounds: android.graphics.Rect( - ocrInfo.img.width() - dis, + ocrInfo.img.width - dis, 输入确定.bounds.top, - ocrInfo.img.width() + dis, + ocrInfo.img.width + dis, 输入确定.bounds.bottom, ) }; @@ -474,6 +479,7 @@ function 等待NIKKE加载() { function 退出NIKKE() { home(); + const NIKKEstorage = storages.create("NIKKEconfig"); const launchMethod = NIKKEstorage.get('launchMethod', 'NIKKE'); if (launchMethod == 'NIKKE') { killApp('NIKKE'); diff --git "a/NIKKE/NIKKE\350\256\276\347\275\256.js" "b/NIKKE/NIKKE\350\256\276\347\275\256.js" index 05b2d01..e3f7287 100644 --- "a/NIKKE/NIKKE\350\256\276\347\275\256.js" +++ "b/NIKKE/NIKKE\350\256\276\347\275\256.js" @@ -581,6 +581,7 @@ if (NIKKEstorage.get('checkUpdateAuto', false)) { const dialogView = ui.inflate( +