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

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,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);
})();