Merge pull request #98 from Yang-z/main

update js and pathing scripts
This commit is contained in:
辉鸭蛋
2024-11-20 17:42:03 +08:00
committed by GitHub
20 changed files with 190 additions and 253 deletions

View File

@@ -1,6 +1,6 @@
{
"info": {
"name": "test",
"name": "",
"type": "collect",
"author":"Yang-z"
},
@@ -532,8 +532,8 @@
"move_mode": "fly"
},
{
"x": -3123.923828125,
"y": -3742.3173828125,
"x": -3124.9794921875,
"y": -3742.8154296875,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
@@ -788,26 +788,32 @@
"type": "path",
"move_mode": "walk"
},
{
"x": -3155.1865234375,
"y": -3724.8916015625,
"x": -3153.908203125,
"y": -3718.08203125,
"type": "path",
"move_mode": "walk"
},
{
"x": -3154.5009765625,
"y": -3727.8203125,
"x": -3161.7919921875,
"y": -3719.201171875,
"type": "path",
"move_mode": "target"
"move_mode": "walk"
},
{
"x": -3161.1552734375,
"y": -3722.1484375,
"type": "target",
"move_mode": "fly"
},
{
"x": -3154.974609375,
"y": -3736.6025390625,
"type": "path",
"move_mode": "fly"
},
{
"x": -3155.1923828125,
"y": -3735.61328125,
"type": "path",
"move_mode": "walk",
"//": "no fly"
},
{
"x": -3147.8583984375,
"y": -3741.576171875,
@@ -815,8 +821,14 @@
"move_mode": "walk"
},
{
"x": -3136.646484375,
"y": -3739.6689453125,
"x": -3142.1376953125,
"y": -3741.7470703125,
"type": "path",
"move_mode": "walk"
},
{
"x": -3134.73828125,
"y": -3736.9609375,
"type": "path",
"move_mode": "walk"
},

View File

@@ -38,7 +38,6 @@
},
{
"x": 2066.17431640625,
"y": 1484.46533203125,
@@ -46,8 +45,8 @@
"move_mode": "walk"
},
{
"x": 2071.8984375,
"y": 1459.54052734375,
"x": 2071.67431640625,
"y": 1459.99951171875,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
@@ -68,19 +67,24 @@
"action": ""
},
{
"x": 2072.03857421875,
"y": 1460.0771484375,
"x": 2070.2568359375,
"y": 1461.359375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"x": 2072.93115234375,
"y": 1461.66455078125,
"type": "path",
"move_mode": "walk"
},
{
"x": 2076.0849609375,
"y": 1459.40625,
"type": "path",
"move_mode": "walk"
},
{
@@ -123,8 +127,6 @@
}
],
"not_used": [

View File

@@ -344,6 +344,19 @@
"y": 837.4140625,
"type": "path",
"move_mode": "walk"
},
{
"x": 648.2548828125,
"y": 829.93701171875,
"type": "target",
"move_mode": "walk"
},
{
"x": 645.55859375,
"y": 830.66357421875,
"type": "path",
"move_mode": "walk"
}

View File

@@ -45,14 +45,6 @@
"action": "",
"#": 1
},
{
"x": 1084.857421875,
"y": 302.73388671875,
"type": "target",
"move_mode": "walk",
"action": "",
"#": 1
},
{
@@ -84,14 +76,6 @@
"action": "",
"#": 2
},
{
"x": 1046.69921875,
"y": 320.9365234375,
"type": "target",
"move_mode": "walk",
"action": "",
"#": 2
},
{
"x": 1041.296875,
@@ -127,16 +111,10 @@
{
"x": 1069.2744140625,
"y": 355.451171875,
"type": "target",
"type": "path",
"move_mode": "walk",
"action": "",
"#": 3
},
{
"x": 1067.06640625,
"y": 361.15478515625,
"type": "path",
"move_mode": "walk"
}
]
}

View File

@@ -72,17 +72,18 @@
"move_mode": "run"
},
{
"x": 617.072265625,
"y": 1707.46630859375,
"x": 614.8515625,
"y": 1708.7294921875,
"type": "path",
"move_mode": "run"
},
{
"x": 620.662109375,
"y": 1707.00732421875,
"x": 621.1572265625,
"y": 1706.734375,
"type": "target",
"move_mode": "walk",
"action":""
"action":"",
"#": 2
},
{
"x": 624.7138671875,
@@ -97,15 +98,16 @@
"move_mode": "run"
},
{
"x": 661.68359375,
"y": 1719.5849609375,
"x": 662.2451171875,
"y": 1719.79443359375,
"type": "target",
"move_mode": "walk",
"action":""
"action":"",
"#": 3
},
{
"x": 662.33203125,
"y": 1719.9033203125,
"x": 666.2421875,
"y": 1722.142578125,
"type": "path",
"move_mode": "walk"
}

View File

@@ -41,11 +41,12 @@
"type": "path",
"move_mode": "walk"
},
{
"x": 5096.35107421875,
"y": -1543.46240234375,
"type": "path",
"move_mode": "walk"
},
{
"x": 5095.0478515625,

View File

@@ -25,8 +25,8 @@
"move_mode": "walk"
},
{
"x": 4011.3349609375,
"y": -1055.27490234375,
"x": 4010.419921875,
"y": -1055.11181640625,
"type": "target",
"move_mode": "walk",
"action": "",
@@ -73,14 +73,6 @@
"type": "path",
"move_mode": "walk"
},
{
"x": 4025.60107421875,
"y": -1040.6708984375,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
"x": 4024.052734375,
"y": -1040.53564453125,
@@ -247,6 +239,12 @@
"move_mode": "walk",
"action": "",
"#": "8"
},
{
"x": 3994.71826171875,
"y": -1048.44091796875,
"type": "target",
"move_mode": "walk"
}
]
}

View File

@@ -41,7 +41,7 @@
"y": 4580.2001953125,
"type": "target",
"move_mode": "walk",
"action": "fight"
"action": ""
}
]
}

View File

@@ -34,14 +34,6 @@
"action": "",
"#": "1"
},
{
"x": 7994.86328125,
"y": -1745.2353515625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "1"
},
{
"x": 8008.7412109375,
@@ -79,22 +71,6 @@
"action": "",
"#": "2"
},
{
"x": 8056.9794921875,
"y": -1716.3125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
"x": 8056.9794921875,
"y": -1716.3125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
@@ -125,14 +101,6 @@
"action": "",
"#": "3"
},
{
"x": 8230.8564453125,
"y": -1712.17041015625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "3"
},
{
@@ -258,14 +226,6 @@
"action": "",
"#": "6"
},
{
"x": 8143.2216796875,
"y": -1469.74072265625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "6"
},
{
"x": 8144.7275390625,
"y": -1470.783203125,
@@ -303,14 +263,6 @@
"action": "",
"#": "7"
},
{
"x": 8766.4541015625,
"y": -1825.40478515625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "7"
},
{
"x": 8766.4541015625,
"y": -1825.40478515625,

View File

@@ -119,14 +119,35 @@
click(42, 420); await sleep(500); // zoom out
}
click(42, 645); await sleep(1000); // zoom in
keyPress("M"); await sleep(1000);
// 打开自动拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
}
// 分解圣遗物
async function salvage() {
keyPress("B"); await sleep(2000);
click(670, 40); await sleep(1000); // 圣遗物
click(660, 1010); await sleep(1000); // 分解
click(300, 1020); await sleep(1000); // 快速选择
click(200, 150); await sleep(500); // 1
click(200, 220); await sleep(500); // 2
click(200, 300); await sleep(500); // 3
// click(300, 380); await sleep(3000); // 4
click(340, 1000); await sleep(1000); // 确认选择
click(1720, 1015); await sleep(1500); // 分解
click(1180, 750); await sleep(1000); // 进行分解
click(1840, 45); await sleep(1500); // 取消
click(1840, 45); await sleep(1000); // 取消
click(1840, 45); await sleep(1000); // 取消
}
// 单一脚本执行
async function runFile(filePath) {
let times = tryTimes; // 剩余尝试次数
async function runFile(filePath, times = tryTimes) {
log.info(filePath);
try {
times--;
@@ -135,19 +156,19 @@
catch (error) {
log.error(error.toString());
await sleep(3000);
if (times > 0) await runFile(filePath);
if (times > 0) await runFile(filePath, times);
}
}
// 批量执行
async function batch(folder, files) {
for (const file of files) {
const filePath = folder + file;
for (let i = 0; i < files.length; i++) {
if (i % 15 == 0) await salvage();
const filePath = folder + files[i];
await runFile(filePath);
}
}
// main
log.warn('"触摸"需要加入拾取白名单,否则纳塔额外点位无法拾取!')
updateTryTimes();
@@ -163,6 +184,6 @@
log.info(`开始执行额外线路。`);
await batch(folderE, pathingE);
keyPress('VK_LBUTTON'); // 砸开罐子拾取
await sleep(3000);
await sleep(5000);
})();

View File

@@ -1,9 +1,9 @@
{
"manifest_version": 1,
"name": "狗粮AB路线及额外点位",
"version": "1.0",
"name": "狗粮ABE路线,自动拾取分解",
"version": "1.1",
"bgi_version": "0.36.1",
"description": "圣遗物狗粮AB路线自动轮换及额外点位拾取",
"description": "圣遗物狗粮AB路线自动轮换及额外点位拾取,途中自动分解。",
"authors": [
{
"name": "Yang-z",

View File

@@ -532,8 +532,8 @@
"move_mode": "fly"
},
{
"x": -3123.923828125,
"y": -3742.3173828125,
"x": -3124.9794921875,
"y": -3742.8154296875,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
@@ -788,26 +788,32 @@
"type": "path",
"move_mode": "walk"
},
{
"x": -3155.1865234375,
"y": -3724.8916015625,
"x": -3153.908203125,
"y": -3718.08203125,
"type": "path",
"move_mode": "walk"
},
{
"x": -3154.5009765625,
"y": -3727.8203125,
"x": -3161.7919921875,
"y": -3719.201171875,
"type": "path",
"move_mode": "target"
"move_mode": "walk"
},
{
"x": -3161.1552734375,
"y": -3722.1484375,
"type": "target",
"move_mode": "fly"
},
{
"x": -3154.974609375,
"y": -3736.6025390625,
"type": "path",
"move_mode": "fly"
},
{
"x": -3155.1923828125,
"y": -3735.61328125,
"type": "path",
"move_mode": "walk",
"//": "no fly"
},
{
"x": -3147.8583984375,
"y": -3741.576171875,
@@ -815,8 +821,14 @@
"move_mode": "walk"
},
{
"x": -3136.646484375,
"y": -3739.6689453125,
"x": -3142.1376953125,
"y": -3741.7470703125,
"type": "path",
"move_mode": "walk"
},
{
"x": -3134.73828125,
"y": -3736.9609375,
"type": "path",
"move_mode": "walk"
},

View File

@@ -38,7 +38,6 @@
},
{
"x": 2066.17431640625,
"y": 1484.46533203125,
@@ -46,8 +45,8 @@
"move_mode": "walk"
},
{
"x": 2071.8984375,
"y": 1459.54052734375,
"x": 2071.67431640625,
"y": 1459.99951171875,
"type": "path",
"move_mode": "fly",
"action": "stop_flying"
@@ -68,19 +67,24 @@
"action": ""
},
{
"x": 2072.03857421875,
"y": 1460.0771484375,
"x": 2070.2568359375,
"y": 1461.359375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"x": 2072.93115234375,
"y": 1461.66455078125,
"type": "path",
"move_mode": "walk"
},
{
"x": 2076.0849609375,
"y": 1459.40625,
"type": "path",
"move_mode": "walk"
},
{
@@ -123,8 +127,6 @@
}
],
"not_used": [

View File

@@ -344,6 +344,19 @@
"y": 837.4140625,
"type": "path",
"move_mode": "walk"
},
{
"x": 648.2548828125,
"y": 829.93701171875,
"type": "target",
"move_mode": "walk"
},
{
"x": 645.55859375,
"y": 830.66357421875,
"type": "path",
"move_mode": "walk"
}

View File

@@ -45,14 +45,6 @@
"action": "",
"#": 1
},
{
"x": 1084.857421875,
"y": 302.73388671875,
"type": "target",
"move_mode": "walk",
"action": "",
"#": 1
},
{
@@ -84,14 +76,6 @@
"action": "",
"#": 2
},
{
"x": 1046.69921875,
"y": 320.9365234375,
"type": "target",
"move_mode": "walk",
"action": "",
"#": 2
},
{
"x": 1041.296875,
@@ -127,16 +111,10 @@
{
"x": 1069.2744140625,
"y": 355.451171875,
"type": "target",
"type": "path",
"move_mode": "walk",
"action": "",
"#": 3
},
{
"x": 1067.06640625,
"y": 361.15478515625,
"type": "path",
"move_mode": "walk"
}
]
}

View File

@@ -72,17 +72,18 @@
"move_mode": "run"
},
{
"x": 617.072265625,
"y": 1707.46630859375,
"x": 614.8515625,
"y": 1708.7294921875,
"type": "path",
"move_mode": "run"
},
{
"x": 620.662109375,
"y": 1707.00732421875,
"x": 621.1572265625,
"y": 1706.734375,
"type": "target",
"move_mode": "walk",
"action":""
"action":"",
"#": 2
},
{
"x": 624.7138671875,
@@ -97,15 +98,16 @@
"move_mode": "run"
},
{
"x": 661.68359375,
"y": 1719.5849609375,
"x": 662.2451171875,
"y": 1719.79443359375,
"type": "target",
"move_mode": "walk",
"action":""
"action":"",
"#": 3
},
{
"x": 662.33203125,
"y": 1719.9033203125,
"x": 666.2421875,
"y": 1722.142578125,
"type": "path",
"move_mode": "walk"
}

View File

@@ -41,11 +41,12 @@
"type": "path",
"move_mode": "walk"
},
{
"x": 5096.35107421875,
"y": -1543.46240234375,
"type": "path",
"move_mode": "walk"
},
{
"x": 5095.0478515625,

View File

@@ -25,8 +25,8 @@
"move_mode": "walk"
},
{
"x": 4011.3349609375,
"y": -1055.27490234375,
"x": 4010.419921875,
"y": -1055.11181640625,
"type": "target",
"move_mode": "walk",
"action": "",
@@ -73,14 +73,6 @@
"type": "path",
"move_mode": "walk"
},
{
"x": 4025.60107421875,
"y": -1040.6708984375,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
"x": 4024.052734375,
"y": -1040.53564453125,
@@ -247,6 +239,12 @@
"move_mode": "walk",
"action": "",
"#": "8"
},
{
"x": 3994.71826171875,
"y": -1048.44091796875,
"type": "target",
"move_mode": "walk"
}
]
}

View File

@@ -41,7 +41,7 @@
"y": 4580.2001953125,
"type": "target",
"move_mode": "walk",
"action": "fight"
"action": ""
}
]
}

View File

@@ -34,14 +34,6 @@
"action": "",
"#": "1"
},
{
"x": 7994.86328125,
"y": -1745.2353515625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "1"
},
{
"x": 8008.7412109375,
@@ -79,22 +71,6 @@
"action": "",
"#": "2"
},
{
"x": 8056.9794921875,
"y": -1716.3125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
"x": 8056.9794921875,
"y": -1716.3125,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "2"
},
{
@@ -125,14 +101,6 @@
"action": "",
"#": "3"
},
{
"x": 8230.8564453125,
"y": -1712.17041015625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "3"
},
{
@@ -258,14 +226,6 @@
"action": "",
"#": "6"
},
{
"x": 8143.2216796875,
"y": -1469.74072265625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "6"
},
{
"x": 8144.7275390625,
"y": -1470.783203125,
@@ -303,14 +263,6 @@
"action": "",
"#": "7"
},
{
"x": 8766.4541015625,
"y": -1825.40478515625,
"type": "target",
"move_mode": "walk",
"action": "",
"#": "7"
},
{
"x": 8766.4541015625,
"y": -1825.40478515625,