JS:食材加工(模擬點擊) v1.0.1 (#1968)

-   修正酸奶油參數錯誤
-   加快等待時間
-   修改腳本名字為"食材加工(模拟点击)"
This commit is contained in:
this-Fish
2025-09-22 20:05:05 +08:00
committed by GitHub
parent 48433c0594
commit d9787357b9
4 changed files with 22 additions and 16 deletions

View File

@@ -58,6 +58,12 @@
## 📜 更新日志
### v1.0.1 `(2025-09-22)`
- 修正酸奶油參數錯誤
- 加快等待時間
- 修改腳本名字為"食材加工(模拟点击)"
### v1.0 `(2025-09-21)`
- 初始版本发布

View File

@@ -95,20 +95,20 @@
if (quantity) {
log.info(`开始加工:${key}`);
click(x, y);
await sleep(1000);
await sleep(500);
click(1690, 1015); // 制作
await sleep(1000);
await sleep(500);
// 输入数量
//click(965, 455);
//await sleep(1000);
//await inputText(quantity);
//拉满
click(1190, 590);
await sleep(1000);
await sleep(500);
click(1190, 755); // 确认
await sleep(1000);
await sleep(500);
}
};
// 通用:模拟输入文本
@@ -244,7 +244,7 @@
// 如果未找到 Cooking 图标,执行滚轮操作
log.info(`未找到 Cooking 图标,执行滚轮操作,当前尝试次数:${scrollAttempts + 1}`);
await keyMouseScript.runFile(`assets/滚轮下翻.json`);
await sleep(1000);
await sleep(800);
// 重新识别 F 图标,获取最新的中心点
fRes = await recognizeFIcon();
@@ -281,15 +281,15 @@
//食材加工
click(1010, 50); //选择食材加工
await sleep(1000);
await sleep(500);
click(255, 1020); //全部领取
await sleep(1000);
await sleep(500);
click(960, 1045); //点击任意处
await sleep(1000);
await sleep(500);
click(960, 1045); //点击任意处
await sleep(1000);
await sleep(500);
click(960, 1045); //点击任意处
await sleep(2000);
await sleep(800);
// 按行列处理所有食材
for (const ingredient of ingredientCoordinates) {
@@ -299,11 +299,11 @@
}
await genshin.returnMainUi();
await sleep(1000);
await sleep(800);
keyDown("S");
await sleep(1500);
keyUp("S");
await sleep(1000);
keyUp("S");
await sleep(800);
} catch (error) {
log.error(`执行按键或鼠标操作时发生错误:${error.message}`);
}

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "食材加工",
"version": "1.0",
"name": "食材加工(模拟点击)",
"version": "1.0.1",
"description": "根据选择加工物,自动加工食材。加工时会直接拉满加工数量。\n \n使用前请阅读“readme”文件以获取更多详细信息。",
"tags": ["食材加工", "模拟点击"],

View File

@@ -55,7 +55,7 @@
"label": " 香辛料"
},
{
"name": "smetanaNum",
"name": "smetana",
"type": "checkbox",
"label": " 酸奶油"
},