JS脚本、地图追踪【众多更新】 (#446)
* Delete repo/pathing/禽肉 directory * 地图追踪:禽肉【更新】 * JS脚本: 合成浓缩树脂【群友优化】 * JS脚本:自动购买狗粮(7点位)【修复版号】 * JS脚本:提瓦特自动钓鱼【更新】
This commit is contained in:
@@ -46,8 +46,8 @@
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"x": 1108.71,
|
||||
"y": 1858.86,
|
||||
"x": 1107.88,
|
||||
"y": 1861.32,
|
||||
"type": "path",
|
||||
"move_mode": "run",
|
||||
"action": "",
|
||||
@@ -55,8 +55,8 @@
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"x": 1105.45,
|
||||
"y": 1865.58,
|
||||
"x": 1101.35,
|
||||
"y": 1866.58,
|
||||
"type": "target",
|
||||
"move_mode": "walk",
|
||||
"action": "combat_script",
|
||||
|
||||
@@ -10,24 +10,15 @@
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"action": "",
|
||||
"action": "combat_script",
|
||||
"move_mode": "walk",
|
||||
"type": "teleport",
|
||||
"x": 526.14,
|
||||
"y": 105.78,
|
||||
"action_params": ""
|
||||
"action_params": "wait(0.5),keypress(space),wait(0.5)"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"x": 527.00,
|
||||
"y": 106.75,
|
||||
"action": "combat_script",
|
||||
"move_mode": "walk",
|
||||
"action_params": "wait(2),keydown(Space),wait(0.1),keyup(Space),wait(0.2),keydown(Space),wait(0.1),keyup(Space),wait(5)",
|
||||
"type": "path"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"x": 529.17,
|
||||
"y": 120.12,
|
||||
"type": "path",
|
||||
@@ -36,7 +27,7 @@
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"id": 3,
|
||||
"x": 530.63,
|
||||
"y": 129.27,
|
||||
"type": "target",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "蒙德-七天神像-苍风高地",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.0",
|
||||
"description": "传送到蒙德-苍风高地的七天神像",
|
||||
"bgiVersion": "0.43.1"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"action": "",
|
||||
"move_mode": "walk",
|
||||
"type": "teleport",
|
||||
"x": -578.72,
|
||||
"y": 1853.39,
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -152,6 +152,7 @@
|
||||
"夜晚": {"name": "Nighttime", "param": 2},
|
||||
"禁用": {"name": "Block", "param": ""},
|
||||
}
|
||||
const statue_name = "蒙德-七天神像-苍风高地";
|
||||
// 存储本次任务中的所有鱼类,作为调节时间的关键参考
|
||||
let list_fish = [];
|
||||
|
||||
@@ -198,7 +199,7 @@
|
||||
// 读取鱼饵
|
||||
let path_sort_bait = typeof(settings.path_sort_bait) === 'undefined' ? [] : settings.path_sort_bait.split(' ');
|
||||
// 读取兑换材料
|
||||
let path_sort_material = typeof(settings.path_sort_material) === 'undefined' ? "无" : settings.path_sort_material;
|
||||
let path_sort_material = typeof(settings.path_sort_material) === 'undefined' ? "无(默认)" : settings.path_sort_material;
|
||||
// 读取调试信息
|
||||
let path_select = typeof(settings.path_select) === 'undefined' ? "无(默认)" : settings.path_select;
|
||||
|
||||
@@ -295,9 +296,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
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/";
|
||||
async function run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight, block_tsurumi, auto_skip) {
|
||||
const base_path_pathing = "assets/pathing/";
|
||||
const base_path_gcm = "assets/KeyMouseScript/";
|
||||
const base_path_statues = "assets/pathing_statues/";
|
||||
const file_name = `${path_msg["area"]}-${path_msg["type"]}-${path_msg["detail"]}`;
|
||||
|
||||
// 检测禁用键鼠设置
|
||||
@@ -362,6 +364,46 @@
|
||||
fishing_time = path_time;
|
||||
}
|
||||
|
||||
// 4点自动领取月卡
|
||||
let time_now = new Date();
|
||||
let time_4 = new Date(time_now.getFullYear(), time_now.getMonth(), time_now.getDate(), 4, 0, 0); // 4点
|
||||
let time_predict_end; // 根据超时时间预测本次钓鱼结束时间(加1分钟容错)
|
||||
if (fishing_time === "全天") {
|
||||
time_predict_end = time_now.setSeconds(time_now.getSeconds() + time_out_whole * 2 + 60);
|
||||
} else {
|
||||
time_predict_end = time_now.setSeconds(time_now.getSeconds() + time_out_whole + 60);
|
||||
}
|
||||
// 30s点击一次,等待领取月卡
|
||||
let step_flag = 0; // 领取月卡步骤标志
|
||||
while (auto_skip && time_now < time_4 && time_predict_end >= time_4) {
|
||||
log.info(`等待领取月卡(剩余${Math.floor((time_4 - new Date()) / 1000)}s)...`);
|
||||
if (step_flag == 0) {
|
||||
// 传送到七天神像
|
||||
await pathingScript.runFile(base_path_pathing + statue_name + ".json");
|
||||
step_flag += 1;
|
||||
}
|
||||
await sleep(30000);
|
||||
keyDown("VK_LBUTTON");
|
||||
await sleep(100);
|
||||
keyUp("VK_LBUTTON");
|
||||
|
||||
// 本次已经到达4点(5s容错)
|
||||
if (new Date() > time_4.setSeconds(time_4.getSeconds() - 5)) {
|
||||
step_flag += 1;
|
||||
auto_skip = false;
|
||||
}
|
||||
|
||||
}
|
||||
// 领取月卡(点击两次)
|
||||
if (step_flag == 2) {
|
||||
step_flag = 0;
|
||||
await sleep(5); // 补回容错时间
|
||||
await click(1450, 1020); // 点击时间调节的确认按钮的位置
|
||||
await sleep(5); // 等待月卡动画时间
|
||||
await click(1450, 1020);
|
||||
await sleep(1);
|
||||
}
|
||||
|
||||
log.info(`该钓鱼点的时间: ${fishing_time}`);
|
||||
|
||||
await pathingScript.runFile(base_path_pathing + file_name + ".json");
|
||||
@@ -393,7 +435,7 @@
|
||||
// 筛选路径
|
||||
let path_filter = pathing_filter();
|
||||
// 读取要继续的路径
|
||||
let path_continue = typeof(settings.path_continue) === "undefined" ? "无(默认)" : settings.path_continue;
|
||||
let path_continue = typeof(settings.path_continue) === 'undefined' ? "无(默认)" : settings.path_continue;
|
||||
let is_continue = true;
|
||||
// 判断是否是调式模式
|
||||
const is_con = !(typeof(settings.path_select) === 'undefined' || settings.path_select === "无(默认)");
|
||||
@@ -403,6 +445,32 @@
|
||||
const block_fight = typeof(settings.block_fight) === 'undefined' ? false : settings.block_fight;
|
||||
// 鹤观设置读取
|
||||
const block_tsurumi = typeof(settings.block_tsurumi) === 'undefined' ? false : settings.block_tsurumi;
|
||||
// 读取自动拾取设置
|
||||
const auto_pick = typeof(settings.auto_pick) === 'undefined' ? false : settings.auto_pick;
|
||||
// 读取4点自动领取月卡的设置
|
||||
const auto_skip = typeof(settings.auto_skip) === 'undefined' ? false : settings.auto_skip;
|
||||
// 读取终止时间
|
||||
const kill_hour = typeof(settings.time_kill_hour) === 'undefined' ? "无" : settings.time_kill_hour;
|
||||
const kill_minute = typeof(settings.time_kill_minute) === 'undefined' ? "无" : settings.time_kill_minute;
|
||||
const is_time_kill = kill_hour !== "无" && kill_minute !== "无"; // 判断是否启用
|
||||
let time_target = new Date();
|
||||
|
||||
if (is_time_kill) {
|
||||
let now = new Date();
|
||||
time_target.setHours(parseInt(kill_hour), 10);
|
||||
time_target.setMinutes(parseInt(kill_minute), 10);
|
||||
time_target.setSeconds(0);
|
||||
time_target.setMilliseconds(0);
|
||||
if (time_target < now) { // 不是当天终止,天数+1
|
||||
time_target.setDate(now.getDate() + 1); // 不会超限
|
||||
}
|
||||
let time_show = `${time_target.getFullYear()}/${time_target.getMonth()}/${time_target.getDate()} ${time_target.getHours()}:${time_target.getMinutes()}`;
|
||||
log.info(`定时关闭已启用,将在 ${time_show} 后停止后续任务...`);
|
||||
await sleep(2000);
|
||||
} else if (kill_hour !== "无" ^ kill_minute !== "无") {
|
||||
log.warn("如果需要启用定时关闭,请确保同时设置了小时和分钟!\n任务将在5s后继续...");
|
||||
await sleep(5000);
|
||||
}
|
||||
|
||||
log.info(`本次总计 ${path_filter.length} 个钓鱼点`);
|
||||
if (path_continue !== "无(默认)") {
|
||||
@@ -411,8 +479,18 @@
|
||||
|
||||
// 调整分辨率和dpi,适应键鼠配置
|
||||
setGameMetrics(1920, 1080, 1.25);
|
||||
// 设置自动拾取
|
||||
if (auto_pick) {
|
||||
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
|
||||
}
|
||||
|
||||
for (let i = 0; i < path_filter.length; i++) {
|
||||
// 检查时间
|
||||
if (is_time_kill && time_target < new Date()) {
|
||||
let time_now = `${new Date().getHours()}:${new Date().getMinutes()}`;
|
||||
log.info(`预定时间(${kill_hour}:${kill_minute})已到(当前时间:${time_now}),终止运行...`);
|
||||
return null;
|
||||
}
|
||||
// 路径详细信息
|
||||
const path_msg = get_pathing_msg(path_filter[i]);
|
||||
try {
|
||||
@@ -428,7 +506,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
await run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight, block_tsurumi);
|
||||
await run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight, block_tsurumi, auto_skip);
|
||||
} catch (error) {
|
||||
const file_name = `${path_msg["area"]}-${path_msg["type"]}-${path_msg["detail"]}`;
|
||||
log.info(`路径: ${file_name} 执行时出错,已跳过...\n错误信息: ${error}`)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "提瓦特自动钓鱼(全流程+自选)",
|
||||
"version": "1.3.4",
|
||||
"bgi_version": "0.43.0",
|
||||
"description": "脚本名称:提瓦特自动钓鱼(全流程+自选)\n功能描述:支持自动追踪并垂钓bgi支持的全提瓦特垂钓点\n核心功能------------------------------>\n1.可自选地区、鱼类、鱼饵\n2.可直接钓取特定物品的兑换材料(例如渔获)\n3.脚本会根据需要的鱼类自动调节时间,不需要的时段会跳过\n4.支持部分地图追踪无法到达的钓鱼点(例如炽岩斗士急流鱼钓鱼点,枫丹廷东北钓鱼点、雷鸣仙垂钓点)\n5.支持从特定的垂钓点继续任务(仅启用所有垂钓点时可用)\n6.如包含键鼠脚本(GCM)的路线有误,可在JS脚本设置禁用键鼠路线\n7.默认禁用需要战斗的路线,如有需要请在JS脚本配置内启用\n8.支持自定义钓鱼超时时间\n注意事项------------------------------>\n1.部分点位涉及战斗,且队伍内不能有双风和跑步(不是冲刺)时加移速的角色\n2.跑图位必须是少男体型\n3.同时选择鱼类和鱼饵的情况下按照以下逻辑选择路线: 所有被选的鱼类会被加入任务列表,如果选择的鱼饵中某个鱼饵不是已选的任何一个鱼类的对应的鱼饵,那么这个鱼饵对应的所有鱼类将被添加到任务列表\n4.JS脚本的设置内各设置项含有优先级,如果存在高优先级且选项不为默认,则只有最高优先级的设置项生效\n5.部分钓鱼点为路径追踪+键鼠脚本(GCM)的混合模式,可能会出现因键鼠脚本误差卡死的情况,如果出现这种情况,请在JS脚本设置禁用键鼠路线来禁用所有包含键鼠脚本的钓鱼点\n---------------------------------------->\n作者:提瓦特钓鱼玳师\n脚本反馈邮箱:hijiwos@hotmail.com",
|
||||
"version": "1.5.0",
|
||||
"bgi_version": "0.43.1",
|
||||
"description": "脚本名称:提瓦特自动钓鱼(全流程+自选)\n功能描述:支持自动追踪并垂钓bgi支持的全提瓦特垂钓点\n核心功能------------------------------>\n1.可自选地区、鱼类、鱼饵\n2.可直接钓取特定物品的兑换材料(例如渔获)\n3.脚本会根据需要的鱼类自动调节时间,不需要的时段会跳过\n4.支持部分地图追踪无法到达的钓鱼点(例如炽岩斗士急流鱼钓鱼点,枫丹廷东北钓鱼点、雷鸣仙垂钓点)\n5.支持从特定的垂钓点继续任务(仅启用所有垂钓点时可用)\n6.默认禁用需要战斗的路线,如有需要请在JS脚本配置内启用\n7.支持自定义钓鱼超时时间\n8.支持设置定时关闭(最多24小时)\n9.4点自动领取月卡(可选)\n10.启用自动拾取(可选)\n注意事项------------------------------>\n1.部分点位涉及战斗,且队伍内不能有双风和跑步(不是冲刺)时加移速的角色\n2.跑图位必须是少男体型\n3.同时选择鱼类和鱼饵的情况下按照以下逻辑选择路线: 所有被选的鱼类会被加入任务列表,如果选择的鱼饵中某个鱼饵不是已选的任何一个鱼类的对应的鱼饵,那么这个鱼饵对应的所有鱼类将被添加到任务列表\n4.JS脚本的设置内各设置项含有优先级,如果存在高优先级且选项不为默认,则只有最高优先级的设置项生效\n5.部分钓鱼点为路径追踪+键鼠脚本(GCM)的混合模式,可能会出现因键鼠脚本误差卡死的情况,如果出现这种情况,请在JS脚本设置禁用键鼠路线来禁用所有包含键鼠脚本的钓鱼点\n---------------------------------------->\n作者:提瓦特钓鱼玳师\n脚本反馈邮箱:hijiwos@hotmail.com",
|
||||
"authors": [
|
||||
{
|
||||
"name": "提瓦特钓鱼玳师"
|
||||
|
||||
@@ -131,6 +131,116 @@
|
||||
"type": "input-text",
|
||||
"label": "整个任务超时时间(秒) 默认: 300"
|
||||
},
|
||||
{
|
||||
"name": "auto_pick",
|
||||
"type": "checkbox",
|
||||
"label": "启用自动拾取(默认禁用)"
|
||||
},
|
||||
{
|
||||
"name": "auto_skip",
|
||||
"type": "checkbox",
|
||||
"label": "启用4点领取月卡(默认禁用)"
|
||||
},
|
||||
{
|
||||
"name": "time_kill_hour",
|
||||
"type": "select",
|
||||
"label": "设置强制停止运行的时间(24小时制)[同时选择生效]\n小时",
|
||||
"options": [
|
||||
"无",
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"14",
|
||||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18",
|
||||
"19",
|
||||
"20",
|
||||
"21",
|
||||
"22",
|
||||
"23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "time_kill_minute",
|
||||
"type": "select",
|
||||
"label": "分钟",
|
||||
"options": [
|
||||
"无",
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"14",
|
||||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18",
|
||||
"19",
|
||||
"20",
|
||||
"21",
|
||||
"22",
|
||||
"23",
|
||||
"24",
|
||||
"25",
|
||||
"26",
|
||||
"27",
|
||||
"28",
|
||||
"29",
|
||||
"30",
|
||||
"31",
|
||||
"32",
|
||||
"33",
|
||||
"34",
|
||||
"35",
|
||||
"36",
|
||||
"37",
|
||||
"38",
|
||||
"39",
|
||||
"40",
|
||||
"41",
|
||||
"42",
|
||||
"43",
|
||||
"44",
|
||||
"45",
|
||||
"46",
|
||||
"47",
|
||||
"48",
|
||||
"49",
|
||||
"50",
|
||||
"51",
|
||||
"52",
|
||||
"53",
|
||||
"54",
|
||||
"55",
|
||||
"56",
|
||||
"57",
|
||||
"58",
|
||||
"59"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "block_gcm",
|
||||
"type": "checkbox",
|
||||
|
||||
Reference in New Issue
Block a user