Merge pull request #1 from HZYgrandma/main

AddJavascript
This commit is contained in:
辉鸭蛋
2024-10-13 23:09:16 +08:00
committed by GitHub
25 changed files with 788 additions and 277 deletions

View File

@@ -0,0 +1,68 @@
{
"info": {
"name": "狗粮_璃月_渌华池_3",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 489.3623046875,
"y": 222.2685546875
},
{
"id": 2,
"x": 487.9140625,
"y": 239.24951171875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 475.84765625,
"y": 237.10205078125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 434.0712890625,
"y": 227.9326171875,
"type": "path",
"move_mode": "fly",
"action": ""
},
{
"id": 5,
"x": 426.3359375,
"y": 230.9072265625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 424.234375,
"y": 231.55224609375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 424.423828125,
"y": 233.74267578125,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,100 @@
{
"info": {
"name": "狗粮_须弥_维摩庄_3",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 2794.1982421875,
"y": -1216.46484375
},
{
"id": 2,
"x": 2789.333984375,
"y": -1187.43701171875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 2786.8701171875,
"y": -1163.32275390625,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 5,
"x": 2719.05517578125,
"y": -1131.2958984375,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 6,
"x": 2698.4287109375,
"y": -1146.67626953125,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 2705.5283203125,
"y": -1145.05712890625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": 2701.0869140625,
"y": -1137.603515625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 9,
"x": 2704.130859375,
"y": -1143.216796875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 10,
"x": 2714.32373046875,
"y": -1116.52978515625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 11,
"x": 2722.77099609375,
"y": -1095.1630859375,
"type": "path",
"move_mode": "fly",
"action": ""
},
{
"id": 12,
"x": 2724.68359375,
"y": -1083.13525390625,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,84 @@
{
"info": {
"name": "狗粮_璃月_轻策庄_2",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 547.7373046875,
"y": 1766.75341796875
},
{
"id": 2,
"x": 551.017578125,
"y": 1755.98291015625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 589.1337890625,
"y": 1724.79931640625,
"type": "path",
"move_mode": "fly",
"action": ""
},
{
"id": 4,
"x": 613.7158203125,
"y": 1710.28564453125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 621.2431640625,
"y": 1706.30419921875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 620.2861328125,
"y": 1711.07568359375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 650.8642578125,
"y": 1703.021484375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 9,
"x": 664.81640625,
"y": 1713.56689453125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 10,
"x": 662.853515625,
"y": 1720.2998046875,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -1,81 +1,81 @@
{
"macroEvents": [
{
"type": 0, // 按下 m 键
"keyCode": 77, // m 键的键码
"time": 20
},
{
"type": 1, // 释放 m 键
"keyCode": 77, // m 键的键码
"time": 100 // 延迟80毫秒后释放
},
{
"type": 2, // 鼠标移动事件
"mouseX": 96,
"mouseY": 856,
"time": 600 // 延迟500毫秒后移动
},
{
"type": 4, // 第一次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 700 // 延迟100毫秒后按下
},
{
"type": 5, // 第一次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 800 // 延迟100毫秒后释放
},
{
"type": 4, // 第二次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 900 // 延迟100毫秒后按下
},
{
"type": 5, // 第二次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1000 // 延迟100毫秒后释放
},
{
"type": 4, // 第三次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1100 // 延迟100毫秒后按下
},
{
"type": 5, // 第三次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1200 // 延迟100毫秒后释放
},
{
"type": 0, // 再次按下 m 键
"keyCode": 77, // m 键的键码
"time": 1700 // 延迟500毫秒后按下
},
{
"type": 1, // 再次释放 m 键
"keyCode": 77, // m 键的键码
"time": 1800 // 延迟100毫秒后释放
}
],
"info": {
"name": "",
"description": "",
"x": 0,
"y": 0,
"width": 3840,
"height": 2160,
"recordDpi": 2
}
{
"macroEvents": [
{
"type": 0, // 按下 m 键
"keyCode": 77, // m 键的键码
"time": 20
},
{
"type": 1, // 释放 m 键
"keyCode": 77, // m 键的键码
"time": 100 // 延迟80毫秒后释放
},
{
"type": 2, // 鼠标移动事件
"mouseX": 96,
"mouseY": 856,
"time": 600 // 延迟500毫秒后移动
},
{
"type": 4, // 第一次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 700 // 延迟100毫秒后按下
},
{
"type": 5, // 第一次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 800 // 延迟100毫秒后释放
},
{
"type": 4, // 第二次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 900 // 延迟100毫秒后按下
},
{
"type": 5, // 第二次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1000 // 延迟100毫秒后释放
},
{
"type": 4, // 第三次按下鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1100 // 延迟100毫秒后按下
},
{
"type": 5, // 第三次释放鼠标左键
"mouseX": 96,
"mouseY": 856,
"mouseButton": "Left",
"time": 1200 // 延迟100毫秒后释放
},
{
"type": 0, // 再次按下 m 键
"keyCode": 77, // m 键的键码
"time": 1700 // 延迟500毫秒后按下
},
{
"type": 1, // 再次释放 m 键
"keyCode": 77, // m 键的键码
"time": 1800 // 延迟100毫秒后释放
}
],
"info": {
"name": "",
"description": "",
"x": 0,
"y": 0,
"width": 3840,
"height": 2160,
"recordDpi": 2
}
}

View File

@@ -1 +1 @@
{"macroEvents":[{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":792.4653},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":1159.2307},{"type":4,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":2636.2387},{"type":5,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":2834.2624},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":3821.2489},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":4224.2644},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":4934.3029},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":5259.2801},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":5478.2152},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":6147.2218},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":6774.2999},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":7159.2845},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":8147.2996},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":8230.3207},{"type":4,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":8697.1997},{"type":5,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":8887.3302},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":9538.261},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":9698.2691},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":10183.2751},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":10266.2936},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":10952.2396},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":11603.3408},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":12195.314},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":12609.2218},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":13142.3151},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":13461.3475},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":14041.2565},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":14296.2272},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":14911.2411},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":15840.3166},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":16071.231},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":16432.2845},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":16805.2562},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":17510.226},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":18054.3114},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":18338.2967},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":19882.4198},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":19970.3405},{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":20651.2966},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":20745.2798},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":21597.2646},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":21916.3049},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":21999.2573},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":22390.2666},{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":23330.2251},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":23472.2883}],"info":{"name":"","description":"","x":0,"y":0,"width":2560,"height":1440,"recordDpi":1.5}}
{"macroEvents":[{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":792.4653},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":1159.2307},{"type":4,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":2636.2387},{"type":5,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":2834.2624},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":3821.2489},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":4224.2644},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":4934.3029},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":5259.2801},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":5478.2152},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":6147.2218},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":6774.2999},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":7159.2845},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":8147.2996},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":8230.3207},{"type":4,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":8697.1997},{"type":5,"mouseX":1279,"mouseY":719,"mouseButton":"Middle","time":8887.3302},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":9538.261},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":9698.2691},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":10183.2751},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":10266.2936},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":10952.2396},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":11603.3408},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":12195.314},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":12609.2218},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":13142.3151},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":13461.3475},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":14041.2565},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":14296.2272},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":14911.2411},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":15840.3166},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":16071.231},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":16432.2845},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":16805.2562},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":17500.226}],"info":{"name":"","description":"","x":0,"y":0,"width":2560,"height":1440,"recordDpi":1.5}}

View File

@@ -1,67 +1,67 @@
{
"macroEvents": [
{
"type": 0, // 按下 m 键
"keyCode": 77, // m 键的键码
"time": 20
},
{
"type": 1, // 释放 m 键
"keyCode": 77, // m 键的键码
"time": 100 // 延迟80毫秒后释放
},
{
"type": 2, // 鼠标移动事件
"mouseX": 96,
"mouseY": 1300,
"time": 600 // 延迟500毫秒后移动
},
{
"type": 4, // 第一次按下鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 700 // 延迟100毫秒后按下
},
{
"type": 5, // 第一次释放鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 800 // 延迟100毫秒后释放
},
{
"type": 4, // 第二次按下鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 900 // 延迟100毫秒后按下
},
{
"type": 5, // 第二次释放鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 1000 // 延迟100毫秒后释放
},
{
"type": 0, // 再次按下 m 键
"keyCode": 77, // m 键的键码
"time": 1400 // 延迟500毫秒后按下
},
{
"type": 1, // 再次释放 m 键
"keyCode": 77, // m 键的键码
"time": 1500 // 延迟100毫秒后释放
}
],
"info": {
"name": "",
"description": "",
"x": 0,
"y": 0,
"width": 3840,
"height": 2160,
"recordDpi": 2
}
{
"macroEvents": [
{
"type": 0, // 按下 m 键
"keyCode": 77, // m 键的键码
"time": 20
},
{
"type": 1, // 释放 m 键
"keyCode": 77, // m 键的键码
"time": 100 // 延迟80毫秒后释放
},
{
"type": 2, // 鼠标移动事件
"mouseX": 96,
"mouseY": 1300,
"time": 600 // 延迟500毫秒后移动
},
{
"type": 4, // 第一次按下鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 700 // 延迟100毫秒后按下
},
{
"type": 5, // 第一次释放鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 800 // 延迟100毫秒后释放
},
{
"type": 4, // 第二次按下鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 900 // 延迟100毫秒后按下
},
{
"type": 5, // 第二次释放鼠标左键
"mouseX": 96,
"mouseY": 1300,
"mouseButton": "Left",
"time": 1000 // 延迟100毫秒后释放
},
{
"type": 0, // 再次按下 m 键
"keyCode": 77, // m 键的键码
"time": 1400 // 延迟500毫秒后按下
},
{
"type": 1, // 再次释放 m 键
"keyCode": 77, // m 键的键码
"time": 1500 // 延迟100毫秒后释放
}
],
"info": {
"name": "",
"description": "",
"x": 0,
"y": 0,
"width": 3840,
"height": 2160,
"recordDpi": 2
}
}

View File

@@ -1,120 +1,117 @@
(async function () {
// 启用自动拾取的实时任务
const startTime = Date.now();
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
async function logTaskStart() {
const messages = [
`确保地图的按键为M键`,
'左上角派蒙头像未被其他悬浮窗遮挡',
'游戏以60帧运行',
'游戏视角灵敏度保持默认',
'运行时是琳妮特前台且拥有双风共鸣',
'元素共鸣需要四个角色组队触发,仅两个风系角色无效'
];
for (let message of messages) {
log.info(message);
await sleep(1000);
}
}
async function KeyMouse(locationName, sec, x, y)
{
if (x !== undefined && y !== undefined) {
log.info(`前往 {name}`, locationName);
await genshin.tp(x, y);
await sleep(1000);
}
let filePath = `assets/KeyMouse/${locationName}.json`;
await keyMouseScript.runFile(filePath);
await sleep(sec * 1000); // 将秒转换为毫秒
}
async function AutoPath(locationName) {
let filePath = `assets/AutoPath/${locationName}.json`;
await AutoPathing.runFile(filePath);
}
await logTaskStart();
await KeyMouse('地中之盐北', 1, -321, 1470);
await KeyMouse('无相之冰', 1, -410, 1161);
await KeyMouse('解除冰元素附着', 4, -255, 629);
await KeyMouse('地中之盐', 2, -164, 1183);
await KeyMouse('望舒客栈', 2, 330, 874);
await KeyMouse('荻花洲西', 2, 730, 1062);
await KeyMouse('望舒客栈西', 2, 730, 1062);
await KeyMouse('轻策庄', 2, 547, 1767);
await KeyMouse('沉玉谷码头', 2, 1113, 1948);
await KeyMouse('沉玉谷狗洞', 2, 1114, 1948);
await KeyMouse('奥藏山', 2, 1451, 1029);
await KeyMouse('放大地图', 1, 1185, 620);
await KeyMouse('绝云间1', 2, 1185, 620);
await KeyMouse('绝云间2', 2, 1185, 620);
await KeyMouse('缩小地图', 1);
await KeyMouse('酒窖', 2, 730, 1062);
await KeyMouse('神无冢1', 2, -3405, -3534);
await KeyMouse('神无冢2', 2, -3405, -3534);
await KeyMouse('炉心1', 2, -3289, -3654);
await KeyMouse('炉心2', 2, -3289, -3654);
await KeyMouse('绝美我心', 2, -1315, -3776);
await KeyMouse('沉眠之庭1', 2, -4185, -4244);
await KeyMouse('沉眠之庭2', 2, -4185, -4244);
await KeyMouse('浅濑神社', 2, -3698, -4689);
await KeyMouse('鹤观神像1', 2, -3269, -6135);
await KeyMouse('鹤观神像2', 2, -3269, -6135);
await KeyMouse('黄金王兽北', 2, -2612, -6507);
await KeyMouse('须弥城', 2, 2786, -503);
await KeyMouse('须弥城东', 2, 2694, -416);
await KeyMouse('须弥城西北1', 2, 2876, -292);
await KeyMouse('须弥城西北2', 2, 2876, -292);
await KeyMouse('圣显厅南', 2, 4271, -1666);
await KeyMouse('圣显厅西', 2, 4775, -1437);
await KeyMouse('神的棋盘', 2, 5759, -1309);
await KeyMouse('枫丹廷1', 2, 4509, 3630);
await KeyMouse('枫丹廷2', 2, 4509, 3630);
await KeyMouse('欧庇克莱歌剧院东南', 2, 3595, 3254);
await KeyMouse('芒索斯山东1', 2, 4985, 4463);
await KeyMouse('芒索斯山东2', 2, 4985, 4463);
await KeyMouse('学术会堂', 2, 4144, 4424);
await KeyMouse('科学院北', 2, 4434, 5092);
await KeyMouse('科学院西北1', 2, 4624, 4952);
await KeyMouse('科学院西北2', 2, 4624, 4952);
await KeyMouse('放大地图', 1);
await KeyMouse('科学院西', 2, 4498, 4711);
await KeyMouse('缩小地图', 1);
await KeyMouse('海露港', 6, 4984, 1700);
await KeyMouse('遗忘之路', 2, 5990, 1212);
await KeyMouse('佩特莉可神像', 2, 4454, 1255);
await KeyMouse('佩特莉可镇', 2, 4322, 1172);
await KeyMouse('楚汶市集1', 2, 9059, -1847);
await KeyMouse('楚汶市集2', 2, 9059, -1847);
await KeyMouse('竞技场东', 2, 8734, -1856);
await KeyMouse('中鸵鸟', 1, 8242, -1735);
await KeyMouse('北鸵鸟', 1, 8396, -1216);
await KeyMouse('虹灵的净土', 2, 9038, -2428);
await KeyMouse('流泉之众', 2, 8918, -2678);
await KeyMouse('悬木人', 2, 8433, -2108);
await KeyMouse('精石铜城', 2, 6323, 821);
//彩蛋:凭此注释截图可找'辉鸭蛋'领取10分钟禁言礼包一份
//await AutoPath('莫尔泰区神像');
// 计算并输出总时长
const endTime = Date.now();
const totalTimeInSeconds = (endTime - startTime) / 1000;
// 将总时长转换为分钟和秒的形式
const minutes = Math.floor(totalTimeInSeconds / 60);
const seconds = totalTimeInSeconds % 60;
// 格式化输出
const formattedTime = `${minutes}${seconds.toFixed(0).padStart(2, '0')}`;
log.info(`自动狗粮运行总时长:${formattedTime}`);
(async function () {
// 启用自动拾取的实时任务
const startTime = Date.now();
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
async function logTaskStart() {
const messages = [
`确保地图的按键为M键`,
'左上角派蒙头像未被其他悬浮窗遮挡',
'游戏以60帧运行',
'游戏视角灵敏度保持默认为3',
'运行时是琳妮特前台且拥有双风共鸣',
'元素共鸣需要四个角色组队触发,仅两个风系角色无效'
'不要带其他有移速加成的角色',
];
for (let message of messages) {
log.info(message);
await sleep(1000);
}
}
async function KeyMouse(locationName, sec, x, y)
{
if (x !== undefined && y !== undefined) {
log.info(`前往 {name}`, locationName);
await genshin.tp(x, y);
await sleep(1000);
}
let filePath = `assets/KeyMouse/${locationName}.json`;
await keyMouseScript.runFile(filePath);
await sleep(sec * 1000); // 将秒转换为毫秒
}
async function AutoPath(locationName) {
let filePath = `assets/AutoPath/${locationName}.json`;
await pathingScript.runFile(filePath);
}
await logTaskStart();
await KeyMouse('地中之盐北', 1, -321, 1470);
await KeyMouse('无相之冰', 1, -410, 1161);
await KeyMouse('解除冰元素附着', 4, -255, 629);
await KeyMouse('地中之盐', 2, -164, 1183);
await KeyMouse('望舒客栈', 2, 330, 874);
await KeyMouse('荻花洲西', 2, 730, 1062);
await KeyMouse('望舒客栈西', 2, 730, 1062);
await KeyMouse('轻策庄', 2, 547, 1767);
await KeyMouse('沉玉谷码头', 2, 1113, 1948);
await KeyMouse('沉玉谷狗洞', 2, 1114, 1948);
await KeyMouse('奥藏山', 2, 1451, 1029);
await KeyMouse('酒窖', 2, 730, 1062);
await KeyMouse('神无冢1', 2, -3405, -3534);
await KeyMouse('神无冢2', 2, -3405, -3534);
await KeyMouse('炉心1', 2, -3289, -3654);
await KeyMouse('炉心2', 2, -3289, -3654);
await KeyMouse('绝美我心', 2, -1315, -3776);
await KeyMouse('沉眠之庭1', 2, -4185, -4244);
await KeyMouse('沉眠之庭2', 2, -4185, -4244);
await KeyMouse('浅濑神社', 2, -3698, -4689);
await KeyMouse('鹤观神像1', 2, -3269, -6135);
await KeyMouse('鹤观神像2', 2, -3269, -6135);
await KeyMouse('黄金王兽北', 2, -2612, -6507);
await KeyMouse('须弥城', 2, 2786, -503);
await KeyMouse('须弥城东', 2, 2694, -416);
await KeyMouse('须弥城西北1', 2, 2876, -292);
await KeyMouse('须弥城西北2', 2, 2876, -292);
await KeyMouse('圣显厅南', 2, 4271, -1666);
await KeyMouse('圣显厅西', 2, 4775, -1437);
await KeyMouse('神的棋盘', 2, 5759, -1309);
await KeyMouse('枫丹廷1', 2, 4509, 3630);
await KeyMouse('枫丹廷2', 2, 4509, 3630);
await KeyMouse('欧庇克莱歌剧院东南', 2, 3595, 3254);
await KeyMouse('芒索斯山东1', 2, 4985, 4463);
await KeyMouse('芒索斯山东2', 2, 4985, 4463);
await KeyMouse('学术会堂', 2, 4144, 4424);
await KeyMouse('科学院北', 2, 4434, 5092);
await KeyMouse('科学院西北1', 2, 4624, 4952);
await KeyMouse('科学院西北2', 2, 4624, 4952);
await KeyMouse('放大地图', 1);
await KeyMouse('科学院西', 2, 4498, 4711);
await KeyMouse('缩小地图', 1);
await KeyMouse('海露港', 6, 4984, 1700);
await KeyMouse('遗忘之路', 2, 5990, 1212);
await KeyMouse('佩特莉可神像', 2, 4454, 1255);
await KeyMouse('佩特莉可镇', 2, 4322, 1172);
await KeyMouse('楚汶市集1', 2, 9059, -1847);
await KeyMouse('楚汶市集2', 2, 9059, -1847);
await KeyMouse('竞技场东', 2, 8734, -1856);
await KeyMouse('中鸵鸟', 1, 8242, -1735);
await KeyMouse('北鸵鸟', 1, 8396, -1216);
await KeyMouse('虹灵的净土', 2, 9038, -2428);
await KeyMouse('流泉之众', 2, 8918, -2678);
await KeyMouse('悬木人', 2, 8433, -2108);
await KeyMouse('精石铜城', 2, 6323, 821);
//彩蛋:凭此注释截图可找'辉鸭蛋'领取10分钟禁言礼包一份
//await AutoPath('莫尔泰区神像');
// 计算并输出总时长
const endTime = Date.now();
const totalTimeInSeconds = (endTime - startTime) / 1000;
// 将总时长转换为分钟和秒的形式
const minutes = Math.floor(totalTimeInSeconds / 60);
const seconds = totalTimeInSeconds % 60;
// 格式化输出
const formattedTime = `${minutes}${seconds.toFixed(0).padStart(2, '0')}`;
log.info(`自动狗粮运行总时长:${formattedTime}`);
})();

View File

@@ -1,12 +1,12 @@
{
"manifest_version": 1,
"name": "自动狗粮",
"version": "1.5",
"description": "自动调查离传送点较近的狗粮。请使用琳妮特前台,双风共鸣。并保证所有传送点都已经激活!",
"authors": [
{
"name": "HZYgrandma"
}
],
"main": "main.js"
{
"manifest_version": 1,
"name": "自动狗粮",
"version": "1.6",
"description": "自动调查离传送点较近的狗粮。请使用琳妮特前台,双风共鸣。并保证所有传送点都已经激活!",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js"
}

View File

@@ -0,0 +1,12 @@
(async function () {
setGameMetrics(3840, 2160, 2);
keyPress("F4");
await sleep(1500);
click(1920, 100);
await sleep(1000);
click(3480, 1948);
await sleep(1000);
keyPress("Escape");
log.info("已领取历练点");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "领取纪行",
"version": "1.0",
"description": "用于领取纪行",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

View File

@@ -0,0 +1,14 @@
(async function () {
setGameMetrics(3840, 2160, 2);
keyPress("F1");
await sleep(1600);
click(580, 680);
await sleep(1000);
click(3110, 1508);
await sleep(1000);
keyPress("Escape");
await sleep(1500);
keyPress("Escape");
log.info("已领取历练点");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "领取历练点",
"version": "1.0",
"description": "用于领取历练点",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

14
repo/js/LastParty/main.js Normal file
View File

@@ -0,0 +1,14 @@
(async function () {
await sleep(15000);
setGameMetrics(3840, 2160, 2);
keyPress("L");
await sleep(4500);
click(150, 1078);
await sleep(800);
click(3200, 2050);
await sleep(1000);
keyPress("Escape");
await sleep(1000);
log.info("已切换至上一队");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "切换上一队",
"version": "1.0",
"description": "用于切换到上一队",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

16
repo/js/Mail/main.js Normal file
View File

@@ -0,0 +1,16 @@
(async function () {
setGameMetrics(3840, 2160, 2);
keyPress("Escape");
await sleep(1500);
click(94, 1212);
await sleep(1500);
click(500, 2024);
await sleep(1000);
keyPress("Escape");
await sleep(1000);
keyPress("Escape");
await sleep(1000);
keyPress("Escape");
log.info("已领取邮件");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "领取邮件",
"version": "1.0",
"description": "用于领取邮件",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

13
repo/js/NextParty/main.js Normal file
View File

@@ -0,0 +1,13 @@
(async function () {
setGameMetrics(3840, 2160, 2);
keyPress("L");
await sleep(4500);
click(3684, 1078);
await sleep(800);
click(3200, 2050);
await sleep(1000);
keyPress("Escape");
await sleep(1000);
log.info("已切换至下一队");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "切换下一队",
"version": "1.0",
"description": "用于切换到下一队",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

8
repo/js/QuitGame/main.js Normal file
View File

@@ -0,0 +1,8 @@
(async function () {
keyDown("MENU");
keyDown("F4");
await sleep(50);
keyUp("MENU");
keyUp("F4");
await sleep(1500);
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "退出游戏",
"version": "1.0",
"description": "用于退出游戏",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

View File

@@ -0,0 +1,33 @@
(async function () {
setGameMetrics(3840, 2160, 2);
keyPress("b");
await sleep(1500);
click(1350, 90);
await sleep(1240);
click(1310, 2030);
await sleep(1000);
click(580, 2030);
await sleep(1240);
click(250, 300);
await sleep(500);
click(250, 450);
await sleep(500);
click(250, 600);
await sleep(500);
click(250, 750);
await sleep(500);
click(700, 2030);
await sleep(1240);
click(3500, 2030);
await sleep(1240);
click(2300, 1500);
await sleep(1000);
keyPress("Escape");
await sleep(800);
keyPress("Escape");
await sleep(1000);
keyPress("Escape");
await sleep(1000);
log.info("已分解狗粮");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "分解狗粮",
"version": "1.0",
"description": "用于分解狗粮",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

15
repo/js/Shutdown/main.js Normal file
View File

@@ -0,0 +1,15 @@
(async function () {
keyDown("LWIN");
keyDown("X");
await sleep(50);
keyUp("LWIN");
keyUp("X");
await sleep(3000);
keyPress("LSHIFT");
await sleep(50);
keyPress("LCONTROL");
await sleep(50);
keyPress("U");
await sleep(1000);
keyPress("U");
})();

View File

@@ -0,0 +1,12 @@
{
"manifest_version": 1,
"name": "关闭计算机",
"version": "1.0",
"description": "用于关闭计算机",
"authors": [
{
"name": "HZYgrandma",
}
],
"main": "main.js",
}

View File

@@ -0,0 +1,41 @@
角色定义:
角色1=皇女
角色2=白术
角色3=林尼
---
策略定义:
皇女 使用 技能2
白术 使用 技能2
林尼 使用 技能3
白术 使用 技能2
皇女 使用 技能2
白术 使用 技能1
白术 使用 技能2
林尼 使用 技能3
皇女 使用 技能2
白术 使用 技能2
林尼 使用 技能3
白术 使用 技能2
皇女 使用 技能2
白术 使用 技能1
白术 使用 技能2
林尼 使用 技能3
皇女 使用 技能2
白术 使用 技能2
林尼 使用 技能3
白术 使用 技能2
皇女 使用 技能2
白术 使用 技能1
白术 使用 技能2
林尼 使用 技能3