This commit is contained in:
起个名字好难的喵
2025-10-25 12:34:45 +08:00
committed by GitHub
parent 5a8e2e3596
commit d7581f097c
3 changed files with 11 additions and 36 deletions

View File

@@ -1,26 +0,0 @@
{
"info": {
"authors": [],
"bgi_version": "0.45.0",
"description": "",
"enable_monster_loot_split": false,
"last_modified_time": 1761330330598,
"map_match_method": "",
"map_name": "Enkanomiya",
"name": "背包木材检测专用",
"tags": [],
"type": "collect",
"version": "1.0"
},
"positions": [
{
"action": "",
"action_params": "",
"id": 1,
"move_mode": "walk",
"type": "teleport",
"x": 1581.1136474609375,
"y": -112.44970703125
}
]
}

View File

@@ -245,9 +245,10 @@
// 调用BGI任务读取背包中的木材数量并返回
async function woodInventory(woodsArray, numbersArray) {
log.info("先别急,先别动键盘鼠标,要去一个神秘的地方")
await pathingScript.runFile('assets/AutoPath/背包木材检测专用.json');
moveMouseBy(0, -114514);
moveMouseBy(0, -1919810);
await genshin.Tp(1581.11, -112.45, "Enkanomiya", true);
await moveMouseBy(0, -114514);
await moveMouseBy(0, -1919810);
await sleep(1000);
if (woodsArray.length === 0) {
var resultDict = await dispatcher.runTask(new SoloTask("CountInventoryItem", { "gridScreenName": "Materials", "itemNames": woodType }));
} else {
@@ -446,13 +447,13 @@
let numbersArray = settings.numbers ? settings.numbers.split(/\s+/).map(Number).map(num => isNaN(num) ? 0 : num) : [];
let hasItto = settings.hasItto ? settings.hasItto : false;
let theBoonOfTheElderTreeStatus = settings.theBoonOfTheElderTree ? await theElderTree() : true;
// 判断是否开启背包检测,如果未开启或识别失败,则使用设置填入的数据或默认数据
const [woodsInventory, woodCountInventory] = settings.woodInventory ? await woodInventory(woodsArray, numbersArray) : [woodsArray, numbersArray];
mapWoodsToNumbers(woodsInventory, woodCountInventory, hasItto);
// mapWoodsToNumbers(woodsArray, numbersArray, hasItto);
// 判断是否装备王树瑞佑,如果未装备则跳过伐木
if (theBoonOfTheElderTreeStatus) {
// 判断是否开启背包检测,如果未开启或识别失败,则使用设置填入的数据或默认数据
let [woodsInventory, woodCountInventory] = settings.woodInventory ? await woodInventory(woodsArray, numbersArray) : [woodsArray, numbersArray];
// 将识别到的木材种类和所需数量转换为映射表,并计算需要砍伐的次数
mapWoodsToNumbers(woodsInventory, woodCountInventory, hasItto);
log.info('自动伐木开始...');
await woodCutting();
} else {

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "自动伐木-地图追踪版",
"version": "3.0.0",
"version": "3.0.1",
"description": "基于地图追踪的自动伐木已支持6.0版本及之前的全部木材\n默认砍伐全部支持木材至2000上限\n自定义设置:\n-可更改砍伐木材种类和数量\n-可以单独设置每个木材数量\n-可设置队伍中是否包含一斗按保底20%计算砍伐数量时会除以1.2",
"bgi_version": "0.52.0",
"tags": [