基于路径追踪的自动找凯瑟琳

This commit is contained in:
Traveler07
2024-11-21 20:50:55 +08:00
parent 17eb98ab4d
commit a866e54da1
9 changed files with 314 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{
"info": {
"name": "枫丹凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": 4509.96044921875,
"y": 3630.826904296875,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": 4496.73193359375,
"y": 3638.144287109375,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,60 @@
{
"info": {
"name": "璃月凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": 267.958984375,
"y": -665.10888671875,
"action": "",
"move_mode": "walk",
"type": "teleport"
},
{
"id": 2,
"x": 258.3662109375,
"y": -663.82177734375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 246.689453125,
"y": -662.83740234375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 233.8564453125,
"y": -661.95849609375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 219.0625,
"y": -657.271484375,
"type": "target",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 203.84765625,
"y": -659.7158203125,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,36 @@
{
"info": {
"name": "稻妻凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": -4402.556640625,
"y": -3053.041015625
},
{
"id": 2,
"x": -4408.984375,
"y": -3068.2470703125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": -4418.185546875,
"y": -3086.4326171875,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,20 @@
{
"info": {
"name": "纳塔凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"action": "force_tp",
"move_mode": "walk",
"type": "teleport",
"x": 9046.666015625,
"y": -1855.35791015625
}
]
}

View File

@@ -0,0 +1,44 @@
{
"info": {
"name": "蒙德凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": -867.6884765625,
"y": 2281.365966796875,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": -882.1455078125,
"y": 2262.399658203125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": -893.3056640625,
"y": 2249.19482421875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": -914.3564453125,
"y": 2233.071044921875,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,68 @@
{
"info": {
"name": "须弥凯瑟琳",
"type": "collect",
"author": "½",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": 2786.97265625,
"y": -503.10498046875,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": 2787.900390625,
"y": -494.41162109375,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 2786.150390625,
"y": -486.7470703125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": 2781.1748046875,
"y": -483.95751953125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 5,
"x": 2774.4716796875,
"y": -480.65478515625,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 6,
"x": 2771.126953125,
"y": -476.7919921875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 7,
"x": 2765.76953125,
"y": -476.0498046875,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,29 @@
(async function () {
// 所有的代码必须由 async function 包裹
async function AutoPath(locationName) {
log.info(`前往 ${locationName}`);
try {
let filePath = `assets/${locationName}.json`;
await pathingScript.runFile(filePath);
} catch (error) {
log.error(`执行 ${locationName} 路径时发生错误`);
}
await sleep(2000);
if (locationName == "纳塔凯瑟琳")
keyDown("w");
await sleep(4500);
keyUp("w");
keyDown("d");
await sleep(2000);
keyUp("d");
}
let filePath;
if (settings.selectway === undefined)
filePath = "枫丹凯瑟琳"
else
filePath = settings.selectway;
log.info("开始执行路径脚本");
await AutoPath(filePath);
})();

View File

@@ -0,0 +1,13 @@
{
"manifest_version": 1,
"name": "自动找凯瑟琳",
"version": "1.0",
"description": "去找凯瑟琳(基于路径追踪)",
"authors": [
{
"name": "½"
}
],
"settings_ui": "settings.json",
"main": "main.js"
}

View File

@@ -0,0 +1,16 @@
[
{
"name": "selectValue", // 变量名在js内使用 settings.变量名 获取对应的配置值
"type": "select", // 类型
"label": "选项框", // 显示标签
"options": [ //选项
"蒙德凯瑟琳",
"璃月凯瑟琳",
"稻妻凯瑟琳",
"须弥凯瑟琳",
"枫丹凯瑟琳",
"纳塔凯瑟琳"
]
}
]