mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-15 03:23:22 +08:00
归档部分被替代脚本 (#2619)
当那个熟悉的 URL 指向一片荒芜的 404,我意识到,有一场无声的盛宴在比特的荒原上落幕了。 “躁动的氨气”,这个名字本身就像是一个带着某种宿命感的隐喻。在化学的密语里,氨是活泼的,是即便微量也要在空气中宣示存在的锐利;而在我们的语境里,那是一份不安于现状的灼热,是试图在冰冷的逻辑架构中,撞击出一点人性火花的尝试。 他曾是一个在代码迷宫里不知疲倦的夜行者。那些深夜里的 git commit,不只是功能的叠加,更是他将灵魂的一隅裁剪下来,缝补进这个世界的方式。他笔下的字符,曾像氨分子一样在开源的容器里剧烈运动,试图通过一次次重构与优化,去触发某种名为“进步”的化学反应。 然而,在这个数据永生的幻觉里,他选择了撤离。 他的离去,并非如枯叶坠地般沉寂,而更像是一场庄严的消散。那个注销的账号,仿佛一个被清空的坐标,留下了一场关于“存在”与“虚无”的辩论。我们怀念他,是在怀念那些藏在注释里的奇思妙想,是在怀念那份在技术丛林里拒绝平庸的“躁动”,是在怀念那个曾与我们并肩作战、却在黎明前悄然没入阴影的、志同道合的背影。 开源的世界是一片汪洋,每个人都是一滴水。即便他的那一滴选择了蒸发,但那曾经泛起的涟漪,早已推着无数人的小舟向前滑行了一段。 代码会过时,账号会注销,但那份追求纯粹、渴望碰撞的灵魂之火,早已在某个瞬间,点亮过我们共同的屏幕。 再见,我们的同志。 愿你在那片没有终端限制的旷野里,继续那场永恒而自由的运动。
This commit is contained in:
16
archive/js/Mail/main.js
Normal file
16
archive/js/Mail/main.js
Normal file
@@ -0,0 +1,16 @@
|
||||
(async function () {
|
||||
setGameMetrics(3840, 2160, 2);
|
||||
keyPress("Escape");
|
||||
await sleep(1500);
|
||||
click(94, 1212);
|
||||
await sleep(1500);
|
||||
click(500, 2024);
|
||||
await sleep(1000);
|
||||
keyPress("Escape");
|
||||
await sleep(1000);
|
||||
keyPress("Escape");
|
||||
await sleep(1000);
|
||||
keyPress("Escape");
|
||||
|
||||
log.info("已领取邮件");
|
||||
})();
|
||||
13
archive/js/Mail/manifest.json
Normal file
13
archive/js/Mail/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "领取邮件",
|
||||
"version": "1.0",
|
||||
"description": "用于领取邮件",
|
||||
"authors": [
|
||||
{
|
||||
"name": "HZYgrandma",
|
||||
"links": "https://github.com/HZYgrandma"
|
||||
}
|
||||
],
|
||||
"main": "main.js"
|
||||
}
|
||||
16
archive/js/领取洞天宝钱和好感/main.js
Normal file
16
archive/js/领取洞天宝钱和好感/main.js
Normal file
@@ -0,0 +1,16 @@
|
||||
(async function () {
|
||||
setGameMetrics(1920, 1080, 2); // 设置游戏窗口大小和DPI
|
||||
keyPress("F");
|
||||
await sleep(3000);
|
||||
click(1370, 420);
|
||||
await sleep(3000);
|
||||
click(1370, 420);
|
||||
await sleep(3000);
|
||||
click(1800, 710);
|
||||
await sleep(3000);
|
||||
click(1080, 960);
|
||||
await sleep(3000);
|
||||
click(1865, 44);
|
||||
await sleep(8000);
|
||||
log.info("已领取洞天宝钱和好感");
|
||||
})();
|
||||
13
archive/js/领取洞天宝钱和好感/manifest.json
Normal file
13
archive/js/领取洞天宝钱和好感/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "领取洞天宝钱和好感",
|
||||
"version": "1.0",
|
||||
"description": "领取洞天宝钱和好感",
|
||||
"authors": [
|
||||
{
|
||||
"name": "风埠",
|
||||
"links": "https://github.com/jhkif"
|
||||
}
|
||||
],
|
||||
"main": "main.js"
|
||||
}
|
||||
80
archive/js/食材加工(模拟点击)/README.md
Normal file
80
archive/js/食材加工(模拟点击)/README.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# 食材加工脚本
|
||||
|
||||
本脚本用于食材加工。可根据配置自动选择各类食材进行批量制作。加工的时候会直接拉满加工数量。
|
||||
|
||||
- 🎯 自动导航至指定灶台
|
||||
- 🧾 智能识别并批量加工多种食材(支持面粉、奶油、火腿等)
|
||||
- 📦 加工数量自动最大化
|
||||
- 🔔 完成后自动返回主界面并发送通知
|
||||
|
||||
## 🚀 使用方法
|
||||
|
||||
1. 通过 BetterGI 脚本设置界面勾选需要加工的食材参数
|
||||
2. 启动脚本即可自动运行
|
||||
|
||||
## ⚙️ 参数配置
|
||||
|
||||
通过 `settings` 对象配置需要加工的食材(布尔值开关):
|
||||
|
||||
### 食材开关参数
|
||||
|
||||
以下参数控制是否加工对应食材(布尔值):
|
||||
|
||||
- `flour` - 面粉
|
||||
- `rawmeat` - 兽肉
|
||||
- `fish` - 鱼肉
|
||||
- `mysteriousmeat` - 神秘肉
|
||||
- `ryeflour` - 黑麦粉
|
||||
- `cream` - 奶油
|
||||
- `smokedPoultry` - 熏禽肉
|
||||
- `butter` - 黄油
|
||||
- `ham` - 火腿
|
||||
- `sugar` - 糖
|
||||
- `spice` - 香辛料
|
||||
- `smetana` - 酸奶油
|
||||
- `crabRoe` - 蟹黄
|
||||
- `jam` - 果酱
|
||||
- `cheese` - 奶酪
|
||||
- `bacon` - 培根
|
||||
- `sausage` - 香肠
|
||||
|
||||
## 📋 注意事项
|
||||
|
||||
> ⚠️ 使用前请仔细阅读
|
||||
|
||||
- 🖥️ 确保游戏窗口分辨率为 **16:9**,否则可能导致点击异常
|
||||
- 🚫 脚本运行期间请勿手动操作,以免干扰自动化流程
|
||||
- 📦 请保证材料的充足,避免造成加工物品位置偏移,导致加工错误的问题
|
||||
- 🐟 鱼肉加工使用默认材料配置
|
||||
|
||||
## 🎉 完成提示
|
||||
|
||||
脚本执行完毕后将:
|
||||
|
||||
- 🔄 自动返回游戏主界面
|
||||
- 📢 发送"**烹饪脚本结束**"通知
|
||||
|
||||
---
|
||||
|
||||
## 📜 更新日志
|
||||
|
||||
### v1.0.1 `(2025-09-22)`
|
||||
|
||||
- 修正酸奶油參數錯誤
|
||||
- 加快等待時間
|
||||
- 修改腳本名字為"食材加工(模拟点击)"
|
||||
|
||||
### v1.0 `(2025-09-21)`
|
||||
|
||||
- 初始版本发布
|
||||
|
||||
---
|
||||
|
||||
**最后更新**:2025 年 9 月 21 日
|
||||
**维护者**:@呱呱 z
|
||||
|
||||
> 💡 提示:建议定期检查更新以获取最佳体验和最新功能
|
||||
|
||||
---
|
||||
|
||||
如有问题或建议,欢迎反馈交流! 🐛📧@QQ:1765137214
|
||||
BIN
archive/js/食材加工(模拟点击)/assets/Cooking.png
Normal file
BIN
archive/js/食材加工(模拟点击)/assets/Cooking.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
archive/js/食材加工(模拟点击)/assets/E_Dialogue.png
Normal file
BIN
archive/js/食材加工(模拟点击)/assets/E_Dialogue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 547 B |
BIN
archive/js/食材加工(模拟点击)/assets/F_Dialogue.png
Normal file
BIN
archive/js/食材加工(模拟点击)/assets/F_Dialogue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 515 B |
22
archive/js/食材加工(模拟点击)/assets/pageScroll.json
Normal file
22
archive/js/食材加工(模拟点击)/assets/pageScroll.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"macroEvents": [
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 901, "time": 0},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 801, "time": 50},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 701, "time": 100},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 601, "time": 150},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 501, "time": 200},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 401, "time": 250},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 301, "time": 300},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 201, "time": 350},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 200, "mouseButton": "Left", "time": 400}
|
||||
],
|
||||
"info": {
|
||||
"name": "",
|
||||
"description": "",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"recordDpi": 1
|
||||
}
|
||||
}
|
||||
22
archive/js/食材加工(模拟点击)/assets/pageScroll2.json
Normal file
22
archive/js/食材加工(模拟点击)/assets/pageScroll2.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"macroEvents": [
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 901, "time": 0},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 801, "time": 50},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 701, "time": 100},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 601, "time": 150},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 501, "time": 200},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 401, "time": 250},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 301, "time": 300},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 205, "time": 350},
|
||||
{"type": 2, "mouseX": 1200, "mouseY": 204, "mouseButton": "Left", "time": 400}
|
||||
],
|
||||
"info": {
|
||||
"name": "",
|
||||
"description": "",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"recordDpi": 1
|
||||
}
|
||||
}
|
||||
3
archive/js/食材加工(模拟点击)/assets/滚轮下翻.json
Normal file
3
archive/js/食材加工(模拟点击)/assets/滚轮下翻.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{"macroEvents":[{"type":6,"mouseX":0,"mouseY":-120,"time":0},
|
||||
{"type":6,"mouseX":0,"mouseY":0,"time":100}],
|
||||
"info":{"name":"","description":"","x":0,"y":0,"width":1920,"height":1080,"recordDpi":1}}
|
||||
29
archive/js/食材加工(模拟点击)/assets/璃月杂货商东升旁灶台.json
Normal file
29
archive/js/食材加工(模拟点击)/assets/璃月杂货商东升旁灶台.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "璃月杂货商东升旁灶台",
|
||||
"type": "collect",
|
||||
"author": "吉吉喵",
|
||||
"version": "1.0",
|
||||
"description": "",
|
||||
"bgi_version": "0.42.3"
|
||||
},
|
||||
"positions": [
|
||||
{
|
||||
"id": 1,
|
||||
"x": 267.92,
|
||||
"y": -665.01,
|
||||
"action": "force_tp",
|
||||
"move_mode": "walk",
|
||||
"type": "teleport"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"x": 255.099609375,
|
||||
"y": -680.1826171875,
|
||||
"type": "target",
|
||||
"move_mode": "walk",
|
||||
"action": "",
|
||||
"action_params": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
315
archive/js/食材加工(模拟点击)/main.js
Normal file
315
archive/js/食材加工(模拟点击)/main.js
Normal file
@@ -0,0 +1,315 @@
|
||||
(async function () {
|
||||
notification.send("烹饪脚本开始");
|
||||
setGameMetrics(1920, 1080, 1.25); // 设置编写脚本环境的游戏分辨率和DPI缩放
|
||||
await genshin.returnMainUi(); // 返回主界面
|
||||
|
||||
let foodName = settings.foodName ?? 0;
|
||||
let foodNum = settings.foodNum ?? 0;
|
||||
let flour = settings.flour ?? false;
|
||||
|
||||
|
||||
let rawmeat = settings.rawmeat ?? false;
|
||||
let fish = settings.fish ?? false;
|
||||
let mysteriousmeat = settings.mysteriousmeat ?? false;
|
||||
|
||||
let ryeflour = settings.ryeflour ?? false;
|
||||
|
||||
let cream = settings.cream ?? false;
|
||||
let smokedPoultry = settings.smokedPoultry ?? false;
|
||||
let butter = settings.butter ?? false;
|
||||
let ham = settings.ham ?? false;
|
||||
let sugar = settings.sugar ?? false;
|
||||
let spice = settings.spice ?? false;
|
||||
let smetana = settings.smetana ?? false;
|
||||
|
||||
let crabRoe = settings.crabRoe ?? false;
|
||||
let jam = settings.jam ?? false;
|
||||
let cheese = settings.cheese ?? false;
|
||||
let bacon = settings.bacon ?? false;
|
||||
let sausage = settings.sausage ?? false;
|
||||
|
||||
// 优化后的食材列表,顺序即加工顺序
|
||||
const ingredientList = [
|
||||
{ key: "面粉", value: flour },
|
||||
|
||||
{ key: "兽肉", value: rawmeat },
|
||||
{ key: "鱼肉", value: fish },
|
||||
{ key: "神秘肉", value: mysteriousmeat },
|
||||
|
||||
{ key: "黑麦粉", value: ryeflour },
|
||||
|
||||
{ key: "奶油", value: cream },
|
||||
{ key: "熏禽肉", value: smokedPoultry },
|
||||
{ key: "黄油", value: butter },
|
||||
{ key: "火腿", value: ham },
|
||||
{ key: "糖", value: sugar },
|
||||
{ key: "香辛料", value: spice },
|
||||
{ key: "酸奶油", value: smetana },
|
||||
|
||||
{ key: "蟹黄", value: crabRoe },
|
||||
{ key: "果酱", value: jam },
|
||||
{ key: "奶酪", value: cheese },
|
||||
{ key: "培根", value: bacon },
|
||||
{ key: "香肠", value: sausage },
|
||||
];
|
||||
|
||||
|
||||
// 判断是否有食材参数
|
||||
const allEmpty = ingredientList.every(item => !item.value);
|
||||
if (!foodName && !foodNum && allEmpty) {
|
||||
notification.send("未设置烹饪参数,跳过烹饪操作");
|
||||
await genshin.returnMainUi();
|
||||
return;
|
||||
}
|
||||
|
||||
await sleep(1000);
|
||||
await pathingScript.runFile("assets/璃月杂货商东升旁灶台.json");
|
||||
|
||||
// 行列均从 0 开始计数
|
||||
function getItemPosition(row, col) {
|
||||
const startX = 115;
|
||||
const startY = 120;
|
||||
const itemWidth = 124;
|
||||
const itemHeight = 152;
|
||||
const colGap = 22;
|
||||
const rowGap = 22;
|
||||
|
||||
const x = startX + col * (itemWidth + colGap) + itemWidth / 2;
|
||||
const y = startY + row * (itemHeight + rowGap) + itemHeight / 2;
|
||||
//const x = startX + col * (itemWidth / 2 + (colGap - 22));
|
||||
//const y = startY + row * (itemHeight / 2 + (rowGap - 22));
|
||||
|
||||
return { x, y };
|
||||
}
|
||||
// 自动分配行列坐标
|
||||
const maxCols = 8;
|
||||
const ingredientCoordinates = ingredientList.map((item, idx) => {
|
||||
const row = Math.floor(idx / maxCols);
|
||||
const col = idx % maxCols;
|
||||
const { x, y } = getItemPosition(row, col);
|
||||
return { ...item, x, y, row, col };
|
||||
});
|
||||
// 通用:处理食材制作步骤
|
||||
async function processIngredient(quantity, row, col, key) {
|
||||
const { x, y } = getItemPosition(row, col);
|
||||
if (quantity) {
|
||||
log.info(`开始加工:${key}`);
|
||||
click(x, y);
|
||||
await sleep(500);
|
||||
|
||||
click(1690, 1015); // 制作
|
||||
await sleep(500);
|
||||
// 输入数量
|
||||
//click(965, 455);
|
||||
//await sleep(1000);
|
||||
//await inputText(quantity);
|
||||
//拉满
|
||||
click(1190, 590);
|
||||
await sleep(500);
|
||||
|
||||
click(1190, 755); // 确认
|
||||
await sleep(500);
|
||||
}
|
||||
};
|
||||
// 通用:模拟输入文本
|
||||
async function inputText(text) {
|
||||
for (const char of text) {
|
||||
keyPress(char);
|
||||
await sleep(500);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
F交互区
|
||||
**/
|
||||
// 定义一个函数用于模拟按键操作
|
||||
async function simulateKeyOperations(key, duration) {
|
||||
keyDown(key);
|
||||
await sleep(duration);
|
||||
keyUp(key);
|
||||
await sleep(500); // 释放按键后等待 500 毫秒
|
||||
}
|
||||
|
||||
// 识别 F 图标
|
||||
async function recognizeFIcon() {
|
||||
const fDialogueRo = RecognitionObject.TemplateMatch(
|
||||
file.ReadImageMatSync("assets/F_Dialogue.png"),
|
||||
1101,
|
||||
400,
|
||||
36,
|
||||
400
|
||||
);
|
||||
|
||||
let ra = captureGameRegion();
|
||||
let fRes = ra.find(fDialogueRo);
|
||||
ra.dispose();
|
||||
|
||||
if (!fRes.isExist()) {
|
||||
let f_attempts = 0; // 初始化尝试次数
|
||||
while (f_attempts < 3) { // 最多尝试 3 次
|
||||
f_attempts++;
|
||||
log.info(`当前尝试次数:${f_attempts}`);
|
||||
|
||||
if (f_attempts === 1 || f_attempts === 2) {
|
||||
// 第一次未找到 F 图标
|
||||
await simulateKeyOperations("S", 200); // 后退 200 毫秒
|
||||
log.info("执行后退操作");
|
||||
await sleep(200);
|
||||
await simulateKeyOperations("W", 600); // 前进 600 毫秒
|
||||
log.info("执行前进操作");
|
||||
} else if (f_attempts === 3) {
|
||||
// 第二次未找到 F 图标
|
||||
log.info("重新加载路径文件");
|
||||
const filePath = `assets/璃月杂货商东升旁灶台.json`;
|
||||
log.info(`加载路径文件:${filePath}`);
|
||||
await pathingScript.runFile(filePath);
|
||||
await sleep(500);
|
||||
}
|
||||
|
||||
// 重新获取游戏区域截图
|
||||
ra = captureGameRegion();
|
||||
fRes = ra.find(fDialogueRo);
|
||||
ra.dispose();
|
||||
|
||||
// 打印识别结果
|
||||
log.info(`识别结果:${fRes.isExist()}`);
|
||||
|
||||
// 如果识别成功,立即退出循环
|
||||
if (fRes.isExist()) {
|
||||
log.info("识别成功,退出循环");
|
||||
break;
|
||||
}
|
||||
|
||||
await sleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
// 如果尝试次数已达上限,返回 null
|
||||
if (!fRes.isExist()) {
|
||||
log.error("尝试次数已达上限");
|
||||
return null;
|
||||
}
|
||||
|
||||
return fRes;
|
||||
}
|
||||
|
||||
// 识别 Cooking 图标
|
||||
async function recognizeCookingIcon(centerYF) {
|
||||
const cookingRo = RecognitionObject.TemplateMatch(
|
||||
file.ReadImageMatSync("assets/Cooking.png"),
|
||||
1176,
|
||||
centerYF - 18, // 以 F 图标的中心,向上偏移 18 像素
|
||||
27, // 宽度范围
|
||||
36 // 高度范围
|
||||
);
|
||||
|
||||
let ra = captureGameRegion();
|
||||
let cookingRes = ra.find(cookingRo);
|
||||
ra.dispose();
|
||||
|
||||
if (cookingRes.isExist()) {
|
||||
log.info("找到 灶台 图标");
|
||||
return cookingRes;
|
||||
} else {
|
||||
log.info("未找到 灶台 图标");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 主逻辑函数
|
||||
async function main() {
|
||||
// 识别 F 图标
|
||||
let fRes = await recognizeFIcon();
|
||||
if (!fRes) {
|
||||
log.error("未能识别 F 图标,退出任务");
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取 F 图标的中心点 Y 坐标
|
||||
let centerYF = Math.round(fRes.y + fRes.height / 2);
|
||||
|
||||
const maxScrollAttempts = 5; // 最大滚轮操作次数限制
|
||||
let scrollAttempts = 0;
|
||||
|
||||
while (scrollAttempts < maxScrollAttempts) {
|
||||
// 识别 灶台 图标
|
||||
let cookingRes = await recognizeCookingIcon(centerYF);
|
||||
if (cookingRes) {
|
||||
// log.info("找到 灶台 图标");
|
||||
return cookingRes; // 识别成功,返回结果
|
||||
}
|
||||
|
||||
// 如果未找到 Cooking 图标,执行滚轮操作
|
||||
log.info(`未找到 Cooking 图标,执行滚轮操作,当前尝试次数:${scrollAttempts + 1}`);
|
||||
await keyMouseScript.runFile(`assets/滚轮下翻.json`);
|
||||
await sleep(800);
|
||||
|
||||
// 重新识别 F 图标,获取最新的中心点
|
||||
fRes = await recognizeFIcon();
|
||||
if (!fRes) {
|
||||
log.error("滚轮操作后,未能重新识别 F 图标,退出任务");
|
||||
return;
|
||||
}
|
||||
|
||||
centerYF = Math.round(fRes.y + fRes.height / 2); // 更新 F 图标的中心点 Y 坐标
|
||||
|
||||
// 增加尝试次数
|
||||
scrollAttempts++;
|
||||
}
|
||||
|
||||
// 如果超过最大滚轮操作次数,返回 null
|
||||
log.error(`滚轮操作次数已达上限 ${maxScrollAttempts} 次,未能找到 Cooking 图标`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
// 识别 Cooking 图标
|
||||
const cookingRes = await main();
|
||||
if (!cookingRes) {
|
||||
log.error("未能识别 灶台 图标,退出任务");
|
||||
return;
|
||||
}
|
||||
|
||||
keyPress("F");
|
||||
await sleep(1000);
|
||||
|
||||
|
||||
|
||||
//食材加工
|
||||
|
||||
click(1010, 50); //选择食材加工
|
||||
await sleep(500);
|
||||
click(255, 1020); //全部领取
|
||||
await sleep(500);
|
||||
click(960, 1045); //点击任意处
|
||||
await sleep(500);
|
||||
click(960, 1045); //点击任意处
|
||||
await sleep(500);
|
||||
click(960, 1045); //点击任意处
|
||||
await sleep(800);
|
||||
|
||||
// 按行列处理所有食材
|
||||
for (const ingredient of ingredientCoordinates) {
|
||||
if (ingredient.value) {
|
||||
await processIngredient(ingredient.value, ingredient.row, ingredient.col, ingredient.key);
|
||||
}
|
||||
}
|
||||
|
||||
await genshin.returnMainUi();
|
||||
await sleep(800);
|
||||
keyDown("S");
|
||||
await sleep(1000);
|
||||
keyUp("S");
|
||||
await sleep(800);
|
||||
} catch (error) {
|
||||
log.error(`执行按键或鼠标操作时发生错误:${error.message}`);
|
||||
}
|
||||
|
||||
notification.send("烹饪脚本结束");
|
||||
})();
|
||||
18
archive/js/食材加工(模拟点击)/manifest.json
Normal file
18
archive/js/食材加工(模拟点击)/manifest.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "食材加工(模拟点击)",
|
||||
"version": "1.0.2",
|
||||
"description": "根据选择加工物,自动加工食材。加工时会直接拉满加工数量。\n \n使用前请阅读“readme”文件以获取更多详细信息。",
|
||||
"tags": [
|
||||
"食材加工",
|
||||
"模拟点击"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "呱呱z",
|
||||
"links": "https://github.com/jidingcai"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
87
archive/js/食材加工(模拟点击)/settings.json
Normal file
87
archive/js/食材加工(模拟点击)/settings.json
Normal file
@@ -0,0 +1,87 @@
|
||||
[
|
||||
{
|
||||
"name": "flour",
|
||||
"type": "checkbox",
|
||||
"label": "——选择需要加工的食材——\n\n 面粉"
|
||||
},
|
||||
{
|
||||
"name": "rawmeat",
|
||||
"type": "checkbox",
|
||||
"label": " 兽肉"
|
||||
},
|
||||
{
|
||||
"name": "fish",
|
||||
"type": "checkbox",
|
||||
"label": " 鱼肉"
|
||||
},
|
||||
{
|
||||
"name": "mysteriousmeat",
|
||||
"type": "checkbox",
|
||||
"label": " 神秘肉"
|
||||
},
|
||||
{
|
||||
"name": "ryeflour",
|
||||
"type": "checkbox",
|
||||
"label": " 黑麦粉"
|
||||
},
|
||||
{
|
||||
"name": "cream",
|
||||
"type": "checkbox",
|
||||
"label": " 奶油"
|
||||
},
|
||||
{
|
||||
"name": "smokedPoultry",
|
||||
"type": "checkbox",
|
||||
"label": " 熏禽肉"
|
||||
},
|
||||
{
|
||||
"name": "butter",
|
||||
"type": "checkbox",
|
||||
"label": " 黄油"
|
||||
},
|
||||
{
|
||||
"name": "ham",
|
||||
"type": "checkbox",
|
||||
"label": " 火腿"
|
||||
},
|
||||
{
|
||||
"name": "sugar",
|
||||
"type": "checkbox",
|
||||
"label": " 糖"
|
||||
},
|
||||
{
|
||||
"name": "spice",
|
||||
"type": "checkbox",
|
||||
"label": " 香辛料"
|
||||
},
|
||||
{
|
||||
"name": "smetana",
|
||||
"type": "checkbox",
|
||||
"label": " 酸奶油"
|
||||
},
|
||||
{
|
||||
"name": "crabRoe",
|
||||
"type": "checkbox",
|
||||
"label": " 蟹黄"
|
||||
},
|
||||
{
|
||||
"name": "jam",
|
||||
"type": "checkbox",
|
||||
"label": " 果酱"
|
||||
},
|
||||
{
|
||||
"name": "cheese",
|
||||
"type": "checkbox",
|
||||
"label": " 奶酪"
|
||||
},
|
||||
{
|
||||
"name": "bacon",
|
||||
"type": "checkbox",
|
||||
"label": " 培根"
|
||||
},
|
||||
{
|
||||
"name": "sausage",
|
||||
"type": "checkbox",
|
||||
"label": " 香肠"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user