新增脚本: 尘歌壶一条龙-领取洞天宝钱和角色好感 (#509)
* update repo.json * feat: 尘歌壶一条龙 * update repo.json * JS脚本:feat:双倍好感度支持指定翻页寻找好友,fix:自增坐标间隔好友因单击取消选项卡不点及第四位好友错点备注的bug (#510) * update repo.json * JS脚本:fix历练点双倍好感切换队伍,新增返回七天神像切换指定队伍加速版 (#511) * fix:历练点双倍好感度切换队伍bug,feat:加入关闭提示,debug输出等选项 * JS脚本:返回七天神像切换指定队伍加速版 bgiVersion >= 0.44.1 * update repo.json * 地图追踪路径整理:钓鱼、原海异种 (#512) * update repo.json * Create archive folder. * update repo.json --------- Co-authored-by: 起个名字好难的喵 <25520958+MisakaAldrich@users.noreply.github.com> Co-authored-by: huiyadanli <15783049+huiyadanli@users.noreply.github.com> Co-authored-by: 秋云 <physligl@gmail.com> Co-authored-by: physligl <181079228+physligl@users.noreply.github.com>
This commit is contained in:
11
repo.json
11
repo.json
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"time": "20250402193336",
|
||||
"time": "20250403134601",
|
||||
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
|
||||
"file": "repo.json",
|
||||
"indexes": [
|
||||
@@ -31520,6 +31520,15 @@
|
||||
"description": "自动食材加工~|~自动食材加工, 可自动获取加工完成食材,可指定制作食材.",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "AutoSereniteaPot",
|
||||
"type": "directory",
|
||||
"hash": "de635bb51c4dc6bae1c7d11a7a6271b1aaeaf73b",
|
||||
"version": "0.0.1",
|
||||
"author": "bling-yshs",
|
||||
"description": "尘歌壶一条龙-领取洞天宝钱和角色好感~|~自动放置并进入尘歌壶,寻找阿圆,领取洞天宝钱和好感(需要配置进入尘歌壶以后的路线)(更新时间:5.5版本)",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"name": "AutoSmithyOre",
|
||||
"type": "directory",
|
||||
|
||||
133
repo/js/AutoSereniteaPot/main.js
Normal file
133
repo/js/AutoSereniteaPot/main.js
Normal file
@@ -0,0 +1,133 @@
|
||||
async function main() {
|
||||
// 先提示一下一般都需要配置移动路线
|
||||
if (!settings.route) {
|
||||
log.warn("当前未配置进入尘歌壶以后的路线,脚本可能无法正常运行");
|
||||
}
|
||||
|
||||
// 打开背包
|
||||
keyPress("B");
|
||||
await sleep(1000);
|
||||
|
||||
// 点击小道具选项卡(1048,50)
|
||||
click(1048, 50);
|
||||
await sleep(1000);
|
||||
|
||||
// 查找并点击尘歌壶
|
||||
await findSereniteaPot();
|
||||
await sleep(1000);
|
||||
|
||||
// 进入尘歌壶,等待加载动画
|
||||
keyPress("F");
|
||||
let waitTime = settings.loadingWaitTime;
|
||||
if (!waitTime) {
|
||||
waitTime = 10;
|
||||
}
|
||||
await sleep(waitTime * 1000);
|
||||
|
||||
// 移动到阿圆
|
||||
await moveToAYuan();
|
||||
log.info("开始领取好感度以及洞天宝钱");
|
||||
|
||||
// 按下 F
|
||||
keyPress("F");
|
||||
await sleep(2000);
|
||||
// 点击屏幕中间跳过对话
|
||||
click(960, 540);
|
||||
await sleep(1000);
|
||||
// 点击“信任等阶”
|
||||
click(1370, 432)
|
||||
await sleep(1000);
|
||||
// 领取好感
|
||||
click(1810, 715)
|
||||
await sleep(1000);
|
||||
// 如果弹出“洞天赠礼”,把它关闭
|
||||
click(1346, 300)
|
||||
await sleep(1000);
|
||||
// 领取洞天宝钱
|
||||
click(1080, 929)
|
||||
await sleep(1000);
|
||||
// 如果弹出“洞天财瓮”,把它关闭
|
||||
click(1346, 300)
|
||||
await sleep(1000);
|
||||
// 点击右上角的X
|
||||
click(1864, 47)
|
||||
await sleep(3000);
|
||||
// 点击“再见。”
|
||||
click(1360, 800)
|
||||
await sleep(1000);
|
||||
// 点击屏幕中间跳过对话
|
||||
click(960, 540);
|
||||
}
|
||||
|
||||
async function findSereniteaPot() {
|
||||
let found = false;
|
||||
let currentX = 178; // 起始X坐标
|
||||
let searchCount = 0; // 添加查找次数计数器
|
||||
const MAX_SEARCH_COUNT = 5; // 最大查找次数
|
||||
|
||||
while (searchCount < MAX_SEARCH_COUNT) {
|
||||
searchCount++;
|
||||
// 点击当前坐标的小道具
|
||||
click(currentX, 188);
|
||||
await sleep(1000);
|
||||
|
||||
// 获取游戏区域截图
|
||||
let screen = captureGameRegion();
|
||||
|
||||
// 根据指定区域进行剪裁
|
||||
let targetRegion = screen.DeriveCrop(1307, 119, 493, 55);
|
||||
|
||||
// 使用OCR识别
|
||||
let ocrRo = RecognitionObject.Ocr(0, 0, targetRegion.Width, targetRegion.Height);
|
||||
let ocrResult = targetRegion.find(ocrRo);
|
||||
|
||||
if (!ocrResult.isEmpty() && ocrResult.Text.includes("尘歌壶")) {
|
||||
found = true;
|
||||
// 点击指定坐标
|
||||
click(1690, 1020);
|
||||
await sleep(1000);
|
||||
// 检查一下背包页面是否退出了,有可能当前角色状态没法放置尘歌壶,直接再判断一次截图区域文本是不是尘歌壶就行
|
||||
let screen = captureGameRegion();
|
||||
// 根据指定区域进行剪裁
|
||||
let targetRegion = screen.DeriveCrop(1307, 119, 493, 55);
|
||||
let ocrRo = RecognitionObject.Ocr(0, 0, targetRegion.Width, targetRegion.Height);
|
||||
let ocrResult = targetRegion.find(ocrRo);
|
||||
if (!ocrResult.isEmpty() && ocrResult.Text.includes("尘歌壶")) {
|
||||
throw new Error("当前无法放置尘歌壶,请检查具体原因");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
currentX += 145; // 向右移动145像素,查找下一个格子的小道具
|
||||
await sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error(`查找尘歌壶次数超过${MAX_SEARCH_COUNT}次,请检查背包是否存在尘歌壶`);
|
||||
}
|
||||
|
||||
async function moveToAYuan() {
|
||||
const userRoute = settings.route;
|
||||
if (!userRoute) {
|
||||
return
|
||||
}
|
||||
|
||||
// 解析路径配置
|
||||
const routes = userRoute.split(',').map(route => route.trim());
|
||||
|
||||
for (const route of routes) {
|
||||
const [direction, time] = route.split(' ');
|
||||
|
||||
if (!direction || !time) {
|
||||
log.error("路径格式错误: {route}", route);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 执行移动
|
||||
keyDown(direction);
|
||||
await sleep(parseInt(time));
|
||||
keyUp(direction);
|
||||
await sleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
14
repo/js/AutoSereniteaPot/manifest.json
Normal file
14
repo/js/AutoSereniteaPot/manifest.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "尘歌壶一条龙-领取洞天宝钱和角色好感",
|
||||
"version": "0.0.1",
|
||||
"description": "自动放置并进入尘歌壶,寻找阿圆,领取洞天宝钱和好感(需要配置进入尘歌壶以后的路线)(更新时间:5.5版本)",
|
||||
"authors": [
|
||||
{
|
||||
"name": "bling-yshs",
|
||||
"link": "https://github.com/bling-yshs"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
12
repo/js/AutoSereniteaPot/settings.json
Normal file
12
repo/js/AutoSereniteaPot/settings.json
Normal file
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"name": "route",
|
||||
"type": "input-text",
|
||||
"label": "进入尘歌壶以后寻找阿圆的路径\n填写规则:方向键+空格+时间(单位:毫秒)\n多个路径用英文逗号隔开,例如:A 1000,S 1500,A 500"
|
||||
},
|
||||
{
|
||||
"name": "loadingWaitTime",
|
||||
"type": "input-text",
|
||||
"label": "按 F 进入尘歌壶后等待加载的时间(单位:秒)(默认:10)"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user