JS脚本:提瓦特自动钓鱼【更新】+ JS脚本:野伏众 【修复】 (#429)

* 禁用鹤观、dpi限制、描述修正

* 更正拾取

* 禁用鹤观、dpi修复、描述修正
This commit is contained in:
提瓦特钓鱼玳师
2025-03-12 22:33:59 +08:00
committed by GitHub
parent 66386bd595
commit 8d5f34a2b8
5 changed files with 22 additions and 7 deletions

View File

@@ -295,7 +295,7 @@
}
}
async function run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight) {
async function run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight, block_tsurumi) {
const base_path_pathing = "assets/Pathing/";
const base_path_gcm = "assets/KeyMouseScript/";
const file_name = `${path_msg["area"]}-${path_msg["type"]}-${path_msg["detail"]}`;
@@ -310,6 +310,11 @@
log.info(`跳过战斗路线: ${file_name}`)
return null;
}
// 检测禁用鹤观设置
if (!block_tsurumi && !is_con && /鹤观/.test(path_msg["detail"])) {
log.info(`跳过鹤观路线: ${file_name}`)
return null;
}
// 时间调节
let fishing_time = "全天";
@@ -396,12 +401,17 @@
const block_gcm = typeof(settings.block_gcm) === 'undefined' ? false : settings.block_gcm;
// 战斗设置读取
const block_fight = typeof(settings.block_fight) === 'undefined' ? false : settings.block_fight;
// 鹤观设置读取
const block_tsurumi = typeof(settings.block_tsurumi) === 'undefined' ? false : settings.block_tsurumi;
log.info(`本次总计 ${path_filter.length} 个钓鱼点`);
if (path_continue !== "无(默认)") {
path_continue = `${path_continue.split("-")[0]}-${path_continue.split("-")[2]}`;
}
// 调整分辨率和dpi适应键鼠配置
setGameMetrics(1920, 1080, 1.25);
for (let i = 0; i < path_filter.length; i++) {
// 路径详细信息
const path_msg = get_pathing_msg(path_filter[i]);
@@ -418,7 +428,7 @@
continue;
}
await run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight);
await run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight, block_tsurumi);
} catch (error) {
const file_name = `${path_msg["area"]}-${path_msg["type"]}-${path_msg["detail"]}`;
log.info(`路径: ${file_name} 执行时出错,已跳过...\n错误信息: ${error}`)