diff --git a/repo/js/AutoPickLitter/README.md b/repo/js/AutoPickLitter/README.md index a94526a77..d5ccdf634 100644 --- a/repo/js/AutoPickLitter/README.md +++ b/repo/js/AutoPickLitter/README.md @@ -1,20 +1,27 @@ -还在因为抽到七七(bushi)而感到身体乏力嘛,快加入玄学玩家的步伐!!! +# 主要功能 +蒙德购买圣水 +璃月上香 +稻妻抽签、稻妻海螺屋 +枫丹领取福利餐 +纳塔领取龙蛋 +挪德卡莱转盘、今日收获、糖雕; -主要功能有:蒙德购买圣水,璃月上香,稻妻抽签,稻妻海螺,枫丹领取福利餐,纳塔领取龙蛋; -使用前先检查你图开完没,没开的地方,就不要勾选相关选项!!! - -注意: +## 注意事项 +运行脚本的时候,一定要把世界权限设置【不允许加入】!!! 璃月上香:铜雀庙任务解锁方法,做完群玉阁重建活动后,现实第二天,到万民堂接取任务!!! 注意:执行这个的时候杜绝双风队加盾位!!! + 稻妻抽签:如果有去鸣神大社的任务还请完成!!!不然会被剧情逮捕!!! 解签的姐姐不在,表示你在做相关任务,请把任务做了在进行抽解签,注意第一次去解签会被派蒙捕获,暂时不做被捕获!!! 以及,解签的时候出现“那个人,什么时候才会来···”!!!也是没有把这个隐藏任务做完 稻妻海螺:请用户自己把附近相关调查点以及宝箱开了!!!然后第二天再勾选 +纳塔龙蛋:龙蛋平均模式,根据你背包,或者以往识别保存在本地的记录,做判断,进行平均领取龙蛋 +挪德卡莱糖雕:默认会被吃掉,防止卡背包,默认角色未死亡 -------------------食用方法------------------ +## 食用方法 打开BGI->点击【全自动】->点击【调度器】->【新增配置器组】 ->自己设置配置组名称并确定->点击自己设置的配置组名称->【添加】 ->选择【JS脚本】->勾选【AutoPickLitter】并确认->鼠标右键【提瓦特杂事(收集)】 @@ -22,43 +29,54 @@ -更新 -版本:1.2.0 -1、增加挪德卡莱转盘和今日收获 -2、删除一些奇奇怪怪的东西 +## 更新 +### 版本:2.0 +1.添加长对话方法 +2.添加糖雕 -版本:1.1.3 -1、增加海螺拿来开宝箱选项(默认开启) -2、添加伪造日志 -3、修改文件位置 +### 版本:1.2 +1.重构代码,优化相关时间 +2.增加龙蛋平均模式 +3.修改保存本地记录方式 +4.添加上香识别时间判断 +5.添加背包物品过期 -版本:1.1.2 -1、修复稻妻鸣神大社传送错误问题 -2、添加没有勾选就执行的操作提示 +### 版本:1.2.0 +1.增加挪德卡莱转盘和今日收获 +2.删除一些奇奇怪怪的东西 -版本:1.1.1 +### 版本:1.1.3 +1.增加海螺拿来开宝箱选项(默认开启) +2.添加伪造日志 +3.修改文件位置 + +### 版本:1.1.2 +1.修复稻妻鸣神大社传送错误问题 +2.添加没有勾选就执行的操作提示 + +### 版本:1.1.1 修改海螺路线,添加海螺刷新点位的第3种路线 -版本:1.1 -1、新增奇异的海螺 -2、修改圣水识别 -3、修改稻妻识别御神签 +### 版本:1.1 +1.新增奇异的海螺 +2.修改圣水识别 +3.修改稻妻识别御神签 -版本:1.0.4 -1、重构相关代码 -2、替换解签后的识别模式 +### 版本:1.0.4 +1.重构相关代码 +2.替换解签后的识别模式 -版本:1.0.3 +### 版本:1.0.3 缩短枫丹梅洛彼得堡的路线 -版本:1.0.2 -1、优化相关逻辑 -2、修改代码显示错误 -3、增加延迟操作,减小相关操作时间 +### 版本:1.0.2 +1.优化相关逻辑 +2.修改代码显示错误 +3.增加延迟操作,减小相关操作时间 -版本:1.0.1 -1、优化相关功能的点击时间 -2、优化背包滑动(感谢吉吉喵!!) -3、更新御神签的识别,以及修复挂签bug -4、输出福利餐得到的食物,以及幸运签的内容到本地,后续还会加入其他东西 \ No newline at end of file +### 版本:1.0.1 +1.优化相关功能的点击时间 +2.优化背包滑动(感谢吉吉喵!!) +3.更新御神签的识别,以及修复挂签bug +4.输出福利餐得到的食物,以及幸运签的内容到本地,后续还会加入其他东西 \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/Bad.png b/repo/js/AutoPickLitter/assets/Old/Bad.png deleted file mode 100644 index 534782b7d..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Bad.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Bad1.png b/repo/js/AutoPickLitter/assets/Old/Bad1.png deleted file mode 100644 index e3249729f..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Bad1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/BigBad.png b/repo/js/AutoPickLitter/assets/Old/BigBad.png deleted file mode 100644 index 150e1c35f..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/BigBad.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/BigBad1.png b/repo/js/AutoPickLitter/assets/Old/BigBad1.png deleted file mode 100644 index 9b9353675..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/BigBad1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/BigLuck.png b/repo/js/AutoPickLitter/assets/Old/BigLuck.png deleted file mode 100644 index 4e1c0792e..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/BigLuck.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/BigLuck1.png b/repo/js/AutoPickLitter/assets/Old/BigLuck1.png deleted file mode 100644 index 5a6f6d1bb..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/BigLuck1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Buy.png b/repo/js/AutoPickLitter/assets/Old/Buy.png deleted file mode 100644 index b952474e0..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Buy.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Buy1.png b/repo/js/AutoPickLitter/assets/Old/Buy1.png deleted file mode 100644 index ff085b60f..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Buy1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Click.png b/repo/js/AutoPickLitter/assets/Old/Click.png deleted file mode 100644 index c2066e76c..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Click.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/EndLuck.png b/repo/js/AutoPickLitter/assets/Old/EndLuck.png deleted file mode 100644 index c6ab90fc7..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/EndLuck.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/EndLuck1.png b/repo/js/AutoPickLitter/assets/Old/EndLuck1.png deleted file mode 100644 index 637303a44..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/EndLuck1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Luck.png b/repo/js/AutoPickLitter/assets/Old/Luck.png deleted file mode 100644 index 33fa4945c..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Luck.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/Luck1.png b/repo/js/AutoPickLitter/assets/Old/Luck1.png deleted file mode 100644 index 123cd2022..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/Luck1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/LuckySign.png b/repo/js/AutoPickLitter/assets/Old/LuckySign.png deleted file mode 100644 index 0eea06968..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/LuckySign.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/MidLuck.png b/repo/js/AutoPickLitter/assets/Old/MidLuck.png deleted file mode 100644 index 5faf101c2..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/MidLuck.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/MidLuck1.png b/repo/js/AutoPickLitter/assets/Old/MidLuck1.png deleted file mode 100644 index 73c830eba..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/MidLuck1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/TaskProp.png b/repo/js/AutoPickLitter/assets/Old/TaskProp.png deleted file mode 100644 index ece809ea1..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/TaskProp.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/TaskProp1.png b/repo/js/AutoPickLitter/assets/Old/TaskProp1.png deleted file mode 100644 index 20d2478ec..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/TaskProp1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/TreasureBag.png b/repo/js/AutoPickLitter/assets/Old/TreasureBag.png deleted file mode 100644 index e4e2d7878..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/TreasureBag.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/WelffareMeal.png b/repo/js/AutoPickLitter/assets/Old/WelffareMeal.png deleted file mode 100644 index ed8b78e95..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/WelffareMeal.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/YuShenQian.png b/repo/js/AutoPickLitter/assets/Old/YuShenQian.png deleted file mode 100644 index 3bc6775cb..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/YuShenQian.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/时间.json b/repo/js/AutoPickLitter/assets/Old/时间.json deleted file mode 100644 index 3ad683b3b..000000000 --- a/repo/js/AutoPickLitter/assets/Old/时间.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "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": 1755957333121, - "map_match_method": "", - "map_name": "Teyvat", - "name": "时间", - "order": 0, - "tags": [], - "type": "collect", - "version": "1.0" - }, - "positions": [ - { - "action": "set_time", - "action_params": "8:00", - "id": 1, - "move_mode": "walk", - "point_ext_params": { - "description": "", - "enable_monster_loot_split": false, - "misidentification": { - "arrival_time": 0, - "handling_mode": "previousDetectedPoint", - "type": [ - "unrecognized" - ] - } - }, - "type": "orientation", - "x": -874.138671875, - "y": 1974.3095703125 - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/末吉1.png b/repo/js/AutoPickLitter/assets/Old/末吉1.png deleted file mode 100644 index ed0d82d61..000000000 Binary files a/repo/js/AutoPickLitter/assets/Old/末吉1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/Old/枫丹梅洛彼得堡路线.json b/repo/js/AutoPickLitter/assets/Old/枫丹梅洛彼得堡路线.json deleted file mode 100644 index b8fe8fe66..000000000 --- a/repo/js/AutoPickLitter/assets/Old/枫丹梅洛彼得堡路线.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "info": { - "name": "枫丹梅洛彼得堡路线", - "type": "collect", - "authors": [ - { - "name": "古又", - "links": "" - } - ], - "version": "1.0", - "description": "领取福利餐", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1755520489362, - "enable_monster_loot_split": false, - "map_match_method": "" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": 4618.744140625, - "y": 4390.26416015625, - "action_params": "" - }, - { - "id": 2, - "x": 4621.45703125, - "y": 4401.85693359375, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 3, - "x": 4613.2890625, - "y": 4404.12353515625, - "type": "path", - "move_mode": "fly", - "action": "stop_flying", - "action_params": "300" - }, - { - "id": 4, - "x": 4583.609375, - "y": 4429.7861328125, - "type": "path", - "move_mode": "run", - "action": "", - "action_params": "" - }, - { - "id": 5, - "x": 4601.986328125, - "y": 4492.96533203125, - "type": "path", - "move_mode": "run", - "action": "", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/移动4行.json b/repo/js/AutoPickLitter/assets/Old/移动4行.json deleted file mode 100644 index e5e548ee1..000000000 --- a/repo/js/AutoPickLitter/assets/Old/移动4行.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "macroEvents": [ - { - "type": 4, - "mouseX": 1206, - "mouseY": 920, - "mouseButton": "Left", - "time": 1125 - }, - { - "type": 2, - "mouseX": 1206, - "mouseY": 919, - "time": 2079 - }, - { - "type": 2, - "mouseX": 1206, - "mouseY": 910, - "time": 2125 - }, - { - "type": 2, - "mouseX": 1207, - "mouseY": 906, - "time": 2329 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 899, - "time": 2360 - }, - { - "type": 2, - "mouseX": 1210, - "mouseY": 876, - "time": 2391 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 853, - "time": 2422 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 834, - "time": 2454 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 824, - "time": 2485 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 813, - "time": 2516 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 792, - "time": 2547 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 770, - "time": 2579 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 672, - "time": 2672 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 643, - "time": 2704 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 616, - "time": 2735 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 600, - "time": 2766 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 576, - "time": 2797 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 556, - "time": 2829 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 536, - "time": 2860 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 513, - "time": 2891 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 499, - "time": 2922 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 481, - "time": 2954 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 463, - "time": 2985 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 448, - "time": 3016 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 425, - "time": 3047 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 399, - "time": 3079 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 385, - "time": 3110 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 378, - "time": 3141 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 314, - "time": 3235 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 297, - "time": 3266 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 278, - "time": 3297 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 265, - "time": 3329 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 248, - "time": 3360 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 234, - "time": 3391 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 224, - "time": 3422 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 222, - "time": 3454 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 221, - "time": 4750 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 220, - "time": 4797 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 219, - "time": 5157 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 216, - "time": 5204 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 216, - "time": 5235 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 215, - "time": 5313 - }, - { - "type": 5, - "mouseX": 1205, - "mouseY": 215, - "mouseButton": "Left", - "time": 5829 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 216, - "time": 5891 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 219, - "time": 5969 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 226, - "time": 6000 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 241, - "time": 6032 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 251, - "time": 6829 - }, - { - "type": 2, - "mouseX": 1215, - "mouseY": 312, - "time": 6860 - }, - { - "type": 2, - "mouseX": 1227, - "mouseY": 390, - "time": 6891 - }, - { - "type": 2, - "mouseX": 1233, - "mouseY": 439, - "time": 6922 - }, - { - "type": 2, - "mouseX": 1241, - "mouseY": 526, - "time": 6954 - }, - { - "type": 2, - "mouseX": 1223, - "mouseY": 799, - "time": 7063 - }, - { - "type": 2, - "mouseX": 1215, - "mouseY": 853, - "time": 7094 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 899, - "time": 7125 - }, - { - "type": 2, - "mouseX": 1210, - "mouseY": 911, - "time": 7157 - }, - { - "type": 2, - "mouseX": 1209, - "mouseY": 914, - "time": 7219 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 921, - "time": 7250 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 924, - "time": 7282 - } - ], - "info": { - "name": "", - "description": "滑动4行", - "x": 0, - "y": 0, - "width": 1920, - "height": 1080, - "recordDpi": 1 - } -} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json b/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json deleted file mode 100644 index 57706fcc1..000000000 --- a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线 (2).json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "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 deleted file mode 100644 index e8e50fa00..000000000 --- a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "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": "3合1路线", - "enable_monster_loot_split": false, - "items": [], - "last_modified_time": 1757685510954, - "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": "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": "dash", - "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),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.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 deleted file mode 100644 index cb50cd11a..000000000 --- a/repo/js/AutoPickLitter/assets/Old/稻妻踏鞴砂路线old.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "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 deleted file mode 100644 index aa4ad9a6e..000000000 --- a/repo/js/AutoPickLitter/assets/Old/稻妻鸣神大社路线old.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "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/Old/蒙德清泉镇路线.json b/repo/js/AutoPickLitter/assets/Old/蒙德清泉镇路线.json deleted file mode 100644 index 7ea7871b9..000000000 --- a/repo/js/AutoPickLitter/assets/Old/蒙德清泉镇路线.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "info": { - "name": "蒙德清泉镇路线", - "bgi_version": "0.45.0", - "type": "collect", - "order": 0, - "tags": [], - "enable_monster_loot_split": false, - "map_name": "Teyvat", - "map_match_method": "", - "items": [], - "authors": [ - { - "name": "古又", - "links": "" - } - ], - "version": "1.0", - "description": "购买圣水", - "last_modified_time": 1755436615482 - }, - "config": { - "realtime_triggers": { - "AutoPick": true - } - }, - "farming_info": { - "allow_farming_count": false, - "normal_mob_count": 0, - "elite_mob_count": 0, - "primary_target": "", - "duration_seconds": 0, - "elite_details": "", - "total_mora": 0 - }, - "positions": [ - { - "id": 1, - "x": -867.2578125, - "y": 1992.54736328125, - "action": "", - "move_mode": "walk", - "type": "teleport", - "point_ext_params": { - "misidentification": { - "type": [ - "unrecognized" - ], - "handling_mode": "previousDetectedPoint", - "arrival_time": 0 - }, - "description": "", - "enable_monster_loot_split": false - } - }, - { - "id": 2, - "x": -872.498046875, - "y": 1978.14111328125, - "action": "", - "move_mode": "run", - "type": "path", - "point_ext_params": { - "misidentification": { - "type": [ - "unrecognized" - ], - "handling_mode": "previousDetectedPoint", - "arrival_time": 0 - }, - "description": "", - "enable_monster_loot_split": false - } - }, - { - "id": 3, - "x": -874.138671875, - "y": 1974.3095703125, - "action": "set_time", - "move_mode": "walk", - "action_params": "6:00", - "type": "path", - "point_ext_params": { - "misidentification": { - "type": [ - "unrecognized" - ], - "handling_mode": "previousDetectedPoint", - "arrival_time": 0 - }, - "description": "", - "enable_monster_loot_split": false - } - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/Buy.png b/repo/js/AutoPickLitter/assets/RecognitionObject/Buy.png deleted file mode 100644 index b952474e0..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/Buy.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/Buy1.png b/repo/js/AutoPickLitter/assets/RecognitionObject/Buy1.png deleted file mode 100644 index ff085b60f..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/Buy1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/Click.png b/repo/js/AutoPickLitter/assets/RecognitionObject/Click.png deleted file mode 100644 index c2066e76c..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/Click.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg0.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg0.png new file mode 100644 index 000000000..556212976 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg0.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg1.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg1.png new file mode 100644 index 000000000..88f8d8de0 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg1.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg2.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg2.png new file mode 100644 index 000000000..656ac7895 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg2.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg3.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg3.png new file mode 100644 index 000000000..d58dc01c8 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg3.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg4.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg4.png new file mode 100644 index 000000000..64c7d5ec5 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg4.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg5.png b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg5.png new file mode 100644 index 000000000..48bea8ff1 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/DragonEgg5.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/InvertedTriangle.png b/repo/js/AutoPickLitter/assets/RecognitionObject/InvertedTriangle.png new file mode 100644 index 000000000..011d4c26e Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/InvertedTriangle.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/LuckySign.png b/repo/js/AutoPickLitter/assets/RecognitionObject/LuckySign.png deleted file mode 100644 index 0eea06968..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/LuckySign.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/PaiMonMenu.png b/repo/js/AutoPickLitter/assets/RecognitionObject/PaiMonMenu.png new file mode 100644 index 000000000..e1eda4576 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/PaiMonMenu.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/SliderTop.png b/repo/js/AutoPickLitter/assets/RecognitionObject/SliderTop.png new file mode 100644 index 000000000..30eb1d06e Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/SliderTop.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/Sugar.png b/repo/js/AutoPickLitter/assets/RecognitionObject/Sugar.png new file mode 100644 index 000000000..d3cc1c2fa Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/Sugar.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp.png b/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp.png deleted file mode 100644 index ece809ea1..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp1.png b/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp1.png deleted file mode 100644 index 20d2478ec..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/TaskProp1.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/TreasureBag.png b/repo/js/AutoPickLitter/assets/RecognitionObject/TreasureBag.png deleted file mode 100644 index e4e2d7878..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/TreasureBag.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/WelffareMeal.png b/repo/js/AutoPickLitter/assets/RecognitionObject/WelffareMeal.png deleted file mode 100644 index ed8b78e95..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/WelffareMeal.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/YuShenQian.png b/repo/js/AutoPickLitter/assets/RecognitionObject/YuShenQian.png deleted file mode 100644 index 3bc6775cb..000000000 Binary files a/repo/js/AutoPickLitter/assets/RecognitionObject/YuShenQian.png and /dev/null differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/伊涅芙.png b/repo/js/AutoPickLitter/assets/RecognitionObject/伊涅芙.png new file mode 100644 index 000000000..a085e3aa5 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/伊涅芙.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/奈芙尔.png b/repo/js/AutoPickLitter/assets/RecognitionObject/奈芙尔.png new file mode 100644 index 000000000..1223bddc3 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/奈芙尔.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/爱诺.png b/repo/js/AutoPickLitter/assets/RecognitionObject/爱诺.png new file mode 100644 index 000000000..38fdfe68d Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/爱诺.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/菈乌玛.png b/repo/js/AutoPickLitter/assets/RecognitionObject/菈乌玛.png new file mode 100644 index 000000000..530e0a201 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/菈乌玛.png differ diff --git a/repo/js/AutoPickLitter/assets/RecognitionObject/菲林斯.png b/repo/js/AutoPickLitter/assets/RecognitionObject/菲林斯.png new file mode 100644 index 000000000..f5384a681 Binary files /dev/null and b/repo/js/AutoPickLitter/assets/RecognitionObject/菲林斯.png differ diff --git a/repo/js/AutoPickLitter/assets/挪德卡莱那夏镇糖雕路线.json b/repo/js/AutoPickLitter/assets/挪德卡莱那夏镇糖雕路线.json new file mode 100644 index 000000000..57177d02b --- /dev/null +++ b/repo/js/AutoPickLitter/assets/挪德卡莱那夏镇糖雕路线.json @@ -0,0 +1,56 @@ +{ + "info": { + "authors": [ + { + "links": "", + "name": "古又" + } + ], + "bgi_version": "0.45.0", + "description": "", + "enable_monster_loot_split": false, + "last_modified_time": 1758462596352, + "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": 9458.0341796875, + "y": 1660.66455078125 + }, + { + "action": "", + "action_params": "", + "id": 2, + "move_mode": "dash", + "type": "path", + "x": 9478.1357421875, + "y": 1657.43359375 + }, + { + "id": 3, + "move_mode": "dash", + "type": "path", + "x": 9498.103393554688, + "y": 1613.3912353515625 + }, + { + "action": "", + "action_params": "", + "id": 4, + "move_mode": "jump", + "type": "path", + "x": 9499.4345703125, + "y": 1610.455078125 + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/移动4行.json b/repo/js/AutoPickLitter/assets/移动4行.json deleted file mode 100644 index e5e548ee1..000000000 --- a/repo/js/AutoPickLitter/assets/移动4行.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "macroEvents": [ - { - "type": 4, - "mouseX": 1206, - "mouseY": 920, - "mouseButton": "Left", - "time": 1125 - }, - { - "type": 2, - "mouseX": 1206, - "mouseY": 919, - "time": 2079 - }, - { - "type": 2, - "mouseX": 1206, - "mouseY": 910, - "time": 2125 - }, - { - "type": 2, - "mouseX": 1207, - "mouseY": 906, - "time": 2329 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 899, - "time": 2360 - }, - { - "type": 2, - "mouseX": 1210, - "mouseY": 876, - "time": 2391 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 853, - "time": 2422 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 834, - "time": 2454 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 824, - "time": 2485 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 813, - "time": 2516 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 792, - "time": 2547 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 770, - "time": 2579 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 672, - "time": 2672 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 643, - "time": 2704 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 616, - "time": 2735 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 600, - "time": 2766 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 576, - "time": 2797 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 556, - "time": 2829 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 536, - "time": 2860 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 513, - "time": 2891 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 499, - "time": 2922 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 481, - "time": 2954 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 463, - "time": 2985 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 448, - "time": 3016 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 425, - "time": 3047 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 399, - "time": 3079 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 385, - "time": 3110 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 378, - "time": 3141 - }, - { - "type": 2, - "mouseX": 1201, - "mouseY": 314, - "time": 3235 - }, - { - "type": 2, - "mouseX": 1202, - "mouseY": 297, - "time": 3266 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 278, - "time": 3297 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 265, - "time": 3329 - }, - { - "type": 2, - "mouseX": 1203, - "mouseY": 248, - "time": 3360 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 234, - "time": 3391 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 224, - "time": 3422 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 222, - "time": 3454 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 221, - "time": 4750 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 220, - "time": 4797 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 219, - "time": 5157 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 216, - "time": 5204 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 216, - "time": 5235 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 215, - "time": 5313 - }, - { - "type": 5, - "mouseX": 1205, - "mouseY": 215, - "mouseButton": "Left", - "time": 5829 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 216, - "time": 5891 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 219, - "time": 5969 - }, - { - "type": 2, - "mouseX": 1204, - "mouseY": 226, - "time": 6000 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 241, - "time": 6032 - }, - { - "type": 2, - "mouseX": 1205, - "mouseY": 251, - "time": 6829 - }, - { - "type": 2, - "mouseX": 1215, - "mouseY": 312, - "time": 6860 - }, - { - "type": 2, - "mouseX": 1227, - "mouseY": 390, - "time": 6891 - }, - { - "type": 2, - "mouseX": 1233, - "mouseY": 439, - "time": 6922 - }, - { - "type": 2, - "mouseX": 1241, - "mouseY": 526, - "time": 6954 - }, - { - "type": 2, - "mouseX": 1223, - "mouseY": 799, - "time": 7063 - }, - { - "type": 2, - "mouseX": 1215, - "mouseY": 853, - "time": 7094 - }, - { - "type": 2, - "mouseX": 1211, - "mouseY": 899, - "time": 7125 - }, - { - "type": 2, - "mouseX": 1210, - "mouseY": 911, - "time": 7157 - }, - { - "type": 2, - "mouseX": 1209, - "mouseY": 914, - "time": 7219 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 921, - "time": 7250 - }, - { - "type": 2, - "mouseX": 1208, - "mouseY": 924, - "time": 7282 - } - ], - "info": { - "name": "", - "description": "滑动4行", - "x": 0, - "y": 0, - "width": 1920, - "height": 1080, - "recordDpi": 1 - } -} \ No newline at end of file diff --git a/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json b/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json index 3e0c8ec79..14cf1dba1 100644 --- a/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json +++ b/repo/js/AutoPickLitter/assets/稻妻鸣神大社路线.json @@ -7,9 +7,9 @@ } ], "bgi_version": "0.45.0", - "description": "修改传送", + "description": "", "enable_monster_loot_split": false, - "last_modified_time": 1757938479689, + "last_modified_time": 1760882468694, "map_match_method": "", "map_name": "Teyvat", "name": "稻妻鸣神大社路线", @@ -33,8 +33,8 @@ "id": 2, "move_mode": "run", "type": "path", - "x": -4393.1015625, - "y": -2485.140625 + "x": -4392.28515625, + "y": -2486.6650390625 }, { "action": "", @@ -42,13 +42,22 @@ "id": 3, "move_mode": "walk", "type": "path", + "x": -4394.048828125, + "y": -2485.2333984375 + }, + { + "action": "", + "action_params": "", + "id": 4, + "move_mode": "walk", + "type": "path", "x": -4388.609375, "y": -2477.291015625 }, { "action": "", "action_params": "", - "id": 4, + "id": 5, "move_mode": "walk", "type": "path", "x": -4397.1328125, @@ -57,7 +66,7 @@ { "action": "", "action_params": "", - "id": 5, + "id": 6, "move_mode": "walk", "type": "path", "x": -4402.39453125, @@ -66,7 +75,7 @@ { "action": "", "action_params": "", - "id": 6, + "id": 7, "move_mode": "run", "type": "path", "x": -4411.4609375, @@ -74,7 +83,7 @@ }, { "action": "", - "id": 7, + "id": 8, "move_mode": "walk", "type": "path", "x": -4414.5810546875, @@ -83,7 +92,7 @@ { "action": "", "action_params": "", - "id": 8, + "id": 9, "move_mode": "jump", "type": "path", "x": -4417.701171875, diff --git a/repo/js/AutoPickLitter/main copy.js b/repo/js/AutoPickLitter/main copy.js new file mode 100644 index 000000000..80c4cb735 --- /dev/null +++ b/repo/js/AutoPickLitter/main copy.js @@ -0,0 +1,1123 @@ +// 初始化相关变量 +let gameRegion; // 游戏截图区域 +const dialogZone = { x: { min: 900, max: 1700 }, y: { min: 420, max: 880 } }; // 对话识别区域 +let record = {}; // record 记录内容 +let recordsNum = 0; // 写入内容次数 +let sticksTime = false; // 判定是否可以上香 +//六龙蛋位置 +const coordinates = [ + [551, 153], + [881, 341], + [1087, 161], + [1342, 357], + [472, 572], + [572, 721] +]; + +// 通用方法区域 +//切换队伍 +async function switchPartyIfNeeded() { + if (!settings.partyName) { + await genshin.returnMainUi(); + return; + }; + try { + log.info("正在尝试切换至" + settings.partyName); + if (!await genshin.switchParty(settings.partyName)) { + log.info("切换队伍失败,前往七天神像重试"); + await genshin.tpToStatueOfTheSeven(); + await genshin.switchParty(settings.partyName); + } + } catch { + log.error("队伍切换失败,可能处于联机模式或其他不可切换状态"); + notification.error(`队伍切换失败,可能处于联机模式或其他不可切换状态`); + await genshin.returnMainUi(); + }; +}; + +// 文字识别/点击,并返回结果 +async function performOcr(keyWords, xRange, yRange, judge, timeout = 500) { + let startTime = new Date(); + let retryCount = 0; + while (Date.now() - startTime < timeout) { + gameRegion = captureGameRegion(); + try { + if (judge) { + // 识别相关区域内容,返回结果 + let ocrResult = gameRegion.find(RecognitionObject.ocr( + xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min + )); + gameRegion.dispose(); + if (ocrResult) { + return { success: true, text: ocrResult.text}; + }; + } else { + // 比对相关内容并点击 + let resList = gameRegion.findMulti(RecognitionObject.ocr( + xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min + )); + gameRegion.dispose(); + for (let res of resList) { + let correctedText = res.text; + if (correctedText.includes(keyWords)) { + let centerX = Math.round(res.x + res.width / 2); + let centerY = Math.round(res.y + res.height / 2); + keyDown("VK_MENU"); + await sleep(700); + moveMouseTo(centerX, centerY); + leftButtonClick(); + await sleep(800); + keyUp("VK_MENU"); + await sleep(1000); + leftButtonClick(); + return { success: true, text: correctedText}; + }; + }; + }; + } catch (error) { + retryCount++; // 增加重试计数 + log.warn(`OCR 识别失败,正在进行第 ${retryCount} 次重试...`); + } + await sleep(50); + }; + // log.warn(`经过多次尝试,仍然无法识别`); + return { success: false}; +}; + +// 图像识别/点击,并返回结果 +async function findImgIcon(imagePath, xRange, yRange, judge, threshold = 0.8, timeout = 500) { + let startTime = new Date(); + let retryCount = 0; + let template = file.ReadImageMatSync(imagePath); + let recognitionObject = RecognitionObject.TemplateMatch(template, xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min); + recognitionObject.Threshold = threshold; + // recognitionObject.Use3Channels = true; + recognitionObject.InitTemplate(); + while (Date.now() - startTime < timeout) { + gameRegion = captureGameRegion(); + let result = gameRegion.find(recognitionObject); + gameRegion.dispose(); + try { + if (judge) { + if (result.isExist()) { + let centerX = Math.round(result.x + result.width / 2); + let centerY = Math.round(result.y + result.height / 2); + keyDown("VK_MENU"); + await sleep(500); + moveMouseTo(centerX, centerY); + leftButtonClick(); + await sleep(800); + keyUp("VK_MENU"); + await sleep(1000); + leftButtonClick(); + return { success: true, coordinates:[centerX, centerY]}; + }; + } else { + if (result.isExist()) { + return { success: true, coordinates:[0, 0]}; + }; + }; + } catch (error) { + retryCount++; // 增加重试计数 + log.warn(`模板匹配失败,正在进行第 ${retryCount} 次重试...`); + }; + await sleep(50); + }; + // log.warn(`经过多次尝试,仍然无法识别`); + return { success: false}; +}; + +// 滚动页面 +// totalDistance: 需要滚动的总距离 +// stepDistance: 每次滚动的距离 +// delayMs: 两次滚动之间的延迟 +async function scrollPage(totalDistance, stepDistance = 10, delayMs = 5) { + // 移动鼠标到(999, 750)并按下左键 + moveMouseTo(999, 750); + await sleep(50); + leftButtonDown(); + + // 估算需要滚动的步数 + const steps = Math.ceil(totalDistance / stepDistance); + // 依次滚动 + for (let j = 0; j < steps; j++) { + // 计算本次滚动剩余的距离 + const remainingDistance = totalDistance - j * stepDistance; + // 如果剩余距离小于 stepDistance,则滚动剩余的距离 + // 否则滚动 stepDistance + const moveDistance = remainingDistance < stepDistance ? remainingDistance : stepDistance; + // 滚动 + moveMouseBy(0, -moveDistance); + // 等待 delayMs ms + await sleep(delayMs); + } + // 等待700ms + await sleep(700); + // 释放左键 + leftButtonUp(); + // 等待100ms + 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 recordForFile(judge) { + /* ---------- 文件名合法性校验 ---------- */ + const illegalCharacters = /[\\/:*?"<>|]/; + const reservedNames = [ + "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" + ]; + + let accountName = settings.accountName || "默认账户"; + + if (accountName === "" || + accountName.startsWith(" ") || + accountName.endsWith(" ") || + illegalCharacters.test(accountName) || + reservedNames.includes(accountName.toUpperCase()) || + accountName.length > 255 + ) { + log.error(`账户名 "${accountName}" 不合法,将使用默认值`); + accountName = "默认账户"; + await sleep(5000); + } else { + log.info(`账户名 "${accountName}" 合法`); + }; + + if (judge) { + /* ---------- 读取记录文件 ---------- */ + const recordFolderPath = "records/"; + let recordFilePath = `records/${accountName}.txt`; + + const filesInSubFolder = file.ReadPathSync(recordFolderPath); + let fileExists = false; + for (const filePath of filesInSubFolder) { + if (filePath === `records\\${accountName}.txt`) { + fileExists = true; + break; + }; + }; + + /* ---------- 初始化记录对象 ---------- */ + record = { + lastRunDate: "1970/01/01", + lastActivateTime: new Date("1970-01-01T20:00:00.000Z"), + lastDragonEggsNum: "【山之血:0,太阳的轰鸣:0圣龙君临:0,菲耶蒂娜:0,献给小酒杯:0,飞澜鲨鲨:0】", + records: new Array(51).fill(""), + version: "" + }; + + let recordIndex = 0; + + if (fileExists) { + log.info(`记录文件 ${recordFilePath} 存在`); + } else { + log.warn(`无记录文件,将使用默认数据`); + return; + }; + + let content = await file.readText(recordFilePath); + let lines = content.split("\n"); + + /* ---------- 逐行解析 ---------- */ + for (const rawLine of lines) { + const line = rawLine.trim(); + if (!line) continue; + + /* 运行完成日期 */ + if (line.startsWith("上次运行日期:")) { + record.lastRunDate = line.slice("上次运行日期:".length).trim(); + }; + + /* 上次上香时间 */ + let timeStr = null; + if (line.startsWith("上次上香时间:")) { + timeStr = line.slice("上次上香时间:".length).trim(); + }; + if (timeStr) { + const d = new Date(timeStr); + if (!isNaN(d.getTime())) { + record.lastActivateTime = d; // 保持 Date 对象 + }; + }; + + /* 背包龙蛋数目 */ + if (line.startsWith("背包龙蛋数目:")) { + record.lastDragonEggsNum = line.slice("背包龙蛋数目:".length).trim(); + }; + + /* 相关信息保存 */ + if (line.startsWith(">>>>>>>>>> ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("抽签的结果: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("获得的食物: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("幸运签内容: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("获得的龙蛋: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("转盘的运势: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + }; + + }; + + log.info(`上次运行日期: ${record.lastRunDate}`); + log.info(`上次上香开始时间: ${record.lastActivateTime.toLocaleString()}`); + + /* ---------- 读取 manifest 版本 ---------- */ + try { + const manifest = JSON.parse(await file.readText("manifest.json")); + record.version = manifest.version; + log.info(`当前版本为${record.version}`); + } catch (err) { + log.error("读取或解析 manifest.json 失败:", err); + }; + + /* ---------- 判断上香时间 ---------- */ + if (settings.sticks) { + const now = Date.now(); // 当前毫秒时间戳 + const aimActivateTime = new Date(record.lastActivateTime.getTime() + 24 * 60 * 60 * 1000).getTime(); + /* ---------- 计算下次可上香时间 ---------- */ + if (aimActivateTime - now > 0) { + log.info(`上香时间还未到!!!`); + sticksTime = false; + } else { + log.info(`上香时间已到,请准备上香!`); + sticksTime = true; + }; + }; + } else { + let recordFilePath = `records/${accountName}.txt`; + let lines = [ + `上次运行日期: ${record.lastRunDate}`, + `上次上香时间: ${record.lastActivateTime.toISOString()}`, + `背包龙蛋数目: ${record.lastDragonEggsNum}`, + ...record.records.filter(Boolean) + ]; + + let content = lines.join('\n'); + + try { + await file.writeText(recordFilePath, content, false); + log.info(`记录已写入 ${recordFilePath}`); + } catch (e) { + log.error(`写入 ${recordFilePath} 失败:`, e); + }; + }; +}; + +// 检查背包龙蛋数目 +async function chcekDragonEggs() { + await genshin.returnMainUi(); + //打开背包 + await keyPress("B"); + await sleep(1500); + await click(1250,50); + let DragonEggs = [0, 0, 0, 0, 0, 0]; + let judgeEgg = 0; + // 判定是不是只有一页 + let sliderTop = await findImgIcon("assets/RecognitionObject/SliderTop.png", { min: 1277, max: 1300 }, { min: 120, max: 160 }, false); + if (!sliderTop.success) { + for (let index = 0; index < 6; index++) { + let DragonEgg = await findImgIcon(`assets/RecognitionObject/DragonEgg${index}.png`, { min: 99, max: 1295 }, { min: 104, max: 967 }, true, 0.95); + if (DragonEgg.success) { + let ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第一次识别到的数字:${ocrEggNum.text}`); + if (ocrEggNum.text == "") { + await sleep(500); + ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第二次识别到的数字:${ocrEggNum.text}`); + }; + DragonEggs[index] = Number(ocrEggNum.text); + }else{ + DragonEggs[index] = 0; + }; + + }; + }else{ + for (let scroll = 0; scroll <= 10; scroll++) { + for (let index = 0; index < 6; index++) { + let DragonEgg = await findImgIcon(`assets/RecognitionObject/DragonEgg${index}.png`, { min: 99, max: 1295 }, { min: 104, max: 967 }, true, 0.95); + if (DragonEgg.success) { + let ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第一次识别到的数字:${ocrEggNum.text}`); + if (ocrEggNum.text == "") { + await sleep(500); + ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第二次识别到的数字:${ocrEggNum.text}`); + }; + if (ocrEggNum.text == "") { + ocrEggNum.text = 1; + }; + DragonEggs[index] = ocrEggNum.text; + }else{ + DragonEggs[index] = 0; + }; + }; + if (judgeEgg == 1) { + break; + }; + if (DragonEggs.every(item => item == 0)) { + // 都为空就滑动背包 滑动大点 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + continue; + } else if (DragonEggs.some(item => item != 0) && judgeEgg == 0) { + // 露出最后一排数字 + // await scrollPage(50, 5, 5); + // 不为空就滑动背包 滑动小点 + await sleep(1000); + await scrollPage(200, 10, 5); + await sleep(1000); + judgeEgg = 1; + }; + + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + + log.info(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`); + if (settings.notify) { + notification.Send(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`); + }; + // 更新记录 + record.lastDragonEggsNum = `【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`; + await recordForFile(false); + return DragonEggs; +}; + +//添加信息 +function writeContentToFile(content, judge) { + //文件名合法校验 + let finalAccountName = settings.accountName || "默认账户"; + try { + const illegalCharacters = /[\\/:*?"<>|]/; + const reservedNames = [ + "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" + ]; + + if (finalAccountName === "" || + finalAccountName.startsWith(" ") || + finalAccountName.endsWith(" ") || + illegalCharacters.test(finalAccountName) || + reservedNames.includes(finalAccountName.toUpperCase()) || + finalAccountName.length > 255 + ) { + log.error(`账户名 "${finalAccountName}" 不合法,将使用默认值`); + finalAccountName = "默认账户"; + } + } catch (error) { + // 只在文件完全不存在时创建,避免覆盖 + file.writeTextSync(finalAccountName, content, false); + log.info(`创建新文件: ${finalAccountName}`); + } + + + let filePath = `records/${finalAccountName}.txt`; + //读取现有内容 + let existingContent = ""; + try { + existingContent = file.readTextSync(filePath); + } catch (e) { + } + + if (judge) { + runDate = `>>>>>>>${new Date().getFullYear()}年${String(new Date().getMonth() + 1).padStart(2, '0')}月${String(new Date().getDate()).padStart(2, '0')}日`; + const finalContent1 = runDate + "\n" + existingContent; + //按行分割,保留最近365条完整记录(按原始换行分割,不过滤) + const lines = finalContent1.split("\n"); + const keepLines = lines.length > 365 * 5 ? lines.slice(0, 365 * 5) : lines; // 假设每条记录最多5行 + const result1 = file.writeTextSync(filePath, keepLines.join("\n"), false); + + if (result1) { + log.info(`写入成功: ${filePath}`); + } else { + log.error(`写入失败: ${filePath}`); + } + + } else { + + //拼接 + const finalContent = content + existingContent; + //按行分割,保留最近365条完整记录(按原始换行分割,不过滤) + const lines = finalContent.split("\n"); + const keepLines = lines.length > 365 * 5 ? lines.slice(0, 365 * 5) : lines; // 假设每条记录最多5行 + const result = file.writeTextSync(filePath, keepLines.join("\n"), false); + + if (result) { + log.info(`写入成功: ${filePath}`); + } else { + log.error(`写入失败: ${filePath}`); + } + } +}; + +// 执行区 +(async function() { + await fakeLog("AutoPickLitter脚本", true, true, 0); + + // 判定你是不是新人 + if(!settings.water && !settings.sticks && !settings.lots && !settings.conchs && !settings.meal && !settings.eggs && !settings.turntable && !settings.todayLuck){ + log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); + log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); + log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); + await fakeLog("AutoPickLitter脚本", true, false, 2333); + return 0; + }; + + // 判定文件名的合法性,以及初始化相关文件 + await recordForFile(true); + // 更新日期信息 + record.lastRunDate = new Date(Date.now() - 4 * 60 * 60 * 1000) + .toLocaleDateString('zh-CN', { timeZone: 'Asia/Shanghai', year: 'numeric', month: '2-digit', day: '2-digit' }) + .replace(/\//g, '/'); + + await recordForFile(false); + // 蒙德清泉镇圣水 + if (settings.water) { + await fakeLog("蒙德清泉镇圣水", false, true, 0); + await genshin.returnMainUi(); + await pathingScript.runFile("assets/霍普金斯.json"); + await genshin.returnMainUi(); + await genshin.returnMainUi(); + await pathingScript.runFile("assets/蒙德清泉镇路线.json"); + //识别对话位置,并点击 + let ocrResults = await performOcr("神奇的", dialogZone.x, dialogZone.y, false); + if (ocrResults.length != 0) { + await performOcr("如何才", dialogZone.x, dialogZone.y, false); + let ocrOver = await performOcr("已",{ min: 1482, max: 1630 }, { min: 912, max: 957 }, false); + if (ocrOver.success) { + log.info("已售罄!!!"); + } else { + let ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true); + if (ocrMora == "") { + await sleep(500); + ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true); + }; + if (BigInt(ocrMora.text) >= 300) { + await sleep(800); + await click(1636,1019); + await sleep(1000); + await click(1168,785); + await sleep(1000); + } else { + log.info("不是哥们,你怎么比我还穷!!!"); + }; + }; + }; + await genshin.returnMainUi(); + await fakeLog("蒙德清泉镇圣水", false, false, 0); + }; + + // 璃月璃沙娇上香 + if (sticksTime) { + await fakeLog("璃月璃沙娇上香", false, true, 0); + await genshin.returnMainUi(); + // 更新上香时间 + record.lastActivateTime = new Date(); + await recordForFile(false); + await pathingScript.runFile("assets/璃月璃沙娇路线.json"); + await sleep(1000); + // 识别区域 + let ocrResults = await performOcr("王平安", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + await genshin.chooseTalkOption("能给我几支香吗"); + await sleep(700); + leftButtonClick(); + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("敬香", dialogZone.x, dialogZone.y, false); + if(ocrResults1.success){ + await click(1168,785); + await sleep(700); + } else { + log.error("未识别到对话,可能角色移速太快加上有开盾打断识别了"); + await genshin.returnMainUi(); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + await genshin.returnMainUi(); + await fakeLog("璃月璃沙娇上香", false, false, 0); + }; + + // 稻妻鸣神大社抽签 + if (settings.lots) { + await fakeLog("稻妻鸣神大社抽签", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/稻妻鸣神大社路线.json"); + await sleep(1000); + // 识别对话位置,并点击 + let ocrResults = await performOcr("御神签箱", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("求签吧", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(2000); + leftButtonClick(); + await sleep(4000); + leftButtonClick(); + await sleep(3500); + }; + let ocrResults2 = await performOcr("玄冬林", dialogZone.x, dialogZone.y, false); + let results = ""; + if (ocrResults2.success) { + await sleep(1000); + leftButtonClick(); + await sleep(700); + let ocrResults3 = await performOcr("我要", dialogZone.x, dialogZone.y, false); + if (ocrResults3.success) { + 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(); + // 打开背包找签 + await keyPress("B"); + await sleep(1000); + await click(1150,50); + await sleep(700); + for(let scroll = 0; scroll <= 22; scroll++){ + // 识别御神签 + let yuShenQian = await findImgIcon("assets/RecognitionObject/YuShenQianHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + if (yuShenQian.success) { + break; + }; + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + //滑动背包 + await scrollPage(680, 10, 5); + await sleep(100); + }; + await sleep(2000); + await click(1670,1025); + await sleep(3000); + // 通过图片识别 + // 大凶or凶 + let bigBad = await findImgIcon("assets/RecognitionObject/BigBad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let bad = await findImgIcon("assets/RecognitionObject/Bad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + // 大吉、中吉、吉、末吉 + let bigLuck = await findImgIcon("assets/RecognitionObject/BigLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let midLuck = await findImgIcon("assets/RecognitionObject/MidLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let endLuck = await findImgIcon("assets/RecognitionObject/EndLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let luck = await findImgIcon("assets/RecognitionObject/Luck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + await genshin.returnMainUi(); + if (bigBad.success) { + log.info("抽签的结果:大凶"); + results = "大凶"; + await pathingScript.runFile("assets/挂签路线.json"); + await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); + await genshin.chooseTalkOption("挂起来吧"); + await sleep(700); + await click(111,184); + await sleep(1000); + await click(1250,817); + await sleep(1000); + await click(1603,1013); + await sleep(1500); + await genshin.returnMainUi(); + log.info("事事顺利"); + } else if (bad.success) { + log.info("抽签的结果:凶"); + results = "凶"; + await pathingScript.runFile("assets/挂签路线.json"); + await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); + await sleep(700); + await genshin.chooseTalkOption("挂起来吧"); + await click(111,184); + await sleep(1000); + await click(1250,817); + await sleep(1000); + await click(1603,1013); + await sleep(1500); + await genshin.returnMainUi(); + log.info("事事顺利"); + } else if (bigLuck.success) { + log.info("抽签的结果:大吉"); + results = "大吉"; + } else if (midLuck.success) { + log.info("抽签的结果:中吉"); + results = "中吉"; + } else if (endLuck.success) { + log.info("抽签的结果:末吉"); + results = "末吉"; + } else if (luck.success) { + log.info("抽签的结果:吉"); + results = "吉"; + } else { + log.warn("嘘,快踢作者屁股,修bug!!!"); + }; + } else { + await sleep(700); + await genshin.chooseTalkOption("再见"); + await sleep(700); + leftButtonClick(); + await sleep(1500); + log.info("对话出现再见,默认解签完毕以及查看签操作!!!"); + }; + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `抽签的结果: ${results}`; + if (settings.notify) { + notification.Send(`抽签的结果: ${results}`); + } + await recordForFile(false);//修改记录文件 + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + // await genshin.returnMainUi(); + }; + await genshin.returnMainUi(); + await fakeLog("稻妻鸣神大社抽签", false, true, 0) + }; + + // 稻妻踏鞴砂海螺 + if (settings.conchs) { + await fakeLog("稻妻踏鞴砂海螺", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/稻妻踏鞴砂路线.json"); + await sleep(1000); + if (settings.doYouOpen) { + await pathingScript.runFile("assets/阿敬.json"); + let figure = parseInt(settings.pickupTreasure); + let ocrResults = await performOcr("阿敬", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(1000); + let ocrResults1 = await performOcr("想要", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + 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 { + log.info("你开过了?look my eyes,回答我!!!"); + await genshin.chooseTalkOption("再见"); + await sleep(700); + leftButtonClick(); + await sleep(1500); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + }; + await genshin.returnMainUi(); + await fakeLog("稻妻踏鞴砂海螺", false, false, 0) + }; + + //枫丹梅洛彼得堡福利餐 + if(settings.meal){ + await fakeLog("枫丹梅洛彼得堡福利餐", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/枫丹梅洛彼得堡路线.json"); + await sleep(1000); + let ocrResults = await performOcr("布兰", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + let ocrResults1 = await performOcr("没什么", dialogZone.x, dialogZone.y, false); + if(ocrResults1.success){ + log.info("对话出现没什么,默认领取和使用过!!!"); + } else{ + // await genshin.chooseTalkOption("给我一份福利餐"); + await performOcr("给我一份福利餐", dialogZone.x, dialogZone.y, false); + await sleep(1000); + leftButtonClick(); + await sleep(1000); + leftButtonClick(); + await sleep(1500); + //打开背包找签 + log.info("打开背包"); + await keyPress("B"); + await sleep(1500); + await click(1250,50); + for(let scroll = 0; scroll <= 10; scroll++){ + let welffareMeal = await findImgIcon("assets/RecognitionObject/WelffareMealHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, false); + if (welffareMeal.success) { + break; + } + //滑动背包 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + //这里是点击使用 + await sleep(1000); + await click(1670,1025); + await sleep(3000); + //识别获得的食物名称 + let ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true); + }; + log.info(`获得:${ocrText.text}`); + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `获得的食物: ${ocrText.text}`; + if (settings.notify) { + notification.Send(`获得的食物: ${ocrText.text}`); + }; + await recordForFile(false);// 修改记录文件 + + //点击幸运签,并识别内容 + await sleep(1000); + await click(1000,520); + await sleep(3000); + let ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true); + }; + let text = ocrText1.text.replace(/\r\n|\n|\r/g, ""); + + log.info(`幸运签内容:${text}`); + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `幸运签内容: ${text}`; + if (settings.notify) { + notification.Send(`幸运签内容: ${text}`); + } + await recordForFile(false);// 修改记录文件 + + }; + + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + await genshin.returnMainUi(); + await fakeLog("枫丹梅洛彼得堡福利餐", false, false, 0) + }; + + // 纳塔悠悠集市龙蛋 + if(settings.eggs){ + let nowDragonEggsNum = record.lastDragonEggsNum; + if (record.lastDragonEggsNum == "【山之血:0,太阳的轰鸣:0,圣龙君临:0,菲耶蒂娜:0,献给小酒杯:0,飞澜鲨鲨:0】" || settings.updateEggs) { + nowDragonEggsNum = await chcekDragonEggs(); + }; + let nowDragonEggs = nowDragonEggsNum.match(/\d+/g).map(Number); + await fakeLog("纳塔悠悠集市龙蛋", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/纳塔悠悠集市路线.json"); + let ocrResults = await performOcr("察尔瓦", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("让我挑一枚", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(5000); + let figure = 0; + if (settings.selectDragonEggModel == "随机模式") { + const crypto = require('crypto'); + figure = crypto.randomInt(0, 6); + // figure = Math.floor(Math.random() * 6); + } else if (settings.selectDragonEggModel == "指定模式") { + switch (settings.pickupDragonEgg) { + case "闪闪礼蛋·山之血": + figure = 0; + break; + case "闪闪礼蛋·太阳的轰鸣": + figure = 1; + break; + case "闪闪礼蛋·圣龙君临": + figure = 2; + break; + case "闪闪礼蛋·菲耶蒂娜": + figure = 3; + break; + case "闪闪礼蛋·献给小酒杯": + figure = 4; + break; + case "闪闪礼蛋·飞澜鲨鲨": + figure = 5; + break; + default: + log.warn("嘘,快踢作者屁股,修bug!!!"); + break; + }; + }else { + + }; + + // 日志输出会去点击那个龙蛋 + switch (figure) { + case 0: + log.info("获得的龙蛋:闪闪礼蛋·山之血"); + break; + case 1: + log.info("获得的龙蛋:闪闪礼蛋·太阳的轰鸣"); + break; + case 2: + log.info("获得的龙蛋:闪闪礼蛋·圣龙君临"); + break; + case 3: + log.info("获得的龙蛋:闪闪礼蛋·菲耶蒂娜"); + break; + case 4: + log.info("获得的龙蛋:闪闪礼蛋·献给小酒杯"); + break; + case 5: + log.info("获得的龙蛋:闪闪礼蛋·飞澜鲨鲨"); + break; + default: + log.warn("嘘,快踢作者屁股,修bug!!!"); + break; + }; + + moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); + nowDragonEggs[figure]++; + if (settings.notify) { + notification.Send(`背包龙蛋数目: 【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`); + }; + // 更新记录 + record.lastDragonEggsNum = `【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`; + await recordForFile(false); + + moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); + + await sleep(100); + leftButtonClick(); + await sleep(3000); + } else { + log.info("你今天已经领取过了"); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + + await genshin.returnMainUi(); + await fakeLog("纳塔悠悠集市龙蛋", false, false, 0) + }; + + //挪德卡莱那夏镇好运转盘 + if (settings.turntable) { + await fakeLog("挪德卡莱那夏镇好运转盘", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/挪德卡莱那夏镇好运转盘路线.json"); + await sleep(1000); + let ocrResults = await performOcr("好运速转", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(3000); + leftButtonClick(); + await sleep(1000); + let ocrResults1 = await performOcr("拨动转盘", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(6000); + let ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true); + }; + log.info(`转盘运势:${ocrText.text}`); + // writeContentToFile(`转盘的运势:${recognizedText}\n`, false); + let text = ocrText.text.replace(/\r\n|\n|\r/g, ""); + + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `转盘的运势: ${text}`; + if (settings.notify) { + notification.Send(`转盘的运势: ${text}`); + } + await recordForFile(false);// 修改记录文件 + + await sleep(2000); + leftButtonClick(); + await sleep(700); + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + await genshin.returnMainUi(); + await fakeLog("挪德卡莱那夏镇好运转盘", false, false, 0) + }; + + // 挪德卡莱那夏镇今日收获 + if (settings.todayLuck) { + await fakeLog("挪德卡莱那夏镇美味的今日收获", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/挪德卡莱那夏镇美味的今日收获路线.json"); + await sleep(1000); + let ocrResults = await performOcr("莉莉希", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + leftButtonClick(); + let ocrResults1 = await performOcr("可以领", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(700); + leftButtonClick(); + await sleep(1500); + } else { + log.warn("情况一,你根本没仔细看提示"); + log.warn("情况二,你把它残忍放进背包了"); + await sleep(1000); + await genshin.chooseTalkOption("其实"); + await sleep(1000); + await sleep(700); + leftButtonClick(); + await sleep(1500); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + await genshin.returnMainUi(); + await fakeLog("挪德卡莱那夏镇美味的今日收获", false, false, 0) + }; + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `>>>>>>>>>> ${new Date().getFullYear()}年${String(new Date().getMonth() + 1).padStart(2, '0')}月${String(new Date().getDate()).padStart(2, '0')}日`; + await recordForFile(false);// 修改记录文件 + + await fakeLog("AutoPickLitter脚本", true, false, 2333); + +})(); \ No newline at end of file diff --git a/repo/js/AutoPickLitter/main.js b/repo/js/AutoPickLitter/main.js index 347c1e484..3f9f32eea 100644 --- a/repo/js/AutoPickLitter/main.js +++ b/repo/js/AutoPickLitter/main.js @@ -1,182 +1,145 @@ -// 初始化游戏截图区域 -let gameRegion; +// 初始化相关变量 +let gameRegion; // 游戏截图区域 +const dialogZone = { x: { min: 900, max: 1700 }, y: { min: 420, max: 880 } }; // 对话识别区域 +let record = {}; // record 记录内容 +let recordsNum = 0; // 写入内容次数 +let sticksTime = false; // 判定是否可以上香 +//六龙蛋位置 +const coordinates = [ + [551, 153], + [881, 341], + [1087, 161], + [1342, 357], + [472, 572], + [572, 721] +]; -// 对话识别区域 -const dialogZone = { x: { min: 900, max: 1700 }, y: { min: 380, max: 880 } }; - -//文字识别,并返回相关信息 -async function performOcr(keyWords, xRange, yRange, judge) { - //截取游戏截图 - gameRegion = captureGameRegion(); +// 通用方法区域 +//切换队伍 +async function switchPartyIfNeeded() { + if (!settings.partyName) { + await genshin.returnMainUi(); + return; + }; try { - if (judge) { - //单个识别 - let ocrResult = gameRegion.find(RecognitionObject.ocr( - xRange.min, yRange.min, - xRange.max - xRange.min, yRange.max - yRange.min - )); - //释放内存 - gameRegion.dispose(); - if (ocrResult) { - //识别结果 - let correctedText = ocrResult.text; - return correctedText; + log.info("正在尝试切换至" + settings.partyName); + if (!await genshin.switchParty(settings.partyName)) { + log.info("切换队伍失败,前往七天神像重试"); + await genshin.tpToStatueOfTheSeven(); + await genshin.switchParty(settings.partyName); + } + } catch { + log.error("队伍切换失败,可能处于联机模式或其他不可切换状态"); + notification.error(`队伍切换失败,可能处于联机模式或其他不可切换状态`); + await genshin.returnMainUi(); + }; +}; + +// 文字识别/点击,并返回结果 +async function performOcr(keyWords, xRange, yRange, judge, timeout = 500) { + let startTime = new Date(); + let retryCount = 0; + while (Date.now() - startTime < timeout) { + gameRegion = captureGameRegion(); + try { + if (judge) { + // 识别相关区域内容,返回结果 + let ocrResult = gameRegion.find(RecognitionObject.ocr( + xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min + )); + gameRegion.dispose(); + if (ocrResult) { + return { success: true, text: ocrResult.text}; + }; } else { - // log.warn(`OCR 识别区域未找到内容`); - return ""; - } - } else { - //多个识别 - let resList = gameRegion.findMulti(RecognitionObject.ocr( - xRange.min, yRange.min, - xRange.max - xRange.min, yRange.max - yRange.min - )); - //释放内存 - gameRegion.dispose(); - // 遍历识别结果,检查是否找到目标文本 - let results = []; - for (let i = 0; i < resList.count; i++) { - let res = resList[i]; - let correctedText = res.text; - if (correctedText.includes(keyWords)) { - results.push({ text: correctedText, x: res.x, y: res.y, width: res.width, height: res.height }); - //点击中心 - // await click(Math.round(res.x +res.width/2),Math.round(res.y + res.height/2)); + // 比对相关内容并点击 + let resList = gameRegion.findMulti(RecognitionObject.ocr( + xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min + )); + gameRegion.dispose(); + for (let res of resList) { + let correctedText = res.text; + if (correctedText.includes(keyWords)) { + let centerX = Math.round(res.x + res.width / 2); + let centerY = Math.round(res.y + res.height / 2); + keyDown("VK_MENU"); + await sleep(700); + moveMouseTo(centerX, centerY); + leftButtonClick(); + await sleep(800); + keyUp("VK_MENU"); + await sleep(1000); + leftButtonClick(); + return { success: true, text: correctedText}; + }; + }; + }; + } catch (error) { + retryCount++; // 增加重试计数 + log.warn(`OCR 识别失败,正在进行第 ${retryCount} 次重试...`); + } + await sleep(50); + }; + // log.warn(`经过多次尝试,仍然无法识别`); + return { success: false}; +}; + +// 图像识别/点击,并返回结果 +async function findImgIcon(imagePath, xRange, yRange, judge, threshold = 0.8, timeout = 500) { + let startTime = new Date(); + let retryCount = 0; + let template = file.ReadImageMatSync(imagePath); + let recognitionObject = RecognitionObject.TemplateMatch(template, xRange.min, yRange.min, + xRange.max - xRange.min, yRange.max - yRange.min); + recognitionObject.Threshold = threshold; + // recognitionObject.Use3Channels = true; + recognitionObject.InitTemplate(); + while (Date.now() - startTime < timeout) { + gameRegion = captureGameRegion(); + let result = gameRegion.find(recognitionObject); + gameRegion.dispose(); + try { + if (judge) { + if (result.isExist()) { + let centerX = Math.round(result.x + result.width / 2); + let centerY = Math.round(result.y + result.height / 2); keyDown("VK_MENU"); await sleep(500); - moveMouseTo(res.x, res.y); + moveMouseTo(centerX, centerY); leftButtonClick(); await sleep(800); keyUp("VK_MENU"); await sleep(1000); leftButtonClick(); - break; - } - } - return results; - } - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - return null; - } - -} - -//图像识别,并返回相关信息 -async function findImgIcon(imagePath, xRange, yRange, judge) { - // 读取图像模板 - let template = file.ReadImageMatSync(imagePath); - // 创建识别对象 - let recognitionObject = RecognitionObject.TemplateMatch(template, xRange.min, yRange.min, - xRange.max - xRange.min, yRange.max - yRange.min); - let results = []; - let results1 = []; - // 捕捉游戏截图 - gameRegion = captureGameRegion(); - // 查找图像 - let result = gameRegion.find(recognitionObject); - // 释放内存 - gameRegion.dispose(); - try { - // 如果需要判断 - if (judge) { - // 如果找到 - if (result.isExist()) { - // 保存结果 - results.push({ success: true, x: result.x, y: result.y, width: result.width, height: result.height }); - // 点击该位置 - keyDown("VK_MENU"); - await sleep(500); - moveMouseTo(result.x, result.y); - leftButtonClick(); - await sleep(800); - keyUp("VK_MENU"); + return { success: true, coordinates:[centerX, centerY]}; + }; } else { - // log.info("图像识别失败"); - } - return results; - } else { - // 如果找到 - if (result.isExist()) { - // 保存结果 - results1.push({ success: true, x: result.x, y: result.y, width: result.width, height: result.height }); - } else { - // log.info("图像识别失败"); - } - return results1; - } - - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - } -} + if (result.isExist()) { + return { success: true, coordinates:[0, 0]}; + }; + }; + } catch (error) { + retryCount++; // 增加重试计数 + log.warn(`模板匹配失败,正在进行第 ${retryCount} 次重试...`); + }; + await sleep(50); + }; + // log.warn(`经过多次尝试,仍然无法识别`); + return { success: false}; +}; -//添加信息 -function writeContentToFile(content, judge) { - let finalAccountName = settings.accountName || "默认账户"; - try { - const illegalCharacters = /[\\/:*?"<>|]/; - const reservedNames = [ - "CON", "PRN", "AUX", "NUL", - "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", - "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" - ]; - - if (finalAccountName === "" || - finalAccountName.startsWith(" ") || - finalAccountName.endsWith(" ") || - illegalCharacters.test(finalAccountName) || - reservedNames.includes(finalAccountName.toUpperCase()) || - finalAccountName.length > 255 - ) { - log.error(`账户名 "${finalAccountName}" 不合法,将使用默认值`); - finalAccountName = "默认账户"; - } - } catch (error) { - // 只在文件完全不存在时创建,避免覆盖 - file.writeTextSync(finalAccountName, content, false); - log.info(`创建新文件: ${finalAccountName}`); - } - - - let filePath = `records/${finalAccountName}.txt`; - //读取现有内容 - let existingContent = ""; - try { - existingContent = file.readTextSync(filePath); - } catch (e) { - } - - if (judge) { - runDate = `==========${new Date().getFullYear()}年${String(new Date().getMonth() + 1).padStart(2, '0')}月${String(new Date().getDate()).padStart(2, '0')}日==========`; - const finalContent1 = runDate + "\n" + existingContent; - //按行分割,保留最近365条完整记录(按原始换行分割,不过滤) - const lines = finalContent1.split("\n"); - const keepLines = lines.length > 365 * 5 ? lines.slice(0, 365 * 5) : lines; // 假设每条记录最多5行 - const result1 = file.writeTextSync(filePath, keepLines.join("\n"), false); - - if (result1) { - log.info(`写入成功: ${filePath}`); - } else { - log.error(`写入失败: ${filePath}`); - } - - } else { - - //拼接 - const finalContent = content + existingContent; - //按行分割,保留最近365条完整记录(按原始换行分割,不过滤) - const lines = finalContent.split("\n"); - const keepLines = lines.length > 365 * 5 ? lines.slice(0, 365 * 5) : lines; // 假设每条记录最多5行 - const result = file.writeTextSync(filePath, keepLines.join("\n"), false); - - if (result) { - log.info(`写入成功: ${filePath}`); - } else { - log.error(`写入失败: ${filePath}`); - } - } -} +// 长对话点击 +async function clickLongTalk() { + // 识别是不是主界面 + let isMainUi = { success: false, coordinates:[0, 0]}; + do { + leftButtonClick(); + isMainUi = await findImgIcon("assets/RecognitionObject/PaiMonMenu.png", { min: 15, max: 112 }, { min: 0, max: 84 }, false, 0.8, 500); + // log.info(`你看嘛: ${isMainUi.success}`); + } while (!isMainUi.success); +}; // 滚动页面 // totalDistance: 需要滚动的总距离 @@ -224,23 +187,23 @@ async function fakeLog(name, isJs, isStart, duration) { 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); @@ -264,7 +227,7 @@ async function fakeLog(name, isJs, isStart, duration) { `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + `→ 开始执行JS脚本: "${name}"`; log.debug(logMessage); - } + }; if (isJs && !isStart) { // 处理 isJs = true 且 isStart = false 的情况 const logMessage = `正在伪造js结束的日志记录\n\n` + @@ -273,7 +236,7 @@ async function fakeLog(name, isJs, isStart, duration) { `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + `------------------------------`; log.debug(logMessage); - } + }; if (!isJs && isStart) { // 处理 isJs = false 且 isStart = true 的情况 const logMessage = `正在伪造地图追踪开始的日志记录\n\n` + @@ -282,7 +245,7 @@ async function fakeLog(name, isJs, isStart, duration) { `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + `→ 开始执行地图追踪任务: "${name}"`; log.debug(logMessage); - } + }; if (!isJs && !isStart) { // 处理 isJs = false 且 isStart = false 的情况 const logMessage = `正在伪造地图追踪结束的日志记录\n\n` + @@ -291,13 +254,266 @@ async function fakeLog(name, isJs, isStart, duration) { `[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` + `------------------------------`; log.debug(logMessage); - } -} + }; +}; +// 读写信息 +async function recordForFile(judge) { + /* ---------- 文件名合法性校验 ---------- */ + const illegalCharacters = /[\\/:*?"<>|]/; + const reservedNames = [ + "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" + ]; + + let accountName = settings.accountName || "默认账户"; + + if (accountName === "" || + accountName.startsWith(" ") || + accountName.endsWith(" ") || + illegalCharacters.test(accountName) || + reservedNames.includes(accountName.toUpperCase()) || + accountName.length > 255 + ) { + log.error(`账户名 "${accountName}" 不合法,将使用默认值`); + accountName = "默认账户"; + await sleep(5000); + } else { + log.info(`账户名 "${accountName}" 合法`); + }; + + if (judge) { + /* ---------- 读取记录文件 ---------- */ + const recordFolderPath = "records/"; + let recordFilePath = `records/${accountName}.txt`; + + const filesInSubFolder = file.ReadPathSync(recordFolderPath); + let fileExists = false; + for (const filePath of filesInSubFolder) { + if (filePath === `records\\${accountName}.txt`) { + fileExists = true; + break; + }; + }; + + /* ---------- 初始化记录对象 ---------- */ + record = { + lastRunDate: "1970/01/01", + lastActivateTime: new Date("1970-01-01T20:00:00.000Z"), + lastDragonEggsNum: "【山之血:0,太阳的轰鸣:0圣龙君临:0,菲耶蒂娜:0,献给小酒杯:0,飞澜鲨鲨:0】", + records: new Array(51).fill(""), + version: "" + }; + + let recordIndex = 0; + + if (fileExists) { + log.info(`记录文件 ${recordFilePath} 存在`); + } else { + log.warn(`无记录文件,将使用默认数据`); + return; + }; + + let content = await file.readText(recordFilePath); + let lines = content.split("\n"); + + /* ---------- 逐行解析 ---------- */ + for (const rawLine of lines) { + const line = rawLine.trim(); + if (!line) continue; + + /* 运行完成日期 */ + if (line.startsWith("上次运行日期:")) { + record.lastRunDate = line.slice("上次运行日期:".length).trim(); + }; + + /* 上次上香时间 */ + let timeStr = null; + if (line.startsWith("上次上香时间:")) { + timeStr = line.slice("上次上香时间:".length).trim(); + }; + if (timeStr) { + const d = new Date(timeStr); + if (!isNaN(d.getTime())) { + record.lastActivateTime = d; // 保持 Date 对象 + }; + }; + + /* 背包龙蛋数目 */ + if (line.startsWith("背包龙蛋数目:")) { + record.lastDragonEggsNum = line.slice("背包龙蛋数目:".length).trim(); + }; + + /* 相关信息保存 */ + if (line.startsWith(">>>>>>>>>> ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("抽签的结果: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("获得的食物: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("幸运签内容: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("获得的龙蛋: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + } else if (line.startsWith("转盘的运势: ") && recordIndex < record.records.length) { + record.records[recordIndex++] = line; + }; + + }; + + log.info(`上次运行日期: ${record.lastRunDate}`); + log.info(`上次上香开始时间: ${record.lastActivateTime.toLocaleString()}`); + + /* ---------- 读取 manifest 版本 ---------- */ + try { + const manifest = JSON.parse(await file.readText("manifest.json")); + record.version = manifest.version; + log.info(`当前版本为${record.version}`); + } catch (err) { + log.error("读取或解析 manifest.json 失败:", err); + }; + + /* ---------- 判断上香时间 ---------- */ + if (settings.sticks) { + const now = Date.now(); // 当前毫秒时间戳 + const aimActivateTime = new Date(record.lastActivateTime.getTime() + 24 * 60 * 60 * 1000).getTime(); + /* ---------- 计算下次可上香时间 ---------- */ + if (aimActivateTime - now > 0) { + log.info(`上香时间还未到!!!`); + sticksTime = false; + } else { + log.info(`上香时间已到,请准备上香!`); + sticksTime = true; + }; + }; + } else { + let recordFilePath = `records/${accountName}.txt`; + let lines = [ + `上次运行日期: ${record.lastRunDate}`, + `上次上香时间: ${record.lastActivateTime.toISOString()}`, + `背包龙蛋数目: ${record.lastDragonEggsNum}`, + ...record.records.filter(Boolean) + ]; + + let content = lines.join('\n'); + + try { + await file.writeText(recordFilePath, content, false); + log.info(`记录已写入 ${recordFilePath}`); + } catch (e) { + log.error(`写入 ${recordFilePath} 失败:`, e); + }; + }; +}; + +// 检查背包龙蛋数目 +async function chcekDragonEggs() { + await genshin.returnMainUi(); + //打开背包 + await keyPress("B"); + await checkExpire(); + await sleep(1500); + await click(1250,50); + let DragonEggs = [0, 0, 0, 0, 0, 0]; + let judgeEgg = 0; + // 判定是不是只有一页 + let sliderTop = await findImgIcon("assets/RecognitionObject/SliderTop.png", { min: 1277, max: 1300 }, { min: 120, max: 160 }, false); + if (!sliderTop.success) { + for (let index = 0; index < 6; index++) { + let DragonEgg = await findImgIcon(`assets/RecognitionObject/DragonEgg${index}.png`, { min: 99, max: 1295 }, { min: 104, max: 967 }, true, 0.95); + if (DragonEgg.success) { + let ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第一次识别到的数字:${ocrEggNum.text}`); + if (ocrEggNum.text == "") { + await sleep(500); + ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + log.info(`第二次识别到的数字:${ocrEggNum.text}`); + }; + DragonEggs[index] = Number(ocrEggNum.text); + }else{ + DragonEggs[index] = 0; + }; + + }; + }else{ + for (let scroll = 0; scroll <= 10; scroll++) { + for (let index = 0; index < 6; index++) { + let DragonEgg = await findImgIcon(`assets/RecognitionObject/DragonEgg${index}.png`, { min: 99, max: 1295 }, { min: 104, max: 967 }, true, 0.95); + if (DragonEgg.success) { + let ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + // log.info(`第一次识别到的数字:${ocrEggNum.text}`); + if (ocrEggNum.text == "") { + await sleep(500); + ocrEggNum = await performOcr("", + { min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true); + // log.info(`第二次识别到的数字:${ocrEggNum.text}`); + }; + if (ocrEggNum.text == "") { + ocrEggNum.text = 1; + }; + DragonEggs[index] = ocrEggNum.text; + }else{ + DragonEggs[index] = 0; + }; + }; + if (judgeEgg == 1) { + break; + }; + if (DragonEggs.every(item => item == 0)) { + // 都为空就滑动背包 滑动大点 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + continue; + } else if (DragonEggs.some(item => item != 0) && judgeEgg == 0) { + // 露出最后一排数字 + // await scrollPage(50, 5, 5); + // 不为空就滑动背包 滑动小点 + await sleep(1000); + await scrollPage(300, 10, 5); + await sleep(1000); + judgeEgg = 1; + }; + + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + + log.info(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`); + if (settings.notify) { + notification.Send(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`); + }; + // 更新记录 + record.lastDragonEggsNum = `【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`; + await recordForFile(false); + return `【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`;; +}; + +// 检查过期物品 +async function checkExpire() { + await sleep(1000); + let ocrExpire = await performOcr("",{ min: 870, max: 1040 }, { min: 280, max: 320 }, true); + if (ocrExpire.text == "物品过期") { + log.info(`处理中=========`); + await click(980, 750); + }; +}; + +// 执行区 (async function() { await fakeLog("AutoPickLitter脚本", true, true, 0); - //判断你是不是老手 - if(!settings.water && !settings.sticks && !settings.lots && !settings.conchs && !settings.meal && !settings.eggs && !settings.turntable && !settings.todayLuck){ + + // 判定你是不是新人 + if(!settings.water && !settings.sticks && !settings.lots && !settings.conchs && !settings.meal && !settings.eggs && !settings.turntable && !settings.todayLuck && !settings.sweetStatue){ log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); log.error(`亲,这面请您点击【打开脚本目录】找到AutoPickLitter文件并打开然后去阅读README!!!`); @@ -305,244 +521,169 @@ async function fakeLog(name, isJs, isStart, duration) { return 0; }; - //蒙德清泉镇圣水 + // 判定文件名的合法性,以及初始化相关文件 + await recordForFile(true); + // 更新日期信息 + record.lastRunDate = new Date(Date.now() - 4 * 60 * 60 * 1000) + .toLocaleDateString('zh-CN', { timeZone: 'Asia/Shanghai', year: 'numeric', month: '2-digit', day: '2-digit' }) + .replace(/\//g, '/'); + + await recordForFile(false); + // 蒙德清泉镇圣水 if (settings.water) { + await fakeLog("蒙德清泉镇圣水", false, true, 0); await genshin.returnMainUi(); await pathingScript.runFile("assets/霍普金斯.json"); await genshin.returnMainUi(); + await genshin.returnMainUi(); await pathingScript.runFile("assets/蒙德清泉镇路线.json"); - await sleep(1000); - //识别区域 - try { - //识别对话位置,并点击 - let ocrResults = await performOcr("神奇的", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { - await sleep(700); - await genshin.chooseTalkOption("如何才"); - await sleep(1000); - leftButtonClick(); - await sleep(1000); - let recognizedOver = await performOcr("已",{ min: 1482, max: 1630 }, { min: 912, max: 957 }, false) - if (recognizedOver.length != 0) { - log.info("已售罄!!!"); - // await genshin.returnMainUi(); + //识别对话位置,并点击 + let ocrResults = await performOcr("神奇的", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(500); + await performOcr("如何才", dialogZone.x, dialogZone.y, false); + await sleep(500); + let ocrOver = await performOcr("已",{ min: 1482, max: 1630 }, { min: 912, max: 957 }, false); + if (ocrOver.success) { + log.info("已售罄!!!"); + } else { + let ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true); + if (ocrMora == "") { + await sleep(500); + ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true); + }; + if (BigInt(ocrMora.text) >= 300) { + await sleep(800); + await click(1636,1019); + await sleep(1000); + await click(1168,785); + await sleep(1000); } else { - let recognizedMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true) - if (BigInt(recognizedMora) >= 300) { - await sleep(800); - await click(1636,1019); - await sleep(1000); - await click(1168,785); - await sleep(1000); - } else { - log.info("不是哥们,你怎么比我还穷!!!"); - // await genshin.returnMainUi(); - }; + log.info("不是哥们,你怎么比我还穷!!!"); }; }; - // await genshin.returnMainUi(); - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); }; await genshin.returnMainUi(); + await fakeLog("蒙德清泉镇圣水", false, false, 0); }; - //璃月璃沙娇上香 - if (settings.sticks) { + // 璃月璃沙娇上香 + if (sticksTime) { + await fakeLog("璃月璃沙娇上香", false, true, 0); await genshin.returnMainUi(); + // 更新上香时间 + record.lastActivateTime = new Date(); + await recordForFile(false); await pathingScript.runFile("assets/璃月璃沙娇路线.json"); await sleep(1000); - //识别区域 - try { - //识别对话位置,并点击 - // let ocrResults = await performOcr("王平安", { min: 1058, max: 1551 }, { min: 394, max: 680 }, false); - let ocrResults = await performOcr("王平安", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { + // 识别区域 + let ocrResults = await performOcr("王平安", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + await genshin.chooseTalkOption("能给我几支香吗"); + await sleep(700); + leftButtonClick(); + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("敬香", dialogZone.x, dialogZone.y, false); + if(ocrResults1.success){ + await click(1168,785); await sleep(700); - await genshin.chooseTalkOption("能给我几支香吗"); - await sleep(700); - leftButtonClick(); - await sleep(700); - leftButtonClick(); - 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); - if(ocrResults1.length != 0){ - // await sleep(700); - await click(1168,785); - await sleep(700); - } else { - log.error(`未识别到对话`); - await genshin.returnMainUi(); - }; } else { - log.error(`识别图像时发生异常: ${error.message}`); + log.error("未识别到对话,可能角色移速太快加上有开盾打断识别了"); + await genshin.returnMainUi(); }; - } catch (error) { + } else { log.error(`识别图像时发生异常: ${error.message}`); }; await genshin.returnMainUi(); + await fakeLog("璃月璃沙娇上香", false, false, 0); }; - //稻妻鸣神大社抽签 + // 稻妻鸣神大社抽签 if (settings.lots) { - await fakeLog("执行抽签", false, true, 0) + await fakeLog("稻妻鸣神大社抽签", false, true, 0) await genshin.returnMainUi(); await pathingScript.runFile("assets/稻妻鸣神大社路线.json"); await sleep(1000); - //识别区域 - try { - //识别对话位置,并点击 - let ocrResults = await performOcr("御神签箱", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { - await sleep(700); - leftButtonClick(); + // 识别对话位置,并点击 + let ocrResults = await performOcr("御神签箱", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("求签吧", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { await sleep(2000); - let ocrResults1 = await performOcr("求签吧", dialogZone.x, dialogZone.y, false); - if (ocrResults1.length != 0) { - await sleep(2000); - leftButtonClick(); - await sleep(4000); - leftButtonClick(); - await sleep(3500); - }; - let ocrResults2 = await performOcr("玄冬林", dialogZone.x, dialogZone.y, false); - if (ocrResults2.length != 0) { - await sleep(1000); - leftButtonClick(); + leftButtonClick(); + await sleep(4000); + leftButtonClick(); + await sleep(3500); + }; + let ocrResults2 = await performOcr("玄冬林", dialogZone.x, dialogZone.y, false); + let results = ""; + if (ocrResults2.success) { + await sleep(1000); + leftButtonClick(); + await sleep(700); + let ocrResults3 = await performOcr("我要", dialogZone.x, dialogZone.y, false); + if (ocrResults3.success) { await sleep(700); - let ocrResults3 = await performOcr("我要", dialogZone.x, dialogZone.y, false); - if (ocrResults3.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(); - //打开背包找签 - await keyPress("B"); - await sleep(1000); - await click(1150,50); - await sleep(700); - for(let scroll = 0; scroll <= 22; scroll++){ - //识别御神签 - let img = await findImgIcon("assets/RecognitionObject/YuShenQianHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true) - if (img.length != 0) { - break; - }; - //判断是否到底 - let img1 = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false) - if (img1.length != 0) { + 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(); + // 打开背包找签 + await keyPress("B"); + await checkExpire(); + await sleep(1000); + await click(1150,50); + await sleep(700); + for(let scroll = 0; scroll <= 22; scroll++){ + // 识别御神签 + let yuShenQian = await findImgIcon("assets/RecognitionObject/YuShenQianHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + if (yuShenQian.success) { + break; + }; + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { log.info("已到达最后一页!"); break; }; - //滑动背包 - await scrollPage(680, 10, 5); - await sleep(100); }; - await sleep(2000); - await click(1670,1025); - await sleep(2500); - // 通过图片识别 - // 大凶or凶 - let img2 = await findImgIcon("assets/RecognitionObject/BigBad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - let img3 = await findImgIcon("assets/RecognitionObject/Bad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - // 大吉、中吉、吉、末吉 - let img4 = await findImgIcon("assets/RecognitionObject/BigLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - let img5 = await findImgIcon("assets/RecognitionObject/MidLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - let img6 = await findImgIcon("assets/RecognitionObject/EndLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - let img7 = await findImgIcon("assets/RecognitionObject/Luck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); - await genshin.returnMainUi(); - if (img2.length !== 0) { - log.info("抽签的结果:大凶"); - writeContentToFile(`抽签的结果:大凶\n`, false); - await pathingScript.runFile("assets/挂签路线.json"); - await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); - await genshin.chooseTalkOption("挂起来吧"); - await sleep(700); - await click(111,184); - await sleep(1000); - await click(1250,817); - await sleep(1000); - await click(1603,1013); - await sleep(1500); - await genshin.returnMainUi(); - log.info("事事顺利"); - } else if (img3.length !== 0) { - log.info("抽签的结果:凶"); - writeContentToFile(`抽签的结果:凶\n`, false); - await pathingScript.runFile("assets/挂签路线.json"); - await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); - await sleep(700); - await genshin.chooseTalkOption("挂起来吧"); - await click(111,184); - await sleep(1000); - await click(1250,817); - await sleep(1000); - await click(1603,1013); - await sleep(1500); - await genshin.returnMainUi(); - log.info("事事顺利"); - } else if (img4.length !== 0) { - log.info("抽签的结果:大吉"); - writeContentToFile(`抽签的结果:大吉\n`, false); - } else if (img5.length !== 0) { - log.info("抽签的结果:中吉"); - writeContentToFile(`抽签的结果:中吉\n`, false); - } else if (img6.length !== 0) { - log.info("抽签的结果:末吉"); - writeContentToFile(`抽签的结果:末吉\n`, false); - } else if (img7.length !== 0) { - log.info("抽签的结果:吉"); - writeContentToFile(`抽签的结果:吉\n`, false); - } else { - log.warn("嘘,快踢作者屁股,修bug!!!"); - - }; - } else { + //滑动背包 + await scrollPage(680, 10, 5); + await sleep(100); + }; + await sleep(2000); + await click(1670,1025); + await sleep(3000); + // 通过图片识别 + // 大凶or凶 + let bigBad = await findImgIcon("assets/RecognitionObject/BigBad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let bad = await findImgIcon("assets/RecognitionObject/Bad.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + // 大吉、中吉、吉、末吉 + let bigLuck = await findImgIcon("assets/RecognitionObject/BigLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let midLuck = await findImgIcon("assets/RecognitionObject/MidLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let endLuck = await findImgIcon("assets/RecognitionObject/EndLuck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + let luck = await findImgIcon("assets/RecognitionObject/Luck.png", { min: 630, max: 830 }, { min: 100, max: 160 }, false); + await genshin.returnMainUi(); + if (bigBad.success) { + log.info("抽签的结果:大凶"); + results = "大凶"; + await pathingScript.runFile("assets/挂签路线.json"); + await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); + await genshin.chooseTalkOption("挂起来吧"); await sleep(700); - await genshin.chooseTalkOption("再见"); - await sleep(700); - leftButtonClick(); - await sleep(1500); - log.info("对话出现再见,默认解签完毕以及查看签操作!!!"); - }; - }; - } else { - log.error(`识别图像时发生异常: ${error.message}`); - // await genshin.returnMainUi(); - } - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - }; - await fakeLog("好运前进", false, true, 0) - await genshin.returnMainUi(); - - }; - - //稻妻踏鞴砂海螺 - if (settings.conchs) { - await genshin.returnMainUi(); - await pathingScript.runFile("assets/稻妻踏鞴砂路线.json"); - await sleep(700); - 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); - 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); @@ -550,228 +691,393 @@ async function fakeLog(name, isJs, isStart, duration) { 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 { - log.info("你开过了?look my eyes,回答我!!!"); - await genshin.chooseTalkOption("再见"); + log.info("事事顺利"); + } else if (bad.success) { + log.info("抽签的结果:凶"); + results = "凶"; + await pathingScript.runFile("assets/挂签路线.json"); + await performOcr("御签挂", { min: 900, max: 1700 }, { min: 380, max: 880 }, false); await sleep(700); - leftButtonClick(); + await genshin.chooseTalkOption("挂起来吧"); + await click(111,184); + await sleep(1000); + await click(1250,817); + await sleep(1000); + await click(1603,1013); await sleep(1500); - }; + await genshin.returnMainUi(); + log.info("事事顺利"); + } else if (bigLuck.success) { + log.info("抽签的结果:大吉"); + results = "大吉"; + } else if (midLuck.success) { + log.info("抽签的结果:中吉"); + results = "中吉"; + } else if (endLuck.success) { + log.info("抽签的结果:末吉"); + results = "末吉"; + } else if (luck.success) { + log.info("抽签的结果:吉"); + results = "吉"; + } else { + log.warn("嘘,快踢作者屁股,修bug!!!"); + }; } else { - log.error(`识别图像时发生异常: ${error.message}`); - // await genshin.returnMainUi(); - }; - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - }; - }; - await genshin.returnMainUi(); - }; - - //枫丹梅洛彼得堡领取福利餐 - if(settings.meal){ - await genshin.returnMainUi(); - await pathingScript.runFile("assets/枫丹梅洛彼得堡路线.json"); - await sleep(700); - 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){ - log.info("对话出现没什么,默认领取和使用过!!!"); - } else{ - await genshin.chooseTalkOption("给我一份福利餐"); - await sleep(1000); - leftButtonClick(); - await sleep(1000); + await sleep(700); + await genshin.chooseTalkOption("再见"); + await sleep(700); leftButtonClick(); await sleep(1500); - //打开背包找签 - log.info("打开背包"); - await keyPress("B"); - await sleep(1000); - await click(1250,50); - await sleep(1000); - for(let scroll = 0; scroll <= 10; scroll++){ - let img = await findImgIcon("assets/RecognitionObject/WelffareMealHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true) - if (img.length != 0) { - break; - } - //滑动背包 - await sleep(1000); - await scrollPage(680, 10, 5); - await sleep(1000); - }; - //这里是点击使用 - await sleep(1000); - await click(1670,1025); - await sleep(2000); - //识别获得的食物名称 - let recognizedText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true); - log.info(`获得:${recognizedText}`); - //点击幸运签,并识别内容 - await sleep(1000); - await click(1000,520); - await sleep(2000); - let recognizedText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true); - log.info(`幸运签内容:${recognizedText1}`); - writeContentToFile(`获得的食物:${recognizedText}\n幸运签内容:${recognizedText1}\n`, false); - }; + log.info("对话出现再见,默认解签完毕以及查看签操作!!!"); + }; - } else { - log.error(`识别图像时发生异常: ${error.message}`); - // await genshin.returnMainUi(); + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `抽签的结果: ${results}`; + if (settings.notify) { + notification.Send(`抽签的结果: ${results}`); + } + await recordForFile(false);//修改记录文件 }; - } catch (error) { + } else { log.error(`识别图像时发生异常: ${error.message}`); + // await genshin.returnMainUi(); }; await genshin.returnMainUi(); + await fakeLog("稻妻鸣神大社抽签", false, true, 0) }; - //纳塔悠悠集市 - if(settings.eggs){ + // 稻妻踏鞴砂海螺 + if (settings.conchs) { + await fakeLog("稻妻踏鞴砂海螺", false, true, 0) await genshin.returnMainUi(); - await pathingScript.runFile("assets/纳塔悠悠集市路线.json"); + await pathingScript.runFile("assets/稻妻踏鞴砂路线.json"); await sleep(1000); - try { - let ocrResults = await performOcr("察尔瓦", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { - await sleep(700); - leftButtonClick(); - await sleep(2000); - let ocrResults1 = await performOcr("让我挑一枚", dialogZone.x, dialogZone.y, false); - if (ocrResults1 != 0) { - await sleep(5000); - let figure = 0; - //六龙蛋位置 - let coordinates = [ - [551, 153], - [881, 341], - [1087, 161], - [1342, 357], - [472, 572], - [572, 721] - ]; - switch (settings.pickupDragonEgg) { - case "闪闪礼蛋·山之血": - figure = 1; - writeContentToFile("获得的龙蛋:闪闪礼蛋·山之血\n", false); - break; - case "闪闪礼蛋·太阳的轰鸣": - figure = 2; - writeContentToFile("获得的龙蛋:闪闪礼蛋·太阳的轰鸣\n", false); - break; - case "闪闪礼蛋·圣龙君临": - writeContentToFile("获得的龙蛋:闪闪礼蛋·圣龙君临\n", false); - figure = 3; - break; - case "闪闪礼蛋·菲耶蒂娜": - writeContentToFile("获得的龙蛋:闪闪礼蛋·菲耶蒂娜\n", false); - figure = 4; - break; - case "闪闪礼蛋·献给小酒杯": - writeContentToFile("获得的龙蛋:闪闪礼蛋·献给小酒杯\n", false); - figure = 5; - break; - case "闪闪礼蛋·飞澜鲨鲨": - writeContentToFile("获得的龙蛋:闪闪礼蛋·飞澜鲨鲨\n", false); - figure = 6; - break; - default: - figure = Math.floor(Math.random() * 6) + 1; - log.info(`随机到第${figure}个蛋`); - switch (figure) { - case 1: - writeContentToFile("获得的龙蛋:闪闪礼蛋·山之血\n", false); - break; - case 2: - writeContentToFile("获得的龙蛋:闪闪礼蛋·太阳的轰鸣\n", false); - break; - case 3: - writeContentToFile("获得的龙蛋:闪闪礼蛋·圣龙君临\n", false); - break; - case 4: - writeContentToFile("获得的龙蛋:闪闪礼蛋·菲耶蒂娜\n", false); - break; - case 5: - writeContentToFile("获得的龙蛋:闪闪礼蛋·献给小酒杯\n", false); - break; - default: - writeContentToFile("获得的龙蛋:闪闪礼蛋·飞澜鲨鲨\n", false); - break; - }; - break; - }; - moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); - await sleep(100); + if (settings.doYouOpen) { + await pathingScript.runFile("assets/阿敬.json"); + let figure = parseInt(settings.pickupTreasure); + let ocrResults = await performOcr("阿敬", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(1000); + let ocrResults1 = await performOcr("想要", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(700); leftButtonClick(); - await sleep(3000); + 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 { - log.info("你今天已经领取过了"); + log.info("你开过了?look my eyes,回答我!!!"); + await genshin.chooseTalkOption("再见"); + await sleep(700); + leftButtonClick(); + await sleep(1500); }; } else { log.error(`识别图像时发生异常: ${error.message}`); }; - } catch (error) { + }; + await genshin.returnMainUi(); + await fakeLog("稻妻踏鞴砂海螺", false, false, 0) + }; + + //枫丹梅洛彼得堡福利餐 + if(settings.meal){ + await fakeLog("枫丹梅洛彼得堡福利餐", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/枫丹梅洛彼得堡路线.json"); + await sleep(1000); + let ocrResults = await performOcr("布兰", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + // await sleep(500); + let ocrResults1 = await performOcr("没什么", dialogZone.x, dialogZone.y, false); + if(ocrResults1.success){ + log.info("对话出现没什么,默认领取和使用过!!!"); + } else{ + // await genshin.chooseTalkOption("给我一份福利餐"); + await performOcr("给我一份福利餐", dialogZone.x, dialogZone.y, false); + await sleep(1000); + leftButtonClick(); + await sleep(1000); + leftButtonClick(); + await sleep(1500); + //打开背包找签 + log.info("打开背包"); + await keyPress("B"); + await checkExpire(); + await sleep(1500); + await click(1250,50); + await sleep(700); + for(let scroll = 0; scroll <= 10; scroll++){ + let welffareMeal = await findImgIcon("assets/RecognitionObject/WelffareMealHalf.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + if (welffareMeal.success) { + break; + } + //滑动背包 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + //这里是点击使用 + await sleep(1000); + await click(1670,1025); + await sleep(3000); + //识别获得的食物名称 + let ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true); + }; + log.info(`获得:${ocrText.text}`); + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `获得的食物: ${ocrText.text}`; + if (settings.notify) { + notification.Send(`获得的食物: ${ocrText.text}`); + }; + await recordForFile(false);// 修改记录文件 + + //点击幸运签,并识别内容 + await sleep(1000); + await click(1000,520); + await sleep(3000); + let ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true); + }; + let text = ocrText1.text.replace(/\r\n|\n|\r/g, ""); + + log.info(`幸运签内容:${text}`); + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `幸运签内容: ${text}`; + if (settings.notify) { + notification.Send(`幸运签内容: ${text}`); + } + await recordForFile(false);// 修改记录文件 + + }; + + } else { log.error(`识别图像时发生异常: ${error.message}`); }; await genshin.returnMainUi(); + await fakeLog("枫丹梅洛彼得堡福利餐", false, false, 0) + }; + + // 纳塔悠悠集市龙蛋 + if(settings.eggs){ + let nowDragonEggsNum = record.lastDragonEggsNum; + if (record.lastDragonEggsNum == "【山之血:0,太阳的轰鸣:0,圣龙君临:0,菲耶蒂娜:0,献给小酒杯:0,飞澜鲨鲨:0】" || settings.updateEggs) { + nowDragonEggsNum = await chcekDragonEggs(); + settings.updateEggs = "false"; + }; + let nowDragonEggs = nowDragonEggsNum.match(/\d+/g).map(Number); + await fakeLog("纳塔悠悠集市龙蛋", false, true, 0) + await genshin.returnMainUi(); + await pathingScript.runFile("assets/纳塔悠悠集市路线.json"); + let ocrResults = await performOcr("察尔瓦", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(700); + leftButtonClick(); + await sleep(2000); + let ocrResults1 = await performOcr("让我挑一枚", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(5000); + let figure = 0; + if (settings.selectDragonEggModel == "随机模式") { + figure = Math.floor((Math.random() + Date.now() % 1) * 6); + } else if (settings.selectDragonEggModel == "指定模式") { + switch (settings.pickupDragonEgg) { + case "闪闪礼蛋·山之血": + figure = 0; + break; + case "闪闪礼蛋·太阳的轰鸣": + figure = 1; + break; + case "闪闪礼蛋·圣龙君临": + figure = 2; + break; + case "闪闪礼蛋·菲耶蒂娜": + figure = 3; + break; + case "闪闪礼蛋·献给小酒杯": + figure = 4; + break; + case "闪闪礼蛋·飞澜鲨鲨": + figure = 5; + break; + default: + log.warn("嘘,快踢作者屁股,修bug!!!"); + break; + }; + }else { + const now = new Date(); + const weekNumber = now.getDay() + if (nowDragonEggs.every(num => num === nowDragonEggs[0])) { + // 所有元素相同时,按星期规则处理 + if (weekNumber === 0) { // 周日:随机一个元素+1 + figure = Math.floor(Math.random() * 6); + nowDragonEggs[figure]++; + } else { // 周一到周六:第n个元素 +n(1-6) + const index = weekNumber - 1; // 周一对应索引0,...,周六对应索引5 + nowDragonEggs[index] += weekNumber; + }; + } else { + // 元素不同时:给低于平均数且最小的元素+1,直到趋于平均 + const sum = nowDragonEggs.reduce((a, b) => a + b, 0); + const avg = sum / 6; + // 筛选低于平均数的元素 + const belowAvg = nowDragonEggs.map((num, i) => ({ num, i })).filter(item => item.num < avg); + + if (belowAvg.length > 0) { + // 找到低于平均数中的最小值 + const minVal = Math.min(...belowAvg.map(item => item.num)); + // 筛选出等于最小值的元素索引 + const minIndices = belowAvg.filter(item => item.num === minVal).map(item => item.i); + figure = minIndices[0]; + // 给第一个最小值元素+1(若多个最小值,可改为随机选一个) + nowDragonEggs[minIndices[0]]++; + }; + }; + }; + + // 日志输出会去点击那个龙蛋 + switch (figure) { + case 0: + log.info("获得的龙蛋:闪闪礼蛋·山之血"); + break; + case 1: + log.info("获得的龙蛋:闪闪礼蛋·太阳的轰鸣"); + break; + case 2: + log.info("获得的龙蛋:闪闪礼蛋·圣龙君临"); + break; + case 3: + log.info("获得的龙蛋:闪闪礼蛋·菲耶蒂娜"); + break; + case 4: + log.info("获得的龙蛋:闪闪礼蛋·献给小酒杯"); + break; + case 5: + log.info("获得的龙蛋:闪闪礼蛋·飞澜鲨鲨"); + break; + default: + log.warn("嘘,快踢作者屁股,修bug!!!"); + break; + }; + + moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); + nowDragonEggs[figure]++; + if (settings.notify) { + notification.Send(`背包龙蛋数目: 【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`); + }; + // 更新记录 + record.lastDragonEggsNum = `【山之血:${nowDragonEggs[0]},太阳的轰鸣:${nowDragonEggs[1]},圣龙君临:${nowDragonEggs[2]},菲耶蒂娜:${nowDragonEggs[3]},献给小酒杯:${nowDragonEggs[4]},飞澜鲨鲨:${nowDragonEggs[5]}】`; + await recordForFile(false); + + moveMouseTo(coordinates[figure - 1][0],coordinates[figure - 1][1]); + + await sleep(100); + leftButtonClick(); + await sleep(3000); + } else { + log.info("你今天已经领取过了"); + }; + } else { + log.error(`识别图像时发生异常: ${error.message}`); + }; + + await genshin.returnMainUi(); + await fakeLog("纳塔悠悠集市龙蛋", false, false, 0) }; //挪德卡莱那夏镇好运转盘 if (settings.turntable) { + await fakeLog("挪德卡莱那夏镇好运转盘", false, true, 0) await genshin.returnMainUi(); await pathingScript.runFile("assets/挪德卡莱那夏镇好运转盘路线.json"); - await sleep(700); - try { - let ocrResults = await performOcr("好运速转", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { - await sleep(3000); - leftButtonClick(); - await sleep(1000); - let ocrResults1 = await performOcr("拨动转盘", dialogZone.x, dialogZone.y, false); - if (ocrResults1 != 0) { - await sleep(6000); - let recognizedText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true); - log.info(`转盘运势:${recognizedText}`); - writeContentToFile(`转盘运势:${recognizedText}\n`, false); - await sleep(2000); - leftButtonClick(); - await sleep(700); - } else { - log.error(`识别图像时发生异常: ${error.message}`); + await sleep(1000); + let ocrResults = await performOcr("好运速转", dialogZone.x, dialogZone.y, false); + if (ocrResults.success) { + await sleep(3000); + leftButtonClick(); + await sleep(1000); + let ocrResults1 = await performOcr("拨动转盘", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(6000); + let ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true); + if (ocrText.text == "") { + await sleep(500); + ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true); }; + log.info(`转盘运势:${ocrText.text}`); + // writeContentToFile(`转盘的运势:${recognizedText}\n`, false); + let text = ocrText.text.replace(/\r\n|\n|\r/g, ""); + + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `转盘的运势: ${text}`; + if (settings.notify) { + notification.Send(`转盘的运势: ${text}`); + } + await recordForFile(false);// 修改记录文件 + + await sleep(2000); + leftButtonClick(); + await sleep(700); } else { log.error(`识别图像时发生异常: ${error.message}`); }; - } catch (error) { + } else { log.error(`识别图像时发生异常: ${error.message}`); - }; + }; await genshin.returnMainUi(); + await fakeLog("挪德卡莱那夏镇好运转盘", false, false, 0) }; - //挪德卡莱那夏今日收获 + // 挪德卡莱那夏镇今日收获 if (settings.todayLuck) { + await fakeLog("挪德卡莱那夏镇美味的今日收获", false, true, 0) await genshin.returnMainUi(); await pathingScript.runFile("assets/挪德卡莱那夏镇美味的今日收获路线.json"); - await sleep(700); - try { + await sleep(1000); let ocrResults = await performOcr("莉莉希", dialogZone.x, dialogZone.y, false); - if (ocrResults.length != 0) { + if (ocrResults.success) { await sleep(700); leftButtonClick(); - await sleep(1500); let ocrResults1 = await performOcr("可以领", dialogZone.x, dialogZone.y, false); - if (ocrResults1 != 0) { + if (ocrResults1.success) { await sleep(700); leftButtonClick(); await sleep(1500); @@ -788,14 +1094,117 @@ async function fakeLog(name, isJs, isStart, duration) { } else { log.error(`识别图像时发生异常: ${error.message}`); }; - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - }; await genshin.returnMainUi(); + await fakeLog("挪德卡莱那夏镇美味的今日收获", false, false, 0) }; - //输出日期 - writeContentToFile("", true); + // 挪德卡莱那夏镇糖雕 + if (settings.sweetStatue) { + await fakeLog("挪德卡莱那夏镇糖雕", false, true, 0) + await pathingScript.runFile("assets/挪德卡莱那夏镇糖雕路线.json"); + await sleep(1000); + if (settings.partyName == "") { + let ocrResults = await performOcr("乌娜亚塔", dialogZone.x, dialogZone.y, false); + // log.info(`识别的东西${ocrResults.text}`); + if (ocrResults.success) { + await sleep(700); + await performOcr("来一份", dialogZone.x, dialogZone.y, false); + await clickLongTalk(); + // 打开背包找糖 + await keyPress("B"); + await checkExpire(); + await sleep(1000); + await click(864,52); + await sleep(800); + for(let scroll = 0; scroll <= 10; scroll++){ + let welffareMeal = await findImgIcon("assets/RecognitionObject/sugar.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + if (welffareMeal.success) { + break; + } + //滑动背包 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + //这里是点击使用 + await sleep(1000); + await click(1670,1025); + await sleep(700); + await click(1145, 765); + await sleep(700); + let ocrResults1 = await performOcr("是否", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(800); + await click(1012, 765); + await click(1012, 765); + }; + }; + } else { + await switchPartyIfNeeded(); // 切换队伍 + let ocrResults = await performOcr("乌娜亚塔", dialogZone.x, dialogZone.y, false); + log.info(`识别的东西${ocrResults.text}`); + if (ocrResults.success) { + await sleep(700); + await performOcr(settings.selectGiveWho, dialogZone.x, dialogZone.y, false); + await clickLongTalk(); + // 打开背包找糖 + await keyPress("B"); + await checkExpire(); + await sleep(1000); + await click(864,52); + await sleep(800); + for(let scroll = 0; scroll <= 10; scroll++){ + let welffareMeal = await findImgIcon("assets/RecognitionObject/sugar.png", { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + if (welffareMeal.success) { + break; + } + //滑动背包 + await sleep(1000); + await scrollPage(680, 10, 5); + await sleep(1000); + if ( scroll != 0) { + // 判断是否到底 + let sliderBottom = await findImgIcon("assets/RecognitionObject/SliderBottom.png", { min: 1284, max: 1293 }, { min: 916, max: 942 }, false); + if (sliderBottom.success) { + log.info("已到达最后一页!"); + break; + }; + }; + }; + //这里是点击使用 + await sleep(1000); + await click(1670,1025); + await sleep(700); + await findImgIcon(`assets/RecognitionObject/${settings.selectGiveWho}.png`, { min: 99, max: 1295 }, { min: 104, max: 967 }, true); + await sleep(700); + await click(1145, 765); + await sleep(700); + let ocrResults1 = await performOcr("是否", dialogZone.x, dialogZone.y, false); + if (ocrResults1.success) { + await sleep(800); + await click(1012, 765); + await click(1012, 765); + }; + }; + }; + await genshin.returnMainUi(); + await fakeLog("挪德卡莱那夏镇糖雕", false, false, 0) + }; + + for (let i = record.records.length - 1; i > 0; i--) { + record.records[i] = record.records[i - 1]; + } + record.records[0] = `>>>>>>>>>> ${new Date().getFullYear()}年${String(new Date().getMonth() + 1).padStart(2, '0')}月${String(new Date().getDate()).padStart(2, '0')}日`; + await recordForFile(false);// 修改记录文件 + 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 4a1d8fd29..1e731a882 100644 --- a/repo/js/AutoPickLitter/manifest.json +++ b/repo/js/AutoPickLitter/manifest.json @@ -1,13 +1,16 @@ { "manifest_version": 1, "name": "提瓦特杂事(收集)", - "version": "1.2.0", + "version": "2.0", "tags": [ "玄学", "收集", "成就" ], "description": "买圣水、抽签、海螺、上香、领福利餐、领闪闪礼蛋、好运转盘、今日收获", + "saved_files": [ + "records/*.txt" + ], "authors": [ { "name": "古又", diff --git a/repo/js/AutoPickLitter/records/默认账户.txt b/repo/js/AutoPickLitter/records/默认账户.txt index 8b1378917..de233a35a 100644 --- a/repo/js/AutoPickLitter/records/默认账户.txt +++ b/repo/js/AutoPickLitter/records/默认账户.txt @@ -1 +1,54 @@ - +上次运行日期: 2025/10/29 +上次上香时间: 2025-10-20T09:34:33.877Z +背包龙蛋数目: 【山之血:1,太阳的轰鸣:2,圣龙君临:1,菲耶蒂娜:1,献给小酒杯:0,飞澜鲨鲨:0】 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +>>>>>>>>>> 2025年10月20日 +幸运签内容: 「生活不是游戏。」 +获得的食物: 美味的薄荷果冻 +>>>>>>>>>> 2025年10月20日 +转盘的运势: 『『层云蔽月,大地沉睡。』就是现在不是好时机,条件还没有凌齐的意思。」 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月19日 +>>>>>>>>>> 2025年10月18日 +>>>>>>>>>> 2025年10月18日 +转盘的运势: 「『晨露凝珠,浆果丰盛。』就是今天会有收获的意思!」 +>>>>>>>>>> 2025年10月18日 +幸运签内容: 「别寻找什么捷径了,说不定去捷径的路现在都已站满了人。」 +获得的食物: 香烤肋排 +>>>>>>>>>> 2025年10月18日 +抽签的结果: 大吉 +>>>>>>>>>> 2025年10月18日 +幸运签内容: 「再来一份!(开玩笑的)」 +获得的食物: 塔塞斯杂烩 +获得的食物: undefined +>>>>>>>>>> 2025年10月11日 +转盘的运势: 「『旭日瞳瞳,驱散迷雾。』就是遇到困难也没关系,一定会得到帮助的意思!」 +幸运签内容: 「当你觉得现状够糟时要保持警惕,因为事态往往还能变得更糟。」 +获得的食物: 美味的咖啡芭芭露 +抽签的结果: 吉 +>>>>>>>>>> sa +抽签的结果: 中吉 +转盘的运势: 「『海蛇翻腾,风暴肆虐。』就是不管做什么都会遇到阻碍的意思。」 +幸运签内容: 「一时的好运只能带来片刻的满足,终身的幸福还得靠勤奋上进。」 +获得的食物: 奇怪的肉酱千层面 +抽签的结果: 大凶 +抽签的结果: 撒不变 +幸运签内容: 按时毕业 \ No newline at end of file diff --git a/repo/js/AutoPickLitter/settings.json b/repo/js/AutoPickLitter/settings.json index bb030995a..bd9f98348 100644 --- a/repo/js/AutoPickLitter/settings.json +++ b/repo/js/AutoPickLitter/settings.json @@ -2,22 +2,22 @@ { "name": "water", "type": "checkbox", - "label": " 按自身情况选择相关内容 \n\n-----------------蒙德清泉镇圣水---------------" + "label": " 按自身情况选择相关内容 \n有打开背包的操作,运行前将世界权限设为【不允许加入】\n\n-----------------蒙德清泉镇圣水---------------" }, { "name": "sticks", "type": "checkbox", - "label": "-----------------璃月铜雀庙上香---------------\n注意:请完成相关系列任务" + "label": "\n-----------------璃月铜雀庙上香---------------\n注意:请完成相关系列任务" }, { "name": "lots", "type": "checkbox", - "label": "---------------稻妻鸣神大社抽签---------------\n注意:勾选前,请去看readme" + "label": "\n---------------稻妻鸣神大社抽签---------------\n注意:勾选前,请去看readme" }, { "name": "conchs", "type": "checkbox", - "label": "---------------稻妻踏鞴砂海螺---------------\n注意:勾选前,请去看readme" + "label": "\n----------------稻妻踏鞴砂海螺----------------\n注意:勾选前,请去看readme" }, { "name": "doYouOpen", @@ -28,7 +28,7 @@ { "name": "pickupTreasure", "type": "select", - "label": "开启宝箱或随机(1:左面 2:中间 3:右边 0:随机)", + "label": "开启宝箱或随机(1:左面 2:中间 3:右边 0:随机 默认0)", "options": [ "1", "2", "3", "0" ], @@ -37,42 +37,82 @@ { "name": "meal", "type": "checkbox", - "label": "-------------枫丹梅洛彼得堡福利餐-------------\n注意:开图啊,喂!!!" + "label": "\n-------------枫丹梅洛彼得堡福利餐-------------\n注意:开图啊,喂!!!" }, { "name": "eggs", "type": "checkbox", - "label": "-------------纳塔悠悠集市闪闪龙蛋-------------\n注意:开图啊,喂!!!" + "label": "\n-------------纳塔悠悠集市闪闪龙蛋-------------\n注意:开图啊,喂!!!" + }, + { + "name": "selectDragonEggModel", + "type": "select", + "label": "随机模式、平均模式或者指定模式(默认是随机模式)", + "options": [ + "随机模式", + "平均模式", + "指定模式" + ], + "default": "随机模式" }, { "name": "pickupDragonEgg", "type": "select", - "label": "挑选你喜欢的龙蛋或随机", + "label": "指定模式:选择你喜欢的龙蛋", "options": [ "闪闪礼蛋·山之血", "闪闪礼蛋·太阳的轰鸣", "闪闪礼蛋·圣龙君临", "闪闪礼蛋·菲耶蒂娜", "闪闪礼蛋·献给小酒杯", - "闪闪礼蛋·飞澜鲨鲨", - "随机龙蛋" - ], - "default": "随机龙蛋" + "闪闪礼蛋·飞澜鲨鲨" + ] + }, + { + "name": "updateEggs", + "type": "checkbox", + "label": "是否更新背包各龙蛋数目(默认否)", + "default": "false" }, { "name": "turntable", "type": "checkbox", - "label": "-------------挪德卡莱那夏镇好运转盘-------------\n注意:开图啊,喂!!!" + "label": "\n-------------挪德卡莱那夏镇好运转盘------------\n注意:开图啊,喂!!!" }, { "name": "todayLuck", "type": "checkbox", - "label": "-------------挪德卡莱那夏镇今日收获-------------\n注意:开图,并且完成【餐食大事】的任务!!!" + "label": "\n-------------挪德卡莱那夏镇今日收获------------\n注意:开图,并且完成【餐食大事】的任务!!!" }, { - "name": "accountName", + "name": "sweetStatue", + "type": "checkbox", + "label": "\n---------------挪德卡莱那夏镇糖雕--------------\n注意:开图啊,喂!!!" + }, + { + "name": "partyName", "type": "input-text", - "label": "账户名称\n用于多用户运行时区分不同账户\n单用户无需修改", - "default": "默认账户" + "label": "切换队伍名称\n如果你想领取专属糖雕请正确输入包含专属角色的队伍名称\n未输入队伍名称则领取普通糖雕" + }, + { + "name": "selectGiveWho", + "type": "select", + "label": "请选择领取的专属糖雕(领取的专属糖雕会默认给专属角色吃)", + "options": [ + "伊涅芙", + "爱诺", + "拉乌玛", + "菲林斯", + "奈芙尔", + "" + // "雅珂达(别选择我!!!)" + ], + "default": "" + }, + { + "name": "accountName", + "type": "input-text", + "label": "-----------------账户名称-------------------\n用于多用户运行时区分不同账户\n单用户无需修改", + "default": "默认账户" } ] \ No newline at end of file diff --git a/repo/js/AutoPickLitter/稻妻鸣神大社路线.json b/repo/js/AutoPickLitter/稻妻鸣神大社路线.json deleted file mode 100644 index 3e0c8ec79..000000000 --- a/repo/js/AutoPickLitter/稻妻鸣神大社路线.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "info": { - "authors": [ - { - "links": "", - "name": "古又" - } - ], - "bgi_version": "0.45.0", - "description": "修改传送", - "enable_monster_loot_split": false, - "last_modified_time": 1757938479689, - "map_match_method": "", - "map_name": "Teyvat", - "name": "稻妻鸣神大社路线", - "tags": [], - "type": "collect", - "version": "2.0" - }, - "positions": [ - { - "action": "force_tp", - "action_params": "", - "id": 1, - "move_mode": "walk", - "type": "teleport", - "x": -4371.146484375, - "y": -2506.767578125 - }, - { - "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 - }, - { - "action": "", - "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