UpadteV1.8

This commit is contained in:
洪籽阳外婆
2024-10-19 22:51:33 +08:00
committed by GitHub
parent a7404f3227
commit 6c8b533ee6
7 changed files with 494 additions and 13 deletions

View File

@@ -0,0 +1,52 @@
{
"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": 2701.53076171875,
"y": -761.8154296875
},
{
"id": 2,
"x": 2703.22119140625,
"y": -794.27490234375,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 3,
"x": 2706.17041015625,
"y": -789.1103515625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 2690.923828125,
"y": -822.13232421875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 2683.91015625,
"y": -839.9404296875,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,92 @@
{
"info": {
"name": "狗粮_须弥_塔尼特营地_4",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 5063.81103515625,
"y": -1587.734375
},
{
"id": 2,
"x": 5094.9765625,
"y": -1547.99658203125,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 3,
"x": 5098.1201171875,
"y": -1541.771484375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 5083.83740234375,
"y": -1550.5673828125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 5059.3310546875,
"y": -1572.44775390625,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 7,
"x": 5064.13818359375,
"y": -1579.64892578125,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": 5081.541015625,
"y": -1573.60595703125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 9,
"x": 5119.51220703125,
"y": -1570.22216796875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 10,
"x": 5136.69189453125,
"y": -1577.34765625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 11,
"x": 5170.701171875,
"y": -1559.78369140625,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,124 @@
{
"info": {
"name": "狗粮_枫丹_枫科院宿舍_4",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 4000.9814453125,
"y": 4878.4423828125
},
{
"id": 2,
"x": 3953.20751953125,
"y": 4829.73291015625,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 3,
"x": 3950.16845703125,
"y": 4837.42529296875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 3946.93505859375,
"y": 4846.52294921875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 3943.2548828125,
"y": 4856.7353515625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 3942.2978515625,
"y": 4861.6513671875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 3951.08154296875,
"y": 4864.849609375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": 3947.02587890625,
"y": 4876.2939453125,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 9,
"x": 3954.876953125,
"y": 4875.513671875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 10,
"x": 3955.63037109375,
"y": 4881.529296875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 11,
"x": 3955.97021484375,
"y": 4875.0732421875,
"type": "path",
"move_mode": "fly",
"action": ""
},
{
"id": 13,
"x": 3960.7890625,
"y": 4875.92578125,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 14,
"x": 3952.8828125,
"y": 4865.2705078125,
"type": "path",
"move_mode": "fly",
"action": ""
},
{
"id": 15,
"x": 3952.779296875,
"y": 4853.02685546875,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,84 @@
{
"info": {
"name": "狗粮_望泷村西南_4",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"x": -755.568359375,
"y": -4001.1162109375,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": -736.296875,
"y": -4012.8759765625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": -726.130859375,
"y": -4025.2802734375,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
},
{
"id": 4,
"x": -703.5146484375,
"y": -4050.36328125,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": -685.8505859375,
"y": -4062.9677734375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": -688.615234375,
"y": -4042.8857421875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": -672.9072265625,
"y": -4043.359375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": -685.6416015625,
"y": -4055.6103515625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 9,
"x": -694.265625,
"y": -4086.93359375,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,108 @@
{
"info": {
"name": "狗粮_璃月_老窖_6",
"type": "collect",
"author": "Tim",
"version": "1.0",
"description": "",
"bgiVersion": "0.34.5"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 730.2958984375,
"y": 1061.9833984375
},
{
"id": 2,
"x": 670.7509765625,
"y": 1013.990234375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 649.2666015625,
"y": 971.67529296875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 642.5595703125,
"y": 941.28466796875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 640.6220703125,
"y": 893.11865234375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 650.8212890625,
"y": 860.02880859375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 650.44921875,
"y": 850.58984375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 8,
"x": 649.681640625,
"y": 832.33056640625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 10,
"x": 648.564453125,
"y": 831.76171875,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 11,
"x": 645.7724609375,
"y": 835.53515625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 12,
"x": 645.4462890625,
"y": 834.556640625,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 13,
"x": 645.578125,
"y": 833.45751953125,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -6,7 +6,7 @@
async function logTaskStart() {
const messages = [
`确保地图的按键为M键`,
'确保地图的按键为M键',
'左上角派蒙头像未被其他悬浮窗遮挡',
'游戏以60帧运行',
'游戏视角灵敏度保持默认为3',
@@ -24,7 +24,7 @@
async function KeyMouse(locationName, sec, x, y)
{
if (x !== undefined && y !== undefined) {
log.info(`前往 {name}`, locationName);
log.info(`前往 ${locationName}`);
await genshin.tp(x, y);
await sleep(1000);
}
@@ -39,41 +39,64 @@
await pathingScript.runFile(filePath);
}
function logTimeTaken(startTime) {
const currentTime = Date.now();
const totalTimeInSeconds = (currentTime - startTime) / 1000;
const minutes = Math.floor(totalTimeInSeconds / 60);
const seconds = totalTimeInSeconds % 60;
const formattedTime = `${minutes}${seconds.toFixed(0).padStart(2, '0')}`;
log.info(`当前运行总时长:${formattedTime}`);
}
await logTaskStart();
log.info('前往地区:璃月')
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 AutoPath('荻花洲');
await KeyMouse('荻花洲西', 2, 730, 1062);
await KeyMouse('望舒客栈西', 2, 730, 1062);
await KeyMouse('轻策庄', 2, 547, 1767);
await AutoPath('轻策庄');
await KeyMouse('沉玉谷码头', 2, 1113, 1948);
await KeyMouse('沉玉谷狗洞', 2, 1114, 1948);
await KeyMouse('奥藏山', 2, 1451, 1029);
await KeyMouse('酒窖', 2, 730, 1062);
await AutoPath('酒窖');
await AutoPath('渌华池');
logTimeTaken(startTime);
log.info('前往地区:稻妻')
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 AutoPath('望泷村西南');
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);
logTimeTaken(startTime);
log.info('前往地区:须弥')
await KeyMouse('须弥城', 2, 2786, -503);
await KeyMouse('须弥城东', 2, 2694, -416);
await KeyMouse('须弥城西北1', 2, 2876, -292);
await KeyMouse('须弥城西北2', 2, 2876, -292);
await AutoPath('化城郭西');
await AutoPath('维摩庄');
await KeyMouse('圣显厅南', 2, 4271, -1666);
await KeyMouse('圣显厅西', 2, 4775, -1437);
await KeyMouse('神的棋盘', 2, 5759, -1309);
logTimeTaken(startTime);
log.info('前往地区:枫丹')
await KeyMouse('枫丹廷1', 2, 4509, 3630);
await KeyMouse('枫丹廷2', 2, 4509, 3630);
await KeyMouse('欧庇克莱歌剧院东南', 2, 3595, 3254);
@@ -87,10 +110,11 @@
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);
logTimeTaken(startTime);
log.info('前往地区:纳塔')
await KeyMouse('楚汶市集1', 2, 9059, -1847);
await KeyMouse('楚汶市集2', 2, 9059, -1847);
await KeyMouse('竞技场东', 2, 8734, -1856);
@@ -99,20 +123,17 @@
await KeyMouse('虹灵的净土', 2, 9038, -2428);
await KeyMouse('流泉之众', 2, 8918, -2678);
await KeyMouse('悬木人', 2, 8433, -2108);
logTimeTaken(startTime);
await AutoPath('渌华池');
await AutoPath('轻策庄');
await AutoPath('荻花洲');
await AutoPath('维摩庄');
log.info('前往地区:其他')
await KeyMouse('精石铜城', 2, 6323, 821);
await AutoPath('塔尼特营地');
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,11 +1,11 @@
{
"manifest_version": 1,
"name": "自动狗粮",
"version": "1.7",
"version": "1.8",
"description": "自动调查离传送点较近的狗粮。请使用琳妮特前台,双风共鸣。并保证所有传送点都已经激活!",
"authors": [
{
"name": "HZYgrandma",
"name": "HZYgrandma & Tim",
}
],
"main": "main.js"