* Add files via upload * 传送至指定合成台 * Delete repo/js/蒙德合成台.json * Delete repo/js/main.js * Delete repo/js/manifest.json * Delete repo/js/settings.json * Delete repo/js/枫丹合成台.json * Delete repo/js/璃月合成台.json * Delete repo/js/稻妻合成台.json * Update settings.json * 去除main.js里的sleep函数,jsv8引擎不再必报错(maybe) js小白,不要拷打我了😭😭😭 * Update main.js 新增默认选项 * Update settings.json * Update manifest.json
33 lines
840 B
JavaScript
33 lines
840 B
JavaScript
async function AutoPath(locationName) {
|
|
try {
|
|
let filePath = `assets/${locationName}.json`;
|
|
await pathingScript.runFile(filePath);
|
|
return true;
|
|
} catch (error) {
|
|
log.error(`执行 ${locationName} 路径时发生错误`);
|
|
log.error(error.message);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
(
|
|
async function () {
|
|
try {
|
|
await genshin.returnMainUi();
|
|
setGameMetrics(1920, 1080, 1)
|
|
// 读取配置文件
|
|
let location = settings.location;
|
|
if(location == undefined){
|
|
location = "璃月合成台";
|
|
log.info(`未设置传送位置,默认前往 ${location}...`);
|
|
}
|
|
log.info(`正在前往 ${location}...`);
|
|
await AutoPath(location);
|
|
} catch (e) {
|
|
log.error("传送失败,请检查设置");
|
|
return;
|
|
}
|
|
}
|
|
)();
|