mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-05-22 22:45:50 +08:00
1.修复识别与龙蛋不符合2.添加通知3.增加时长for稳定性 (#2363)
* Add files via upload * Update main.js
This commit is contained in:
@@ -31,6 +31,11 @@
|
|||||||
|
|
||||||
|
|
||||||
## 更新
|
## 更新
|
||||||
|
### 版本:2.0.3
|
||||||
|
1.修复闪闪礼蛋识别与蛋名称不相符合
|
||||||
|
2.添加通知
|
||||||
|
3.增加时长,为了延长功能稳定性
|
||||||
|
|
||||||
### 版本:2.0.2
|
### 版本:2.0.2
|
||||||
1.修改龙蛋滑动小段,直接跳出问题
|
1.修改龙蛋滑动小段,直接跳出问题
|
||||||
|
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ async function recordForFile(judge) {
|
|||||||
record = {
|
record = {
|
||||||
lastRunDate: "1970/01/01",
|
lastRunDate: "1970/01/01",
|
||||||
lastActivateTime: new Date("1970-01-01T20:00:00.000Z"),
|
lastActivateTime: new Date("1970-01-01T20:00:00.000Z"),
|
||||||
lastDragonEggsNum: "【山之血:0,太阳的轰鸣:0圣龙君临:0,菲耶蒂娜:0,献给小酒杯:0,飞澜鲨鲨:0】",
|
lastDragonEggsNum: "【山之血:0,飞澜鲨鲨:0,圣龙君临:0,太阳的轰鸣:0,献给小酒杯:0,菲耶蒂娜:0】",
|
||||||
records: new Array(51).fill(""),
|
records: new Array(51).fill(""),
|
||||||
version: ""
|
version: ""
|
||||||
};
|
};
|
||||||
@@ -427,7 +427,7 @@ async function chcekDragonEggs() {
|
|||||||
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
||||||
// log.info(`第一次识别到的数字:${ocrEggNum.text}`);
|
// log.info(`第一次识别到的数字:${ocrEggNum.text}`);
|
||||||
if (ocrEggNum.text == "") {
|
if (ocrEggNum.text == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrEggNum = await performOcr("",
|
ocrEggNum = await performOcr("",
|
||||||
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
||||||
// log.info(`第二次识别到的数字:${ocrEggNum.text}`);
|
// log.info(`第二次识别到的数字:${ocrEggNum.text}`);
|
||||||
@@ -447,7 +447,7 @@ async function chcekDragonEggs() {
|
|||||||
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
||||||
// log.info(`第一次识别到的数字:${ocrEggNum.text}`);
|
// log.info(`第一次识别到的数字:${ocrEggNum.text}`);
|
||||||
if (ocrEggNum.text == "") {
|
if (ocrEggNum.text == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrEggNum = await performOcr("",
|
ocrEggNum = await performOcr("",
|
||||||
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
{ min: DragonEgg.coordinates[0]-46, max: DragonEgg.coordinates[0]+34 }, { min: DragonEgg.coordinates[1]+56, max: DragonEgg.coordinates[1]+83 }, true);
|
||||||
// log.info(`第二次识别到的数字:${ocrEggNum.text}`);
|
// log.info(`第二次识别到的数字:${ocrEggNum.text}`);
|
||||||
@@ -494,14 +494,14 @@ async function chcekDragonEggs() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
log.info(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`);
|
log.info(`背包龙蛋数目: 【山之血:${DragonEggs[0]},飞澜鲨鲨:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},太阳的轰鸣:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},菲耶蒂娜:${DragonEggs[5]}】`);
|
||||||
if (settings.notify) {
|
if (settings.notify) {
|
||||||
notification.Send(`背包龙蛋数目: 【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`);
|
notification.Send(`背包龙蛋数目: 【山之血:${DragonEggs[0]},飞澜鲨鲨:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},太阳的轰鸣:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},菲耶蒂娜:${DragonEggs[5]}】`);
|
||||||
};
|
};
|
||||||
// 更新记录
|
// 更新记录
|
||||||
record.lastDragonEggsNum = `【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`;
|
record.lastDragonEggsNum = `【山之血:${DragonEggs[0]},飞澜鲨鲨:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},太阳的轰鸣:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},菲耶蒂娜:${DragonEggs[5]}】`;
|
||||||
await recordForFile(false);
|
await recordForFile(false);
|
||||||
return `【山之血:${DragonEggs[0]},太阳的轰鸣:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},菲耶蒂娜:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},飞澜鲨鲨:${DragonEggs[5]}】`;;
|
return `【山之血:${DragonEggs[0]},飞澜鲨鲨:${DragonEggs[1]},圣龙君临:${DragonEggs[2]},太阳的轰鸣:${DragonEggs[3]},献给小酒杯:${DragonEggs[4]},菲耶蒂娜:${DragonEggs[5]}】`;;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 检查过期物品
|
// 检查过期物品
|
||||||
@@ -546,16 +546,16 @@ async function checkExpire() {
|
|||||||
//识别对话位置,并点击
|
//识别对话位置,并点击
|
||||||
let ocrResults = await performOcr("神奇的", dialogZone.x, dialogZone.y, false);
|
let ocrResults = await performOcr("神奇的", dialogZone.x, dialogZone.y, false);
|
||||||
if (ocrResults.success) {
|
if (ocrResults.success) {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
await performOcr("如何才", dialogZone.x, dialogZone.y, false);
|
await performOcr("如何才", dialogZone.x, dialogZone.y, false);
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
let ocrOver = await performOcr("已",{ min: 1482, max: 1630 }, { min: 912, max: 957 }, false);
|
let ocrOver = await performOcr("已",{ min: 1482, max: 1630 }, { min: 912, max: 957 }, false);
|
||||||
if (ocrOver.success) {
|
if (ocrOver.success) {
|
||||||
log.info("已售罄!!!");
|
log.info("已售罄!!!");
|
||||||
} else {
|
} else {
|
||||||
let ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true);
|
let ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true);
|
||||||
if (ocrMora == "") {
|
if (ocrMora == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true);
|
ocrMora = await performOcr("", { min: 1600, max: 1780 }, { min: 30, max: 60 }, true);
|
||||||
};
|
};
|
||||||
if (BigInt(ocrMora.text) >= 300) {
|
if (BigInt(ocrMora.text) >= 300) {
|
||||||
@@ -810,7 +810,7 @@ async function checkExpire() {
|
|||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
let ocrResults = await performOcr("布兰", dialogZone.x, dialogZone.y, false);
|
let ocrResults = await performOcr("布兰", dialogZone.x, dialogZone.y, false);
|
||||||
if (ocrResults.success) {
|
if (ocrResults.success) {
|
||||||
// await sleep(500);
|
await sleep(700);
|
||||||
let ocrResults1 = await performOcr("没什么", dialogZone.x, dialogZone.y, false);
|
let ocrResults1 = await performOcr("没什么", dialogZone.x, dialogZone.y, false);
|
||||||
if(ocrResults1.success){
|
if(ocrResults1.success){
|
||||||
log.info("对话出现没什么,默认领取和使用过!!!");
|
log.info("对话出现没什么,默认领取和使用过!!!");
|
||||||
@@ -855,7 +855,7 @@ async function checkExpire() {
|
|||||||
//识别获得的食物名称
|
//识别获得的食物名称
|
||||||
let ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true);
|
let ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true);
|
||||||
if (ocrText.text == "") {
|
if (ocrText.text == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true);
|
ocrText = await performOcr("", { min: 813, max: 985 }, { min: 585, max: 619 }, true);
|
||||||
};
|
};
|
||||||
log.info(`获得:${ocrText.text}`);
|
log.info(`获得:${ocrText.text}`);
|
||||||
@@ -874,7 +874,7 @@ async function checkExpire() {
|
|||||||
await sleep(3000);
|
await sleep(3000);
|
||||||
let ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true);
|
let ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true);
|
||||||
if (ocrText.text == "") {
|
if (ocrText.text == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true);
|
ocrText1 = await performOcr("", { min: 716, max: 1200 }, { min: 631, max: 710 }, true);
|
||||||
};
|
};
|
||||||
let text = ocrText1.text.replace(/\r\n|\n|\r/g, "");
|
let text = ocrText1.text.replace(/\r\n|\n|\r/g, "");
|
||||||
@@ -1039,7 +1039,7 @@ async function checkExpire() {
|
|||||||
await sleep(6000);
|
await sleep(6000);
|
||||||
let ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true);
|
let ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true);
|
||||||
if (ocrText.text == "") {
|
if (ocrText.text == "") {
|
||||||
await sleep(500);
|
await sleep(700);
|
||||||
ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true);
|
ocrText = await performOcr("", { min: 555, max: 1365 }, { min: 902, max: 1000 }, true);
|
||||||
};
|
};
|
||||||
log.info(`转盘运势:${ocrText.text}`);
|
log.info(`转盘运势:${ocrText.text}`);
|
||||||
@@ -1212,3 +1212,4 @@ async function checkExpire() {
|
|||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 1,
|
"manifest_version": 1,
|
||||||
"name": "提瓦特杂事(收集)",
|
"name": "提瓦特杂事(收集)",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"tags": [
|
"tags": [
|
||||||
"玄学",
|
"玄学",
|
||||||
"收集",
|
"收集",
|
||||||
|
|||||||
@@ -1,54 +1,9 @@
|
|||||||
上次运行日期: 2025/10/29
|
>>>>>>>2025年09月29日
|
||||||
上次上香时间: 2025-10-20T09:34:33.877Z
|
>>>>>>>2025年09月29日
|
||||||
背包龙蛋数目: 【山之血:1,太阳的轰鸣:2,圣龙君临:1,菲耶蒂娜:1,献给小酒杯:0,飞澜鲨鲨:0】
|
转盘的运势:「『层云蔽月,大地沉睡。』
|
||||||
>>>>>>>>>> 2025年10月20日
|
就是现在不是好时机,条件还没有凌齐的意思。」
|
||||||
>>>>>>>>>> 2025年10月20日
|
获得的龙蛋:闪闪礼蛋·献给小酒杯
|
||||||
>>>>>>>>>> 2025年10月20日
|
>>2025年09月27日
|
||||||
>>>>>>>>>> 2025年10月20日
|
获得的食物:
|
||||||
>>>>>>>>>> 2025年10月20日
|
幸运签内容:
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
幸运签内容: 「生活不是游戏。」
|
|
||||||
获得的食物: 美味的薄荷果冻
|
|
||||||
>>>>>>>>>> 2025年10月20日
|
|
||||||
转盘的运势: 『『层云蔽月,大地沉睡。』就是现在不是好时机,条件还没有凌齐的意思。」
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月19日
|
|
||||||
>>>>>>>>>> 2025年10月18日
|
|
||||||
>>>>>>>>>> 2025年10月18日
|
|
||||||
转盘的运势: 「『晨露凝珠,浆果丰盛。』就是今天会有收获的意思!」
|
|
||||||
>>>>>>>>>> 2025年10月18日
|
|
||||||
幸运签内容: 「别寻找什么捷径了,说不定去捷径的路现在都已站满了人。」
|
|
||||||
获得的食物: 香烤肋排
|
|
||||||
>>>>>>>>>> 2025年10月18日
|
|
||||||
抽签的结果: 大吉
|
|
||||||
>>>>>>>>>> 2025年10月18日
|
|
||||||
幸运签内容: 「再来一份!(开玩笑的)」
|
|
||||||
获得的食物: 塔塞斯杂烩
|
|
||||||
获得的食物: undefined
|
|
||||||
>>>>>>>>>> 2025年10月11日
|
|
||||||
转盘的运势: 「『旭日瞳瞳,驱散迷雾。』就是遇到困难也没关系,一定会得到帮助的意思!」
|
|
||||||
幸运签内容: 「当你觉得现状够糟时要保持警惕,因为事态往往还能变得更糟。」
|
|
||||||
获得的食物: 美味的咖啡芭芭露
|
|
||||||
抽签的结果: 吉
|
|
||||||
>>>>>>>>>> sa
|
|
||||||
抽签的结果: 中吉
|
|
||||||
转盘的运势: 「『海蛇翻腾,风暴肆虐。』就是不管做什么都会遇到阻碍的意思。」
|
|
||||||
幸运签内容: 「一时的好运只能带来片刻的满足,终身的幸福还得靠勤奋上进。」
|
|
||||||
获得的食物: 奇怪的肉酱千层面
|
|
||||||
抽签的结果: 大凶
|
|
||||||
抽签的结果: 撒不变
|
|
||||||
幸运签内容: 按时毕业
|
|
||||||
|
|||||||
@@ -109,6 +109,11 @@
|
|||||||
],
|
],
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "notify",
|
||||||
|
"type": "checkbox",
|
||||||
|
"label": "\n---------------------通知---------------------\n是否开启通知"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "accountName",
|
"name": "accountName",
|
||||||
"type": "input-text",
|
"type": "input-text",
|
||||||
|
|||||||
Reference in New Issue
Block a user