From c517ff423b4da9360480e6ed732aeaa30a22dc90 Mon Sep 17 00:00:00 2001 From: Traveler07 <88669636+Traveler07@users.noreply.github.com> Date: Thu, 31 Oct 2024 21:47:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E6=84=8F=E5=A4=96=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoWoodmen/main.js | 69 ------------------------------- repo/js/AutoWoodmen/manifest.json | 12 ------ 2 files changed, 81 deletions(-) delete mode 100644 repo/js/AutoWoodmen/main.js delete mode 100644 repo/js/AutoWoodmen/manifest.json diff --git a/repo/js/AutoWoodmen/main.js b/repo/js/AutoWoodmen/main.js deleted file mode 100644 index ad0a393c..00000000 --- a/repo/js/AutoWoodmen/main.js +++ /dev/null @@ -1,69 +0,0 @@ -w(async function () { - setGameMetrics(1920, 1080, 2); - - async function performGameActions() { - // 负责砍树的,退出重进,按Z - await sleep(1000);//等待一秒 - keyPress("ESCAPE");//按下esc - await sleep(1000); - click(50, 1030);//点击退出 - await sleep(1000); - click(1000, 750);//点击确认 - await sleep(10000); //退出延迟 - click(1000, 550);//进入游戏 - await sleep(13000);//加载延迟 - keyDown("z"); - await sleep(300); - keyUp("z"); - } - - - async function runGameActionsMultipleTimes(times) { - // 负责循环调用performGameActions,实现循环砍树 - for (let i = 0; i < times; i++) { - await performGameActions(); - } - } - async function AutoPath(locationName, time) { - //传入路径以及循环次数 - let filePath = `assets/AutoPath/${locationName}.json`; - await pathingScript.runFile(filePath); - await runGameActionsMultipleTimes(time) - } - async function KeyMouse(locationName, sec, x, y) { - //传入路径,秒数,坐标 - if (x !== undefined && y !== undefined) { - await genshin.tp(x, y); - await sleep(1000); - } - - let filePath = `assets/KeyMouse/${locationName}.json`; - await keyMouseScript.runFile(filePath); - await sleep(sec * 1000); // 将秒转换为毫秒 - } - await AutoPath('松木_蒙德_24个', 84) - await AutoPath('业果木15个(辉木15个)', 134) - await AutoPath('刺葵木6个', 334) - await AutoPath('却砂木12个', 167) - await AutoPath('垂香木15个', 134) - await AutoPath('御伽木9个(孔雀木6个)', 334) - await AutoPath('悬铃木18个', 112) - await AutoPath('杉木_蒙德_12个', 167) - await AutoPath('枫木9个', 223) - await AutoPath('柽木15个', 134) - await AutoPath('桦木_蒙德_15个', 134) - await AutoPath('梦见木12个', 167) - await AutoPath('椴木9个(悬铃木9个)', 223) - await AutoPath('灰灰楼木6个', 334) - // await AutoPath('燃爆木15个', 0) - await AutoPath('燃爆木6个(白栗栎木6个)', 334) - await AutoPath('白梣木15个', 134) - await AutoPath('竹节30个', 67) - await AutoPath('萃华木6个(垂香木3个)', 334) - await AutoPath('证悟木15个(业果木6个)', 134) - await AutoPath('香柏木27个', 75) - await KeyMouse('炬木15个',3, 8359.7548828125, -2868.03515625) - // await keyDown('',5,8353.4921875,-2853.8505859375) - - -})(); \ No newline at end of file diff --git a/repo/js/AutoWoodmen/manifest.json b/repo/js/AutoWoodmen/manifest.json deleted file mode 100644 index cad82d8f..00000000 --- a/repo/js/AutoWoodmen/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "manifest_version": 1, - "name": "自动伐木-全树种收集计划", - "version": "1.0", - "description": "小道具自动伐木,单个树种满后,前往下一个树种", - "authors": [ - { - "name": "½" - } - ], - "main": "main.js" -} \ No newline at end of file