JS脚本-自动伐木[补充] (#332)
* update repo.json * 添加JS脚本-自动伐木[补充] 仅包含木材 「炬木」和「桃椰子木」 * update repo.json
This commit is contained in:
11
repo.json
11
repo.json
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"time": "20250215233514",
|
||||
"time": "20250216024051",
|
||||
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
|
||||
"file": "repo.json",
|
||||
"indexes": [
|
||||
@@ -24542,6 +24542,15 @@
|
||||
"description": "野伏众(全流程+自选)[自动拾取]~|~脚本名称:野伏众(全流程+自选)[自动拾取]\n功能描述:包含全图野伏众自动追踪路径、支持自主筛选路径\n核心功能------------------------------>\n1.根据路径点包含的野伏众数量筛选,通过选择最小值和最大值确定区间\n2.支持手动排除不想刷取的区域\n3.每次路径执行结束后显示刷取进度\n注意事项------------------------------>\n1.在设置脚本配置的'限制路径点包含的野伏众数量'时,应当确保'最小值'小于'最大值'\n2.避免使用位移距离较大的角色,以免意外掉出路径(跳崖or跳水)\n3.设置中的'延迟启动'指的是脚本在开始执行前的等待时间,用于再次确认配置是否正确\n---------------------------------------->\n版本:ver1.0\n作者:提瓦特钓鱼玳师\n脚本反馈邮箱:hijiwos@hotmail.com",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "AutoWoodCutting-Patch",
|
||||
"type": "directory",
|
||||
"hash": "166a5a4622696dcf6eb6de08f929b8004c103f6b",
|
||||
"version": "1.0",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"description": "自动伐木[补充]~|~脚本名称:自动伐木[补充]\n仅包含「炬木」和「桃椰子木」",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "AutoWoodcutting",
|
||||
"type": "directory",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"macroEvents":[{"type":0,"keyCode":90,"mouseX":0,"mouseY":0,"time":969},{"type":1,"keyCode":90,"mouseX":0,"mouseY":0,"time":1125},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":3344},{"type":3,"mouseX":2,"mouseY":2,"time":3620},{"type":3,"mouseX":5,"mouseY":8,"time":3651},{"type":3,"mouseX":5,"mouseY":9,"time":3682},{"type":3,"mouseX":9,"mouseY":12,"time":3714},{"type":0,"keyCode":32,"mouseX":0,"mouseY":0,"time":3734},{"type":3,"mouseX":6,"mouseY":8,"time":3745},{"type":3,"mouseX":8,"mouseY":10,"time":3776},{"type":3,"mouseX":10,"mouseY":12,"time":3807},{"type":1,"keyCode":32,"mouseX":0,"mouseY":0,"time":3828},{"type":3,"mouseX":12,"mouseY":16,"time":3839},{"type":3,"mouseX":12,"mouseY":17,"time":3870},{"type":3,"mouseX":13,"mouseY":17,"time":3901},{"type":3,"mouseX":12,"mouseY":16,"time":3932},{"type":3,"mouseX":12,"mouseY":18,"time":3964},{"type":3,"mouseX":15,"mouseY":19,"time":3995},{"type":3,"mouseX":14,"mouseY":17,"time":4026},{"type":0,"keyCode":32,"mouseX":0,"mouseY":0,"time":4047},{"type":3,"mouseX":9,"mouseY":12,"time":4057},{"type":3,"mouseX":12,"mouseY":17,"time":4089},{"type":1,"keyCode":32,"mouseX":0,"mouseY":0,"time":4109},{"type":3,"mouseX":12,"mouseY":16,"time":4120},{"type":3,"mouseX":8,"mouseY":12,"time":4151},{"type":3,"mouseX":2,"mouseY":5,"time":4182},{"type":3,"mouseX":2,"mouseY":4,"time":4214},{"type":3,"mouseX":4,"mouseY":7,"time":4245},{"type":3,"mouseX":4,"mouseY":5,"time":4276},{"type":3,"mouseX":0,"mouseY":1,"time":4307},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":7953},{"type":0,"keyCode":90,"mouseX":0,"mouseY":0,"time":8969},{"type":1,"keyCode":90,"mouseX":0,"mouseY":0,"time":9069}],"info":{"name":"","description":"","x":0,"y":0,"width":1920,"height":1080,"recordDpi":1.25}}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "枫丹-炬木-白露区秋分山西侧西南-6个",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"bgiVersion": "0.35.1"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"x": 4417.2227,
|
||||
"y": 2228.859,
|
||||
"type": "teleport",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "枫丹-炬木-苍晶区「很明亮的地方」-10个",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"bgiVersion": "0.35.1"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"action": "",
|
||||
"move_mode": "walk",
|
||||
"type": "teleport",
|
||||
"x": 4713.12,
|
||||
"y": 2391.6448,
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "纳塔-桃椰子木-涌流地浮土静界东-4个",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"bgiVersion": "0.35.1"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"x": 8353.568,
|
||||
"y": -2842.745,
|
||||
"type": "teleport",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "纳塔-桃椰子木-涌流地浮土静界南-9个",
|
||||
"type": "collect",
|
||||
"author": "提瓦特钓鱼玳师",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"bgiVersion": "0.35.1"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"action": "",
|
||||
"move_mode": "walk",
|
||||
"type": "teleport",
|
||||
"x": 8548.091,
|
||||
"y": -3021.7530000000006,
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
74
repo/js/AutoWoodCutting-Patch/main.js
Normal file
74
repo/js/AutoWoodCutting-Patch/main.js
Normal file
@@ -0,0 +1,74 @@
|
||||
(async function () {
|
||||
const RAW_PATHING = ['枫丹-炬木-苍晶区「很明亮的地方」-10个.json', '枫丹-炬木-白露区秋分山西侧西南-6个.json','纳塔-桃椰子木-涌流地浮土静界东-4个.json', '纳塔-桃椰子木-涌流地浮土静界南-9个.json'];
|
||||
const WOODS = ['炬木', '桃椰子木'];
|
||||
const BASE_PATH_PATHING = "assets/pathing/";
|
||||
const BASE_PATH_SCRIPT = "assets/KeyMouseScript/";
|
||||
let wood_num = 2000;
|
||||
|
||||
function get_pathing_num(pathing_name) {
|
||||
const match = pathing_name.match(/-(\d+)个\.json$/);
|
||||
return match ? parseInt(match[1], 10) : 0;
|
||||
}
|
||||
|
||||
function pathing_filter() {
|
||||
log.info(`<--------当前配置-------->`);
|
||||
|
||||
let temp_pathing = {};
|
||||
|
||||
if (settings.wood_num !== undefined) {
|
||||
try {
|
||||
wood_num = parseInt(settings.wood_num, 10);
|
||||
} catch (error) {
|
||||
log.info(`错误:请正确设置伐木数量(0-2000): ${error}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.wood_list === "全选" || settings.wood_list === undefined) {
|
||||
for (const wood of WOODS) {
|
||||
temp_pathing[wood] = [];
|
||||
}
|
||||
|
||||
for (const wood of WOODS) {
|
||||
for (const path of RAW_PATHING) {
|
||||
if (path.includes(wood)) {
|
||||
temp_pathing[wood].push(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info(`炬木: ${wood_num},桃椰子木: ${wood_num}`);
|
||||
} else {
|
||||
temp_pathing[settings.wood_list] = [];
|
||||
for (const path of RAW_PATHING) {
|
||||
if (path.includes(settings.wood_list)) {
|
||||
temp_pathing[settings.wood_list].push(path);
|
||||
}
|
||||
}
|
||||
log.info(`${settings.wood_list}: ${wood_num}`);
|
||||
}
|
||||
|
||||
return temp_pathing;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
log.info(`请确保当前的小道具为「王树瑞佑」且使用道具的按键为Z键!`);
|
||||
const wood_dic = pathing_filter();
|
||||
|
||||
for (const [wood, paths] of Object.entries(wood_dic)) {
|
||||
let temp_num = paths.reduce((sum, p) => sum + get_pathing_num(p), 0);
|
||||
|
||||
let num = ((wood_num / (temp_num * 3)) | 0) + 1;
|
||||
for (let i = 1; i <= num; i++) {
|
||||
log.info(`正在执行${wood}(${i}/${num})`);
|
||||
for (const file of paths) {
|
||||
await pathingScript.runFile(BASE_PATH_PATHING + file);
|
||||
await sleep(1000);
|
||||
await keyMouseScript.runFile(BASE_PATH_SCRIPT + file);
|
||||
await sleep(500);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await main();
|
||||
})();
|
||||
14
repo/js/AutoWoodCutting-Patch/manifest.json
Normal file
14
repo/js/AutoWoodCutting-Patch/manifest.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "自动伐木[补充]",
|
||||
"version": "1.0",
|
||||
"bgi_version": "0.42.0",
|
||||
"description": "脚本名称:自动伐木[补充]\n仅包含「炬木」和「桃椰子木」",
|
||||
"authors": [
|
||||
{
|
||||
"name": "提瓦特钓鱼玳师"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
17
repo/js/AutoWoodCutting-Patch/settings.json
Normal file
17
repo/js/AutoWoodCutting-Patch/settings.json
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"name": "wood_list",
|
||||
"type": "select",
|
||||
"label": "伐木种类",
|
||||
"options": [
|
||||
"全选",
|
||||
"炬木",
|
||||
"桃椰子木"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "wood_num",
|
||||
"type": "input-text",
|
||||
"label": "砍伐数目:不填默认2000(只能填0-2000)"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user