Files
bettergi-scripts-list/repo/js/AutoCatherine/main.js
KarylDAZE 2af65bfc20 fix some bugs (#343)
* fix: 设备卡顿时可能无法点到领取委托奖励/探索派遣按钮

* fix: 无法正常选择不同地区凯瑟琳
2025-02-18 00:49:25 +08:00

31 lines
880 B
JavaScript

(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.selectValue === undefined)
filePath = "枫丹凯瑟琳"
else
filePath = settings.selectValue;
log.info("开始执行路径脚本");
await AutoPath(filePath);
})();