Compare commits

...

10 Commits

Author SHA1 Message Date
MisakaAldrich
6eaf7ce057 update repo.json
Some checks failed
Build repo.json / build (18.x) (push) Has been cancelled
Build repo.json / upload (push) Has been cancelled
2025-08-07 17:21:42 +00:00
起个名字好难的喵
6733c2a178 JS脚本: 鳄鱼好感修复fakelog 2025-08-08 01:21:11 +08:00
physligl
abc2749375 update repo.json 2025-08-07 15:29:11 +00:00
秋云
49d408b5d3 fix: 手动管理截图内存 2025-08-07 23:28:34 +08:00
MisakaAldrich
1b58b1df40 update repo.json 2025-08-07 14:45:14 +00:00
起个名字好难的喵
92d29a8e31 add js authors 2025-08-07 22:44:47 +08:00
起个名字好难的喵
8423ec45c9 秋秋云,我已登神 2025-08-07 22:44:13 +08:00
起个名字好难的喵
8342c87404 archive js battlepass 2025-08-07 22:36:45 +08:00
zaodonganqi
b446f0c98c update repo.json 2025-08-07 12:00:08 +00:00
mno
c23b44399a js:锄地一条龙1.3.6 (#1499)
### 1.3.6(2025.08.07)
1.进一步优化内存占用
2025-08-07 19:59:46 +08:00
15 changed files with 203 additions and 132 deletions

View File

@@ -1,5 +1,5 @@
{
"time": "20250807151045",
"time": "20250808012141",
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
"file": "repo.json",
"indexes": [
@@ -73742,19 +73742,20 @@
{
"name": "AEscoffier_chef",
"type": "directory",
"hash": "dd10ebc368bff93c0a227a950fd9406df54dcc1d",
"hash": "bd301e7146d34c7c61cd219cf9851e7be94eacd4",
"version": "1.3.2",
"author": "提瓦特钓鱼玳师",
"authors": [
{
"name": "提瓦特钓鱼玳师"
"name": "提瓦特钓鱼玳师",
"link": "https://github.com/Hijiwos"
}
],
"description": "一只爱可菲(厨娘版)~|~专精料理制作的爱可菲(自动烹饪及解锁、特殊料理)",
"tags": [
"bgi≥0.45.0"
],
"lastUpdated": "2025-08-06 00:59:55"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "AIPC珍贵宝箱无限刷",
@@ -74046,8 +74047,8 @@
{
"name": "AutoFriendshipEvilBaresItsFangsGetRawMeat",
"type": "directory",
"hash": "81e0d2ec5f98789b0c03afd29a75e125551bcdc1",
"version": "1.4.0",
"hash": "bec8d3a255a15593d078b536b922c85e0aa76d1e",
"version": "1.4.1",
"author": "起个名字好难的喵",
"authors": [
{
@@ -74066,7 +74067,7 @@
"兽肉",
"突发事件"
],
"lastUpdated": "2025-05-17 12:18:17"
"lastUpdated": "2025-08-07 22:44:13"
},
{
"name": "AutoFriendshipFight",
@@ -74118,8 +74119,8 @@
{
"name": "AutoHoeingOneDragon",
"type": "directory",
"hash": "f38cc8f917009bccd2e022d95de021b74affc556",
"version": "1.3.5",
"hash": "d7a01b477c6ac7340b9580a5664adc1e0575994b",
"version": "1.3.6",
"author": "mno",
"authors": [
{
@@ -74129,7 +74130,7 @@
],
"description": "锄地一条龙~|~一站式解决自动化锄地支持只拾取狗粮请仔细阅读README.md后使用",
"tags": [],
"lastUpdated": "2025-08-07 15:10:28"
"lastUpdated": "2025-08-07 19:59:46"
},
{
"name": "AutoLeyLineOutcrop",
@@ -74209,12 +74210,13 @@
{
"name": "AutoRefinedCondensationResin",
"type": "directory",
"hash": "3981ed70e521984c8c36df9b1c3e76b600bdc6a1",
"hash": "be107b5c8d4add5ba334c74fdcb838baa7d00e27",
"version": "1.0",
"author": "蜜柑魚",
"authors": [
{
"name": "蜜柑魚"
"name": "蜜柑魚",
"link": "https://github.com/this-Fish"
}
],
"description": "自动合成浓缩树脂~|~\n可前往多国合成台自动合成浓缩树脂仅支持中文语言。\n通过OCR技术确保准确进入合成台并完成合成操作。\n可设置特定星期执行任务输入\"1,3,5,7\"在周一/三/五/日执行)。\n特殊时间处理00:00~04:00视为前一天。",
@@ -74223,7 +74225,7 @@
"OCR",
"合成树脂"
],
"lastUpdated": "2025-07-28 12:15:15"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "AutoSmithyOre",
@@ -74246,12 +74248,13 @@
{
"name": "AutoStygianOnslaught",
"type": "directory",
"hash": "d0cfdd78a03a253e842691412267a12531f1cf05",
"hash": "7704148e6fa7092cd453d95a4b29f1bdb4a72111",
"version": "1.7",
"author": "LCB-茶包",
"authors": [
{
"name": "LCB-茶包"
"name": "LCB-茶包",
"link": "https://github.com/kaedelcb"
}
],
"description": "自动幽境危战~|~请先配置好秘境内的队伍,幽境危战战斗失败或执行错误会重试一次,请保证队伍实力",
@@ -74259,7 +74262,7 @@
"bgi≥0.44.8",
"幽境危战"
],
"lastUpdated": "2025-08-07 08:44:31"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "AutoSwitchRoles",
@@ -74381,22 +74384,6 @@
],
"lastUpdated": "2025-07-28 12:15:15"
},
{
"name": "BattlePass",
"type": "directory",
"hash": "66acca809841f735fc8f7ddc3a7b05c67f8a1191",
"version": "1.1",
"author": "HZYgrandma",
"authors": [
{
"name": "HZYgrandma",
"link": "https://github.com/HZYgrandma"
}
],
"description": "领取纪行~|~用于领取纪行",
"tags": [],
"lastUpdated": "2025-07-05 00:25:10"
},
{
"name": "CD-Aware-AutoGather",
"type": "directory",
@@ -74644,7 +74631,7 @@
{
"name": "Language",
"type": "directory",
"hash": "d229b51f31c26e1dfbba3ebcbed93ee970026afa",
"hash": "4585a9fe615c922c615e1dfeffe9d9aaf68db521",
"version": "1.0",
"author": "ddaodan",
"authors": [
@@ -74657,7 +74644,7 @@
"tags": [
"bgi≥0.45.0"
],
"lastUpdated": "2025-08-02 14:36:43"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "Mail",
@@ -75598,19 +75585,20 @@
{
"name": "背包材料统计",
"type": "directory",
"hash": "a3b14b315d45ae80f9148159a709bec97e5e0a09",
"hash": "279728a8f72a68636e4035e7609e0424bc09e41e",
"version": "2.41",
"author": "吉吉喵",
"authors": [
{
"name": "吉吉喵"
"name": "吉吉喵",
"link": "https://github.com/JJMdzh"
}
],
"description": "背包统计采集系统~|~默认四行为一页模板匹配材料OCR识别数量。\n数字太小可能无法识别用?代替。\n目前支持采集材料的数量统计+路径CD管理。",
"tags": [
"bgi≥0.44.8"
],
"lastUpdated": "2025-07-27 16:38:53"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "自动使用兑换码",
@@ -75665,18 +75653,18 @@
{
"name": "角色养成一条龙",
"type": "directory",
"hash": "f3deacbcf60bd84f287fad5d0e13cfbd9a6ed953",
"hash": "96c40ce9b80680d4350b2d32dd285f46ac7d1eb9",
"version": "1.2",
"author": "柒叶子",
"authors": [
{
"name": "柒叶子",
"link": "https://github.com/511760049"
"link": "https://github.com/5117600049"
}
],
"description": "角色养成一条龙~|~详见readme.md",
"tags": [],
"lastUpdated": "2025-08-02 02:15:55"
"lastUpdated": "2025-08-07 22:44:47"
},
{
"name": "计算机",

View File

@@ -7,7 +7,7 @@
"authors": [
{
"name": "提瓦特钓鱼玳师",
"url": "https://github.com/Hijiwos"
"links": "https://github.com/Hijiwos"
}
],
"settings_ui": "settings.json",

View File

@@ -70,6 +70,83 @@
}
}
async function fakeLog(name, isJs, isStart, duration) {
await sleep(10);
const currentTime = Date.now();
// 参数检查
if (typeof name !== 'string') {
log.error("参数 'name' 必须是字符串类型!");
return;
}
if (typeof isJs !== 'boolean') {
log.error("参数 'isJs' 必须是布尔型!");
return;
}
if (typeof isStart !== 'boolean') {
log.error("参数 'isStart' 必须是布尔型!");
return;
}
if (typeof currentTime !== 'number' || !Number.isInteger(currentTime)) {
log.error("参数 'currentTime' 必须是整数!");
return;
}
if (typeof duration !== 'number' || !Number.isInteger(duration)) {
log.error("参数 'duration' 必须是整数!");
return;
}
// 将 currentTime 转换为 Date 对象并格式化为 HH:mm:ss.sss
const date = new Date(currentTime);
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
const milliseconds = String(date.getMilliseconds()).padStart(3, '0');
const formattedTime = `${hours}:${minutes}:${seconds}.${milliseconds}`;
// 将 duration 转换为分钟和秒,并保留三位小数
const durationInSeconds = duration / 1000; // 转换为秒
const durationMinutes = Math.floor(durationInSeconds / 60);
const durationSeconds = (durationInSeconds % 60).toFixed(3); // 保留三位小数
// 使用四个独立的 if 语句处理四种情况
if (isJs && isStart) {
// 处理 isJs = true 且 isStart = true 的情况
const logMessage = `正在伪造js开始的日志记录\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`------------------------------\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`→ 开始执行JS脚本: "${name}"`;
log.debug(logMessage);
}
if (isJs && !isStart) {
// 处理 isJs = true 且 isStart = false 的情况
const logMessage = `正在伪造js结束的日志记录\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`→ 脚本执行结束: "${name}", 耗时: ${durationMinutes}${durationSeconds}\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`------------------------------`;
log.debug(logMessage);
}
if (!isJs && isStart) {
// 处理 isJs = false 且 isStart = true 的情况
const logMessage = `正在伪造地图追踪开始的日志记录\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`------------------------------\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`→ 开始执行地图追踪任务: "${name}"`;
log.debug(logMessage);
}
if (!isJs && !isStart) {
// 处理 isJs = false 且 isStart = false 的情况
const logMessage = `正在伪造地图追踪结束的日志记录\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`→ 脚本执行结束: "${name}", 耗时: ${durationMinutes}${durationSeconds}\n\n` +
`[${formattedTime}] [INF] BetterGenshinImpact.Service.ScriptService\n` +
`------------------------------`;
log.debug(logMessage);
}
}
// 好感核心函数
async function AutoFriendship(runTimes, statueTimes, getMeatMode, delayTime, startTime, ocrTimeout) {
for (let i = 0; i < runTimes; i++) {
@@ -112,6 +189,9 @@
"forceInteraction": true
}));
const pathingName = `${i + 1}次,共${runTimes}`
await fakeLog(`${pathingName}`, false, true, 0);
//原版逻辑 await AutoPath(`好感-张牙舞爪的恶党-循环${getMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`);
//多种拾取模式
if (getMeatMode == "算了我不捡了") {
@@ -126,6 +206,8 @@
await AutoPath(`好感-张牙舞爪的恶党-循环(二净甸)`);
}
await fakeLog(`${pathingName}`, false, false, 0);
// 关闭急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
"forceInteraction": false

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "兽肉好感:自动好感度&刷两只鳄鱼兽肉&卡时间",
"version": "1.4.0",
"version": "1.4.1",
"bgi_version": "0.44.6",
"tags": ["好感", "兽肉", "突发事件"],
"description": "通过突发事件:张牙舞爪的恶党刷兽肉并顺带获取好感度好感度超过10次后不再获取请使用满员好感度队伍并为全体队伍角色配置相应的战斗策略",

View File

@@ -105,7 +105,7 @@ async function detectTaskTrigger(ocrTimeout, enemyType) {
while (Date.now() - ocrStartTime < ocrTimeout * 1000 && !ocrStatus) {
let captureRegion = captureGameRegion();
let resList = captureRegion.findMulti(RecognitionObject.ocr(0, 200, 300, 300));
captureRegion.dispose();
for (let o = 0; o < resList.count; o++) {
let res = resList[o];
for (let keyword of ocrKeywords) {
@@ -474,7 +474,7 @@ async function waitForBattleResult(timeout = 2 * 60 * 1000, enemyType = "盗宝
let result2 = capture.find(RecognitionObject.ocr(0, 200, 300, 300));
let text = result.text;
let text2 = result2.text;
capture.dispose();
// 检查成功关键词
for (let keyword of successKeywords) {
if (text.includes(keyword)) {

View File

@@ -74,6 +74,8 @@
---
### 更新日志
### 1.3.62025.08.07
1.进一步优化内存占用
### 1.3.52025.08.07
1.使用dispose极大优化内存占用
### 1.3.42025.08.07

View File

@@ -1,4 +1,4 @@
//当前js版本 1.3.5
//当前js版本 1.3.6
//拾取时上下滑动的时间
const timeMoveUp = 500;
@@ -10,6 +10,7 @@ if (settings.activeDumperMode) { //处理泥头车信息
dumpers = [];
}
trigger = (+settings.trigger || 50);
let gameRegion;
(async function () {
//自定义配置处理
@@ -501,7 +502,7 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
try {
let template = file.ReadImageMatSync(imagePath);
let recognitionObject = RecognitionObject.TemplateMatch(template, xMin, yMin, width, height);
const gameRegion = captureGameRegion();
gameRegion = captureGameRegion();
let result = gameRegion.find(recognitionObject);
gameRegion.dispose();
if (result.isExist()) {
@@ -542,7 +543,7 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
try {
let template = file.ReadImageMatSync(imagePath);
let recognitionObject = RecognitionObject.TemplateMatch(template, xMin, yMin, width, height);
const gameRegion = captureGameRegion();
gameRegion = captureGameRegion();
let result = gameRegion.find(recognitionObject);
gameRegion.dispose();
if (result.isExist()) {
@@ -578,17 +579,15 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
// 定义一个函数用于执行OCR识别和交互
async function performOcrAndInteract(imagePath, whitelistKeywords, textxRange, texttolerance) {
async function performOcr(whitelistKeywords, xRange, yRange, timeout = 200) {
let startTime = Date.now();
while (Date.now() - startTime < timeout) {
async function performOcr(whitelistKeywords, xRange, yRange) {
try {
// 在捕获的区域内进行OCR识别
let ra = captureGameRegion();
let resList = ra.findMulti(RecognitionObject.ocr(
gameRegion = captureGameRegion();
let resList = gameRegion.findMulti(RecognitionObject.ocr(
xRange.min, yRange.min,
xRange.max - xRange.min, yRange.max - yRange.min
));
ra.dispose();
gameRegion.dispose();
// 遍历识别结果,检查是否找到目标文本
let results = [];
for (let i = 0; i < resList.count; i++) {
@@ -614,9 +613,6 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
return [];
}
}
log.warn("OCR识别超时");
return [];
}
while (!state.completed && !state.cancelRequested) {
// 尝试找到 F 图标并返回其坐标
@@ -626,13 +622,12 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
try {
let template = file.ReadImageMatSync(imagePath);
let recognitionObject = RecognitionObject.TemplateMatch(template, xMin, yMin, width, height);
const gameRegion = captureGameRegion();
gameRegion = captureGameRegion();
let result = gameRegion.find(recognitionObject);
gameRegion.dispose();
if (result.isExist()) {
return { success: true, x: result.x, y: result.y, width: result.width, height: result.height };
} else {
gameRegion.dispose();
}
} catch (error) {
log.error(`识别图像时发生异常: ${error.message}`);
@@ -665,7 +660,7 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
let centerYF = fRes.y + fRes.height / 2;
// 在当前屏幕范围内进行 OCR 识别
let ocrResults = await performOcr(whitelistKeywords, textxRange, { min: fRes.y - texttolerance, max: fRes.y + fRes.height + texttolerance * 2 }, 200);
let ocrResults = await performOcr(whitelistKeywords, textxRange, { min: fRes.y - texttolerance, max: fRes.y + fRes.height + texttolerance * 2 });
// 检查所有目标文本是否在当前页面中
let foundTarget = false;

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "锄地一条龙",
"version": "1.3.5",
"version": "1.3.6",
"description": "一站式解决自动化锄地支持只拾取狗粮请仔细阅读README.md后使用",
"authors": [
{
@@ -12,7 +12,7 @@
"settings_ui": "settings.json",
"main": "main.js",
"saved_files": [
"records/",
"records/*.json",
"assets/拾取名单.json"
]
}

View File

@@ -10,7 +10,8 @@
],
"authors": [
{
"name": "蜜柑魚"
"name": "蜜柑魚",
"links": "https://github.com/this-Fish"
}
],
"settings_ui": "settings.json",

View File

@@ -2,12 +2,15 @@
"manifest_version": 1,
"name": "自动幽境危战",
"version": "1.7",
"tags": ["幽境危战"],
"tags": [
"幽境危战"
],
"bgi_version": "0.44.8",
"description": "请先配置好秘境内的队伍,幽境危战战斗失败或执行错误会重试一次,请保证队伍实力",
"authors": [
{
"name": "LCB-茶包"
"name": "LCB-茶包",
"links": "https://github.com/kaedelcb"
}
],
"settings_ui": "settings.json",

View File

@@ -7,10 +7,9 @@
"authors": [
{
"name": "ddaodan",
"link": "https://github.com/ddaodan"
"links": "https://github.com/ddaodan"
}
],
"settings_ui": "settings.json",
"main": "main.js"
}

View File

@@ -6,7 +6,8 @@
"description": "默认四行为一页模板匹配材料OCR识别数量。\n数字太小可能无法识别用?代替。\n目前支持采集材料的数量统计+路径CD管理。",
"authors": [
{
"name": "吉吉喵"
"name": "吉吉喵",
"links": "https://github.com/JJMdzh"
}
],
"settings_ui": "settings.json",

View File

@@ -6,7 +6,7 @@
"authors": [
{
"name": "柒叶子",
"link": "https://github.com/511760049"
"links": "https://github.com/5117600049"
}
],
"settings_ui": "settings.json",