Skip to content

Commit 48d55fe

Browse files
committed
增加:9突破取消锁定
1战斗主题非简约主题会提示更换 myToast显示停留时间的参数 修复 520
1 parent 457131e commit 48d55fe

File tree

7 files changed

+137
-22
lines changed

7 files changed

+137
-22
lines changed

src/common/funcList/001_准备.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,62 @@ export class Func001 implements IFuncOrigin {
3232
oper: [
3333
[left, 1280, 720, 37, 637, 86, 686, 1000]
3434
]
35+
}, { // 2 准备界面无左上角取点
36+
desc: [
37+
1280, 720,
38+
[
39+
[left, 42, 681, 0xe49780],
40+
[left, 49, 682, 0xfff9ef],
41+
[left, 124, 682, 0xfef1d8],
42+
[left, 150, 682, 0xfbdec5],
43+
[center, 438, 701, 0x231917],
44+
[right, 1188, 684, 0xa26f4d],
45+
]
46+
],
47+
oper: [
48+
[right, 1280, 720, 1137, 542, 1228, 632, 1000], // 准备
49+
]
50+
}, { // 3 准备界面左上角取点
51+
desc: [
52+
1280, 720,
53+
[
54+
[left, 22, 32, 0x503d34],
55+
[left, 46, 33, 0xd9b589],
56+
[left, 92, 32, 0x513e34],
57+
[left, 106, 41, 0xd0a77b],
58+
[left, 168, 23, 0xd4ae84],
59+
[left, 180, 38, 0xcba073],
60+
]
61+
]
62+
}, { // 4 准备界面经典主题
63+
desc: [
64+
1280, 720,
65+
[
66+
[left, 41, 681, 0xdf8471],
67+
[left, 49, 680, 0xfff7ec],
68+
[left, 36, 567, 0x913157],
69+
[left, 122, 686, 0xfdead1],
70+
[center, 441, 645, 0x573c3c],
71+
[right, 1169, 672, 0xd5a86c],
72+
]
73+
],
74+
oper: [
75+
[center, 1280, 720, 1110, 529, 1223, 616, 1000],
76+
]
3577
}];
3678
operatorFunc(thisScript: Script, thisOperator: IFuncOperator[]): boolean {
3779
const thisconf = thisScript.scheme.config['1'];
80+
if (thisScript.oper({
81+
id: 1,
82+
name: '准备界面识别',
83+
operator: [thisOperator[2], thisOperator[4]]
84+
}) && !thisScript.oper({
85+
name: '准备界面识别',
86+
operator: [thisOperator[3]]
87+
})) {
88+
thisScript.myToast('战斗主题非简约主题,部分功能失效,请及时跟换', 10000);
89+
return true;
90+
}
3891
if (thisconf.exitBeforeReady) {
3992
return thisScript.oper({
4093
id: 1,

src/common/funcList/009_结界_勋章点击.ts

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { IFuncOrigin, IFuncOperatorOrigin, IFuncOperator } from '@/interface/IFu
33

44
// const normal = -1; //定义常量
55
const left = 0;
6-
// const center = 1;
7-
// const right = 2;
6+
const center = 1;
7+
const right = 2;
88

99
export class Func009 implements IFuncOrigin {
1010
id = 9;
@@ -47,8 +47,46 @@ export class Func009 implements IFuncOrigin {
4747
// [left, 1280, 720, 0, 0, 1279, 719, 500]
4848
[left, 1280, 720, 147, 146, 465, 265, 500]
4949
]
50+
}, { // 2 解锁阵容
51+
desc: [
52+
1280, 720,
53+
[
54+
[center, 818, 599, 0xbdaef2],
55+
[center, 853, 599, 0xbab4f4],
56+
[center, 830, 595, 0x886d4a],
57+
[center, 830, 601, 0x836847],
58+
[center, 852, 601, 0xb6b6ff],
59+
[left, 74, 168, 0xd4bb9d],
60+
[left, 36, 456, 0x5e606b],
61+
]
62+
],
63+
oper: [
64+
[center, 1280, 720, 821, 593, 850, 609, 1000],
65+
]
66+
}, { // 3 解锁阵容_寮突破
67+
desc: [
68+
1280, 720,
69+
[
70+
[left, 198, 617, 0xbfaef2],
71+
[left, 233, 616, 0xbdb2e9],
72+
[left, 209, 613, 0x886e4b],
73+
[left, 210, 621, 0x846947],
74+
[left, 233, 618, 0xb6b6ff],
75+
[right, 1214, 284, 0x5e3c27],
76+
[right, 1211, 405, 0x8b5221],
77+
]
78+
],
79+
oper: [
80+
[center, 1280, 720, 202, 608, 227, 628, 1000],
81+
]
5082
}];
5183
operatorFunc(thisScript: Script, thisOperator: IFuncOperator[]): boolean {
84+
if (thisScript.oper({
85+
name: '突破界面_判断',
86+
operator: [thisOperator[2], thisOperator[3]]
87+
})) {
88+
return true;
89+
}
5290
if (thisScript.oper({
5391
name: '突破界面_判断',
5492
operator: [{ desc: thisOperator[0].desc }]

src/common/funcList/520_宴会筹备.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { IFuncOrigin, IFuncOperatorOrigin, IFuncOperator } from '@/interface/IFu
44
const left = 0;
55
const center = 1;
66
const right = 2;
7-
7+
let x = 0;
88
export class Func520 implements IFuncOrigin {
99
id = 520;
1010
name = '宴会筹备';
11-
desc:'进入探索,狸猫饿鬼河童各打三次(需挑战券)'
11+
desc: '进入探索,狸猫饿鬼河童各打三次(需挑战券)'
1212
operator: IFuncOperatorOrigin[] = [{
1313
desc: '探索地图界面',
1414
oper: [
@@ -84,8 +84,28 @@ export class Func520 implements IFuncOrigin {
8484
oper: [
8585
[center, 1280, 720, 1030, 125, 1070, 157, 1000],
8686
]
87+
}, { // 6 第一章
88+
desc: [
89+
1280, 720,
90+
[
91+
[right, 1141, 214, 0xf8f3e0],
92+
[right, 1159, 213, 0xf8f3e0],
93+
[right, 1173, 206, 0xf7f2df],
94+
[right, 1115, 225, 0xe7e1cf],
95+
[right, 1150, 340, 0xf8f3e0],
96+
]
97+
]
8798
}];
8899
operatorFunc(thisScript: Script, thisOperator: IFuncOperator[]): boolean {
100+
if (thisScript.oper({
101+
name: '第一章',
102+
operator: [thisOperator[6]]
103+
})) {
104+
thisScript.doPush(thisScript, { text: '宴会筹备失败,请查看。', before() { thisScript.myToast('脚本即将停止,正在上传数据'); } });
105+
thisScript.stop();
106+
sleep(3000);
107+
return;
108+
}
89109
if (thisScript.oper({
90110
name: '探索界面',
91111
operator: [{ desc: thisOperator[0].desc }]

src/common/multiFindColors.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3418,20 +3418,21 @@ const multiFindColors: IMultiFindColorsOrigin = {
34183418
'宴会筹备_狸猫': {
34193419
region: [center, 1280, 720, 1038, 187, 1248, 618],
34203420
desc: [[
3421-
1280, 720, // 狸猫
3421+
1280, 720,
34223422
[
3423-
[right, 1163, 405, 0x785032],
3424-
[right, 1175, 418, 0xe5a55b],
3425-
[right, 1180, 410, 0xffffee],
3426-
[right, 1172, 405, 0x60391e],
3427-
[right, 1179, 434, 0x7a581d],
3423+
[right, 1172, 398, 0xe9b36f],
3424+
[right, 1177, 401, 0xe7a962],
3425+
[right, 1163, 390, 0x764e30],
3426+
[right, 1183, 389, 0xe7b26e],
3427+
[right, 1177, 383, 0xb9b73b],
34283428
]
34293429
]]
34303430
},
34313431
'宴会筹备_饿鬼': {
34323432
region: [center, 1280, 720, 1038, 187, 1248, 618],
3433+
similar: 90,
34333434
desc: [[
3434-
1280, 720, // 饿鬼
3435+
1280, 720,
34353436
[
34363437
[right, 1168, 392, 0xfae695],
34373438
[right, 1166, 398, 0xffe177],
@@ -3444,13 +3445,13 @@ const multiFindColors: IMultiFindColorsOrigin = {
34443445
'宴会筹备_河童': {
34453446
region: [center, 1280, 720, 1038, 187, 1248, 618],
34463447
desc: [[
3447-
1280, 720, // 河童
3448+
1280, 720,
34483449
[
3449-
[right, 1195, 415, 0x5ca7a2],
3450-
[right, 1210, 412, 0x337d72],
3451-
[right, 1208, 428, 0xae2f62],
3452-
[right, 1202, 445, 0x4a60bf],
3453-
[right, 1212, 442, 0x5054a9],
3450+
[right, 1197, 372, 0x5ba3a0],
3451+
[right, 1218, 374, 0x5eafa9],
3452+
[right, 1189, 401, 0x5764bd],
3453+
[right, 1228, 400, 0x73d4d3],
3454+
[right, 1211, 385, 0x8b6d73],
34543455
]
34553456
]]
34563457
},

src/common/toolAuto.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function requestMyScreenCapture(callback: Function, helperBridge: Ihelper
7979
* }
8080
* @param {string} str
8181
*/
82-
function _toast(str: string) {
82+
function _toast(str: string, duration: number) {
8383
const toast = android.widget.Toast.makeText(context.getApplicationContext(), str.toString(), android.widget.Toast.LENGTH_LONG);
8484
// let layout = toast.getView();
8585
// 设置景
@@ -99,15 +99,15 @@ function _toast(str: string) {
9999
toast.show();
100100
setTimeout(function () {
101101
toast.cancel();
102-
}, 1000)
102+
}, duration)
103103
}
104104

105105
/**
106106
* @description 消息提示
107107
* @param {string}str
108108
*/
109-
export function myToast(str: string): void {
110-
ui.run(() => _toast(str));
109+
export function myToast(str: string, duration: number = 1000): void {
110+
ui.run(() => _toast(str, duration));
111111
console.log(str);
112112
}
113113

src/common/version.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,9 @@ export const versionList = [{
12901290
}, {
12911291
version: '20241229_01',
12921292
desc: '优化:安卓8+下的拟人滑动更拟人'
1293+
}, {
1294+
version: '20241230_01',
1295+
desc: '增加:9突破取消锁定,1战斗主题非简约主题会提示更换'
12931296
}];
12941297

12951298
export default versionList[versionList.length - 1].version;

src/system/script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class Script {
7878
* @description 消息提示
7979
* @param {string}str
8080
*/
81-
myToast: (str: string) => void;
81+
myToast: (str: string, duration?: number) => void;
8282

8383
constructor() {
8484
this.runThread = null;

0 commit comments

Comments
 (0)