diff --git a/repo/js/AutoArtifactsPro/README.md b/repo/js/AutoArtifactsPro/README.md index a10af077d..68d209162 100644 --- a/repo/js/AutoArtifactsPro/README.md +++ b/repo/js/AutoArtifactsPro/README.md @@ -16,17 +16,49 @@ 使用即表示您已阅读并同意上述条款。 -**Last Updated:** 2025-06-26 - --- +## 零、使用方法及配置 + +1. 将脚本添加至调度器。 +2. 右键点击脚本以修改 JS 自定义配置。 +- **卡时间模式** + - “盗宝团/愚人众/鳄鱼兽肉好感”:均为做好感任务获取收益,等昨天的调查点CD结束。 + - “干等卡时间”:原地发呆,等昨天的调查点CD结束。 + - “不卡时间AB交替运行”:立刻富A富B交替运行,不需要等24小时CD,但是2条路线要等12小时CD。 +- **是否启用激活路线**:启用后将花费一段时间先四处传送激活狗粮调查点,可以用于缩短间隔(提高A线比例,从而提高总收益)/降低因为后续路线卡死导致运行时间波动引起第二天狗粮点位未刷新/启用后当日运行完激活路线后跑狗粮过程中如果卡死可以当日直接重跑,不会导致少跑a线。 +- **使用老abe路线**:勾选后将替换为使用老abe的路线,收益会下降。 +- **好感任务最低运行次数**:填写0~50次(上限),前10次收益最高。捡完狗粮会回来打完未完成的次数。 +- **账户名称**:**单账号无需更改。** 多账号使用时建多个配置组,一个账号使用一个配置组,填入游戏账号名称(自己取名),就可以按各自名称记录运行信息。 +- **好感队名称**:改成自己刷好感的队伍名字,该队伍也将用于清理狗粮路线上的小怪,**需要自行匹配战斗策略。** +- **狗粮队名称**:改成自己捡狗粮的队伍名字。建议使用迪西雅或e启动奶妈作为行走位,如果需要配置生存位,建议与行走位相同。建议携带:迪西雅(耐肘王,提供移速加成),万叶(路线中有配置万叶吸取狗粮,可提高拾取率) +- **最短时间间隔**:比昨天延后(默认)5分钟开始捡狗粮。如果启用了激活路线,可以降低至1-2分钟。 +- **卡时间时间段**:在此时间段内,会每天延后1次时间间隔来跑富A路线。若时间超出则立刻运行富B路线,第二天则会回到。 +3. 一定要正确设置好感队和狗粮队的名称。 +4. 根据好感队角色配置,调整战斗超时设置。 + +## 注意事项 + +1. 对于运行时间和路线的记录依赖本地文件的读写,直接更新js会导致丢失记录影响收益,建议更新js前先备份js文件夹中的records文件夹,更新后覆盖。 +2. 路线和abe略有差异,第一次运行时收益下降是正常现象,第二天即可恢复正常,或者第一次在晚于前一天运行abe的时间开始运行本js也可解决。 +3. 狗粮路线出现卡死、跳崖等问题请找 @汐 ,盗宝团好感部分出现问题请找 @秋云。 +4. 默认配置下将在4:05-4:45卡时间,如果你常用的启动时间不在这个时间段,请在js自定义配置中调节,建议总时长不超过40分钟,否则会在盗宝团等好感全部运行结束都不能等到时间的话会开始干等。 +5. 务必在js自定义配置中填写合适的狗粮队伍与好感队伍名称,运行过程中会自动切换,要求正确配置生存位,行走位,战斗策略(用于好感战斗)等。同时要确保在配置组中启用“允许在JsScript中使用”和“覆盖JS中的自动战斗配置”。 +6. 还在测试中可能存在bug,bug反馈和建议可以在频道中提问,或联系相关作者。 +7. 本脚本不支持断点续跑,如果你需要相关功能,说明你不适合使用本脚本,请移步abe。 +8. 清怪和激活时不会拾取,属于正常现象。 + +## 联系方式 + +1. 如有任何问题或建议,请在bgi频道中反映。 + ## 一、调查点类型收益 -| 类型 | 等效1星圣遗物 | 平均经验值 | 平均摩拉 | 计算公式 | -|------|--------------|------------|----------|----------| -| 穷点 | 1.35个 | 567 EXP | 0 | 65%出1星(420EXP)+35%出2星(840EXP) | -| 富点 | 1.5个 | 630 EXP | 200 | 50%出1个1星(420EXP)/2个1星(840EXP) | +| 类型 | 等效1星圣遗物 | 平均经验值 | 平均摩拉 | 计算公式 | +| ---- | ------------- | ---------- | -------- | ---------------------------------- | +| 穷点 | 1.35个 | 567 EXP | 0 | 65%出1星(420EXP)+35%出2星(840EXP) | +| 富点 | 1.5个 | 630 EXP | 200 | 50%出1个1星(420EXP)/2个1星(840EXP) | ## 二、调查点机制与刷新CD @@ -45,12 +77,12 @@ ### 1. 主要路线参数 -| 路线名称 | 调查点 | 富点数量 | 穷点数量 | 总经验值 | 总摩拉 | 运行时间 | 98上限点 富% | -|----------|--------|----------|----------|----------|--------|----------|----------------| -| 富A路线 | 162 | 104 | 58 | 98,406 | 20,800 | 68分钟 | 98/98 (100%) | -| 富B路线 | 127 | 81 | 46 | 77,112 | 16,200 | 50分钟 | 81/98 (82.6%) | -| ABE A线 | 137 | 33 | 104 | 77,742 | 6,600 | 41分钟 | 27/98 (27.5%) | -| ABE B线 | 138 | 34 | 104 | 77,868 | 6,800 | 43分钟 | 33/98 (33.6%) | +| 路线名称 | 调查点 | 富点数量 | 穷点数量 | 总经验值 | 总摩拉 | 运行时间 | 98上限点 富% | +| -------- | ------ | -------- | -------- | -------- | ------ | -------- | ------------- | +| 富A路线 | 162 | 104 | 58 | 98,406 | 20,800 | 68分钟 | 98/98 (100%) | +| 富B路线 | 127 | 81 | 46 | 77,112 | 16,200 | 50分钟 | 81/98 (82.6%) | +| ABE A线 | 137 | 33 | 104 | 77,742 | 6,600 | 41分钟 | 27/98 (27.5%) | +| ABE B线 | 138 | 34 | 104 | 77,868 | 6,800 | 43分钟 | 33/98 (33.6%) | `富B富点%提升中` ### 2. 经验值计算公式 @@ -62,9 +94,8 @@ https://www.kdocs.cn/wo/sl/v13uXscL ## 四、路径结构 - **00TP**:提前加载触发CD倒计时,后续可自由安排时间拾取,避免“现用现触发”的等待问题,无需担心CD同步问题 - **00激活**:少数点位需要提前转变为发光点,不拾取调查点! - **00清怪**:部分优质富点有小怪镇守,清除以后才按路径顺序拾取,此时不拾取调查点! + **-1激活**:提前加载触发CD倒计时,后续可自由安排时间拾取,避免“现用现触发”的等待问题,无需担心CD同步问题 + **00准备**:部分优质富点有小怪镇守,清除以后才按路径顺序拾取,此时不拾取调查点!少数点位需要提前转变为发光点,不拾取调查点! **01普通**:至多98个调查点 **02收尾**:附近区域超出100以外的调查点 **03额外**:不受满上限影响消失,又叫超限点 @@ -102,15 +133,15 @@ https://www.kdocs.cn/wo/sl/v13uXscL ### 4. 收益对比表 -| 指标 | 富6A1B | 富1A1B | ABE1A1B | 富6A1B增长 | 富1A1B增长 | -|----------|--------|--------|---------|------------|------------| -| 周经验 | 667,548 | 614,313 | 544,677 | +122,871 (22.6%) | +69,636 (12.8%) | -| 周摩拉 | 141,000 | 129,500 | 46,900 | +94,100(200.6%) | +82,600(176.1%) | -| 周耗时 | 7.63h | 6.88h | 4.9h | +2.73h | +1.98h | +| 指标 | 富6A1B | 富1A1B | ABE1A1B | 富6A1B增长 | 富1A1B增长 | +| ------ | ------- | ------- | ------- | ---------------- | --------------- | +| 周经验 | 667,548 | 614,313 | 544,677 | +122,871 (22.6%) | +69,636 (12.8%) | +| 周摩拉 | 141,000 | 129,500 | 46,900 | +94,100(200.6%) | +82,600(176.1%) | +| 周耗时 | 7.63h | 6.88h | 4.9h | +2.73h | +1.98h | ## 六、队伍配置 -- **根据自己CPU配置选择合适的移速** +- **根据自己CPU配置选择合适的移速**:电脑性能较差以至于收益远不如及格线时,降低队伍移速(使用较矮小的体型,不使用双风,四风原典,迪西雅天赋等)。 - **行走位:优先迪希雅;或E启动奶** - **钟剑迪希雅**:耐肘王/白天6-18点移速+10%(路径内置调时间到白天,全程100%吃满天赋) - **万叶:建议携带,路径内配有E吸狗粮策略(不带不影响运行)** @@ -129,29 +160,10 @@ https://www.kdocs.cn/wo/sl/v13uXscL 1. **main.js**:负责核心业务逻辑,包括好感任务和狗粮路线的执行。 2. **manifest.json**:脚本配置文件,记录基本信息和设置。 3. **settings.json**:用户配置文件,用于设置好感队和狗粮队的名称、任务间隔等参数。 -4. **record.txt**:运行记录文件,用于存储运行信息。 +4. **records**:运行记录文件,用于存储运行信息。 -## 九、使用方法及配置 - -1. 将脚本添加至调度器。 -2. 右键点击脚本以修改 JS 自定义配置。 -- **卡时间模式** - - “盗宝团/愚人众/鳄鱼兽肉好感”:均为做好感任务获取收益,等昨天的调查点CD结束。 - - “干等卡时间”:原地发呆,等昨天的调查点CD结束。 - - “不卡时间AB交替运行”:立刻富A富B交替运行,不需要等24小时CD,但是2条路线要等12小时CD。 -- **默认使用新路线**: -- **好感任务最低运行次数**:填写0~50次(上限),前10次收益最高。捡完狗粮会回来打完未完成的次数。 -- **账户名称**:**不可为空!单账号无需更改。** 多账号:建多个配置组,一个账号使用一个配置组,填入游戏账号名称(自己取名),就可以按各自名称记录运行信息。 -- **好感队名称**:改成自己刷好感的队伍名字,**需要自行匹配战斗策略。** -- **狗粮队名称**:改成自己捡狗粮的队伍名字。 -- **最短时间间隔**:比昨天延后(默认)5分钟开始捡狗粮。 -- **卡时间时间段**:在此时间段内,会每天延后1次时间间隔来跑富A路线。若时间超出则立刻运行富B路线。 -3. 一定要正确设置好感队和狗粮队的名称。 -4. 根据好感队角色配置,调整战斗超时设置。 - - -## 十、功能特点 +## 九、功能特点 1. 完成好感任务。 2. 执行狗粮路线,自动计算时间并进行路线选择。 @@ -160,64 +172,49 @@ https://www.kdocs.cn/wo/sl/v13uXscL ## 更新日志 ### 1.4.9(2025.06.29) -1.优化了关于四星狗粮的处理 -2.添加"调查点提早触发倒计时机制" +1. 优化了关于四星狗粮的处理 +2. 添加"调查点提早触发倒计时机制" ### 1.4.8(2025.06.28) -1.替换掉富A 508号路径 +1. 替换掉富A 508号路径 ### 1.4.7(2025.06.26) -1.路径内置"时瞬06:00",带[迪希雅]天赋全程100%吃满 +1. 路径内置"时瞬06:00",带[迪希雅]天赋全程100%吃满 ### 1.4.6(2025.06.26) -1.对账户名内置默认项,避免因为default不生效产生报错 +1. 对账户名内置默认项,避免因为default不生效产生报错 ### 1.4.4(2025.06.24) -1.优化几处坐标精确度. +1. 优化几处坐标精确度. ### 1.4.4(2025.06.23) -1.优化部分点位万叶E的方向,避免位移方向误吃调查点 +1. 优化部分点位万叶E的方向,避免位移方向误吃调查点 ### 1.4.3(2025.06.23) -1.修复了添加老abe路线导致的程序无法正常运行 -2.优化了经验识别逻辑,运行前无狗粮时也能正确处理剩余经验 -3.添加了对于账户名等的默认配置和校验,减少用户乱填导致的出错可能 +1. 修复了添加老abe路线导致的程序无法正常运行 +2. 优化了经验识别逻辑,运行前无狗粮时也能正确处理剩余经验 +3. 添加了对于账户名等的默认配置和校验,减少用户乱填导致的出错可能 ### 1.4.1(2025.06.22) -1.维修部分路径卡死点位 -2.目标点已设置好强制行走位拾取,队伍可以带治疗位 +1. 维修部分路径卡死点位 +2. 目标点已设置好强制行走位拾取,队伍可以带治疗位 ### 1.4.0(2025.06.22) -1.添加了使用老abe路线的选项 +1. 添加了使用老abe路线的选项 ### 1.3.5(2025.06.22) -1.修复了对于四星狗粮数量的错误处理造成的统计结果中收益为负的问题 +1. 修复了对于四星狗粮数量的错误处理造成的统计结果中收益为负的问题 ### 1.3.4(2025.06.21) -1.优化了换队伍的逻辑 +1. 优化了换队伍的逻辑 ### 1.3.3(2025.06.21) -1.尝试修复好感战斗超时时程序异常终止的问题 +1. 尝试修复好感战斗超时时程序异常终止的问题 ### 1.23.4(2025.06.16) -1.增加了对于敌人类型的处理,避免报错 +1. 增加了对于敌人类型的处理,避免报错 ### 1.23.1(2025.06.14) -1.日志中加入路径名的信息 +1. 日志中加入路径名的信息 ### 1.23.0(2025.06.13) -1.settings中默认好感队伍为“好感”,默认狗粮队伍为“狗粮”,防止默认配置下出现问题 +1. settings中默认好感队伍为“好感”,默认狗粮队伍为“狗粮”,防止默认配置下出现问题 ### 1.21(2025.06.09) 1. 修改盗宝团触发路线,减少摩拉丢失 -2.优化ocr模块,现在识别失败时会尝试点击中心位置 -3.优化流程,现在只有当用户勾选了不分解四星时才会两次快速选择,可以节约约5秒 -4.修改自定义配置,现在可以输入最低好感运行次数,默认10次,用来保证能够完成最低的好感任务次数。 +2. 优化ocr模块,现在识别失败时会尝试点击中心位置 +3. 优化流程,现在只有当用户勾选了不分解四星时才会两次快速选择,可以节约约5秒 +4. 修改自定义配置,现在可以输入最低好感运行次数,默认10次,用来保证能够完成最低的好感任务次数。 ### 1.2(2025.06.08) 1. 加入狗粮分解和经验统计功能。 -2.优化逻辑,已经运行完成狗粮路线时仍然可以直接执行本js来完成好感 +2. 优化逻辑,已经运行完成狗粮路线时仍然可以直接执行本js来完成好感 ### 1.1(2025.06.05) 1. 路线优化。 -2.加入了不同类型的卡时间方式。 +2. 加入了不同类型的卡时间方式。 ### 1.0(2025.06.05) -1. 初始版本发布,支持自动好感任务和狗粮路线执行。 - -## 注意事项 - -1. 对于运行时间和路线的记录依赖本地文件的读写,直接更新js会导致丢失记录影响收益,建议更新js前先备份js文件夹中的record.txt,更新后覆盖。 -2. 路线和abe略有差异,第一次运行时收益下降是正常现象,第二天即可恢复正常。 -3. 狗粮路线出现卡死等问题请找 @汐 ,盗宝团好感部分出现问题请找 @秋云。 -4. 默认配置下将在4:05-4:45卡时间,如果你常用的启动时间不在这个时间段,请在js自定义配置中调节,建议总时长不超过40分钟,否则会在盗宝团全部运行结束都不能等到时间的话会开始干等。 -5. 务必在js自定义配置中填写合适的狗粮队伍与好感队伍名称,运行过程中会自动切换,要求正确配置生存位,行走位,战斗策略(用于好感战斗)等。同时要确保在配置组中启用“允许在JsScript中使用”和“覆盖JS中的自动战斗配置”。 -6. 还在测试中可能存在bug,bug反馈和建议可以在此帖回复,或联系相关作者。 -7. 本脚本不支持断点续跑或一天多次运行,如果你需要相关功能,说明你不适合使用本脚本,请移步abe。 -8.清怪和激活时不会拾取,属于正常现象。 - -## 联系方式 - -1. 如有任何问题或建议,请在bgi频道中反映,或通过QQ:718135749联系作者mno。 +1. 初始版本发布,支持自动好感任务和狗粮路线执行。 \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/-1激活/富A狗粮tp刷新.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/-1激活/富A狗粮tp刷新.json new file mode 100644 index 000000000..65be9e4fd --- /dev/null +++ b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/-1激活/富A狗粮tp刷新.json @@ -0,0 +1,303 @@ +{ + "info": { + "name": "富A狗粮tp刷新", + "type": "collect", + "author": "汐", + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.45.0", + "tags": [], + "last_modified_time": 1751204493198 + }, + "positions": [ + { + "id": 1, + "x": 487.9091796875, + "y": 223.6640625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 2, + "x": 1185.0263671875, + "y": 621.962890625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 3, + "x": 329.0185546875, + "y": 873.70751953125, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 4, + "x": -163.560546875, + "y": 1182.41015625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 5, + "x": 1116.0087890625, + "y": 1188.8984375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 6, + "x": 1449.48828125, + "y": 1027.95849609375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 7, + "x": 1604.322265625, + "y": 1040.69873046875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 8, + "x": 2145.92578125, + "y": 2413.8603515625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 9, + "x": -3932.6064453125, + "y": -3204.482421875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 10, + "x": -3437.7333984375, + "y": -3316.2119140625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 11, + "x": 2872.080078125, + "y": -285.8486328125, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 12, + "x": 4402.5693359375, + "y": -1870.73876953125, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 13, + "x": 4210.2431640625, + "y": -2716.638671875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 14, + "x": 5067.64990234375, + "y": -1589.0341796875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 15, + "x": 5793.814453125, + "y": 797.06103515625, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 16, + "x": 4512.119140625, + "y": 3630.14208984375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 17, + "x": 4543.06787109375, + "y": 4228.76904296875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 18, + "x": 4985.568359375, + "y": 4464.69970703125, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 19, + "x": 4504.0205078125, + "y": 4709.3642578125, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 20, + "x": 3594.9287109375, + "y": 3255.047607421875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 21, + "x": 8436.521484375, + "y": -2107.8896484375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 22, + "x": 9033.82421875, + "y": -2911.9306640625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 23, + "x": 9589.333984375, + "y": -1285.98095703125, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 24, + "x": -3290.7158203125, + "y": -3653.0283203125, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 25, + "x": 3133.732421875, + "y": -1733.98486328125, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 26, + "x": 9711.3037109375, + "y": -1552.1005859375, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 27, + "x": 9470.3037109375, + "y": -1670.8291015625, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 28, + "x": 9463.181640625, + "y": -1665.5732421875, + "type": "path", + "move_mode": "fly", + "action": "stop_flying", + "action_params": "6000" + }, + { + "id": 29, + "x": 9310.8408203125, + "y": -1423.21240234375, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 30, + "x": 10117.359375, + "y": -134.76904296875, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 31, + "x": 10072.021484375, + "y": 22.08056640625, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 32, + "x": 9968.375, + "y": 252.1005859375, + "type": "teleport", + "move_mode": "walk", + "action": "", + "action_params": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.1璃月富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.1璃月富A路TP刷CD.json deleted file mode 100644 index cc1f54e98..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.1璃月富A路TP刷CD.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "info": { - "name": "2.1璃月富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751287576075 - }, - "positions": [ - { - "id": 1, - "x": 487.9091796875, - "y": 223.6640625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 2, - "x": 1185.0263671875, - "y": 621.962890625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 3, - "x": 329.0185546875, - "y": 873.70751953125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 4, - "x": -163.560546875, - "y": 1182.41015625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 5, - "x": 1116.0087890625, - "y": 1188.8984375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 6, - "x": 1449.48828125, - "y": 1027.95849609375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 7, - "x": 1604.322265625, - "y": 1040.69873046875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 8, - "x": 2145.92578125, - "y": 2413.8603515625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.2璃月富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.2璃月富A路TP刷CD.json deleted file mode 100644 index 60d9818e4..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/2.2璃月富A路TP刷CD.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "info": { - "name": "2.2璃月富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "TheChasm", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751287109874 - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": 898.6903076171875, - "y": 1018.3929443359375, - "action_params": "" - }, - { - "id": 2, - "x": 333.72998046875, - "y": 975.7076416015625, - "type": "teleport", - "move_mode": "walk", - "action": "", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/3稻妻富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/3稻妻富A路TP刷CD.json deleted file mode 100644 index 1f5b55cb2..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/3稻妻富A路TP刷CD.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "info": { - "name": "3稻妻富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751283268556 - }, - "positions": [ - { - "id": 1, - "x": -3932.6064453125, - "y": -3204.482421875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 2, - "x": -3437.7333984375, - "y": -3316.2119140625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 3, - "x": -3290.7158203125, - "y": -3653.0283203125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/4须弥富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/4须弥富A路TP刷CD.json deleted file mode 100644 index f386260ca..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/4须弥富A路TP刷CD.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "info": { - "name": "4须弥富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751283340629 - }, - "positions": [ - { - "id": 1, - "x": 2872.080078125, - "y": -285.8486328125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 2, - "x": 4402.5693359375, - "y": -1870.73876953125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 3, - "x": 4210.2431640625, - "y": -2716.638671875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 4, - "x": 5067.64990234375, - "y": -1589.0341796875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 5, - "x": 5793.814453125, - "y": 797.06103515625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 6, - "x": 3133.732421875, - "y": -1733.98486328125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/5枫丹富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/5枫丹富A路TP刷CD.json deleted file mode 100644 index 735131743..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/5枫丹富A路TP刷CD.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "info": { - "name": "5枫丹富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751283426085 - }, - "positions": [ - { - "id": 1, - "x": 4512.119140625, - "y": 3630.14208984375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 2, - "x": 4543.06787109375, - "y": 4228.76904296875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 3, - "x": 4985.568359375, - "y": 4464.69970703125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 4, - "x": 4504.0205078125, - "y": 4709.3642578125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 5, - "x": 3594.9287109375, - "y": 3255.047607421875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/6纳塔富A路TP刷CD.json b/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/6纳塔富A路TP刷CD.json deleted file mode 100644 index c277b9833..000000000 --- a/repo/js/AutoArtifactsPro/assets/ArtifactsPath/A路线/00TP/6纳塔富A路TP刷CD.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "info": { - "name": "6纳塔富A路TP刷CD", - "type": "collect", - "author": "汐", - "version": "1.0", - "description": "", - "map_name": "Teyvat", - "bgi_version": "0.45.0", - "tags": [], - "last_modified_time": 1751283493372 - }, - "positions": [ - { - "id": 1, - "x": 8436.521484375, - "y": -2107.8896484375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 2, - "x": 9033.82421875, - "y": -2911.9306640625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 3, - "x": 9589.333984375, - "y": -1285.98095703125, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 4, - "x": 9711.3037109375, - "y": -1552.1005859375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 5, - "x": 9470.3037109375, - "y": -1670.8291015625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 6, - "x": 9460.624838046599, - "y": -1663.1880760026115, - "action": "stop_flying", - "move_mode": "fly", - "action_params": "5500", - "type": "path" - }, - { - "id": 7, - "x": 9310.8408203125, - "y": -1423.21240234375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 8, - "x": 10117.359375, - "y": -134.76904296875, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 9, - "x": 10072.021484375, - "y": 22.08056640625, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - }, - { - "id": 10, - "x": 9968.375, - "y": 252.1005859375, - "action": "", - "move_mode": "walk", - "action_params": "", - "type": "teleport" - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoArtifactsPro/main.js b/repo/js/AutoArtifactsPro/main.js index e2daf018a..8455c56c3 100644 --- a/repo/js/AutoArtifactsPro/main.js +++ b/repo/js/AutoArtifactsPro/main.js @@ -1,18 +1,28 @@ const DEFAULT_OCR_TIMEOUT_SECONDS = 10; const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; +// 初始化变量并赋予默认值 +let lastRunDate = "未知"; // 默认值 +let lastEndTime = new Date(); // 默认值为当前时间 +let lastRunRoute = "未知"; // 默认值 +let records = new Array(7).fill(""); +let finished = false; +const accountName = settings.accountName || "默认账户"; +let version = "default"; +let runnedToday = false; + +//预处理 +const minIntervalTime = settings.minIntervalTime || "5"; +const waitTimePeriod = settings.waitTimePeriod || "4:05-4:45"; +const friendshipPartyName = settings.friendshipPartyName || "好感"; +const grindPartyName = settings.grindPartyName || "狗粮"; +const operationType = settings.operationType || "不卡时间,ab交替运行"; +const runActivatePath = settings.runActivatePath || false; +let enemyType = "无"; (async function () { //伪造js结束记录 await fakeLog("自动狗粮重制版", true, true, 0); - //预处理 - const minIntervalTime = settings.minIntervalTime || "5"; - const waitTimePeriod = settings.waitTimePeriod || "4:05-4:45"; - const friendshipPartyName = settings.friendshipPartyName || "好感"; - const grindPartyName = settings.grindPartyName || "狗粮"; - const operationType = settings.operationType || "不卡时间,ab交替运行"; - let enemyType = "无"; - //处理操作模式信息 switch (operationType) { case "盗宝团好感卡时间": @@ -44,8 +54,6 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; //处理记录文件路径 // 获取子文件夹路径 - const accountName = settings.accountName || "默认账户"; - // Windows文件名非法字符列表 const illegalCharacters = /[\\/:*?"<>|]/; // Windows保留设备名称列表 @@ -139,12 +147,6 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; // 异步读取文件内容 const content = await file.readText(recordFilePath); - // 初始化变量并赋予默认值 - let lastRunDate = "未知"; // 默认值 - let lastEndTime = new Date(); // 默认值为当前时间 - let lastRunRoute = "未知"; // 默认值 - let records = new Array(7).fill(""); - // 按行分割内容 const lines = content.split('\n'); let recordIndex = 0; @@ -173,6 +175,10 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; lastRunRoute = line.substring("上次运行路线:".length).trim(); } + if (line.startsWith("上次运行是否完成:t")) { + finished = true; + } + if (line.startsWith("日期") && recordIndex < records.length) { records[recordIndex] = line.trim(); // 直接使用 line.trim() recordIndex++; @@ -183,7 +189,8 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; log.info(`上次运行完成日期: ${lastRunDate}`); log.info(`上次狗粮开始时间: ${lastEndTime.toISOString()}`); log.info(`上次运行路线: ${lastRunRoute}`); - let version = "default"; + log.info(`上次运行是否完成: ${finished}`); + try { // 读取 manifest.json 文件的内容 @@ -216,9 +223,9 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; const timeDifference = now - lastRunMidnight; // 如果当前时间减去 lastRunMidnight 小于 24 小时(24 * 60 * 60 * 1000 毫秒),则终止狗粮程序运行 - let runnedToday = false; + if (timeDifference < 24 * 60 * 60 * 1000) { - log.info("今日已经运行过狗粮路线,跳过运行狗粮程序"); + log.info("今日已经运行过狗粮路线"); runnedToday = true; } @@ -236,40 +243,43 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; today.setHours(0, 0, 0, 0); // 将时间设置为当天的午夜 // 创建等待时间段的开始时间和结束时间的 Date 对象 - const waitStartTime = new Date(today); + let waitStartTime = new Date(today); waitStartTime.setHours(startHour, startMinute, 0, 0); - - const waitEndTime = new Date(today); + let waitEndTime = new Date(today); waitEndTime.setHours(endHour, endMinute, 0, 0); - // 新增变量,初始值为 true,用于标识今天跑的路线 - let runRouteA = true; + let runRouteA = lastRunRoute === "A"; + + log.info(`卡时间时间段为${waitStartTime.toTimeString()}-${waitEndTime.toTimeString()}`); // 获取当前时间 const timeNow = new Date(); - // 检查 endTime 是否晚于当天的结束时间 - if (endTime > waitEndTime) { - // 如果 endTime 晚于当天的结束时间,则将其改为当天的开始时间 - endTime = new Date(waitStartTime); - // 同时将 runRouteA 改为 false,今天运行B路线 - runRouteA = false; - } - - // 检查 lastRunRoute 是否为 "B" - if (lastRunRoute === "B" && operationType !== "不卡时间,ab交替运行") { - // 如果 lastRunRoute 为 "B",则将 endTime 改为当天的开始时间 - endTime = new Date(waitStartTime); - // 同时将 runRouteA 改为 true + if (!runnedToday || !runActivatePath) { runRouteA = true; - } + // 检查 endTime 是否晚于当天的结束时间 + if (endTime > waitEndTime) { + // 如果 endTime 晚于当天的结束时间,则将其改为当天的开始时间 + endTime = new Date(waitStartTime); + // 同时将 runRouteA 改为 false,今天运行B路线 + runRouteA = false; + } - if (operationType === "不卡时间,ab交替运行") { - // 定义 1970-01-01T20:00:00.000Z 的时间对象 - const epochTime = new Date('1970-01-01T20:00:00.000Z'); + // 检查 lastRunRoute 是否为 "B" + if (lastRunRoute === "B" && operationType !== "不卡时间,ab交替运行") { + // 如果 lastRunRoute 为 "B",则将 endTime 改为当天的开始时间 + endTime = new Date(waitStartTime); + // 同时将 runRouteA 改为 true + runRouteA = true; + } - // 根据当前时间与 1970-01-01T20:00:00.000Z 的天数差的奇偶性给布尔变量 runRouteA 赋值 - runRouteA = Math.floor((now - epochTime) / (24 * 60 * 60 * 1000)) % 2 === 0; + if (operationType === "不卡时间,ab交替运行") { + // 定义 1970-01-01T20:00:00.000Z 的时间对象 + const epochTime = new Date('1970-01-01T20:00:00.000Z'); + + // 根据当前时间与 1970-01-01T20:00:00.000Z 的天数差的奇偶性给布尔变量 runRouteA 赋值 + runRouteA = Math.floor((now - epochTime) / (24 * 60 * 60 * 1000)) % 2 === 0; + } } // 启用自动拾取的实时任务 @@ -332,7 +342,7 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; //更新运行数据 refresh: { - if (runnedToday) { + if ((runnedToday && finished) || (runnedToday && runActivatePath)) { break refresh; } // 获取当前日期和时间 @@ -363,7 +373,7 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; const result1 = await decomposeArtifacts(settings.keep4Star, settings.doDecompose); artifacts: { - if (runnedToday) { + if (runnedToday && finished) { break artifacts; } @@ -391,11 +401,10 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; } records[0] = `日期:${lastRunDate},运行路线${lastRunRoute},狗粮经验${artifactExperienceDiff},摩拉${moraDiff}`; - if (runArtifactsResult) { //修改文件内容 - log.info('尝试修改记录文件'); - await writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, `records/${accountName}.txt`, version); + log.info('修改记录文件'); + await writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, `records/${accountName}.txt`, version, true); } } @@ -431,13 +440,14 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; })(); // 异步函数,用于将变量内容写回到文件 -async function writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, recordFilePath, version) { +async function writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, recordFilePath, version, finished) { try { // 构造要写入文件的内容 const content = [ `上次运行完成日期: ${lastRunDate}`, `上次结束时间: ${lastEndTime.toISOString()}`, `上次运行路线: ${lastRunRoute}`, + `上次运行是否完成: ${finished}`, `js版本: ${version}`, "历史收益:" ].concat(records).join('\n'); @@ -475,6 +485,7 @@ async function runArtifactsPaths(runRouteA, grindPartyName, useABE) { const filePathEnding = `assets/${ArtifactsPath}/${folderName}/02收尾`; const filePathExtra = `assets/${ArtifactsPath}/${folderName}/03额外`; const filePathPreparation = `assets/${ArtifactsPath}/${folderName}/00准备`; + const filePathActivate = `assets/${ArtifactsPath}/${folderName}/-1激活`; // 将每组路线的逻辑抽取为公用函数 async function runPathGroups(filePathDir, subTaskName) { @@ -502,12 +513,22 @@ async function runArtifactsPaths(runRouteA, grindPartyName, useABE) { await sleep(10); // 假设 sleep 是一个异步函数,休眠 10 毫秒 } catch (error) { log.error(`发生错误: ${error}`); - return false; // 终止循环 + throw new Error("任务被取消"); } await fakeLog(fileName, false, false, 0); } } + //运行激活路线 + if (settings.runActivatePath && !runnedToday) { + await runPathGroups(filePathActivate, "激活"); + } + + if (!((runnedToday && finished) || (runnedToday && runActivatePath))) { + //修改文件内容 + log.info('修改记录文件'); + await writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, `records/${accountName}.txt`, version, false); + } // 运行准备路线(关闭拾取) dispatcher.ClearAllTriggers(); await runPathGroups(filePathPreparation, "准备"); diff --git a/repo/js/AutoArtifactsPro/manifest.json b/repo/js/AutoArtifactsPro/manifest.json index 659d13d89..a2d6dd93b 100644 --- a/repo/js/AutoArtifactsPro/manifest.json +++ b/repo/js/AutoArtifactsPro/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "自动狗粮重制版", - "version": "1.4.9", + "version": "1.5.0", "tags": ["好感", "盗宝团", "愚人众", "鳄鱼", "兽肉", "狗粮"], "description": "通过不同好感任务卡时间后运行狗粮任务以提高狗粮总收益,需要正确配置好感队伍的战斗策略,并在自定义配置中指定好感和狗粮队伍名称", "authors": [ diff --git a/repo/js/AutoArtifactsPro/settings.json b/repo/js/AutoArtifactsPro/settings.json index 8d4fd8b4c..3e9c01890 100644 --- a/repo/js/AutoArtifactsPro/settings.json +++ b/repo/js/AutoArtifactsPro/settings.json @@ -12,10 +12,15 @@ ], "default": "不卡时间,ab交替运行" }, + { + "name": "runActivatePath", + "type": "checkbox", + "label": "是否启用激活路线,启用后将先花费约3分钟激活狗粮点\n启用该选项后可提高稳定性,并允许断点续跑和极大降低最短间隔时间" + }, { "name": "useABE", "type": "checkbox", - "label": "是否使用用时更短,收益更低的老abe路线\n默认使用新路线" + "label": "是否使用用时较短,收益较低的老abe路线\n不勾选时使用默认的新路线" }, { "name": "minTimesForFirendship", @@ -32,13 +37,13 @@ { "name": "friendshipPartyName", "type": "input-text", - "label": "好感队名称\n【请输入好感队的队伍名称】", + "label": "好感队名称\n【请输入好感队的队伍名称】\n请为该配队配置对应的战斗策略,清怪路线也会使用该配队", "default": "好感" }, { "name": "grindPartyName", "type": "input-text", - "label": "狗粮队名称\n【请输入狗粮队的队伍名称】", + "label": "狗粮队名称\n【请输入狗粮队的队伍名称】\n", "default": "狗粮" }, { @@ -60,7 +65,7 @@ { "name": "waitTimePeriod", "type": "input-text", - "label": "卡时间时间段\n【格式参考:4:05-4:45,默认为4:05-4:45】", + "label": "卡时间时间段\n【格式参考:4:05-4:45,默认为4:05-4:45】\njs会尝试控制开始狗粮路线的时间在这个时间段内", "default": "4:05-4:45" }, {