From 47fb2368fefe84a4411106983dd34523ead2c8c1 Mon Sep 17 00:00:00 2001 From: HZYgrandma Date: Sat, 19 Oct 2024 12:21:13 +0000 Subject: [PATCH 1/5] update repo.json --- repo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.json b/repo.json index a8ff4008..1a226b44 100644 --- a/repo.json +++ b/repo.json @@ -1,5 +1,5 @@ { - "time": "20241019132438", + "time": "20241019202112", "url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip", "file": "repo.json", "indexes": [ From 211a429499720d90e232fc31f9bbb0a5f8800d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E7=B1=BD=E9=98=B3=E5=A4=96=E5=A9=86?= <2915414902@qq.com> Date: Sat, 19 Oct 2024 20:22:33 +0800 Subject: [PATCH 2/5] JustAwait --- repo/js/JustAwait/main.js | 6 ++++++ repo/js/JustAwait/manifest.json | 13 +++++++++++++ repo/js/JustAwait/settings.json | 7 +++++++ 3 files changed, 26 insertions(+) create mode 100644 repo/js/JustAwait/main.js create mode 100644 repo/js/JustAwait/manifest.json create mode 100644 repo/js/JustAwait/settings.json diff --git a/repo/js/JustAwait/main.js b/repo/js/JustAwait/main.js new file mode 100644 index 00000000..a92e4938 --- /dev/null +++ b/repo/js/JustAwait/main.js @@ -0,0 +1,6 @@ +(async function () { + // settings 的对象内容来自于 settings.json 文件生成的动态配置页面 + log.info('等待{time}秒', settings.t) + timeset=1000*settings.t + await sleep(timeset); +})(); \ No newline at end of file diff --git a/repo/js/JustAwait/manifest.json b/repo/js/JustAwait/manifest.json new file mode 100644 index 00000000..001c4929 --- /dev/null +++ b/repo/js/JustAwait/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 1, + "name": "只是等待一下", + "version": "1.0", + "description": "只用于等待,方便在调度器为不同性能的设备配置等待", + "authors": [ + { + "name": "HZYgrandma", + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/JustAwait/settings.json b/repo/js/JustAwait/settings.json new file mode 100644 index 00000000..d46d7eae --- /dev/null +++ b/repo/js/JustAwait/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "t", + "type": "input-text", + "label": "等待时间(单位:秒)" + } +] \ No newline at end of file From a7404f32271cf30fd28e6c64438516d2a0afbbe6 Mon Sep 17 00:00:00 2001 From: HZYgrandma Date: Sat, 19 Oct 2024 12:22:49 +0000 Subject: [PATCH 3/5] update repo.json --- repo.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repo.json b/repo.json index 1a226b44..eb14684e 100644 --- a/repo.json +++ b/repo.json @@ -1,5 +1,5 @@ { - "time": "20241019202112", + "time": "20241019202248", "url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip", "file": "repo.json", "indexes": [ @@ -4374,6 +4374,15 @@ "description": "领取历练点~|~用于领取历练点", "tags": [] }, + { + "name": "JustAwait", + "type": "directory", + "hash": "b16b4f6e53345769b489706b860ab212f630dd31", + "version": "1.0", + "author": "HZYgrandma", + "description": "只是等待一下~|~只用于等待,方便在调度器为不同性能的设备配置等待", + "tags": [] + }, { "name": "JustTp", "type": "directory", From 6c8b533ee603cb033f41995e09c0fd564f1b480f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E7=B1=BD=E9=98=B3=E5=A4=96=E5=A9=86?= <2915414902@qq.com> Date: Sat, 19 Oct 2024 22:51:33 +0800 Subject: [PATCH 4/5] UpadteV1.8 --- .../assets/AutoPath/化城郭西.json | 52 ++++++++ .../assets/AutoPath/塔尼特营地.json | 92 +++++++++++++ .../assets/AutoPath/新枫科院宿舍.json | 124 ++++++++++++++++++ .../assets/AutoPath/望泷村西南.json | 84 ++++++++++++ .../AutoArtifacts/assets/AutoPath/酒窖.json | 108 +++++++++++++++ repo/js/AutoArtifacts/main.js | 43 ++++-- repo/js/AutoArtifacts/manifest.json | 4 +- 7 files changed, 494 insertions(+), 13 deletions(-) create mode 100644 repo/js/AutoArtifacts/assets/AutoPath/化城郭西.json create mode 100644 repo/js/AutoArtifacts/assets/AutoPath/塔尼特营地.json create mode 100644 repo/js/AutoArtifacts/assets/AutoPath/新枫科院宿舍.json create mode 100644 repo/js/AutoArtifacts/assets/AutoPath/望泷村西南.json create mode 100644 repo/js/AutoArtifacts/assets/AutoPath/酒窖.json diff --git a/repo/js/AutoArtifacts/assets/AutoPath/化城郭西.json b/repo/js/AutoArtifacts/assets/AutoPath/化城郭西.json new file mode 100644 index 00000000..eee880e7 --- /dev/null +++ b/repo/js/AutoArtifacts/assets/AutoPath/化城郭西.json @@ -0,0 +1,52 @@ +{ + "info": { + "name": "狗粮_化城郭_2", + "type": "collect", + "author": "Tim", + "version": "1.0", + "description": "", + "bgiVersion": "0.34.5" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 2701.53076171875, + "y": -761.8154296875 + }, + { + "id": 2, + "x": 2703.22119140625, + "y": -794.27490234375, + "type": "path", + "move_mode": "fly", + "action": "stop_flying" + }, + { + "id": 3, + "x": 2706.17041015625, + "y": -789.1103515625, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 4, + "x": 2690.923828125, + "y": -822.13232421875, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 5, + "x": 2683.91015625, + "y": -839.9404296875, + "type": "target", + "move_mode": "walk", + "action": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoArtifacts/assets/AutoPath/塔尼特营地.json b/repo/js/AutoArtifacts/assets/AutoPath/塔尼特营地.json new file mode 100644 index 00000000..12c2b449 --- /dev/null +++ b/repo/js/AutoArtifacts/assets/AutoPath/塔尼特营地.json @@ -0,0 +1,92 @@ +{ + "info": { + "name": "狗粮_须弥_塔尼特营地_4", + "type": "collect", + "author": "Tim", + "version": "1.0", + "description": "", + "bgiVersion": "0.34.5" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 5063.81103515625, + "y": -1587.734375 + }, + { + "id": 2, + "x": 5094.9765625, + "y": -1547.99658203125, + "type": "path", + "move_mode": "fly", + "action": "stop_flying" + }, + { + "id": 3, + "x": 5098.1201171875, + "y": -1541.771484375, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 4, + "x": 5083.83740234375, + "y": -1550.5673828125, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 6, + "x": 5059.3310546875, + "y": -1572.44775390625, + "type": "path", + "move_mode": "fly", + "action": "stop_flying" + }, + { + "id": 7, + "x": 5064.13818359375, + "y": -1579.64892578125, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 8, + "x": 5081.541015625, + "y": -1573.60595703125, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 9, + "x": 5119.51220703125, + "y": -1570.22216796875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 10, + "x": 5136.69189453125, + "y": -1577.34765625, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 11, + "x": 5170.701171875, + "y": -1559.78369140625, + "type": "target", + "move_mode": "walk", + "action": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoArtifacts/assets/AutoPath/新枫科院宿舍.json b/repo/js/AutoArtifacts/assets/AutoPath/新枫科院宿舍.json new file mode 100644 index 00000000..2deb6483 --- /dev/null +++ b/repo/js/AutoArtifacts/assets/AutoPath/新枫科院宿舍.json @@ -0,0 +1,124 @@ +{ + "info": { + "name": "狗粮_枫丹_枫科院宿舍_4", + "type": "collect", + "author": "Tim", + "version": "1.0", + "description": "", + "bgiVersion": "0.34.5" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 4000.9814453125, + "y": 4878.4423828125 + }, + { + "id": 2, + "x": 3953.20751953125, + "y": 4829.73291015625, + "type": "path", + "move_mode": "fly", + "action": "stop_flying" + }, + { + "id": 3, + "x": 3950.16845703125, + "y": 4837.42529296875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 4, + "x": 3946.93505859375, + "y": 4846.52294921875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 5, + "x": 3943.2548828125, + "y": 4856.7353515625, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 6, + "x": 3942.2978515625, + "y": 4861.6513671875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 7, + "x": 3951.08154296875, + "y": 4864.849609375, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 8, + "x": 3947.02587890625, + "y": 4876.2939453125, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 9, + "x": 3954.876953125, + "y": 4875.513671875, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 10, + "x": 3955.63037109375, + "y": 4881.529296875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 11, + "x": 3955.97021484375, + "y": 4875.0732421875, + "type": "path", + "move_mode": "fly", + "action": "" + }, + { + "id": 13, + "x": 3960.7890625, + "y": 4875.92578125, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 14, + "x": 3952.8828125, + "y": 4865.2705078125, + "type": "path", + "move_mode": "fly", + "action": "" + }, + { + "id": 15, + "x": 3952.779296875, + "y": 4853.02685546875, + "type": "target", + "move_mode": "walk", + "action": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoArtifacts/assets/AutoPath/望泷村西南.json b/repo/js/AutoArtifacts/assets/AutoPath/望泷村西南.json new file mode 100644 index 00000000..e5ec689f --- /dev/null +++ b/repo/js/AutoArtifacts/assets/AutoPath/望泷村西南.json @@ -0,0 +1,84 @@ +{ + "info": { + "name": "狗粮_望泷村西南_4", + "type": "collect", + "author": "Tim", + "version": "1.0", + "description": "", + "bgiVersion": "0.34.5" + }, + "positions": [ + { + "id": 1, + "x": -755.568359375, + "y": -4001.1162109375, + "type": "teleport", + "move_mode": "walk", + "action": "" + }, + { + "id": 2, + "x": -736.296875, + "y": -4012.8759765625, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 3, + "x": -726.130859375, + "y": -4025.2802734375, + "type": "path", + "move_mode": "fly", + "action": "stop_flying" + }, + { + "id": 4, + "x": -703.5146484375, + "y": -4050.36328125, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 5, + "x": -685.8505859375, + "y": -4062.9677734375, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 6, + "x": -688.615234375, + "y": -4042.8857421875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 7, + "x": -672.9072265625, + "y": -4043.359375, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 8, + "x": -685.6416015625, + "y": -4055.6103515625, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 9, + "x": -694.265625, + "y": -4086.93359375, + "type": "target", + "move_mode": "walk", + "action": "" + } + ] +} diff --git a/repo/js/AutoArtifacts/assets/AutoPath/酒窖.json b/repo/js/AutoArtifacts/assets/AutoPath/酒窖.json new file mode 100644 index 00000000..6d0eb14b --- /dev/null +++ b/repo/js/AutoArtifacts/assets/AutoPath/酒窖.json @@ -0,0 +1,108 @@ +{ + "info": { + "name": "狗粮_璃月_老窖_6", + "type": "collect", + "author": "Tim", + "version": "1.0", + "description": "", + "bgiVersion": "0.34.5" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 730.2958984375, + "y": 1061.9833984375 + }, + { + "id": 2, + "x": 670.7509765625, + "y": 1013.990234375, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 3, + "x": 649.2666015625, + "y": 971.67529296875, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 4, + "x": 642.5595703125, + "y": 941.28466796875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 5, + "x": 640.6220703125, + "y": 893.11865234375, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 6, + "x": 650.8212890625, + "y": 860.02880859375, + "type": "path", + "move_mode": "walk", + "action": "" + }, + { + "id": 7, + "x": 650.44921875, + "y": 850.58984375, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 8, + "x": 649.681640625, + "y": 832.33056640625, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 10, + "x": 648.564453125, + "y": 831.76171875, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 11, + "x": 645.7724609375, + "y": 835.53515625, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 12, + "x": 645.4462890625, + "y": 834.556640625, + "type": "target", + "move_mode": "walk", + "action": "" + }, + { + "id": 13, + "x": 645.578125, + "y": 833.45751953125, + "type": "target", + "move_mode": "walk", + "action": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoArtifacts/main.js b/repo/js/AutoArtifacts/main.js index d04bc36f..6dc788e2 100644 --- a/repo/js/AutoArtifacts/main.js +++ b/repo/js/AutoArtifacts/main.js @@ -6,7 +6,7 @@ async function logTaskStart() { const messages = [ - `确保地图的按键为M键`, + '确保地图的按键为M键', '左上角派蒙头像未被其他悬浮窗遮挡', '游戏以60帧运行', '游戏视角灵敏度保持默认为3', @@ -24,7 +24,7 @@ async function KeyMouse(locationName, sec, x, y) { if (x !== undefined && y !== undefined) { - log.info(`前往 {name}`, locationName); + log.info(`前往 ${locationName}`); await genshin.tp(x, y); await sleep(1000); } @@ -39,41 +39,64 @@ await pathingScript.runFile(filePath); } + function logTimeTaken(startTime) { + const currentTime = Date.now(); + const totalTimeInSeconds = (currentTime - startTime) / 1000; + const minutes = Math.floor(totalTimeInSeconds / 60); + const seconds = totalTimeInSeconds % 60; + const formattedTime = `${minutes}分${seconds.toFixed(0).padStart(2, '0')}秒`; + log.info(`当前运行总时长:${formattedTime}`); + } + await logTaskStart(); + log.info('前往地区:璃月') await KeyMouse('地中之盐北', 1, -321, 1470); await KeyMouse('无相之冰', 1, -410, 1161); await KeyMouse('解除冰元素附着', 4, -255, 629); await KeyMouse('地中之盐', 2, -164, 1183); await KeyMouse('望舒客栈', 2, 330, 874); + await AutoPath('荻花洲'); await KeyMouse('荻花洲西', 2, 730, 1062); await KeyMouse('望舒客栈西', 2, 730, 1062); await KeyMouse('轻策庄', 2, 547, 1767); + await AutoPath('轻策庄'); await KeyMouse('沉玉谷码头', 2, 1113, 1948); await KeyMouse('沉玉谷狗洞', 2, 1114, 1948); await KeyMouse('奥藏山', 2, 1451, 1029); await KeyMouse('酒窖', 2, 730, 1062); + await AutoPath('酒窖'); + await AutoPath('渌华池'); + logTimeTaken(startTime); + log.info('前往地区:稻妻') await KeyMouse('神无冢1', 2, -3405, -3534); await KeyMouse('神无冢2', 2, -3405, -3534); await KeyMouse('炉心1', 2, -3289, -3654); await KeyMouse('炉心2', 2, -3289, -3654); await KeyMouse('绝美我心', 2, -1315, -3776); + await AutoPath('望泷村西南'); await KeyMouse('沉眠之庭1', 2, -4185, -4244); await KeyMouse('沉眠之庭2', 2, -4185, -4244); await KeyMouse('浅濑神社', 2, -3698, -4689); await KeyMouse('鹤观神像1', 2, -3269, -6135); await KeyMouse('鹤观神像2', 2, -3269, -6135); await KeyMouse('黄金王兽北', 2, -2612, -6507); + logTimeTaken(startTime); + log.info('前往地区:须弥') await KeyMouse('须弥城', 2, 2786, -503); await KeyMouse('须弥城东', 2, 2694, -416); await KeyMouse('须弥城西北1', 2, 2876, -292); await KeyMouse('须弥城西北2', 2, 2876, -292); + await AutoPath('化城郭西'); + await AutoPath('维摩庄'); await KeyMouse('圣显厅南', 2, 4271, -1666); await KeyMouse('圣显厅西', 2, 4775, -1437); await KeyMouse('神的棋盘', 2, 5759, -1309); + logTimeTaken(startTime); + log.info('前往地区:枫丹') await KeyMouse('枫丹廷1', 2, 4509, 3630); await KeyMouse('枫丹廷2', 2, 4509, 3630); await KeyMouse('欧庇克莱歌剧院东南', 2, 3595, 3254); @@ -87,10 +110,11 @@ await KeyMouse('科学院西', 2, 4498, 4711); await KeyMouse('缩小地图', 1); await KeyMouse('海露港', 6, 4984, 1700); - await KeyMouse('遗忘之路', 2, 5990, 1212); await KeyMouse('佩特莉可神像', 2, 4454, 1255); await KeyMouse('佩特莉可镇', 2, 4322, 1172); + logTimeTaken(startTime); + log.info('前往地区:纳塔') await KeyMouse('楚汶市集1', 2, 9059, -1847); await KeyMouse('楚汶市集2', 2, 9059, -1847); await KeyMouse('竞技场东', 2, 8734, -1856); @@ -99,20 +123,17 @@ await KeyMouse('虹灵的净土', 2, 9038, -2428); await KeyMouse('流泉之众', 2, 8918, -2678); await KeyMouse('悬木人', 2, 8433, -2108); + logTimeTaken(startTime); - await AutoPath('渌华池'); - await AutoPath('轻策庄'); - await AutoPath('荻花洲'); - await AutoPath('维摩庄'); - + log.info('前往地区:其他') await KeyMouse('精石铜城', 2, 6323, 821); + await AutoPath('塔尼特营地'); + await AutoPath('新枫科院宿舍'); // 计算并输出总时长 const endTime = Date.now(); const totalTimeInSeconds = (endTime - startTime) / 1000; - // 将总时长转换为分钟和秒的形式 const minutes = Math.floor(totalTimeInSeconds / 60); const seconds = totalTimeInSeconds % 60; - // 格式化输出 const formattedTime = `${minutes}分${seconds.toFixed(0).padStart(2, '0')}秒`; log.info(`自动狗粮运行总时长:${formattedTime}`); -})(); \ No newline at end of file +})(); diff --git a/repo/js/AutoArtifacts/manifest.json b/repo/js/AutoArtifacts/manifest.json index 834e0545..5448b44f 100644 --- a/repo/js/AutoArtifacts/manifest.json +++ b/repo/js/AutoArtifacts/manifest.json @@ -1,11 +1,11 @@ { "manifest_version": 1, "name": "自动狗粮", - "version": "1.7", + "version": "1.8", "description": "自动调查离传送点较近的狗粮。请使用琳妮特前台,双风共鸣。并保证所有传送点都已经激活!", "authors": [ { - "name": "HZYgrandma", + "name": "HZYgrandma & Tim", } ], "main": "main.js" From e32442b2df6adeec2aaf717072ecfc77c7e1b89a Mon Sep 17 00:00:00 2001 From: HZYgrandma Date: Sat, 19 Oct 2024 14:51:50 +0000 Subject: [PATCH 5/5] update repo.json --- repo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repo.json b/repo.json index eb14684e..57aaeeba 100644 --- a/repo.json +++ b/repo.json @@ -1,5 +1,5 @@ { - "time": "20241019202248", + "time": "20241019225150", "url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip", "file": "repo.json", "indexes": [ @@ -4287,9 +4287,9 @@ { "name": "AutoArtifacts", "type": "directory", - "hash": "a0a967b4293f14e74f4bddf079e4c62768403451", - "version": "1.7", - "author": "HZYgrandma", + "hash": "ca18a49dc611b3fa07c7414f27e1e795061b1a0e", + "version": "1.8", + "author": "HZYgrandma & Tim", "description": "自动狗粮~|~自动调查离传送点较近的狗粮。请使用琳妮特前台,双风共鸣。并保证所有传送点都已经激活!", "tags": [] },