From af8d0c2659ef57eae7fdba2bd1c73470ee203d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E5=8F=88?= <104784428+guyou45@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:10:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=BA=86=E6=94=B9=E4=BA=86=EF=BC=8C?= =?UTF-8?q?=E5=88=AB=E9=AA=82=E4=BA=86=20(#1947)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoPickLitter/README.md | 6 + .../assets/Old/稻妻踏鞴砂路线 (2).json | 274 ++++++++++++++++++ .../assets/Old/稻妻踏鞴砂路线.json | 103 +++++-- .../assets/Old/稻妻踏鞴砂路线old.json | 211 ++++++++++++++ .../assets/Old/稻妻鸣神大社路线old.json | 92 ++++++ repo/js/AutoPickLitter/assets/宝箱2.json | 8 +- .../AutoPickLitter/assets/稻妻踏鞴砂路线.json | 30 +- .../assets/稻妻鸣神大社路线.json | 15 +- repo/js/AutoPickLitter/assets/阿敬.json | 40 +++ repo/js/AutoPickLitter/main.js | 166 ++++++++--- repo/js/AutoPickLitter/manifest.json | 2 +- repo/js/AutoPickLitter/settings.json | 6 + 12 files changed, 859 insertions(+), 94 deletions(-) create mode 100644 repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json create mode 100644 repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线old.json create mode 100644 repo/js/AutoPickLitter/assets/Old/稻妻鸣神大社路线old.json create mode 100644 repo/js/AutoPickLitter/assets/阿敬.json diff --git a/repo/js/AutoPickLitter/README.md b/repo/js/AutoPickLitter/README.md index 3ecc3443c..440756b0d 100644 --- a/repo/js/AutoPickLitter/README.md +++ b/repo/js/AutoPickLitter/README.md @@ -5,6 +5,7 @@ 注意: 璃月上香:铜雀庙任务解锁方法,做完群玉阁重建活动后,现实第二天,到万民堂接取任务!!! + 注意:执行这个的时候杜绝双风队加盾位!!! 稻妻抽签:如果有去鸣神大社的任务还请完成!!!不然会被剧情逮捕!!! 解签的姐姐不在,表示你在做相关任务,请把任务做了在进行抽解签,注意第一次去解签会被派蒙捕获,暂时不做被捕获!!! 以及,解签的时候出现“那个人,什么时候才会来···”!!!也是没有把这个隐藏任务做完 @@ -22,6 +23,11 @@ 更新 +版本:1.1.3 +1、增加海螺拿来开宝箱选项(默认开启) +2、添加伪造日志 +3、修改文件位置 + 版本:1.1.2 1、修复稻妻鸣神大社传送错误问题 2、添加没有勾选就执行的操作提示 diff --git a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json new file mode 100644 index 000000000..57706fcc1 --- /dev/null +++ b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json @@ -0,0 +1,274 @@ +{ + "config": { + "realtime_triggers": { + "AutoPick": true + } + }, + "farming_info": { + "allow_farming_count": false, + "duration_seconds": 0, + "elite_details": "", + "elite_mob_count": 0, + "normal_mob_count": 0, + "primary_target": "", + "total_mora": 0 + }, + "info": { + "authors": [ + { + "links": "", + "name": "古又" + } + ], + "bgi_version": "0.45.0", + "description": "", + "enable_monster_loot_split": false, + "items": [], + "last_modified_time": 1757848307397, + "map_match_method": "", + "map_name": "Teyvat", + "name": "稻妻踏鞴砂路线", + "order": 0, + "tags": [], + "type": "collect", + "version": "4.0" + }, + "positions": [ + { + "action": "", + "action_params": "", + "id": 1, + "move_mode": "walk", + "type": "teleport", + "x": -3016.494140625, + "y": -3623.3935546875 + }, + { + "action": "", + "action_params": "", + "id": 2, + "move_mode": "dash", + "type": "path", + "x": -3024.7734375, + "y": -3560.5029296875 + }, + { + "action": "", + "action_params": "", + "id": 3, + "move_mode": "run", + "type": "path", + "x": -3000.927734375, + "y": -3521.7841796875 + }, + { + "action": "combat_script", + "action_params": "keypress(f);", + "id": 4, + "move_mode": "walk", + "type": "path", + "x": -3018.033203125, + "y": -3516.87109375 + }, + { + "action": "combat_script", + "action_params": "keypress(f);", + "id": 5, + "move_mode": "walk", + "type": "path", + "x": -3034.796875, + "y": -3514.798828125 + }, + { + "action": "", + "action_params": "", + "id": 6, + "move_mode": "run", + "type": "path", + "x": -3065.5, + "y": -3516 + }, + { + "action": "", + "action_params": "", + "id": 7, + "move_mode": "run", + "type": "path", + "x": -3069, + "y": -3503.5 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 8, + "move_mode": "run", + "type": "path", + "x": -3026.9765625, + "y": -3471.837890625 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 9, + "move_mode": "run", + "type": "path", + "x": -3025.373046875, + "y": -3481.05859375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 10, + "move_mode": "walk", + "point_ext_params": { + "description": "", + "enable_monster_loot_split": false, + "misidentification": { + "arrival_time": 0, + "handling_mode": "previousDetectedPoint", + "type": [ + "unrecognized" + ] + } + }, + "type": "path", + "x": -3011.41015625, + "y": -3470.673828125 + }, + { + "action": "", + "action_params": "", + "id": 11, + "move_mode": "walk", + "type": "path", + "x": -3003.630859375, + "y": -3481.4169921875 + }, + { + "action": "", + "action_params": "", + "id": 12, + "move_mode": "jump", + "type": "path", + "x": -2999.97265625, + "y": -3477.474609375 + }, + { + "action": "", + "action_params": "", + "id": 13, + "move_mode": "walk", + "type": "path", + "x": -2990.884765625, + "y": -3471.7333984375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 14, + "move_mode": "dash", + "type": "path", + "x": -2984.275390625, + "y": -3480.443359375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f);", + "id": 15, + "move_mode": "run", + "type": "path", + "x": -2958.42578125, + "y": -3439.11328125 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", + "id": 16, + "move_mode": "dash", + "type": "path", + "x": -2980.548828125, + "y": -3416.419921875 + }, + { + "action": "", + "action_params": "", + "id": 17, + "move_mode": "run", + "type": "path", + "x": -2986.845703125, + "y": -3413.5947265625 + }, + { + "action": "", + "action_params": "", + "id": 18, + "move_mode": "run", + "type": "path", + "x": -2985.08203125, + "y": -3399.38671875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 19, + "move_mode": "dash", + "type": "path", + "x": -2999.705078125, + "y": -3378.4228515625 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 20, + "move_mode": "dash", + "type": "path", + "x": -3016.740234375, + "y": -3378.591796875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 21, + "move_mode": "dash", + "type": "path", + "x": -3026.380859375, + "y": -3387.8671875 + }, + { + "action": "", + "action_params": "", + "id": 22, + "move_mode": "walk", + "type": "path", + "x": -3035.2734375, + "y": -3410.71875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 23, + "move_mode": "dash", + "type": "path", + "x": -3025.44921875, + "y": -3421.1103515625 + }, + { + "action": "", + "action_params": "", + "id": 24, + "move_mode": "run", + "type": "path", + "x": -3034.443359375, + "y": -3461.5 + }, + { + "action": "", + "action_params": "", + "id": 25, + "move_mode": "run", + "type": "path", + "x": -3039.61328125, + "y": -3460.5390625 + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线.json b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线.json index cb50cd11a..e8e50fa00 100644 --- a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线.json +++ b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线.json @@ -21,10 +21,10 @@ } ], "bgi_version": "0.45.0", - "description": "", + "description": "3合1路线", "enable_monster_loot_split": false, "items": [], - "last_modified_time": 1757126413936, + "last_modified_time": 1757685510954, "map_match_method": "", "map_name": "Teyvat", "name": "稻妻踏鞴砂路线", @@ -148,6 +148,15 @@ "action": "", "action_params": "", "id": 12, + "move_mode": "jump", + "type": "path", + "x": -2999.97265625, + "y": -3477.474609375 + }, + { + "action": "", + "action_params": "", + "id": 13, "move_mode": "walk", "type": "path", "x": -2990.884765625, @@ -156,7 +165,7 @@ { "action": "combat_script", "action_params": "wait(0.2),keypress(f);", - "id": 13, + "id": 14, "move_mode": "dash", "type": "path", "x": -2984.275390625, @@ -165,47 +174,101 @@ { "action": "combat_script", "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f);", - "id": 14, + "id": 15, "move_mode": "dash", "type": "path", - "x": -2958.71484375, - "y": -3439.4755859375 + "x": -2958.42578125, + "y": -3439.11328125 }, { "action": "combat_script", "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", - "id": 15, + "id": 16, "move_mode": "dash", "type": "path", "x": -2980.548828125, "y": -3416.419921875 }, - { - "action": "", - "action_params": "", - "id": 16, - "move_mode": "run", - "type": "path", - "x": -2997.9453125, - "y": -3417.5146484375 - }, { "action": "", "action_params": "", "id": 17, "move_mode": "run", "type": "path", - "x": -3034.443359375, - "y": -3461.5 + "x": -2986.845703125, + "y": -3413.5947265625 }, { "action": "", "action_params": "", "id": 18, "move_mode": "run", + "type": "path", + "x": -2985.08203125, + "y": -3399.38671875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", + "id": 19, + "move_mode": "dash", + "type": "path", + "x": -2999.705078125, + "y": -3378.4228515625 + }, + { + "action": "", + "action_params": "", + "id": 20, + "move_mode": "walk", + "type": "path", + "x": -3016.740234375, + "y": -3378.591796875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", + "id": 21, + "move_mode": "dash", + "type": "path", + "x": -3026.380859375, + "y": -3387.8671875 + }, + { + "action": "", + "action_params": "", + "id": 22, + "move_mode": "walk", + "type": "path", + "x": -3035.2734375, + "y": -3410.71875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", + "id": 23, + "move_mode": "dash", + "type": "path", + "x": -3025.44921875, + "y": -3421.1103515625 + }, + { + "action": "", + "action_params": "", + "id": 24, + "move_mode": "run", + "type": "path", + "x": -3032.84375, + "y": -3463.021484375 + }, + { + "action": "", + "action_params": "", + "id": 25, + "move_mode": "run", "type": "target", - "x": -3039.61328125, - "y": -3460.5390625 + "x": -3039.576171875, + "y": -3460.64453125 } ] } \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线old.json b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线old.json new file mode 100644 index 000000000..cb50cd11a --- /dev/null +++ b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线old.json @@ -0,0 +1,211 @@ +{ + "config": { + "realtime_triggers": { + "AutoPick": true + } + }, + "farming_info": { + "allow_farming_count": false, + "duration_seconds": 0, + "elite_details": "", + "elite_mob_count": 0, + "normal_mob_count": 0, + "primary_target": "", + "total_mora": 0 + }, + "info": { + "authors": [ + { + "links": "", + "name": "古又" + } + ], + "bgi_version": "0.45.0", + "description": "", + "enable_monster_loot_split": false, + "items": [], + "last_modified_time": 1757126413936, + "map_match_method": "", + "map_name": "Teyvat", + "name": "稻妻踏鞴砂路线", + "order": 0, + "tags": [], + "type": "collect", + "version": "3.0" + }, + "positions": [ + { + "action": "", + "action_params": "", + "id": 1, + "move_mode": "walk", + "type": "teleport", + "x": -3016.494140625, + "y": -3623.3935546875 + }, + { + "action": "", + "action_params": "", + "id": 2, + "move_mode": "run", + "type": "path", + "x": -3024.7734375, + "y": -3560.5029296875 + }, + { + "action": "", + "action_params": "", + "id": 3, + "move_mode": "run", + "type": "path", + "x": -3000.927734375, + "y": -3521.7841796875 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 4, + "move_mode": "walk", + "type": "path", + "x": -3018.033203125, + "y": -3516.87109375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 5, + "move_mode": "walk", + "type": "path", + "x": -3034.796875, + "y": -3514.798828125 + }, + { + "action": "", + "action_params": "", + "id": 6, + "move_mode": "run", + "type": "path", + "x": -3065.5, + "y": -3516 + }, + { + "action": "", + "action_params": "", + "id": 7, + "move_mode": "dash", + "type": "path", + "x": -3069, + "y": -3503.5 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 8, + "move_mode": "run", + "type": "path", + "x": -3026.9765625, + "y": -3471.837890625 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 9, + "move_mode": "run", + "type": "path", + "x": -3025.373046875, + "y": -3481.05859375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 10, + "move_mode": "walk", + "point_ext_params": { + "description": "", + "enable_monster_loot_split": false, + "misidentification": { + "arrival_time": 0, + "handling_mode": "previousDetectedPoint", + "type": [ + "unrecognized" + ] + } + }, + "type": "path", + "x": -3011.41015625, + "y": -3470.673828125 + }, + { + "action": "", + "action_params": "", + "id": 11, + "move_mode": "walk", + "type": "path", + "x": -3003.630859375, + "y": -3481.4169921875 + }, + { + "action": "", + "action_params": "", + "id": 12, + "move_mode": "walk", + "type": "path", + "x": -2990.884765625, + "y": -3471.7333984375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f);", + "id": 13, + "move_mode": "dash", + "type": "path", + "x": -2984.275390625, + "y": -3480.443359375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f);", + "id": 14, + "move_mode": "dash", + "type": "path", + "x": -2958.71484375, + "y": -3439.4755859375 + }, + { + "action": "combat_script", + "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2);", + "id": 15, + "move_mode": "dash", + "type": "path", + "x": -2980.548828125, + "y": -3416.419921875 + }, + { + "action": "", + "action_params": "", + "id": 16, + "move_mode": "run", + "type": "path", + "x": -2997.9453125, + "y": -3417.5146484375 + }, + { + "action": "", + "action_params": "", + "id": 17, + "move_mode": "run", + "type": "path", + "x": -3034.443359375, + "y": -3461.5 + }, + { + "action": "", + "action_params": "", + "id": 18, + "move_mode": "run", + "type": "target", + "x": -3039.61328125, + "y": -3460.5390625 + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/稻妻鸣神大社路线old.json b/repo/js/AutoPickLitter/assets/Old/稻妻鸣神大社路线old.json new file mode 100644 index 000000000..aa4ad9a6e --- /dev/null +++ b/repo/js/AutoPickLitter/assets/Old/稻妻鸣神大社路线old.json @@ -0,0 +1,92 @@ +{ + "info": { + "authors": [ + { + "links": "", + "name": "古又" + } + ], + "bgi_version": "0.45.0", + "description": "抽签", + "enable_monster_loot_split": false, + "last_modified_time": 1755867216831, + "map_match_method": "", + "map_name": "Teyvat", + "name": "稻妻鸣神大社路线-测试", + "tags": [], + "type": "collect", + "version": "1.0" + }, + "positions": [ + { + "action": "", + "action_params": "", + "id": 1, + "move_mode": "walk", + "type": "teleport", + "x": -4375.3359375, + "y": -2497.890625 + }, + { + "action": "", + "action_params": "", + "id": 2, + "move_mode": "run", + "type": "path", + "x": -4393.1015625, + "y": -2485.140625 + }, + { + "action": "", + "action_params": "", + "id": 3, + "move_mode": "walk", + "type": "path", + "x": -4388.609375, + "y": -2477.291015625 + }, + { + "action": "", + "action_params": "", + "id": 4, + "move_mode": "walk", + "type": "path", + "x": -4397.1328125, + "y": -2471.44140625 + }, + { + "action": "", + "action_params": "", + "id": 5, + "move_mode": "walk", + "type": "path", + "x": -4402.39453125, + "y": -2477.8330078125 + }, + { + "action": "", + "action_params": "", + "id": 6, + "move_mode": "run", + "type": "path", + "x": -4411.4609375, + "y": -2472.765625 + }, + { + "id": 7, + "move_mode": "walk", + "type": "path", + "x": -4414.5810546875, + "y": -2476.6298828125 + }, + { + "action": "", + "action_params": "", + "id": 8, + "move_mode": "jump", + "type": "path", + "x": -4417.701171875, + "y": -2480.494140625 + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/宝箱2.json b/repo/js/AutoPickLitter/assets/宝箱2.json index d330abd84..5bdf0c504 100644 --- a/repo/js/AutoPickLitter/assets/宝箱2.json +++ b/repo/js/AutoPickLitter/assets/宝箱2.json @@ -9,20 +9,20 @@ "bgi_version": "0.45.0", "description": "", "enable_monster_loot_split": false, - "last_modified_time": 1757127596725, + "last_modified_time": 1758197839114, "map_match_method": "", "map_name": "Teyvat", "name": "宝箱2", "tags": [], "type": "collect", - "version": "1.0" + "version": "2.0" }, "positions": [ { "action": "combat_script", - "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f),wait(0.2),keypress(f);", + "action_params": "wait(1.5),keypress(f);", "id": 1, - "move_mode": "run", + "move_mode": "jump", "type": "target", "x": -3049.146484375, "y": -3458.802734375 diff --git a/repo/js/AutoPickLitter/assets/稻妻踏鞴砂路线.json b/repo/js/AutoPickLitter/assets/稻妻踏鞴砂路线.json index 57706fcc1..70b6a8643 100644 --- a/repo/js/AutoPickLitter/assets/稻妻踏鞴砂路线.json +++ b/repo/js/AutoPickLitter/assets/稻妻踏鞴砂路线.json @@ -24,14 +24,14 @@ "description": "", "enable_monster_loot_split": false, "items": [], - "last_modified_time": 1757848307397, + "last_modified_time": 1758193430700, "map_match_method": "", "map_name": "Teyvat", "name": "稻妻踏鞴砂路线", "order": 0, "tags": [], "type": "collect", - "version": "4.0" + "version": "6.0" }, "positions": [ { @@ -119,7 +119,7 @@ "action": "combat_script", "action_params": "wait(0.2),keypress(f);", "id": 10, - "move_mode": "walk", + "move_mode": "run", "point_ext_params": { "description": "", "enable_monster_loot_split": false, @@ -175,10 +175,10 @@ "action": "combat_script", "action_params": "wait(0.2),keypress(f),wait(0.2),keypress(f);", "id": 15, - "move_mode": "run", + "move_mode": "dash", "type": "path", - "x": -2958.42578125, - "y": -3439.11328125 + "x": -2959.7421875, + "y": -3439.080078125 }, { "action": "combat_script", @@ -251,24 +251,6 @@ "type": "path", "x": -3025.44921875, "y": -3421.1103515625 - }, - { - "action": "", - "action_params": "", - "id": 24, - "move_mode": "run", - "type": "path", - "x": -3034.443359375, - "y": -3461.5 - }, - { - "action": "", - "action_params": "", - "id": 25, - "move_mode": "run", - "type": "path", - "x": -3039.61328125, - "y": -3460.5390625 } ] } \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json b/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json index aa4ad9a6e..3e0c8ec79 100644 --- a/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json +++ b/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json @@ -7,25 +7,25 @@ } ], "bgi_version": "0.45.0", - "description": "抽签", + "description": "修改传送", "enable_monster_loot_split": false, - "last_modified_time": 1755867216831, + "last_modified_time": 1757938479689, "map_match_method": "", "map_name": "Teyvat", - "name": "稻妻鸣神大社路线-测试", + "name": "稻妻鸣神大社路线", "tags": [], "type": "collect", - "version": "1.0" + "version": "2.0" }, "positions": [ { - "action": "", + "action": "force_tp", "action_params": "", "id": 1, "move_mode": "walk", "type": "teleport", - "x": -4375.3359375, - "y": -2497.890625 + "x": -4371.146484375, + "y": -2506.767578125 }, { "action": "", @@ -73,6 +73,7 @@ "y": -2472.765625 }, { + "action": "", "id": 7, "move_mode": "walk", "type": "path", diff --git a/repo/js/AutoPickLitter/assets/阿敬.json b/repo/js/AutoPickLitter/assets/阿敬.json new file mode 100644 index 000000000..0965daf56 --- /dev/null +++ b/repo/js/AutoPickLitter/assets/阿敬.json @@ -0,0 +1,40 @@ +{ + "info": { + "authors": [ + { + "links": "", + "name": "古又" + } + ], + "bgi_version": "0.45.0", + "description": "找阿敬兑换宝箱", + "enable_monster_loot_split": false, + "last_modified_time": 1758035880088, + "map_match_method": "", + "map_name": "Teyvat", + "name": "阿敬", + "tags": [], + "type": "collect", + "version": "1.0" + }, + "positions": [ + { + "action": "", + "action_params": "", + "id": 1, + "move_mode": "run", + "type": "path", + "x": -3034.4399999999987, + "y": -3461.5 + }, + { + "action": "", + "action_params": "", + "id": 2, + "move_mode": "run", + "type": "path", + "x": -3039.61, + "y": -3460.54 + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/main.js b/repo/js/AutoPickLitter/main.js index 09bb191ae..fb47e347a 100644 --- a/repo/js/AutoPickLitter/main.js +++ b/repo/js/AutoPickLitter/main.js @@ -214,18 +214,102 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { await sleep(100); } +// fakeLog 函数,使用方法:将本函数放在主函数前,调用时请务必使用await,否则可能出现v8白框报错 +//在js开头处伪造该js结束运行的日志信息,如 await fakeLog("js脚本", true, true, 0); +//在js结尾处伪造该js开始运行的日志信息,如 await fakeLog("js脚本", true, false, 2333); +//duration项目仅在伪造结束信息时有效,且无实际作用,可以任意填写,当你需要在日志中输出特定值时才需要,单位为毫秒 +//在调用地图追踪前伪造该地图追踪开始运行的日志信息,如 await fakeLog(`地图追踪.json`, false, true, 0); +//在调用地图追踪后伪造该地图追踪结束运行的日志信息,如 await fakeLog(`地图追踪.json`, false, false, 0); +//如此便可以在js运行过程中伪造地图追踪的日志信息,可以在日志分析等中查看 + +async function fakeLog(name, isJs, isStart, duration) { + await sleep(10); + const currentTime = Date.now(); + // 参数检查 + if (typeof name !== 'string') { + log.error("参数 'name' 必须是字符串类型!"); + return; + } + if (typeof isJs !== 'boolean') { + log.error("参数 'isJs' 必须是布尔型!"); + return; + } + if (typeof isStart !== 'boolean') { + log.error("参数 'isStart' 必须是布尔型!"); + return; + } + if (typeof currentTime !== 'number' || !Number.isInteger(currentTime)) { + log.error("参数 'currentTime' 必须是整数!"); + return; + } + if (typeof duration !== 'number' || !Number.isInteger(duration)) { + log.error("参数 'duration' 必须是整数!"); + return; + } + + // 将 currentTime 转换为 Date 对象并格式化为 HH:mm:ss.sss + const date = new Date(currentTime); + const hours = String(date.getHours()).padStart(2, '0'); + const minutes = String(date.getMinutes()).padStart(2, '0'); + const seconds = String(date.getSeconds()).padStart(2, '0'); + const milliseconds = String(date.getMilliseconds()).padStart(3, '0'); + const formattedTime = `${hours}:${minutes}:${seconds}.${milliseconds}`; + + // 将 duration 转换为分钟和秒,并保留三位小数 + const durationInSeconds = duration / 1000; // 转换为秒 + const durationMinutes = Math.floor(durationInSeconds / 60); + const durationSeconds = (durationInSeconds % 60).toFixed(3); // 保留三位小数 + + // 使用四个独立的 if 语句处理四种情况 + if (isJs && isStart) { + // 处理 isJs = true 且 isStart = true 的情况 + const logMessage = `正在伪造js开始的日志记录\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `------------------------------\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `→ 开始执行JS脚本: "${name}"`; + log.debug(logMessage); + } + if (isJs && !isStart) { + // 处理 isJs = true 且 isStart = false 的情况 + const logMessage = `正在伪造js结束的日志记录\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `→ 脚本执行结束: "${name}", 耗时: ${durationMinutes}分${durationSeconds}秒\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `------------------------------`; + log.debug(logMessage); + } + if (!isJs && isStart) { + // 处理 isJs = false 且 isStart = true 的情况 + const logMessage = `正在伪造地图追踪开始的日志记录\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `------------------------------\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `→ 开始执行地图追踪任务: "${name}"`; + log.debug(logMessage); + } + if (!isJs && !isStart) { + // 处理 isJs = false 且 isStart = false 的情况 + const logMessage = `正在伪造地图追踪结束的日志记录\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `→ 脚本执行结束: "${name}", 耗时: ${durationMinutes}分${durationSeconds}秒\n\n` + + `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + + `------------------------------`; + log.debug(logMessage); + } +} (async function() { + await fakeLog("AutoPickLitter脚本", true, true, 0); //判断你是不是老手 if(!settings.water && !settings.sticks && !settings.lots && !settings.conchs && !settings.meal && !settings.eggs){ log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); + await fakeLog("AutoPickLitter脚本", true, false, 2333); return 0; }; - - //蒙德清泉镇圣水 if (settings.water) { await genshin.returnMainUi(); @@ -286,7 +370,7 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { leftButtonClick(); await sleep(700); leftButtonClick(); - await sleep(1500); + await sleep(2000); // let ocrResults1 = await performOcr("敬香", { min: 1060, max: 1550 }, { min: 400, max: 680 }, false); let ocrResults1 = await performOcr("敬香", dialogZone.x, dialogZone.y, false); @@ -303,12 +387,13 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { }; } catch (error) { log.error(`识别图像时发生异常: ${error.message}`); - } + }; await genshin.returnMainUi(); }; //稻妻鸣神大社抽签 if (settings.lots) { + await fakeLog("执行抽签", false, true, 0) await genshin.returnMainUi(); await pathingScript.runFile("assets/稻妻鸣神大社路线.json"); await sleep(1000); @@ -447,6 +532,7 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { } catch (error) { log.error(`识别图像时发生异常: ${error.message}`); }; + await fakeLog("好运前进", false, true, 0) await genshin.returnMainUi(); }; @@ -457,41 +543,48 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { await genshin.returnMainUi(); await pathingScript.runFile("assets/稻妻踏鞴砂路线.json"); await sleep(700); - let figure = parseInt(settings.pickupTreasure); - try { - let ocrResults = await performOcr("阿敬", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { - await sleep(1000); - let ocrResults1 = await performOcr("想要", dialogZone.x, dialogZone.y, false); - if (ocrResults1.length != 0) { - await sleep(700); - leftButtonClick(); - await sleep(1500); - //交互道具,直接选择位置点击 - await click(111,184); + if (settings.doYouOpen) { + await pathingScript.runFile("assets/阿敬.json"); + let figure = parseInt(settings.pickupTreasure); + try { + let ocrResults = await performOcr("阿敬", dialogZone.x, dialogZone.y, false); + if (ocrResults.length != 0) { await sleep(1000); - await click(1250,817); - await sleep(1000); - await click(1603,1013); - await sleep(1500); - await genshin.returnMainUi(); - if (figure != 0) { - await pathingScript.runFile(`assets/宝箱${figure}.json`); - log.info(`你即将开启${figure}号宝箱`) + let ocrResults1 = await performOcr("想要", dialogZone.x, dialogZone.y, false); + if (ocrResults1.length != 0) { + await sleep(700); + leftButtonClick(); + await sleep(1500); + //交互道具,直接选择位置点击 + await click(111,184); + await sleep(1000); + await click(1250,817); + await sleep(1000); + await click(1603,1013); + await sleep(1500); + await genshin.returnMainUi(); + if (figure != 0) { + await pathingScript.runFile(`assets/宝箱${figure}.json`); + log.info(`你即将开启${figure}号宝箱`) + } else { + figure = Math.floor(Math.random() * 3) + 1; + log.info(`你即将开启${figure}号宝箱`) + await pathingScript.runFile(`assets/宝箱${figure}.json`); + } } else { - figure = Math.floor(Math.random() * 3) + 1; - log.info(`你即将开启${figure}号宝箱`) - await pathingScript.runFile(`assets/宝箱${figure}.json`); - } + log.info("你开过了?look my eyes,回答我!!!"); + await genshin.chooseTalkOption("再见"); + await sleep(700); + leftButtonClick(); + await sleep(1500); + }; } else { - log.info("你开过了?look my eyes,回答我!!!"); + log.error(`识别图像时发生异常: ${error.message}`); + // await genshin.returnMainUi(); }; - } else { + } catch (error) { log.error(`识别图像时发生异常: ${error.message}`); - // await genshin.returnMainUi(); - }; - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); + }; }; await genshin.returnMainUi(); }; @@ -642,16 +735,13 @@ async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { } else { log.error(`识别图像时发生异常: ${error.message}`); }; - - - } catch (error) { log.error(`识别图像时发生异常: ${error.message}`); }; await genshin.returnMainUi(); }; - //输出日期 writeContentToFile("", true); + await fakeLog("AutoPickLitter脚本", true, false, 2333); })(); \ No newline at end of file diff --git a/repo/js/AutoPickLitter/manifest.json b/repo/js/AutoPickLitter/manifest.json index c65c9a2b8..119554e7a 100644 --- a/repo/js/AutoPickLitter/manifest.json +++ b/repo/js/AutoPickLitter/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特杂事(收集)", - "version": "1.1.2", + "version": "1.1.3", "tags": [ "玄学", "收集", diff --git a/repo/js/AutoPickLitter/settings.json b/repo/js/AutoPickLitter/settings.json index 893fa5212..a1fc66292 100644 --- a/repo/js/AutoPickLitter/settings.json +++ b/repo/js/AutoPickLitter/settings.json @@ -19,6 +19,12 @@ "type": "checkbox", "label": "---------------稻妻踏鞴砂海螺---------------\n注意:勾选前,请去看readme" }, + { + "name": "doYouOpen", + "type": "checkbox", + "label": "是否开启宝箱(默认是)", + "default": "true" + }, { "name": "pickupTreasure", "type": "select",