JS脚本:提瓦特自动钓鱼【更新+优化】 (#424)
* 优化路径 * 添加功能:默认禁用战斗路线 * 完善了脚本描述 * 更新了描述 * 优化路径
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"name": "纳塔-垂钓点-奥奇卡纳塔东",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.2",
|
||||
"version": "1.3",
|
||||
"description": "地区: 纳塔\n类型: 垂钓点\n详细位置: 奥奇卡纳塔东\n鱼类: 花鳉、青浪翻车鲀、晚霞翻车鲀、伪装鲨鲨独角鱼\n饵类: 果酿饵、澄晶果粒饵\n附加信息: 普通",
|
||||
"bgiVersion": "0.42.4"
|
||||
},
|
||||
@@ -83,8 +83,8 @@
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"x": 9190.6,
|
||||
"y": -334.15,
|
||||
"x": 9189.81,
|
||||
"y": -334.14,
|
||||
"type": "target",
|
||||
"move_mode": "walk",
|
||||
"action": "combat_script",
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
"name": "纳塔-垂钓点-奥奇卡纳塔西",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"description": "地区: 纳塔\n类型: 垂钓点\n详细位置: 奥奇卡纳塔西\n鱼类: 深潜斗士急流鱼、繁花斗士急流鱼、伪装鲨鲨独角鱼\n饵类: 澄晶果粒饵\n附加信息: 普通",
|
||||
"bgiVersion": "0.42.4"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"x": 10163.09,
|
||||
"y": -398.85,
|
||||
"x": 10165.79,
|
||||
"y": -395.63,
|
||||
"type": "teleport",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
@@ -19,44 +19,44 @@
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"x": 10245.02,
|
||||
"y": -392.27,
|
||||
"type": "path",
|
||||
"move_mode": "dash",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"x": 10264.41,
|
||||
"y": -390.43,
|
||||
"x": 10199.27,
|
||||
"y": -416.33,
|
||||
"type": "path",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"x": 10276.46,
|
||||
"y": -388.09,
|
||||
"id": 3,
|
||||
"x": 10224.55,
|
||||
"y": -423.99,
|
||||
"type": "path",
|
||||
"move_mode": "fly",
|
||||
"move_mode": "swim",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"x": 10254.72,
|
||||
"y": -431.42,
|
||||
"type": "path",
|
||||
"move_mode": "run",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"x": 10316.22,
|
||||
"y": -420.1,
|
||||
"x": 10259.89,
|
||||
"y": -453.22,
|
||||
"type": "path",
|
||||
"move_mode": "fly",
|
||||
"move_mode": "run",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"x": 10313.9,
|
||||
"y": -443.41,
|
||||
"x": 10270.64,
|
||||
"y": -485.59,
|
||||
"type": "path",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
@@ -64,17 +64,44 @@
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"x": 10314.94,
|
||||
"y": -476.15,
|
||||
"x": 10276.17,
|
||||
"y": -482.59,
|
||||
"type": "path",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"x": 10280.81,
|
||||
"y": -479.83,
|
||||
"type": "path",
|
||||
"move_mode": "fly",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"x": 10327.16,
|
||||
"y": -489.68,
|
||||
"id": 9,
|
||||
"x": 10295.81,
|
||||
"y": -479.8,
|
||||
"type": "path",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"x": 10319.17,
|
||||
"y": -490.23,
|
||||
"type": "path",
|
||||
"move_mode": "fly",
|
||||
"action": "stop_flying",
|
||||
"action_params": ""
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"x": 10327.2,
|
||||
"y": -489.55,
|
||||
"type": "target",
|
||||
"move_mode": "walk",
|
||||
"action": "combat_script",
|
||||
|
||||
@@ -295,17 +295,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function run_file(path_msg, time_out_throw, time_out_whole, is_con) {
|
||||
async function run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight) {
|
||||
const base_path_pathing = "assets/Pathing/";
|
||||
const base_path_gcm = "assets/KeyMouseScript/";
|
||||
const file_name = `${path_msg["area"]}-${path_msg["type"]}-${path_msg["detail"]}`;
|
||||
// 键鼠设置读取
|
||||
const block_gcm = typeof(settings.block_gcm) === 'undefined' ? false : settings.block_gcm;
|
||||
|
||||
// 检测禁用键鼠设置
|
||||
if (block_gcm && !is_con && path_msg["addition"] === "GCM") {
|
||||
log.info(`跳过键鼠路线: ${file_name}`)
|
||||
return null;
|
||||
}
|
||||
// 检测禁用战斗设置
|
||||
if (!block_fight && !is_con && path_msg["addition"] === "战斗") {
|
||||
log.info(`跳过战斗路线: ${file_name}`)
|
||||
return null;
|
||||
}
|
||||
|
||||
// 时间调节
|
||||
let fishing_time = "全天";
|
||||
// 读取游戏模式(多人模式则禁用时间调节)[暂时不可用]
|
||||
@@ -387,6 +392,11 @@
|
||||
let is_continue = true;
|
||||
// 判断是否是调式模式
|
||||
const is_con = !(typeof(settings.path_select) === 'undefined' || settings.path_select === "无(默认)");
|
||||
// 键鼠设置读取
|
||||
const block_gcm = typeof(settings.block_gcm) === 'undefined' ? false : settings.block_gcm;
|
||||
// 战斗设置读取
|
||||
const block_fight = typeof(settings.block_fight) === 'undefined' ? false : settings.block_fight;
|
||||
|
||||
log.info(`本次总计 ${path_filter.length} 个钓鱼点`);
|
||||
if (path_continue !== "无(默认)") {
|
||||
path_continue = `${path_continue.split("-")[0]}-${path_continue.split("-")[2]}`;
|
||||
@@ -402,11 +412,13 @@
|
||||
is_continue = false;
|
||||
}
|
||||
|
||||
// 从选择的点位继续
|
||||
if (path_continue !== "无(默认)" && !is_con && is_continue && path_filter.length === path_pathing.length) {
|
||||
log.info("跳过...");
|
||||
continue;
|
||||
}
|
||||
await run_file(path_msg, time_out_throw, time_out_whole, is_con);
|
||||
|
||||
await run_file(path_msg, time_out_throw, time_out_whole, is_con, block_gcm, block_fight);
|
||||
} 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.2",
|
||||
"version": "1.3.3",
|
||||
"bgi_version": "0.43.0",
|
||||
"description": "脚本名称:提瓦特自动钓鱼(全流程+自选)\n功能描述:支持自动追踪并垂钓bgi支持的全提瓦特垂钓点\n核心功能------------------------------>\n1.可自选地区、鱼类、鱼饵\n2.可直接钓取特定物品的兑换材料(例如渔获)\n3.脚本会根据需要的鱼类自动调节时间,不需要的时段会跳过\n4.支持部分地图追踪无法到达的钓鱼点(例如炽岩斗士急流鱼钓鱼点,枫丹廷东北钓鱼点、雷鸣仙垂钓点)\n5.支持从特定的垂钓点继续任务(仅启用所有垂钓点时可用)\n6.如包含键鼠脚本(GCM)的路线有误,可在JS脚本设置禁用键鼠路线\n7.支持自定义钓鱼超时时间\n注意事项------------------------------>\n1.部分点位涉及战斗,且队伍内不能有双风和跑步(不是冲刺)时加移速的角色\n2.跑图位必须是少男体型\n3.JS脚本的设置内各设置项含有优先级,如果存在高优先级且选项不为默认,则只有最高优先级的设置项生效\n4.部分钓鱼点为路径追踪+键鼠脚本(GCM)的混合模式,可能会出现因键鼠脚本误差卡死的情况,如果出现这种情况,请在JS脚本设置禁用键鼠路线来禁用所有包含键鼠脚本的钓鱼点\n---------------------------------------->\n作者:提瓦特钓鱼玳师\n脚本反馈邮箱:hijiwos@hotmail.com",
|
||||
"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",
|
||||
"authors": [
|
||||
{
|
||||
"name": "提瓦特钓鱼玳师"
|
||||
|
||||
@@ -134,7 +134,12 @@
|
||||
{
|
||||
"name": "block_gcm",
|
||||
"type": "checkbox",
|
||||
"label": "禁用键鼠脚本(默认启用键鼠脚本)"
|
||||
"label": "禁用键鼠路线(默认启用键鼠路线)"
|
||||
},
|
||||
{
|
||||
"name": "block_fight",
|
||||
"type": "checkbox",
|
||||
"label": "启用战斗路线(默认禁用战斗路线)"
|
||||
},
|
||||
{
|
||||
"name": "path_select",
|
||||
|
||||
Reference in New Issue
Block a user