Skip to content

Commit 7fb01a1

Browse files
committed
Merge remote-tracking branch 'origin/master' into kk_dev
2 parents c0ab51c + 1f28ab7 commit 7fb01a1

File tree

8 files changed

+247
-16
lines changed

8 files changed

+247
-16
lines changed

src/common/funcList/016_地鬼_热门收藏挑战.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ export class Func016 implements IFuncOrigin {
5656
[
5757
[left, 137, 216, 0xddd6ce],
5858
[left, 181, 631, 0xd7cdc6],
59-
[right, 1209, 43, 0xeecccc],
60-
[right, 1204, 520, 0xe8d5b0],
59+
[right, 1209, 43, 0xe8d4cf],
60+
[right, 1204, 530, 0xded3bd],
6161
[right, 1087, 624, 0xebe5ce],
6262
[right, 1205, 437, 0xa05437],
6363
]
@@ -86,20 +86,20 @@ export class Func016 implements IFuncOrigin {
8686
]
8787
}, {
8888
// 4 地鬼_挑战页面_极
89-
desc: [
90-
1280, 720,
89+
desc: [1280, 720,
9190
[
92-
[center, 447, 138, 0x9a4e50],
93-
[center, 475, 94, 0xdad1ca],
94-
[right, 1208, 400, 0xbe643b],
95-
[right, 1155, 581, 0xf1d8af],
96-
[right, 1140, 621, 0x581819],
97-
[left, 191, 612, 0xdcd6cf],
98-
[center, 532, 82, 0x576891],
91+
[center, 447, 138, 0x994a4e],
92+
[center, 475, 94, 0xd9d1c9],
93+
[right, 1208, 400, 0xc86a42],
94+
[right, 1155, 581, 0xefd2a2],
95+
[left, 191, 612, 0xdcd5cd],
96+
[right, 1209, 44, 0xe8d4cf],
97+
[center, 363, 86, 0xd6cdc5],
98+
[left, 298, 117, 0x3b425e],
9999
]
100100
],
101101
oper: [
102-
[center, 1280, 720, 522, 52, 557, 81, 1200] // 极转为普通
102+
[center, 1280, 720, 279, 121, 308, 153, 1000], // 极转为普通
103103
]
104104
}, {
105105
// 5

src/common/funcList/029_庭院进入探索地图.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class Func029 implements IFuncOrigin {
1313
// 庭院未打开菜单
1414
desc: '页面是否为庭院_菜单未展开_只支持默认庭院皮肤与默认装饰',
1515
oper: [
16-
[right, 1280, 720, 1168, 592, 1230, 690, 1200]
16+
[right, 1280, 720, 0, 0, 32, 63, 1200]
1717
]
1818
}, { // 庭院已打开菜单
1919
desc: '页面是否为庭院_菜单已展开_只支持默认庭院皮肤与默认装饰'

src/common/funcList/522_招募.ts

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
2+
import { IFuncOrigin, IFuncOperatorOrigin, IFuncOperator } from '@/interface/IFunc';
3+
import { Script } from '@/system/script';
4+
5+
const center = 1;
6+
const right = 2;
7+
8+
export class Func522 implements IFuncOrigin {
9+
id = 522;
10+
name = '自动招募';
11+
desc = '自动点击招募成员界面中的10个+号,然后等待设定时间后点击换一批。建议开启OCR插件以获得最佳效果。';
12+
config = [{
13+
desc: '配置',
14+
config: [{
15+
name: 'waitTime',
16+
desc: '点击10个后的等待时间(分钟)',
17+
type: 'list',
18+
data: ['1', '2', '3', '4', '5', '10'],
19+
default: '1',
20+
value: null,
21+
}]
22+
}];
23+
operator: IFuncOperatorOrigin[] = [{
24+
oper: [
25+
[center, 1280, 720, 500, 20, 780, 80, 0], // 顶部标题区域
26+
]
27+
}, {
28+
oper: [
29+
[right, 1280, 720, 1000, 620, 1200, 700, 0], // 右下角换一批区域
30+
]
31+
}, {
32+
oper: [
33+
[center, 1280, 720, 783, 173, 784, 174, 0], // 向下滑动
34+
[center, 1280, 720, 777, 534, 778, 535, 0], // 向下滑动
35+
]
36+
}, {
37+
oper: [
38+
[center, 1280, 720, 777, 534, 778, 535, 0], // 向上滑动
39+
[center, 1280, 720, 783, 173, 784, 174, 0], // 向上滑动
40+
]
41+
}];
42+
43+
operatorFunc(thisScript: Script, thisOperator: IFuncOperator[]): boolean {
44+
const thisConf = thisScript.scheme.config['522'];
45+
const waitTimeMs = parseInt(thisConf.waitTime as string) * 60 * 1000;
46+
const titleRes = thisScript.findText('招募成员', 0, thisOperator[0].oper[0].slice(0, 4), '包含');
47+
if (titleRes.length === 0) {
48+
return false;
49+
}
50+
if (typeof thisScript.global.recruitCount === 'undefined') {
51+
thisScript.global.recruitCount = 0;
52+
}
53+
if (!thisScript.global.recruitClickedY) {
54+
thisScript.global.recruitClickedY = [];
55+
}
56+
if (typeof thisScript.global.recruitHasScrolled === 'undefined') {
57+
thisScript.global.recruitHasScrolled = false;
58+
}
59+
60+
if (thisScript.global.recruitCount >= 10) {
61+
const now = new Date().getTime();
62+
if (!thisScript.global.lastRecruitFinishTime) {
63+
thisScript.global.lastRecruitFinishTime = now;
64+
thisScript.myToast(`已完成 10/10 次点击,开始 ${thisConf.waitTime} 分钟倒计时...`);
65+
}
66+
67+
const elapsedMs = now - thisScript.global.lastRecruitFinishTime;
68+
if (elapsedMs >= waitTimeMs) {
69+
const countdownRes = thisScript.findText('秒', 0, thisOperator[1].oper[0].slice(0, 4), '包含');
70+
if (countdownRes.length > 0) {
71+
thisScript.myToast('游戏内按钮处于倒计时,等待中...');
72+
return true;
73+
}
74+
75+
const refreshRes = thisScript.findText('换一批', 0, thisOperator[1].oper[0].slice(0, 4), '包含');
76+
const refreshColor = thisScript.findMultiColor('招募_换一批');
77+
78+
if (refreshRes.length > 0 || refreshColor) {
79+
thisScript.myToast('时间到,点击换一批');
80+
if (refreshRes.length > 0) {
81+
thisScript.regionClick([[
82+
refreshRes[0].points[0].x,
83+
refreshRes[0].points[0].y,
84+
refreshRes[0].points[2].x,
85+
refreshRes[0].points[2].y,
86+
1200
87+
]]);
88+
} else {
89+
thisScript.regionClick([[
90+
refreshColor.x - 50,
91+
refreshColor.y - 20,
92+
refreshColor.x + 50,
93+
refreshColor.y + 20,
94+
1200
95+
]]);
96+
}
97+
} else {
98+
thisScript.myToast('未识别到换一批,使用固定坐标点击');
99+
thisScript.regionClick([[1048 - 30, 627 - 20, 1048 + 30, 627 + 20, 1200]]);
100+
}
101+
102+
// 重置计数器和状态
103+
thisScript.global.recruitCount = 0;
104+
thisScript.global.recruitClickedY = [];
105+
thisScript.global.lastRecruitFinishTime = null;
106+
thisScript.global.recruitHasScrolled = false;
107+
108+
// 滑动回顶部
109+
thisScript.myToast('正在回滚到最顶部');
110+
thisScript.regionSwipe(thisOperator[2].oper[0], thisOperator[2].oper[1], [800, 1000], 200);
111+
sleep(500);
112+
thisScript.regionSwipe(thisOperator[2].oper[0], thisOperator[2].oper[1], [800, 1000], 200);
113+
sleep(1000);
114+
115+
return true;
116+
} else {
117+
const remainingSec = Math.ceil((waitTimeMs - elapsedMs) / 1000);
118+
const min = Math.floor(remainingSec / 60);
119+
const sec = remainingSec % 60;
120+
thisScript.myToast(`倒计时: ${min}${sec}秒`);
121+
}
122+
return true;
123+
}
124+
125+
let clickedInThisTurn = false;
126+
127+
if (!thisScript.global.recruitHasScrolled && thisScript.global.recruitCount >= 5) {
128+
thisScript.myToast('正在滚动到后5个');
129+
thisScript.regionSwipe(thisOperator[3].oper[0], thisOperator[3].oper[1], [800, 1000], 200);
130+
sleep(500);
131+
thisScript.regionSwipe(thisOperator[3].oper[0], thisOperator[3].oper[1], [800, 1000], 200);
132+
133+
thisScript.global.recruitClickedY = [];
134+
thisScript.global.recruitHasScrolled = true;
135+
sleep(1500);
136+
return true;
137+
}
138+
139+
140+
const plusPoints = thisScript.findMultiColorEx('招募_加号');
141+
if (plusPoints.length > 0) {
142+
for (const point of plusPoints) {
143+
const centerY = point.y;
144+
if (thisScript.global.recruitClickedY.some((y: number) => Math.abs(y - centerY) < 25)) {
145+
continue;
146+
}
147+
148+
thisScript.global.recruitCount++;
149+
const prefix = thisScript.global.recruitHasScrolled ? '后' : '前';
150+
const currentInPhase = thisScript.global.recruitHasScrolled ? (thisScript.global.recruitCount - 5) : thisScript.global.recruitCount;
151+
thisScript.myToast(`(${prefix}${currentInPhase}/5个)`);
152+
153+
thisScript.regionClick([[point.x - 30, point.y - 30, point.x + 30, point.y + 30, 1200]]);
154+
thisScript.global.recruitClickedY.push(centerY);
155+
clickedInThisTurn = true;
156+
if (thisScript.global.recruitCount >= 10 || (!thisScript.global.recruitHasScrolled && thisScript.global.recruitCount >= 5)) break;
157+
}
158+
}
159+
160+
if (!clickedInThisTurn && thisScript.global.recruitCount < 10) {
161+
const statusRes = thisScript.findText('在线|小时前|分钟前|昨天', 0, [880, 100, 1100, 620], '正则');
162+
if (statusRes.length > 0) {
163+
for (const status of statusRes) {
164+
const centerY = (status.points[0].y + status.points[2].y) / 2;
165+
if (thisScript.global.recruitClickedY.some((y: number) => Math.abs(y - centerY) < 25)) {
166+
continue;
167+
}
168+
const clickX = 1118;
169+
const clickY = centerY;
170+
171+
thisScript.global.recruitCount++;
172+
const prefix = thisScript.global.recruitHasScrolled ? '后' : '前';
173+
const currentInPhase = thisScript.global.recruitHasScrolled ? (thisScript.global.recruitCount - 5) : thisScript.global.recruitCount;
174+
thisScript.myToast(`(${prefix}${currentInPhase}/5个)`);
175+
176+
thisScript.regionClick([[clickX - 35, clickY - 35, clickX + 35, clickY + 35, 1200]]);
177+
thisScript.global.recruitClickedY.push(centerY);
178+
clickedInThisTurn = true;
179+
if (thisScript.global.recruitCount >= 10 || (!thisScript.global.recruitHasScrolled && thisScript.global.recruitCount >= 5)) break;
180+
}
181+
}
182+
}
183+
184+
185+
if (!clickedInThisTurn && thisScript.global.recruitCount < 10) {
186+
const currentCoords = thisScript.global.recruitHasScrolled
187+
? [202, 283, 364, 445, 525]
188+
: [172, 254, 334, 415, 496];
189+
190+
for (const y of currentCoords) {
191+
if (thisScript.global.recruitClickedY.some((clickedY: number) => Math.abs(clickedY - y) < 25)) {
192+
continue;
193+
}
194+
thisScript.global.recruitCount++;
195+
const prefix = thisScript.global.recruitHasScrolled ? '后' : '前';
196+
const currentInPhase = thisScript.global.recruitHasScrolled ? (thisScript.global.recruitCount - 5) : thisScript.global.recruitCount;
197+
thisScript.myToast(`(${prefix}${currentInPhase}/5个)`);
198+
199+
thisScript.regionClick([[1118 - 35, y - 35, 1118 + 35, y + 35, 1200]]);
200+
thisScript.global.recruitClickedY.push(y);
201+
clickedInThisTurn = true;
202+
if (thisScript.global.recruitCount >= 10 || (!thisScript.global.recruitHasScrolled && thisScript.global.recruitCount >= 5)) break;
203+
}
204+
}
205+
206+
return true;
207+
}
208+
}
209+
210+
export default new Func522();

src/common/funcList/605_寮宴会.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const right = 2;
77

88
export class Func605 implements IFuncOrigin {
99
id = 605;
10-
name = '宴会';
11-
desc = '宴会';
10+
name = '寮宴会';
11+
desc = '';
1212
config = [{
1313
desc: '',
1414
config: [{

src/common/funcList/607_阴界之门.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const right = 2;
88

99
export class Func607 implements IFuncOrigin {
1010
id = 607;
11-
name = '阴门_挑战';
11+
name = '阴门之门';
1212
operator: IFuncOperatorOrigin[] = [{ // 检测_是否为首领退治集结页
1313
desc: // 检测_阴门
1414
[

src/common/multiFindColors.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,16 @@ const multiFindColors: IMultiFindColorsOrigin = {
12481248
[center, 274, 341, 0xd4d4d4],
12491249
]
12501250
],
1251+
[1280, 720, // 封
1252+
[
1253+
[left, 260, 244, 0xffebc0],
1254+
[left, 282, 241, 0xb54131],
1255+
[left, 286, 238, 0xe7ebd6],
1256+
[left, 268, 260, 0x3e3f49],
1257+
[left, 275, 245, 0xffeabd],
1258+
[left, 264, 268, 0xb59f7e],
1259+
]
1260+
],
12511261
// 旧
12521262
[1280, 720, // 封
12531263
[

src/common/version.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,9 @@ export const versionList = [{
14941494
053_探索地图进入挑战: 新增进入御魂层数选择, 完善UI改变,
14951495
1106_每周两次真蛇: 优化退出逻辑,
14961496
内置方案修复: "每周真蛇", 要用请删除旧方案后重新添加`,
1497+
}, {
1498+
version: '20260127_01',
1499+
desc: '新增:522寮招募',
14971500
}, {
14981501
version: '20260128_01',
14991502
desc: `合并kk_dev部分功能(

src/system/GlobalStore/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ export type globalRootType = {
4545
narrow_state: Record<string, boolean>, // 狭间暗域状态
4646
narrow_time: number, // 狭间暗域自定义3D人物走路时等待时间
4747
narrow_mode: boolean,
48+
recruitCount?: number, // 招募点击计数
49+
recruitClickedY?: number[], // 招募已点击的Y坐标
50+
lastRecruitFinishTime?: number | null, // 招募完成点击的时间戳
51+
recruitHasScrolled?: boolean, // 是否已翻页
4852
liao_activity_page_flag: number, // 寮活动翻页标记
4953
liao_activity_Swith: Record<string, boolean>, // 寮活动记录
5054
liao_banquet_collect: boolean, // 宴会筹备状态
@@ -173,6 +177,10 @@ export const globalRoot: globalRootType = {
173177
narrow_state: undefined,
174178
narrow_time: 0,
175179
narrow_mode: false,
180+
recruitCount: 0,
181+
recruitClickedY: [],
182+
lastRecruitFinishTime: null,
183+
recruitHasScrolled: false,
176184
liao_activity_page_flag: 0,
177185
liao_activity_Swith: undefined,
178186
banquet_change_flag: false,

0 commit comments

Comments
 (0)