From c86529c62e02620893c9cd8df6a0b57366950422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B7=E4=B8=AA=E5=90=8D=E5=AD=97=E5=A5=BD=E9=9A=BE?= =?UTF-8?q?=E7=9A=84=E5=96=B5?= <25520958+MisakaAldrich@users.noreply.github.com> Date: Sun, 20 Apr 2025 18:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=BF=BD=E8=B8=AA=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=99=E8=BE=9B=E6=9E=9C32=E4=B8=AA?= =?UTF-8?q?=EF=BC=9B=E5=BD=92=E6=A1=A3=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84?= =?UTF-8?q?JS=E8=84=9A=E6=9C=AC=20(#608)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 地图追踪:新增香辛果32个 * JS脚本归档 --- {repo/js => archive}/Login/main.js | 216 +++++++++--------- {repo/js => archive}/Login/manifest.json | 24 +- {repo/js => archive}/Login/settings.json | 24 +- {repo/js => archive}/Logout/main.js | 34 +-- {repo/js => archive}/Logout/manifest.json | 22 +- .../香辛果-善见地-水天丛林-14个.json | 165 +++++++++++++ .../香辛果-善见地-河谷的黯道-18个.json | 192 ++++++++++++++++ 7 files changed, 517 insertions(+), 160 deletions(-) rename {repo/js => archive}/Login/main.js (96%) rename {repo/js => archive}/Login/manifest.json (95%) rename {repo/js => archive}/Login/settings.json (93%) rename {repo/js => archive}/Logout/main.js (96%) rename {repo/js => archive}/Logout/manifest.json (94%) create mode 100644 repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-水天丛林-14个.json create mode 100644 repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-河谷的黯道-18个.json diff --git a/repo/js/Login/main.js b/archive/Login/main.js similarity index 96% rename from repo/js/Login/main.js rename to archive/Login/main.js index 08d2856b..4ff42f7a 100644 --- a/repo/js/Login/main.js +++ b/archive/Login/main.js @@ -1,109 +1,109 @@ -(async function () { - //特殊字符键盘映射集 - const map = { - '(': '9', - ')': '0', - '`': 'VK_OEM_3', - '!': '1', - '@': '2', - '#': '3', - '$': '4', - '%': '5', - '^': '6', - '&': '7', - '*': '8', - '_': 'VK_SUBTRACT', - '-': 'VK_SUBTRACT', - '+': 'VK_ADD', - '=': 'VK_ADD', - '|': 'VK_SEPARATOR', - '{': 'VK_OEM_4', - '}': 'VK_OEM_6', - '[': 'VK_OEM_4', - ']': 'VK_OEM_6', - ':': 'VK_OEM_1', - ';': 'VK_OEM_1', - '\'': 'VK_OEM_7', - '"': 'VK_OEM_7', - '<': 'VK_OEM_COMMA', - '>': 'VK_OEM_PERIOD', - ',': 'VK_OEM_COMMA', - '.': 'VK_OEM_PERIOD', - '?': 'VK_OEM_2', - }; - function replaceUsingMap(input) { - return map[input] || input; // 如果找到映射,返回对应的值;否则返回原值 - } - setGameMetrics(1920, 1080, 2); - await sleep(3000); - //同意用户协议 - click(698, 610); - await sleep(1000); - //点击用户名输入框 - click(800, 400); - await sleep(1000); - //输入用户名 - log.info("输入用户名"); - let username = settings.username; - let usernameList = username.split(''); - usernameList.forEach(element => { - charCode = element.charCodeAt(0); - let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; - if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ - element=replaceUsingMap(element); - keyDown("SHIFT"); - keyPress(element); - keyUp("SHIFT"); - }else{ - element=replaceUsingMap(element); - keyPress(element); - } - }); - log.info("用户名={xx}",username) - await sleep(3000); - //点击用户名输入框 - click(800, 500); - await sleep(1000); - //输入密码 - log.info("输入密码") - let password = settings.password; - let passwordList = password.split(''); - passwordList.forEach(element => { - charCode = element.charCodeAt(0); - let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; - if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ - element=replaceUsingMap(element); - keyDown("SHIFT"); - keyPress(element); - keyUp("SHIFT"); - }else{ - element=replaceUsingMap(element); - keyPress(element); - } - }); - log.info("密码={xx}",password); - await sleep(1000); - //登录 - keyPress("RETURN"); - await sleep(10000); - //进入世界 - click(950, 1000); - log.info("进入世界"); - await sleep(10000); - //进入世界2 - click(950, 1000); - log.info("进入世界2"); - await sleep(10000); - //点击领月卡 - click(950, 1000); - log.info("点击领月卡"); - await sleep(1000); - //点击领月卡2 - click(950, 1000); - log.info("点击领月卡2"); - await sleep(1000); - //点击领月卡2 - click(950, 1000); - log.info("点击领月卡3"); - await sleep(1000); +(async function () { + //特殊字符键盘映射集 + const map = { + '(': '9', + ')': '0', + '`': 'VK_OEM_3', + '!': '1', + '@': '2', + '#': '3', + '$': '4', + '%': '5', + '^': '6', + '&': '7', + '*': '8', + '_': 'VK_SUBTRACT', + '-': 'VK_SUBTRACT', + '+': 'VK_ADD', + '=': 'VK_ADD', + '|': 'VK_SEPARATOR', + '{': 'VK_OEM_4', + '}': 'VK_OEM_6', + '[': 'VK_OEM_4', + ']': 'VK_OEM_6', + ':': 'VK_OEM_1', + ';': 'VK_OEM_1', + '\'': 'VK_OEM_7', + '"': 'VK_OEM_7', + '<': 'VK_OEM_COMMA', + '>': 'VK_OEM_PERIOD', + ',': 'VK_OEM_COMMA', + '.': 'VK_OEM_PERIOD', + '?': 'VK_OEM_2', + }; + function replaceUsingMap(input) { + return map[input] || input; // 如果找到映射,返回对应的值;否则返回原值 + } + setGameMetrics(1920, 1080, 2); + await sleep(3000); + //同意用户协议 + click(698, 610); + await sleep(1000); + //点击用户名输入框 + click(800, 400); + await sleep(1000); + //输入用户名 + log.info("输入用户名"); + let username = settings.username; + let usernameList = username.split(''); + usernameList.forEach(element => { + charCode = element.charCodeAt(0); + let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; + if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ + element=replaceUsingMap(element); + keyDown("SHIFT"); + keyPress(element); + keyUp("SHIFT"); + }else{ + element=replaceUsingMap(element); + keyPress(element); + } + }); + log.info("用户名={xx}",username) + await sleep(3000); + //点击用户名输入框 + click(800, 500); + await sleep(1000); + //输入密码 + log.info("输入密码") + let password = settings.password; + let passwordList = password.split(''); + passwordList.forEach(element => { + charCode = element.charCodeAt(0); + let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; + if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ + element=replaceUsingMap(element); + keyDown("SHIFT"); + keyPress(element); + keyUp("SHIFT"); + }else{ + element=replaceUsingMap(element); + keyPress(element); + } + }); + log.info("密码={xx}",password); + await sleep(1000); + //登录 + keyPress("RETURN"); + await sleep(10000); + //进入世界 + click(950, 1000); + log.info("进入世界"); + await sleep(10000); + //进入世界2 + click(950, 1000); + log.info("进入世界2"); + await sleep(10000); + //点击领月卡 + click(950, 1000); + log.info("点击领月卡"); + await sleep(1000); + //点击领月卡2 + click(950, 1000); + log.info("点击领月卡2"); + await sleep(1000); + //点击领月卡2 + click(950, 1000); + log.info("点击领月卡3"); + await sleep(1000); })(); \ No newline at end of file diff --git a/repo/js/Login/manifest.json b/archive/Login/manifest.json similarity index 95% rename from repo/js/Login/manifest.json rename to archive/Login/manifest.json index 13665b8e..215e59b8 100644 --- a/repo/js/Login/manifest.json +++ b/archive/Login/manifest.json @@ -1,13 +1,13 @@ -{ - "manifest_version": 1, - "name": "登录游戏", - "version": "1.0", - "description": "输入账号和密码并进入游戏", - "authors": [ - { - "name": "愚溪", - } - ], - "settings_ui": "settings.json", - "main": "main.js" +{ + "manifest_version": 1, + "name": "登录游戏", + "version": "1.0", + "description": "输入账号和密码并进入游戏", + "authors": [ + { + "name": "愚溪", + } + ], + "settings_ui": "settings.json", + "main": "main.js" } \ No newline at end of file diff --git a/repo/js/Login/settings.json b/archive/Login/settings.json similarity index 93% rename from repo/js/Login/settings.json rename to archive/Login/settings.json index 18f0822e..79a4961c 100644 --- a/repo/js/Login/settings.json +++ b/archive/Login/settings.json @@ -1,12 +1,12 @@ -[ - { - "name": "username", - "type": "input-text", - "label": "账号" - }, - { - "name": "password", - "type": "input-text", - "label": "密码" - } -] +[ + { + "name": "username", + "type": "input-text", + "label": "账号" + }, + { + "name": "password", + "type": "input-text", + "label": "密码" + } +] diff --git a/repo/js/Logout/main.js b/archive/Logout/main.js similarity index 96% rename from repo/js/Logout/main.js rename to archive/Logout/main.js index 39e41483..f64d2523 100644 --- a/repo/js/Logout/main.js +++ b/archive/Logout/main.js @@ -1,18 +1,18 @@ -(async function () { - setGameMetrics(1920, 1080, 2); - await sleep(1000); - keyPress("ESCAPE") - await sleep(1000); - click(50, 1030); - log.info("退出"); - await sleep(1000); - click(1000, 750); - log.info("确认"); - await sleep(20000); - click(1800, 1000); - log.info("切换账号"); - await sleep(1000); - click(1000, 550); - log.info("确认"); - await sleep(4000); +(async function () { + setGameMetrics(1920, 1080, 2); + await sleep(1000); + keyPress("ESCAPE") + await sleep(1000); + click(50, 1030); + log.info("退出"); + await sleep(1000); + click(1000, 750); + log.info("确认"); + await sleep(20000); + click(1800, 1000); + log.info("切换账号"); + await sleep(1000); + click(1000, 550); + log.info("确认"); + await sleep(4000); })(); \ No newline at end of file diff --git a/repo/js/Logout/manifest.json b/archive/Logout/manifest.json similarity index 94% rename from repo/js/Logout/manifest.json rename to archive/Logout/manifest.json index 3ca1e23e..a2d07ea4 100644 --- a/repo/js/Logout/manifest.json +++ b/archive/Logout/manifest.json @@ -1,12 +1,12 @@ -{ - "manifest_version": 1, - "name": "退出并重登", - "version": "1.0", - "description": "退出游戏并退出账号", - "authors": [ - { - "name": "愚溪", - } - ], - "main": "main.js" +{ + "manifest_version": 1, + "name": "退出并重登", + "version": "1.0", + "description": "退出游戏并退出账号", + "authors": [ + { + "name": "愚溪", + } + ], + "main": "main.js" } \ No newline at end of file diff --git a/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-水天丛林-14个.json b/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-水天丛林-14个.json new file mode 100644 index 00000000..ae81a340 --- /dev/null +++ b/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-水天丛林-14个.json @@ -0,0 +1,165 @@ +{ + "info": { + "name": "香辛果-善见地-水天丛林-14个", + "type": "collect", + "author": "起个名字好难的喵", + "version": "1.0", + "description": "", + "bgiVersion": "0.42.3" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 2806.47, + "y": -1790.44, + "action_params": "" + }, + { + "id": 2, + "x": 2837.1, + "y": -1801.61, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 3, + "x": 2841.76, + "y": -1821.84, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 4, + "x": 2852.29, + "y": -1832.36, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 5, + "x": 2877.13, + "y": -1845.19, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 6, + "x": 2895.71, + "y": -1785.65, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 7, + "x": 2904.73, + "y": -1776.9, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 8, + "x": 2883.06, + "y": -1735.11, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 9, + "x": 2882.9, + "y": -1731.1, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 10, + "x": 3028.63, + "y": -1680.12, + "type": "path", + "move_mode": "fly", + "action": "stop_flying", + "action_params": "" + }, + { + "id": 11, + "x": 3034.78, + "y": -1681.57, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 12, + "x": 3038.53, + "y": -1685.24, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 13, + "x": 3024.81, + "y": -1705.95, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 14, + "x": 3012.48, + "y": -1751.94, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 15, + "x": 3034.94, + "y": -1787.81, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 16, + "x": 3058.74, + "y": -1768.0, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 17, + "x": 3056.89, + "y": -1765.55, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + } + ] +} \ No newline at end of file diff --git a/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-河谷的黯道-18个.json b/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-河谷的黯道-18个.json new file mode 100644 index 00000000..087d9270 --- /dev/null +++ b/repo/pathing/香辛果/香辛果@起个名字好难的喵/香辛果-善见地-河谷的黯道-18个.json @@ -0,0 +1,192 @@ +{ + "info": { + "name": "香辛果-善见地-河谷的黯道-18个", + "type": "collect", + "author": "起个名字好难的喵", + "version": "1.0", + "description": "", + "bgiVersion": "0.42.3" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 2965.45, + "y": -1452.86, + "action_params": "" + }, + { + "id": 2, + "x": 2968.79, + "y": -1445.59, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 3, + "x": 2979.68, + "y": -1422.12, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 4, + "x": 3017.02, + "y": -1425.87, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 5, + "x": 3019.15, + "y": -1422.56, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 6, + "x": 3047.79, + "y": -1407.5, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 7, + "x": 3049.98, + "y": -1384.72, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 8, + "x": 3005.12, + "y": -1332.27, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 9, + "x": 2999.88, + "y": -1329.58, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 10, + "x": 2977.28, + "y": -1298.53, + "type": "path", + "move_mode": "fly", + "action": "stop_flying", + "action_params": "" + }, + { + "id": 11, + "x": 2958.25, + "y": -1298.65, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 12, + "x": 2978.82, + "y": -1302.27, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 13, + "x": 2992.88, + "y": -1303.71, + "type": "target", + "move_mode": "fly", + "action": "stop_flying", + "action_params": "" + }, + { + "id": 14, + "x": 2997.89, + "y": -1303.7, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 15, + "x": 3012.0, + "y": -1292.85, + "type": "target", + "move_mode": "fly", + "action": "stop_flying", + "action_params": "1000" + }, + { + "id": 16, + "x": 3072.47, + "y": -1308.35, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 17, + "x": 3090.11, + "y": -1326.69, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 18, + "x": 3106.44, + "y": -1317.29, + "type": "target", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 19, + "x": 3128.91, + "y": -1336.55, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 20, + "x": 3126.97, + "y": -1350.64, + "type": "target", + "move_mode": "fly", + "action": "", + "action_params": "" + } + ] +} \ No newline at end of file