js,自动狗粮pro 1.5.0 (#1255)

加入激活路线相关
This commit is contained in:
mno
2025-07-01 20:38:44 +08:00
committed by GitHub
parent 90285642b3
commit f314ec3f2c
11 changed files with 463 additions and 533 deletions

View File

@@ -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. 默认配置下将在405-445卡时间如果你常用的启动时间不在这个时间段请在js自定义配置中调节建议总时长不超过40分钟否则会在盗宝团等好感全部运行结束都不能等到时间的话会开始干等。
5. 务必在js自定义配置中填写合适的狗粮队伍与好感队伍名称运行过程中会自动切换要求正确配置生存位行走位战斗策略用于好感战斗等。同时要确保在配置组中启用“允许在JsScript中使用”和“覆盖JS中的自动战斗配置”。
6. 还在测试中可能存在bugbug反馈和建议可以在频道中提问或联系相关作者。
7. 本脚本不支持断点续跑如果你需要相关功能说明你不适合使用本脚本请移步abe。
8. 清怪和激活时不会拾取,属于正常现象。
## 联系方式
1. 如有任何问题或建议请在bgi频道中反映。
## 一、调查点类型收益 ## 一、调查点类型收益
| 类型 | 等效1星圣遗物 | 平均经验值 | 平均摩拉 | 计算公式 | | 类型 | 等效1星圣遗物 | 平均经验值 | 平均摩拉 | 计算公式 |
|------|--------------|------------|----------|----------| | ---- | ------------- | ---------- | -------- | ---------------------------------- |
| 穷点 | 1.35个 | 567 EXP | 0 | 65%出1星(420EXP)+35%出2星(840EXP) | | 穷点 | 1.35个 | 567 EXP | 0 | 65%出1星(420EXP)+35%出2星(840EXP) |
| 富点 | 1.5个 | 630 EXP | 200 | 50%出1个1星(420EXP)/2个1星(840EXP) | | 富点 | 1.5个 | 630 EXP | 200 | 50%出1个1星(420EXP)/2个1星(840EXP) |
## 二、调查点机制与刷新CD ## 二、调查点机制与刷新CD
@@ -45,12 +77,12 @@
### 1. 主要路线参数 ### 1. 主要路线参数
| 路线名称 | 调查点 | 富点数量 | 穷点数量 | 总经验值 | 总摩拉 | 运行时间 | 98上限点 富% | | 路线名称 | 调查点 | 富点数量 | 穷点数量 | 总经验值 | 总摩拉 | 运行时间 | 98上限点 富% |
|----------|--------|----------|----------|----------|--------|----------|----------------| | -------- | ------ | -------- | -------- | -------- | ------ | -------- | ------------- |
| 富A路线 | 162 | 104 | 58 | 98,406 | 20,800 | 68分钟 | 98/98 (100%) | | 富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%) | | 富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 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%) | | ABE B线 | 138 | 34 | 104 | 77,868 | 6,800 | 43分钟 | 33/98 (33.6%) |
`富B富点%提升中` `富B富点%提升中`
### 2. 经验值计算公式 ### 2. 经验值计算公式
@@ -62,9 +94,8 @@ https://www.kdocs.cn/wo/sl/v13uXscL
## 四、路径结构 ## 四、路径结构
**00TP**提前加载触发CD倒计时后续可自由安排时间拾取避免“现用现触发”的等待问题无需担心CD同步问题 **-1激活**提前加载触发CD倒计时后续可自由安排时间拾取避免“现用现触发”的等待问题无需担心CD同步问题
**00激活**:少数点位需要提前转变为发光点,不拾取调查点! **00准备**部分优质富点有小怪镇守,清除以后才按路径顺序拾取,此时不拾取调查点!少数点位需要提前转变为发光点,不拾取调查点!
**00清怪**:部分优质富点有小怪镇守,清除以后才按路径顺序拾取,此时不拾取调查点!
**01普通**至多98个调查点 **01普通**至多98个调查点
**02收尾**附近区域超出100以外的调查点 **02收尾**附近区域超出100以外的调查点
**03额外**:不受满上限影响消失,又叫超限点 **03额外**:不受满上限影响消失,又叫超限点
@@ -102,15 +133,15 @@ https://www.kdocs.cn/wo/sl/v13uXscL
### 4. 收益对比表 ### 4. 收益对比表
| 指标 | 富6A1B | 富1A1B | ABE1A1B | 富6A1B增长 | 富1A1B增长 | | 指标 | 富6A1B | 富1A1B | ABE1A1B | 富6A1B增长 | 富1A1B增长 |
|----------|--------|--------|---------|------------|------------| | ------ | ------- | ------- | ------- | ---------------- | --------------- |
| 周经验 | 667,548 | 614,313 | 544,677 | +122,871 (22.6%) | +69,636 (12.8%) | | 周经验 | 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%) | | 周摩拉 | 141,000 | 129,500 | 46,900 | +94,100(200.6%) | +82,600(176.1%) |
| 周耗时 | 7.63h | 6.88h | 4.9h | +2.73h | +1.98h | | 周耗时 | 7.63h | 6.88h | 4.9h | +2.73h | +1.98h |
## 六、队伍配置 ## 六、队伍配置
- **根据自己CPU配置选择合适的移速** - **根据自己CPU配置选择合适的移速**:电脑性能较差以至于收益远不如及格线时,降低队伍移速(使用较矮小的体型,不使用双风,四风原典,迪西雅天赋等)。
- **行走位:优先迪希雅;或E启动奶** - **行走位:优先迪希雅;或E启动奶**
- **钟剑迪希雅**:耐肘王/白天6-18点移速+10%(路径内置调时间到白天,全程100%吃满天赋) - **钟剑迪希雅**:耐肘王/白天6-18点移速+10%(路径内置调时间到白天,全程100%吃满天赋)
- **万叶建议携带路径内配有E吸狗粮策略(不带不影响运行)** - **万叶建议携带路径内配有E吸狗粮策略(不带不影响运行)**
@@ -129,29 +160,10 @@ https://www.kdocs.cn/wo/sl/v13uXscL
1. **main.js**:负责核心业务逻辑,包括好感任务和狗粮路线的执行。 1. **main.js**:负责核心业务逻辑,包括好感任务和狗粮路线的执行。
2. **manifest.json**:脚本配置文件,记录基本信息和设置。 2. **manifest.json**:脚本配置文件,记录基本信息和设置。
3. **settings.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. 完成好感任务。 1. 完成好感任务。
2. 执行狗粮路线,自动计算时间并进行路线选择。 2. 执行狗粮路线,自动计算时间并进行路线选择。
@@ -160,64 +172,49 @@ https://www.kdocs.cn/wo/sl/v13uXscL
## 更新日志 ## 更新日志
### 1.4.92025.06.29 ### 1.4.92025.06.29
1.优化了关于四星狗粮的处理 1. 优化了关于四星狗粮的处理
2.添加"调查点提早触发倒计时机制" 2. 添加"调查点提早触发倒计时机制"
### 1.4.82025.06.28 ### 1.4.82025.06.28
1.替换掉富A 508号路径 1. 替换掉富A 508号路径
### 1.4.72025.06.26 ### 1.4.72025.06.26
1.路径内置"时瞬06:00",带[迪希雅]天赋全程100%吃满 1. 路径内置"时瞬06:00",带[迪希雅]天赋全程100%吃满
### 1.4.62025.06.26 ### 1.4.62025.06.26
1.对账户名内置默认项避免因为default不生效产生报错 1. 对账户名内置默认项避免因为default不生效产生报错
### 1.4.42025.06.24 ### 1.4.42025.06.24
1.优化几处坐标精确度. 1. 优化几处坐标精确度.
### 1.4.42025.06.23 ### 1.4.42025.06.23
1.优化部分点位万叶E的方向避免位移方向误吃调查点 1. 优化部分点位万叶E的方向避免位移方向误吃调查点
### 1.4.32025.06.23 ### 1.4.32025.06.23
1.修复了添加老abe路线导致的程序无法正常运行 1. 修复了添加老abe路线导致的程序无法正常运行
2.优化了经验识别逻辑,运行前无狗粮时也能正确处理剩余经验 2. 优化了经验识别逻辑,运行前无狗粮时也能正确处理剩余经验
3.添加了对于账户名等的默认配置和校验,减少用户乱填导致的出错可能 3. 添加了对于账户名等的默认配置和校验,减少用户乱填导致的出错可能
### 1.4.12025.06.22 ### 1.4.12025.06.22
1.维修部分路径卡死点位 1. 维修部分路径卡死点位
2.目标点已设置好强制行走位拾取,队伍可以带治疗位 2. 目标点已设置好强制行走位拾取,队伍可以带治疗位
### 1.4.02025.06.22 ### 1.4.02025.06.22
1.添加了使用老abe路线的选项 1. 添加了使用老abe路线的选项
### 1.3.52025.06.22 ### 1.3.52025.06.22
1.修复了对于四星狗粮数量的错误处理造成的统计结果中收益为负的问题 1. 修复了对于四星狗粮数量的错误处理造成的统计结果中收益为负的问题
### 1.3.42025.06.21 ### 1.3.42025.06.21
1.优化了换队伍的逻辑 1. 优化了换队伍的逻辑
### 1.3.32025.06.21 ### 1.3.32025.06.21
1.尝试修复好感战斗超时时程序异常终止的问题 1. 尝试修复好感战斗超时时程序异常终止的问题
### 1.23.42025.06.16 ### 1.23.42025.06.16
1.增加了对于敌人类型的处理,避免报错 1. 增加了对于敌人类型的处理,避免报错
### 1.23.12025.06.14 ### 1.23.12025.06.14
1.日志中加入路径名的信息 1. 日志中加入路径名的信息
### 1.23.02025.06.13 ### 1.23.02025.06.13
1.settings中默认好感队伍为“好感”默认狗粮队伍为“狗粮”防止默认配置下出现问题 1. settings中默认好感队伍为“好感”默认狗粮队伍为“狗粮”防止默认配置下出现问题
### 1.212025.06.09 ### 1.212025.06.09
1. 修改盗宝团触发路线,减少摩拉丢失 1. 修改盗宝团触发路线,减少摩拉丢失
2.优化ocr模块现在识别失败时会尝试点击中心位置 2. 优化ocr模块现在识别失败时会尝试点击中心位置
3.优化流程现在只有当用户勾选了不分解四星时才会两次快速选择可以节约约5秒 3. 优化流程现在只有当用户勾选了不分解四星时才会两次快速选择可以节约约5秒
4.修改自定义配置现在可以输入最低好感运行次数默认10次用来保证能够完成最低的好感任务次数。 4. 修改自定义配置现在可以输入最低好感运行次数默认10次用来保证能够完成最低的好感任务次数。
### 1.22025.06.08 ### 1.22025.06.08
1. 加入狗粮分解和经验统计功能。 1. 加入狗粮分解和经验统计功能。
2.优化逻辑已经运行完成狗粮路线时仍然可以直接执行本js来完成好感 2. 优化逻辑已经运行完成狗粮路线时仍然可以直接执行本js来完成好感
### 1.12025.06.05 ### 1.12025.06.05
1. 路线优化。 1. 路线优化。
2.加入了不同类型的卡时间方式。 2. 加入了不同类型的卡时间方式。
### 1.02025.06.05 ### 1.02025.06.05
1. 初始版本发布,支持自动好感任务和狗粮路线执行。 1. 初始版本发布,支持自动好感任务和狗粮路线执行。
## 注意事项
1. 对于运行时间和路线的记录依赖本地文件的读写直接更新js会导致丢失记录影响收益建议更新js前先备份js文件夹中的record.txt更新后覆盖。
2. 路线和abe略有差异第一次运行时收益下降是正常现象第二天即可恢复正常。
3. 狗粮路线出现卡死等问题请找 @汐 ,盗宝团好感部分出现问题请找 @秋云
4. 默认配置下将在405-445卡时间如果你常用的启动时间不在这个时间段请在js自定义配置中调节建议总时长不超过40分钟否则会在盗宝团全部运行结束都不能等到时间的话会开始干等。
5. 务必在js自定义配置中填写合适的狗粮队伍与好感队伍名称运行过程中会自动切换要求正确配置生存位行走位战斗策略用于好感战斗等。同时要确保在配置组中启用“允许在JsScript中使用”和“覆盖JS中的自动战斗配置”。
6. 还在测试中可能存在bugbug反馈和建议可以在此帖回复或联系相关作者。
7. 本脚本不支持断点续跑或一天多次运行如果你需要相关功能说明你不适合使用本脚本请移步abe。
8.清怪和激活时不会拾取,属于正常现象。
## 联系方式
1. 如有任何问题或建议请在bgi频道中反映或通过QQ718135749联系作者mno。

View File

@@ -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": ""
}
]
}

View File

@@ -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"
}
]
}

View File

@@ -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": ""
}
]
}

View File

@@ -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"
}
]
}

View File

@@ -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"
}
]
}

View File

@@ -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"
}
]
}

View File

@@ -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"
}
]
}

View File

@@ -1,18 +1,28 @@
const DEFAULT_OCR_TIMEOUT_SECONDS = 10; const DEFAULT_OCR_TIMEOUT_SECONDS = 10;
const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; 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 () { (async function () {
//伪造js结束记录 //伪造js结束记录
await fakeLog("自动狗粮重制版", true, true, 0); 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) { switch (operationType) {
case "盗宝团好感卡时间": case "盗宝团好感卡时间":
@@ -44,8 +54,6 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
//处理记录文件路径 //处理记录文件路径
// 获取子文件夹路径 // 获取子文件夹路径
const accountName = settings.accountName || "默认账户";
// Windows文件名非法字符列表 // Windows文件名非法字符列表
const illegalCharacters = /[\\/:*?"<>|]/; const illegalCharacters = /[\\/:*?"<>|]/;
// Windows保留设备名称列表 // Windows保留设备名称列表
@@ -139,12 +147,6 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
// 异步读取文件内容 // 异步读取文件内容
const content = await file.readText(recordFilePath); 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'); const lines = content.split('\n');
let recordIndex = 0; let recordIndex = 0;
@@ -173,6 +175,10 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
lastRunRoute = line.substring("上次运行路线:".length).trim(); lastRunRoute = line.substring("上次运行路线:".length).trim();
} }
if (line.startsWith("上次运行是否完成:t")) {
finished = true;
}
if (line.startsWith("日期") && recordIndex < records.length) { if (line.startsWith("日期") && recordIndex < records.length) {
records[recordIndex] = line.trim(); // 直接使用 line.trim() records[recordIndex] = line.trim(); // 直接使用 line.trim()
recordIndex++; recordIndex++;
@@ -183,7 +189,8 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
log.info(`上次运行完成日期: ${lastRunDate}`); log.info(`上次运行完成日期: ${lastRunDate}`);
log.info(`上次狗粮开始时间: ${lastEndTime.toISOString()}`); log.info(`上次狗粮开始时间: ${lastEndTime.toISOString()}`);
log.info(`上次运行路线: ${lastRunRoute}`); log.info(`上次运行路线: ${lastRunRoute}`);
let version = "default"; log.info(`上次运行是否完成: ${finished}`);
try { try {
// 读取 manifest.json 文件的内容 // 读取 manifest.json 文件的内容
@@ -216,9 +223,9 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
const timeDifference = now - lastRunMidnight; const timeDifference = now - lastRunMidnight;
// 如果当前时间减去 lastRunMidnight 小于 24 小时24 * 60 * 60 * 1000 毫秒),则终止狗粮程序运行 // 如果当前时间减去 lastRunMidnight 小于 24 小时24 * 60 * 60 * 1000 毫秒),则终止狗粮程序运行
let runnedToday = false;
if (timeDifference < 24 * 60 * 60 * 1000) { if (timeDifference < 24 * 60 * 60 * 1000) {
log.info("今日已经运行过狗粮路线,跳过运行狗粮程序"); log.info("今日已经运行过狗粮路线");
runnedToday = true; runnedToday = true;
} }
@@ -236,40 +243,43 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
today.setHours(0, 0, 0, 0); // 将时间设置为当天的午夜 today.setHours(0, 0, 0, 0); // 将时间设置为当天的午夜
// 创建等待时间段的开始时间和结束时间的 Date 对象 // 创建等待时间段的开始时间和结束时间的 Date 对象
const waitStartTime = new Date(today); let waitStartTime = new Date(today);
waitStartTime.setHours(startHour, startMinute, 0, 0); waitStartTime.setHours(startHour, startMinute, 0, 0);
let waitEndTime = new Date(today);
const waitEndTime = new Date(today);
waitEndTime.setHours(endHour, endMinute, 0, 0); waitEndTime.setHours(endHour, endMinute, 0, 0);
// 新增变量,初始值为 true用于标识今天跑的路线 let runRouteA = lastRunRoute === "A";
let runRouteA = true;
log.info(`卡时间时间段为${waitStartTime.toTimeString()}-${waitEndTime.toTimeString()}`);
// 获取当前时间 // 获取当前时间
const timeNow = new Date(); const timeNow = new Date();
// 检查 endTime 是否晚于当天的结束时间 if (!runnedToday || !runActivatePath) {
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
runRouteA = true; runRouteA = true;
} // 检查 endTime 是否晚于当天的结束时间
if (endTime > waitEndTime) {
// 如果 endTime 晚于当天的结束时间,则将其改为当天的开始时间
endTime = new Date(waitStartTime);
// 同时将 runRouteA 改为 false今天运行B路线
runRouteA = false;
}
if (operationType === "不卡时间ab交替运行") { // 检查 lastRunRoute 是否为 "B"
// 定义 1970-01-01T20:00:00.000Z 的时间对象 if (lastRunRoute === "B" && operationType !== "不卡时间ab交替运行") {
const epochTime = new Date('1970-01-01T20:00:00.000Z'); // 如果 lastRunRoute 为 "B",则将 endTime 改为当天的开始时间
endTime = new Date(waitStartTime);
// 同时将 runRouteA 改为 true
runRouteA = true;
}
// 根据当前时间与 1970-01-01T20:00:00.000Z 的天数差的奇偶性给布尔变量 runRouteA 赋值 if (operationType === "不卡时间ab交替运行") {
runRouteA = Math.floor((now - epochTime) / (24 * 60 * 60 * 1000)) % 2 === 0; // 定义 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: { refresh: {
if (runnedToday) { if ((runnedToday && finished) || (runnedToday && runActivatePath)) {
break refresh; break refresh;
} }
// 获取当前日期和时间 // 获取当前日期和时间
@@ -363,7 +373,7 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
const result1 = await decomposeArtifacts(settings.keep4Star, settings.doDecompose); const result1 = await decomposeArtifacts(settings.keep4Star, settings.doDecompose);
artifacts: { artifacts: {
if (runnedToday) { if (runnedToday && finished) {
break artifacts; break artifacts;
} }
@@ -391,11 +401,10 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120;
} }
records[0] = `日期:${lastRunDate},运行路线${lastRunRoute},狗粮经验${artifactExperienceDiff},摩拉${moraDiff}`; records[0] = `日期:${lastRunDate},运行路线${lastRunRoute},狗粮经验${artifactExperienceDiff},摩拉${moraDiff}`;
if (runArtifactsResult) { if (runArtifactsResult) {
//修改文件内容 //修改文件内容
log.info('尝试修改记录文件'); log.info('修改记录文件');
await writeRecordFile(lastRunDate, lastEndTime, lastRunRoute, records, `records/${accountName}.txt`, version); 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 { try {
// 构造要写入文件的内容 // 构造要写入文件的内容
const content = [ const content = [
`上次运行完成日期: ${lastRunDate}`, `上次运行完成日期: ${lastRunDate}`,
`上次结束时间: ${lastEndTime.toISOString()}`, `上次结束时间: ${lastEndTime.toISOString()}`,
`上次运行路线: ${lastRunRoute}`, `上次运行路线: ${lastRunRoute}`,
`上次运行是否完成: ${finished}`,
`js版本: ${version}`, `js版本: ${version}`,
"历史收益:" "历史收益:"
].concat(records).join('\n'); ].concat(records).join('\n');
@@ -475,6 +485,7 @@ async function runArtifactsPaths(runRouteA, grindPartyName, useABE) {
const filePathEnding = `assets/${ArtifactsPath}/${folderName}/02收尾`; const filePathEnding = `assets/${ArtifactsPath}/${folderName}/02收尾`;
const filePathExtra = `assets/${ArtifactsPath}/${folderName}/03额外`; const filePathExtra = `assets/${ArtifactsPath}/${folderName}/03额外`;
const filePathPreparation = `assets/${ArtifactsPath}/${folderName}/00准备`; const filePathPreparation = `assets/${ArtifactsPath}/${folderName}/00准备`;
const filePathActivate = `assets/${ArtifactsPath}/${folderName}/-1激活`;
// 将每组路线的逻辑抽取为公用函数 // 将每组路线的逻辑抽取为公用函数
async function runPathGroups(filePathDir, subTaskName) { async function runPathGroups(filePathDir, subTaskName) {
@@ -502,12 +513,22 @@ async function runArtifactsPaths(runRouteA, grindPartyName, useABE) {
await sleep(10); // 假设 sleep 是一个异步函数,休眠 10 毫秒 await sleep(10); // 假设 sleep 是一个异步函数,休眠 10 毫秒
} catch (error) { } catch (error) {
log.error(`发生错误: ${error}`); log.error(`发生错误: ${error}`);
return false; // 终止循环 throw new Error("任务被取消");
} }
await fakeLog(fileName, false, false, 0); 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(); dispatcher.ClearAllTriggers();
await runPathGroups(filePathPreparation, "准备"); await runPathGroups(filePathPreparation, "准备");

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "自动狗粮重制版", "name": "自动狗粮重制版",
"version": "1.4.9", "version": "1.5.0",
"tags": ["好感", "盗宝团", "愚人众", "鳄鱼", "兽肉", "狗粮"], "tags": ["好感", "盗宝团", "愚人众", "鳄鱼", "兽肉", "狗粮"],
"description": "通过不同好感任务卡时间后运行狗粮任务以提高狗粮总收益,需要正确配置好感队伍的战斗策略,并在自定义配置中指定好感和狗粮队伍名称", "description": "通过不同好感任务卡时间后运行狗粮任务以提高狗粮总收益,需要正确配置好感队伍的战斗策略,并在自定义配置中指定好感和狗粮队伍名称",
"authors": [ "authors": [

View File

@@ -12,10 +12,15 @@
], ],
"default": "不卡时间ab交替运行" "default": "不卡时间ab交替运行"
}, },
{
"name": "runActivatePath",
"type": "checkbox",
"label": "是否启用激活路线启用后将先花费约3分钟激活狗粮点\n启用该选项后可提高稳定性并允许断点续跑和极大降低最短间隔时间"
},
{ {
"name": "useABE", "name": "useABE",
"type": "checkbox", "type": "checkbox",
"label": "是否使用用时短,收益低的老abe路线\n默认使用新路线" "label": "是否使用用时短,收益低的老abe路线\n不勾选时使用默认的新路线"
}, },
{ {
"name": "minTimesForFirendship", "name": "minTimesForFirendship",
@@ -32,13 +37,13 @@
{ {
"name": "friendshipPartyName", "name": "friendshipPartyName",
"type": "input-text", "type": "input-text",
"label": "好感队名称\n【请输入好感队的队伍名称】", "label": "好感队名称\n【请输入好感队的队伍名称】\n请为该配队配置对应的战斗策略清怪路线也会使用该配队",
"default": "好感" "default": "好感"
}, },
{ {
"name": "grindPartyName", "name": "grindPartyName",
"type": "input-text", "type": "input-text",
"label": "狗粮队名称\n【请输入狗粮队的队伍名称】", "label": "狗粮队名称\n【请输入狗粮队的队伍名称】\n",
"default": "狗粮" "default": "狗粮"
}, },
{ {
@@ -60,7 +65,7 @@
{ {
"name": "waitTimePeriod", "name": "waitTimePeriod",
"type": "input-text", "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" "default": "4:05-4:45"
}, },
{ {