@@ -24,15 +24,14 @@ export class Func517 implements IFuncOrigin {
2424 ]
2525 ] ,
2626 oper : [
27- [ right , 1280 , 720 , 1022 , 420 , 1080 , 464 , 1200 ] // 点击宠物屋
27+ [ right , 1280 , 720 , 1022 , 420 , 1080 , 450 , 1200 ] // 点击宠物屋
2828 ]
2929 } , { // 页面是否为庭院且能识别宠物屋(菜单未展开) 只支持默认庭院皮肤与默认装饰
3030 desc :
3131 [ 1280 , 720 ,
3232 [
3333 [ right , 1226 , 47 , 0xcda47a ] ,
3434 [ right , 1157 , 45 , 0xb39671 ] ,
35- [ center , 389 , 65 , 0xfbc573 ] ,
3635 [ right , 1207 , 637 , 0xdfd1cb ] ,
3736 [ right , 1034 , 448 , 0xfff1be ] ,
3837 [ right , 1084 , 450 , 0x241738 ] ,
@@ -146,7 +145,6 @@ export class Func517 implements IFuncOrigin {
146145 [ right , 1149 , 637 , 0xc0bab4 ] ,
147146 [ left , 118 , 648 , 0x3d2c1c ] ,
148147 [ left , 142 , 97 , 0x4c3120 ] ,
149- [ left , 198 , 95 , 0xd4ccc7 ] ,
150148 ]
151149 ] ,
152150 oper : [
@@ -164,9 +162,6 @@ export class Func517 implements IFuncOrigin {
164162 [ center , 954 , 698 , 0x6b4232 ] ,
165163 [ right , 1202 , 682 , 0x946241 ] ,
166164 [ left , 34 , 666 , 0xd4c4a3 ] ,
167- [ left , 66 , 42 , 0xd5c3a1 ] ,
168- [ center , 378 , 548 , 0xe57a52 ] ,
169- [ center , 835 , 386 , 0x9c9c7a ] ,
170165 ]
171166 ]
172167 } , { // 式神选择弹窗
@@ -198,9 +193,43 @@ export class Func517 implements IFuncOrigin {
198193 [ right , 1020 , 448 , 0x302552 ] ,
199194 ]
200195 ]
201- } ] ;
196+ } , {
197+ // 师徒界面
198+ desc : [ 1280 , 720 ,
199+ [
200+ [ left , 177 , 540 , 0x3f3333 ] ,
201+ [ left , 159 , 581 , 0x161313 ] ,
202+ [ center , 383 , 600 , 0x472918 ] ,
203+ [ center , 419 , 135 , 0x896955 ] ,
204+ [ center , 533 , 128 , 0x312724 ] ,
205+ ]
206+ ] ,
207+ oper : [
208+ [ center , 1280 , 720 , 21 , 16 , 67 , 56 , 1000 ] ,
209+ ]
210+ }
211+ ] ;
202212 operatorFunc ( thisScript : Script , thisOperator : IFuncOperator [ ] ) : boolean {
213+ // 优先检测是否已经在宠物小屋界面,解决直接在小屋启动脚本的问题
214+ if ( thisScript . oper ( {
215+ id : 517 ,
216+ name : '页面为宠物小屋' ,
217+ operator : [ thisOperator [ 3 ] , thisOperator [ 5 ] , thisOperator [ 6 ] , thisOperator [ 7 ] , thisOperator [ 8 ] , thisOperator [ 10 ] ]
218+ } ) ) {
219+ return true ;
220+ }
203221
222+ // 其次检测是否已投食,如果是则返回庭院
223+ if ( thisScript . oper ( {
224+ id : 517 ,
225+ name : '检测_已投食' ,
226+ operator : [ thisOperator [ 9 ] ]
227+ } ) ) {
228+ const next_scheme = '返回庭院' ;
229+ thisScript . rerun ( next_scheme ) ;
230+ }
231+
232+ // 然后检测是否在庭院
204233 if ( thisScript . oper ( {
205234 id : 517 ,
206235 name : '页面是否为庭院且能识别宠物屋' ,
@@ -214,40 +243,54 @@ export class Func517 implements IFuncOrigin {
214243 desc : thisOperator [ 11 ] . desc
215244 } ]
216245 } ) ) {
217- return thisScript . oper ( {
246+ // 1. 执行点击宠物屋
247+ thisScript . oper ( {
218248 id : 517 ,
219249 name : '点击宠物屋' ,
220250 operator : [ {
221251 oper : thisOperator [ 0 ] . oper
222252 } ]
223253 } ) ;
224- }
225254
226- if ( thisScript . oper ( {
227- id : 517 ,
228- name : '页面为宠物小屋' ,
229- operator : [ thisOperator [ 3 ] , thisOperator [ 5 ] , thisOperator [ 6 ] , thisOperator [ 7 ] , thisOperator [ 8 ] , thisOperator [ 10 ] ]
230- } ) ) {
231- return true ;
232- }
255+ // 2. 识别是否是师徒界面 (thisOperator[12] 是师徒界面的定义)
256+ if ( thisScript . oper ( {
257+ id : 517 ,
258+ name : '检测师徒界面' ,
259+ operator : [ {
260+ desc : thisOperator [ 12 ] . desc
261+ } ]
262+ } ) ) {
263+ // 3. 如果是师徒界面,运行师徒的oper (通常是关闭师徒界面)
264+ thisScript . oper ( {
265+ id : 517 ,
266+ name : '师徒界面操作' ,
267+ operator : [ {
268+ oper : thisOperator [ 12 ] . oper
269+ } ]
270+ } ) ;
233271
234- if ( thisScript . oper ( {
235- id : 517 ,
236- name : '检测_已投食' ,
237- operator : [ thisOperator [ 9 ] ]
238- } ) ) {
239- const next_scheme = '返回庭院' ;
240- thisScript . rerun ( next_scheme ) ;
272+ // 4. 师徒界面处理完后,再次点击宠物屋,进入后续流程
273+ return thisScript . oper ( {
274+ id : 517 ,
275+ name : '再次点击宠物屋' ,
276+ operator : [ {
277+ oper : thisOperator [ 0 ] . oper
278+ } ]
279+ } ) ;
280+ }
281+
282+ // 5. 如果不是师徒界面,直接返回true,继续后续流程
283+ return true ;
241284 }
242285
286+ // 最后检测宠物后庭
243287 if ( thisScript . oper ( {
244288 id : 517 ,
245289 name : '检测_宠物后庭' ,
246290 operator : [ {
247291 desc : thisOperator [ 4 ] . desc
248292 } ]
249293 } ) ) {
250-
251294 // 做延时检测 防止登陆后的弹窗
252295 if ( thisScript . global . checked_yard_count >= 6 ) {
253296 thisScript . global . checked_yard_count = 0 ;
@@ -273,5 +316,4 @@ export class Func517 implements IFuncOrigin {
273316 return false ;
274317 }
275318}
276-
277319export default new Func517 ( ) ;
0 commit comments