同步AutoCommission更新 (#2558)

Co-authored-by: DarkFlameMaster <actions@github.com>
This commit is contained in:
DarkFlameMaster
2025-12-24 11:16:20 +08:00
committed by GitHub
parent 4407df6056
commit 451fe273ca
23 changed files with 545 additions and 891 deletions

View File

@@ -169,3 +169,4 @@
- 支持委托地点OCR识别
- 基础的委托路径追踪功能

View File

@@ -1,59 +1,59 @@
[
{
"type": "地图追踪",
"data": "冒险家,安娜!-蒙德城-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"要我陪你去吗"
],
"npcWhiteList": [
"安娜"
]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "冒险家,安娜!-蒙德城-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待",
"data": 3000,
"note": "等待3秒钟"
},
{
"type": "委托描述检测",
"data": {
"description": "护送货运热气球",
"executeFile": "执行分支一.json",
"runType": "process",
"useKeyword": true
},
"note": "检测委托描述并执行执行分支一"
},
{
"type": "委托描述检测",
"data": {
"description": "与安娜一同完成",
"executeFile": "执行分支二.json",
"runType": "process",
"useKeyword": true
},
"note": "检测委托描述并执行执行分支二"
}
[
{
"type": "地图追踪",
"data": "冒险家,安娜!-蒙德城-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"要我陪你去吗"
],
"npcWhiteList": [
"安娜"
]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "冒险家,安娜!-蒙德城-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待",
"data": 3000,
"note": "等待3秒钟"
},
{
"type": "委托描述检测",
"data": {
"description": "护送货运热气球",
"executeFile": "执行分支一.json",
"runType": "process",
"useKeyword": true
},
"note": "检测委托描述并执行执行分支一"
},
{
"type": "委托描述检测",
"data": {
"description": "与安娜一同完成",
"executeFile": "执行分支二.json",
"runType": "process",
"useKeyword": true
},
"note": "检测委托描述并执行执行分支二"
}
]

View File

@@ -1,5 +1,5 @@
-1.json
F
-2.json
-1.json
-1.json
F
-2.json
-1.json
F

View File

@@ -1,78 +1,78 @@
[
{
"type": "地图追踪",
"data": "父亲能做的事-晨曦酒庄-1.json",
"note": "寻路到晨曦酒庄附近的任务NPC"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": ["怎么了", "好的"],
"npcWhiteList": ["特纳"]
},
"note": ""
},
{
"type": "地图追踪",
"data": "去往蒙德大教堂.json",
"note": "去教堂配药"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"npcWhiteList": ["进入教堂"]
},
"note": ""
},
{
"type": "追踪委托",
"data": {
"npc": "吉丽安娜",
"iconType": "Bigmap"
},
"note": "蹦蹦跳跳去找吉丽安娜"
},
{
"type": "自动任务",
"data": {
"action": "enable",
"taskType": "AutoSkip"
},
"note": "开启自动剧情"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待返回主界面",
"note": "等待对话完成提交物品"
},
{
"type": "地图追踪",
"data": "父亲能做的事-晨曦酒庄-3.json",
"note": "将药送回晨曦酒庄"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待返回主界面",
"note": "等待对话完成提交物品"
}
]
[
{
"type": "地图追踪",
"data": "父亲能做的事-晨曦酒庄-1.json",
"note": "寻路到晨曦酒庄附近的任务NPC"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": ["怎么了", "好的"],
"npcWhiteList": ["特纳"]
},
"note": ""
},
{
"type": "地图追踪",
"data": "去往蒙德大教堂.json",
"note": "去教堂配药"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"npcWhiteList": ["进入教堂"]
},
"note": ""
},
{
"type": "追踪委托",
"data": {
"npc": "吉丽安娜",
"iconType": "Bigmap"
},
"note": "蹦蹦跳跳去找吉丽安娜"
},
{
"type": "自动任务",
"data": {
"action": "enable",
"taskType": "AutoSkip"
},
"note": "开启自动剧情"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待返回主界面",
"note": "等待对话完成提交物品"
},
{
"type": "地图追踪",
"data": "父亲能做的事-晨曦酒庄-3.json",
"note": "将药送回晨曦酒庄"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "等待返回主界面",
"note": "等待对话完成提交物品"
}
]

View File

@@ -1,36 +1,36 @@
[
{
"type": "地图追踪",
"data": "西风骑士的基础知识-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"直接问吧"
],
"npcWhiteList": ["斯万"]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "对话",
"data": {
"skipCount": 18,
"priorityOptions": [
"图书管理员",
"骑兵队长",
"侦察骑士",
"西风骑士团可真严格"
],
"npcWhiteList": ["斯万"]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
}
]
[
{
"type": "地图追踪",
"data": "西风骑士的基础知识-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"直接问吧"
],
"npcWhiteList": ["斯万"]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "对话",
"data": {
"skipCount": 18,
"priorityOptions": [
"图书管理员",
"骑兵队长",
"侦察骑士",
"西风骑士团可真严格"
],
"npcWhiteList": ["斯万"]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
}
]

View File

@@ -1,40 +1,40 @@
[
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"Celi dada",
"Muhe ye!",
"Ye dada"
]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-3.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
]
[
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "对话",
"data": {
"skipCount": 5,
"priorityOptions": [
"Celi dada",
"Muhe ye!",
"Ye dada"
]
},
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "诗歌交流-坠星山谷-3.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
]

View File

@@ -1,39 +1,39 @@
[
{
"type": "地图追踪",
"data": "语言交流-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-3.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-4.json",
"note": "执行第四个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
[
{
"type": "地图追踪",
"data": "语言交流-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-3.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-4.json",
"note": "执行第四个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
]

View File

@@ -1,39 +0,0 @@
[
{
"type": "地图追踪",
"data": "语言交流-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-3.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "地图追踪",
"data": "语言交流-4.json",
"note": "执行第四个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
]

View File

@@ -1,58 +0,0 @@
{
"info": {
"name": "语言交流-1",
"type": "collect",
"author": "语言交流-1",
"version": "1.0",
"description": "语言交流-1",
"map_name": "Teyvat",
"bgi_version": "0.45.0"
},
"positions": [
{
"id": 1,
"x": -1266.5673828125,
"y": 1933.5556640625,
"type": "teleport",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 2,
"x": -1161.83984375,
"y": 1918.06396484375,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 3,
"x": -1152.2275390625,
"y": 1918.8984375,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 4,
"x": -1143.2373046875,
"y": 1920.8662109375,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 5,
"x": -1135.5048828125,
"y": 1922.49462890625,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
}
]
}

View File

@@ -1,58 +0,0 @@
{
"info": {
"name": "语言交流-2",
"type": "collect",
"author": "云闲vsv",
"version": "1.0",
"description": "语言交流-2",
"map_name": "Teyvat",
"bgi_version": "0.45.0"
},
"positions": [
{
"id": 1,
"x": -1135.5048828125,
"y": 1922.49462890625,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "target"
},
{
"id": 2,
"x": -1139.5029296875,
"y": 1933.181640625,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "target"
},
{
"id": 3,
"x": -1136.8388671875,
"y": 1947.8203125,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "target"
},
{
"id": 4,
"x": -1143.228515625,
"y": 1955.67041015625,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 5,
"x": -1148.83984375,
"y": 1959.734375,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "target"
}
]
}

View File

@@ -1,76 +0,0 @@
{
"info": {
"name": "语言交流-3",
"type": "collect",
"author": "语言交流-3",
"version": "1.0",
"description": "语言交流-3",
"map_name": "Teyvat",
"bgi_version": "0.45.0"
},
"positions": [
{
"id": 1,
"x": -1148.83984375,
"y": 1959.734375,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 2,
"x": -1140.384765625,
"y": 1946.82373046875,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 3,
"x": -1150.6787109375,
"y": 1939.36328125,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 4,
"x": -1153.6025390625,
"y": 1942.1865234375,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 5,
"x": -1156.669921875,
"y": 1944.763671875,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 6,
"x": -1159.115234375,
"y": 1946.9345703125,
"action": "",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 7,
"x": -1163.064453125,
"y": 1949.5947265625,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
}
]
}

View File

@@ -1,58 +0,0 @@
{
"info": {
"name": "语言交流-4",
"type": "collect",
"author": "云闲vsv",
"version": "1.0",
"description": "语言交流-4",
"map_name": "Teyvat",
"bgi_version": "0.45.0"
},
"positions": [
{
"id": 1,
"x": -1163.064453125,
"y": 1949.5947265625,
"action": "fight",
"move_mode": "walk",
"action_params": "",
"type": "path"
},
{
"id": 2,
"x": -1172.4560546875,
"y": 1951.7265625,
"type": "path",
"move_mode": "walk",
"action": "fight",
"action_params": ""
},
{
"id": 3,
"x": -1170.306640625,
"y": 1959.173828125,
"type": "path",
"move_mode": "walk",
"action": "fight",
"action_params": ""
},
{
"id": 4,
"x": -1170.080078125,
"y": 1944.396484375,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 5,
"x": -1161.7783203125,
"y": 1949.9970703125,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
}
]
}

View File

@@ -1,22 +0,0 @@
{
"info": {
"name": "语言交流-3",
"type": "collect",
"author": "星野",
"version": "1.0",
"description": "自动地图追踪录制",
"map_name": "Teyvat",
"bgi_version": "0.45.0"
},
"positions": [
{
"id": 1,
"x": -1161.0830078125,
"y": 1950.35498046875,
"action": "",
"move_mode": "dash",
"action_params": "",
"type": "target"
}
]
}

View File

@@ -1,43 +1,43 @@
[
{
"type": "地图追踪",
"data": "说到做到-1.json",
"note": "寻路NPC接取任务"
},
{
"type": "对话",
"data": {
"skipCount": 1,
"priorityOptions": [
"山底"
],
"npcWhiteList": [
"查耶维奇"
]
},
"note": "选择去山底"
},
{
"type": "地图追踪",
"data": "说到做到-2山底.json",
"note": "寻路到山底并清理怪物"
},
{
"type": "地图追踪",
"data": "说到做到-1.json",
"note": "回去找NPC交任务"
},
{
"type": "对话",
"data": {
"skipCount": 1,
"priorityOptions": [
""
],
"npcWhiteList": [
"查耶维奇"
]
},
"note": "与NPC对话"
}
[
{
"type": "地图追踪",
"data": "说到做到-1.json",
"note": "寻路NPC接取任务"
},
{
"type": "对话",
"data": {
"skipCount": 1,
"priorityOptions": [
"山底"
],
"npcWhiteList": [
"查耶维奇"
]
},
"note": "选择去山底"
},
{
"type": "地图追踪",
"data": "说到做到-2山底.json",
"note": "寻路到山底并清理怪物"
},
{
"type": "地图追踪",
"data": "说到做到-1.json",
"note": "回去找NPC交任务"
},
{
"type": "对话",
"data": {
"skipCount": 1,
"priorityOptions": [
""
],
"npcWhiteList": [
"查耶维奇"
]
},
"note": "与NPC对话"
}
]

View File

@@ -1,5 +1,5 @@
--1.json
F
--2.json
--3.json
--1.json
F
--2.json
--3.json
F

View File

@@ -1,55 +1,44 @@
[
{
"type": "地图追踪",
"data": "钥匙是易丢品-晨曦酒庄-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "等待",
"data": 20
},
{
"type": "地址检测",
"data": [
-365,
1793
],
"note": "目的地址与检测地址超过15的情况",
"run": "西北方向位置.json"
},
{
"type": "地址检测",
"data": [
-442,
1683
],
"note": "目的地址与检测地址超过15的情况",
"run": "东南方向位置.json"
},
{
"type": "地址检测",
"data": [
-478,
1719
],
"note": "目的地址与检测地址超过15的情况",
"run": "东南方向位置.json"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "自动任务",
"data": {
"action": "disable"
},
"note": "取消所有自动任务"
}
[
{
"type": "地图追踪",
"data": "钥匙是易丢品-晨曦酒庄-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "等待",
"data": 20
},
{
"type": "地址检测",
"data": [
-365,
1793
],
"note": "目的地址与检测地址超过15的情况",
"run": "西北方向位置.json"
},
{
"type": "地址检测",
"data": [
-472,
1949
],
"note": "目的地址与检测地址超过15的情况",
"run": "东南方向位置.json"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "自动任务",
"data": {
"action": "disable"
},
"note": "取消所有自动任务"
}
]

View File

@@ -1,50 +1,50 @@
[
{
"type": "地图追踪",
"data": "钥匙是易丢品-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "等待",
"data": 20
},
{
"type": "地址检测",
"data": [
-1577,
1596
],
"note": "目的地址与检测地址超过15的情况",
"run": "达达乌帕谷北方位置.json"
},
{
"type": "地址检测",
"data": [
-1427,
1256
],
"note": "目的地址与检测地址超过15的情况",
"run": "去达达乌帕谷西南方位置.json"
},
{
"type": "自动任务",
"data": {
"action": "disable"
},
"note": "取消所有自动任务"
},
{
"type": "地图追踪",
"data": "钥匙是易丢品-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
[
{
"type": "地图追踪",
"data": "钥匙是易丢品-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
},
{
"type": "等待",
"data": 20
},
{
"type": "地址检测",
"data": [
-1577,
1596
],
"note": "目的地址与检测地址超过15的情况",
"run": "达达乌帕谷北方位置.json"
},
{
"type": "地址检测",
"data": [
-1427,
1256
],
"note": "目的地址与检测地址超过15的情况",
"run": "去达达乌帕谷西南方位置.json"
},
{
"type": "自动任务",
"data": {
"action": "disable"
},
"note": "取消所有自动任务"
},
{
"type": "地图追踪",
"data": "钥匙是易丢品-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤默认跳过10次对话"
}
]

View File

@@ -1,34 +1,34 @@
[
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-1.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
}
]
[
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-1.json",
"note": "执行第一个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
},
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-2.json",
"note": "执行第二个地图追踪步骤"
},
{
"type": "按键",
"data": "F",
"note": "按下F键"
},
{
"type": "地图追踪",
"data": "鸽子、鸭子、小孩子-坠星山谷-1.json",
"note": "执行第三个地图追踪步骤"
},
{
"type": "对话",
"note": "执行对话步骤优先选择特定选项并与白名单NPC交互"
}
]

View File

@@ -1,8 +1,8 @@
// 原神每日委托自动执行脚本 - 常量定义模块
var Constants = {
// 版本和编译信息
VERSION: "0.98.11",
BUILD_TIME: "2025.12.21",
VERSION: "0.98.12",
BUILD_TIME: "2025.12.24",
// 文件路径常量
SUPPORT_LIST_PATH: "name.json",

View File

@@ -137,9 +137,9 @@ var DialogProcessor = {
// 获取对话区域截图并进行OCR识别
var dialogOptionsRegion = {
X: 1250,
Y: 450,
Y: 250,
WIDTH: 550,
HEIGHT: 400,
HEIGHT: 600,
};
var ocrResults = await Utils.easyOCR(dialogOptionsRegion);
if (ocrResults.count > 0) {

View File

@@ -1,25 +0,0 @@
// 按键步骤处理器
(function () {
StepProcessorLoader.register("关闭商店界面", async function (step, context) {
try {
const isStoreUI = UI.UIUtils.isStoreUI;
await sleep(500);
if (isStoreUI) {
keyPress("VK_ESCAPE");
}
await sleep(500);
} catch (error) {
log.error("执行按键步骤时出错: {error}", error.message);
throw error;
}
});
})();
/*
JSON使用示例:
{
"type": "关闭商店界面",
"note": "关闭商店界面(如果现在在商店页面)"
}
*/

View File

@@ -1,99 +1,99 @@
// 原神每日委托自动执行脚本 - 模块化主文件
// BGI兼容的模块化架构实现
// === 模块加载区域顶层执行BGI要求 ===
eval(file.readTextSync("constants.js"));
eval(file.readTextSync("lib/utils.js"));
eval(file.readTextSync("lib/ui.js"));
eval(file.readTextSync("lib/core.js"));
eval(file.readTextSync("lib/execute.js"));
eval(file.readTextSync("lib/dialog-processor.js"));
eval(file.readTextSync("lib/commission-basic.js"));
eval(file.readTextSync("lib/commission-recognition.js"));
eval(file.readTextSync("lib/commission-data.js"));
eval(file.readTextSync("lib/step-processor-loader.js"));
// === BGI标准脚本入口匿名立即执行异步函数必须是文件的最后一个表达式 ===
// 测试用代码
const test = async () => {
log.info("=== 开始测试执行脚本 ===");
try {
// 读取并解析 testScript/process.json 文件
const testScriptPath = "testScript/process.json";
const processContent = await file.readText(testScriptPath);
const processSteps = JSON.parse(processContent);
log.info("成功加载测试脚本文件: {path}", testScriptPath);
log.info("测试步骤数量: {count}", processSteps.length);
// 创建执行上下文
const context = {
commissionName: "测试委托",
location: "测试位置",
processSteps: processSteps,
currentIndex: 0,
isInMainUI: UI.UIUtils.isInMainUI,
priorityOptions: [],
npcWhiteList: []
};
// 执行测试流程中的每个步骤
for (let i = 0; i < processSteps.length; i++) {
const step = processSteps[i];
log.info("执行测试步骤 {step}: {type}", i + 1, step.type || step);
context.currentIndex = i;
// 处理步骤配置
const stepConfig = Execute.processStepConfiguration(
step,
context.priorityOptions,
context.npcWhiteList
);
context.priorityOptions = stepConfig.priorityOptions;
context.npcWhiteList = stepConfig.npcWhiteList;
// 执行步骤
await Execute.processStep(step, context);
// 步骤间等待
await sleep(1000);
}
log.info("=== 测试执行脚本完成 ===");
return true;
} catch (error) {
log.error("测试执行过程中发生错误: {error}", error.message);
return false;
}
};
(async function () {
try {
// 输出版本和编译时间信息
log.info("=".repeat(20));
log.info("版本: {version}", Constants.VERSION);
log.info("编译时间: {buildTime}", Constants.BUILD_TIME);
log.info("=".repeat(20));
// 加载步骤处理器
log.info("正在加载步骤处理器...");
StepProcessorLoader.loadStepProcessors();
// 执行主要流程
var mainStartTime = new Date();
await Core.executeMainProcess();
// await test();
// 记录结束时间
var endTime = new Date();
var totalTime = Math.round((endTime - mainStartTime) / 1000);
log.info("脚本执行完成,总耗时: {time} 秒", totalTime);
log.info("模块化主文件加载完成");
} catch (error) {
log.error("脚本执行过程中发生错误: {error}", error.message);
throw error;
}
})();
// 原神每日委托自动执行脚本 - 模块化主文件
// BGI兼容的模块化架构实现
// === 模块加载区域顶层执行BGI要求 ===
eval(file.readTextSync("constants.js"));
eval(file.readTextSync("lib/utils.js"));
eval(file.readTextSync("lib/ui.js"));
eval(file.readTextSync("lib/core.js"));
eval(file.readTextSync("lib/execute.js"));
eval(file.readTextSync("lib/dialog-processor.js"));
eval(file.readTextSync("lib/commission-basic.js"));
eval(file.readTextSync("lib/commission-recognition.js"));
eval(file.readTextSync("lib/commission-data.js"));
eval(file.readTextSync("lib/step-processor-loader.js"));
// === BGI标准脚本入口匿名立即执行异步函数必须是文件的最后一个表达式 ===
// 测试用代码
const test = async () => {
log.info("=== 开始测试执行脚本 ===");
try {
// 读取并解析 testScript/process.json 文件
const testScriptPath = "testScript/process.json";
const processContent = await file.readText(testScriptPath);
const processSteps = JSON.parse(processContent);
log.info("成功加载测试脚本文件: {path}", testScriptPath);
log.info("测试步骤数量: {count}", processSteps.length);
// 创建执行上下文
const context = {
commissionName: "测试委托",
location: "测试位置",
processSteps: processSteps,
currentIndex: 0,
isInMainUI: UI.UIUtils.isInMainUI,
priorityOptions: [],
npcWhiteList: []
};
// 执行测试流程中的每个步骤
for (let i = 0; i < processSteps.length; i++) {
const step = processSteps[i];
log.info("执行测试步骤 {step}: {type}", i + 1, step.type || step);
context.currentIndex = i;
// 处理步骤配置
const stepConfig = Execute.processStepConfiguration(
step,
context.priorityOptions,
context.npcWhiteList
);
context.priorityOptions = stepConfig.priorityOptions;
context.npcWhiteList = stepConfig.npcWhiteList;
// 执行步骤
await Execute.processStep(step, context);
// 步骤间等待
await sleep(1000);
}
log.info("=== 测试执行脚本完成 ===");
return true;
} catch (error) {
log.error("测试执行过程中发生错误: {error}", error.message);
return false;
}
};
(async function () {
try {
// 输出版本和编译时间信息
log.info("=".repeat(20));
log.info("版本: {version}", Constants.VERSION);
log.info("编译时间: {buildTime}", Constants.BUILD_TIME);
log.info("=".repeat(20));
// 加载步骤处理器
log.info("正在加载步骤处理器...");
StepProcessorLoader.loadStepProcessors();
// 执行主要流程
var mainStartTime = new Date();
await Core.executeMainProcess();
// await test();
// 记录结束时间
var endTime = new Date();
var totalTime = Math.round((endTime - mainStartTime) / 1000);
log.info("脚本执行完成,总耗时: {time} 秒", totalTime);
log.info("模块化主文件加载完成");
} catch (error) {
log.error("脚本执行过程中发生错误: {error}", error.message);
throw error;
}
})();

View File

@@ -1,15 +1,15 @@
{
"manifest_version": 1,
"name": "(对话+成就)全自动蒙德地区每日委托",
"version": "0.98.11",
"tags": ["委托","对话","战斗","成就","历练点"],
"description": "自动完成每日委托、自动识别委托内容、自动追踪战斗委托、自动完成对话委托、自动获得到隐藏成就。使用前请阅读README.md获取详细说明和常见问题解答。目前项目急需人手,有意者可加群。感谢云闲vsv & 换苏伟u & 小鹰划船不用桨 & 塔台 & 未知_ 的共同开发",
"authors": [
{
"name": "星野",
"links": "https://github.com/LX666-666"
}
],
"settings_ui": "settings.json",
"main": "main.js"
}
{
"manifest_version": 1,
"name": "(对话+成就)全自动蒙德地区每日委托",
"version": "0.98.12",
"tags": ["委托","对话","战斗","成就","历练点"],
"description": "自动完成每日委托、自动识别委托内容、自动追踪战斗委托、自动完成对话委托、自动获得到隐藏成就。使用前请阅读README.md获取详细说明和常见问题解答。目前项目急需人手,有意者可加群。感谢云闲vsv & 换苏伟u & 小鹰划船不用桨 & 塔台 & 未知_ 的共同开发",
"authors": [
{
"name": "星野",
"links": "https://github.com/LX666-666"
}
],
"settings_ui": "settings.json",
"main": "main.js"
}