forked from hzqst/CGAssistantJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path双王.js
1139 lines (1032 loc) · 26 KB
/
双王.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var cga = require(process.env.CGA_DIR_PATH_UTF8+'/cgaapi')(function(){
var playerinfo = cga.GetPlayerInfo();
var teammates = [];
var teamplayers = cga.getTeamPlayers();
for(var i in teamplayers)
teammates[i] = teamplayers[i].name;
cga.isTeamLeader = (teammates[0] == playerinfo.name || teammates.length == 0) ? true : false;
var task = cga.task.Task('诅咒的迷宫 (战斗系三转)', [
{//0
intro: '1.前往阿巴尼斯村民家(40.30)与历史学家雷伯尔森(14.10)对话,选“是”获得【野草莓】。',
workFunc: function(cb2){
var go_1 = ()=>{
cga.cleanInventory(1, ()=>{
cga.turnTo(14, 10);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(4, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(1, 0);
setTimeout(()=>{
cga.SayWords('拿野草莓,然后传送至民家地下,与帕鲁凯斯对话获得“刀刃的碎片”。然后返回民家与队长重新组队!', 0, 3, 1);
setTimeout(cb2, 1500, true);
}, 1500);
});
});
});
});
});
});
});
}
var go = ()=>{
cga.walkList([
[5, 4, 4313],
[6, 13, 4312],
[6, 13, '阿巴尼斯村'],
[40, 30, '民家'],
[13, 10],
[13, 11],
[13, 10],
[13, 11],
[13, 10],
], ()=>{
setTimeout(()=>{
cga.DoRequest(cga.REQUEST_TYPE_LEAVETEAM);
setTimeout(go_1, 1500);
}, 1500);
});
}
var go2 = ()=>{
var retry = ()=>{
cga.cleanInventory(1, ()=>{
cga.turnTo(14, 10);
cga.AsyncWaitNPCDialog((err)=>{
if(err){
cga.walkList([ [13, 11], [13, 10] ], retry);
return;
}
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(4, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(32, 0);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(1, 0);
setTimeout(cb2, 1500, true);
});
});
});
});
});
});
});
}
cga.waitForLocation({mapname : '民家', pos : [14, 10], leaveteam : true, walkto : [13, 10]}, retry);
}
var wait3 = ()=>{
cga.addTeammate(teammates[0], (r)=>{
if(r){
go2();
return;
}
setTimeout(wait3, 1000);
});
}
var wait = ()=>{
cga.WalkTo(5, 13);
cga.waitTeammates(teammates, (r)=>{
if(r){
go();
return;
}
setTimeout(wait, 1000);
});
}
var wait2 = ()=>{
var retry = ()=>{
cga.turnTo(38, 4);
cga.AsyncWaitNPCDialog((err)=>{
if(err){
cga.walkList([ [37, 5], [37, 4] ], retry);
return;
}
cga.ClickNPCDialog(4, -1);
setTimeout(wait3, 1500);
});
}
cga.waitForLocation({mapname : '启程之间', pos : [38, 4], leaveteam : true, walkto : [37, 4]}, retry);
}
if(cga.isTeamLeader){
cga.travel.falan.toTeleRoom('阿巴尼斯村', ()=>{
wait();
});
} else {
wait2();
}
}
},
{//1
intro: '2.与米希安(9.4)对话,交出【野草莓】并传送至民家地下。3.调查连接时空的石盘(15.7),选“是”传送至民家地下。4.与战士帕鲁凯斯(15.7)对话,获得【刀刃碎片】。5.通过(5.3)处楼梯至民家,与历史学家雷伯雷翁(14.10)对话。通过(9.4)处楼梯返回民家地下。6.调查连接时空的石盘(15.10),选“是”传送至民家地下。',
workFunc: function(cb2){
if(cga.getItemCount('野草莓') == 0){
throw new Error('执行出错,没有拿到野草莓,可能是因为没有开启者称号!')
}
var wait = ()=>{
cga.WalkTo(9, 5);
cga.waitTeammates(teammates, (r)=>{
if(r){
cb2(true);
return;
}
setTimeout(wait, 1000);
});
}
var wait3 = ()=>{
cga.addTeammate(teammates[0], (r)=>{
if(r){
cb2(true);
return;
}
setTimeout(wait3, 1000);
});
}
var go = ()=>{
cga.walkList([
[9, 5],
], ()=>{
cga.turnTo(9, 4);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(1, 0);
cga.AsyncWaitMovement({map:4331, delay:1000, timeout:5000}, ()=>{
cga.walkList([
[14, 7],
], ()=>{
cga.turnTo(15, 7);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(4, 0);
cga.AsyncWaitMovement({map:4332, delay:1000, timeout:5000}, ()=>{
cga.walkList([
[14, 7],
], ()=>{
cga.turnTo(15, 7);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(1, 0);
setTimeout(()=>{
cga.walkList([
[5, 3, 4333],
[9, 4, 4334],
[14, 10],
], ()=>{
cga.turnTo(15, 10);
cga.AsyncWaitNPCDialog(()=>{
cga.ClickNPCDialog(4, 0);
cga.AsyncWaitMovement({map:4335, delay:1000, timeout:5000}, ()=>{
cga.walkList([
[7, 3, 4320],
], ()=>{
setTimeout(cga.isTeamLeader ? wait : wait3, 1000);
});
});
});
});
});
});
});
});
});
});
});
});
});
}
go();
}
},
{//2
intro: '7.出阿巴尼斯村,前往莎莲娜岛(54.161)处,持有【刀刃的碎片】调查鼓动的石盘,交出【刀刃的碎片】传送至诅咒的迷宫。通过(35.9)处楼梯进入诅咒的迷宫。',
workFunc: function(cb2){
var wait = ()=>{
cga.WalkTo(8, 8);
cga.waitTeammates(teammates, (r)=>{
if(r){
cb2(true);
return;
}
setTimeout(wait, 1000);
});
}
var wait3 = ()=>{
cga.addTeammate(teammates[0], (r)=>{
if(r){
cb2(true);
return;
}
setTimeout(wait3, 1000);
});
}
var go = ()=>{
cga.walkList([
[12, 17, '阿巴尼斯村'],
[37, 71, '莎莲娜'],
[54, 162],
], ()=>{
cga.walkTeammateToPosition([
[54, 162],
[55, 162],
], ()=>{
cga.turnTo(54, 161);
cga.AsyncWaitMovement({map:'诅咒的迷宫', delay:1000, timeout:5000}, ()=>{
setTimeout(wait, 1000);
});
});
});
}
var go2 = ()=>{
var retry = ()=>{
cga.turnTo(54, 161);
cga.AsyncWaitMovement({map:'诅咒的迷宫', delay:1000, timeout:5000}, (err)=>{
if(err){
cga.walkList([ [54, 162], [55, 162] ], retry);
return;
}
setTimeout(wait3, 1000);
});
}
cga.waitForLocation({mapname : '莎莲娜', pos : [54, 161], walkto : [54, 162], leaveteam : true}, retry);
}
if(cga.isTeamLeader){
go();
} else {
go2();
}
}
},
{//3
intro: '9.抵达第一个难关,与纳帕(22.14)对话进入战斗。',
workFunc: function(cb2){
var checkSkill = (cb3)=>{
var skills = cga.GetSkillsInfo();
var pass = false;
skills.filter((sk)=>{
if(sk.name == '精灵的盟约' || sk.name == '调教' || sk.name == '宠物强化'){
if(sk.lv >= 8){
pass = true;
}
}
return true;
});
return pass;
}
var nextMap = [
{
moving : true,
mapindex: 24069,
cb : ()=>{
cb2(true);
return true;
}
},
{
moving : true,
mapname: '诅咒的迷宫 地下11楼',
cb : ()=>{
cb2(true);
return true;
}
}
];
var fuckBOSS = ()=>{
cga.turnTo(22, 14);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});
cga.waitForMultipleLocation(nextMap);
}
var wait15 = (counter)=>{
if(cga.GetMapName() != '第一个难关')
{
cga.waitForMultipleLocation(nextMap);
return;
}
if(counter == 0){
fuckBOSS();
return;
} else if(counter == 5){
cga.SayWords("倒计时5秒!", 0, 3, 1);
} else if(counter == 10){
cga.SayWords("倒计时10秒!", 0, 3, 1);
}
setTimeout(wait15, 1000, counter-1);
}
var go = ()=>{
var list = [
[22, 15],
[21, 15],
[22, 15],
[21, 15],
[22, 15],
];
if (cga.GetMapName() == '诅咒的迷宫')
{
list.unshift(
[35, 9, '诅咒的迷宫 地下1楼'],
[25, 13, '诅咒的迷宫 地下2楼'],
[17, 4, '诅咒的迷宫 地下3楼'],
[23, 20, '诅咒的迷宫 地下4楼'],
[16, 10, '诅咒的迷宫 地下5楼'],
[6, 3, '诅咒的迷宫 地下6楼'],
[15, 3, '诅咒的迷宫 地下7楼'],
[25, 18, '诅咒的迷宫 地下8楼'],
[14, 18, '诅咒的迷宫 地下9楼'],
[24, 4, '第一个难关']
);
}
cga.walkList(list, ()=>{
if(checkSkill()){
fuckBOSS();
} else {
cga.SayWords("拥有Lv.8+精灵的盟约、调教或宠物强化的队员与BOSS对话可直接通过,如果15秒内没有队员对话则直接开始战斗!", 0, 3, 1);
setTimeout(wait15, 1000, 15);
}
});
}
if(cga.isTeamLeader){
go();
} else {
cga.waitForMultipleLocation(nextMap.concat({
mapindex: 24018,
pos:[22, 14],
cb : ()=>{
if(checkSkill()){
fuckBOSS();
return true;
}
return false;
}
}));
}
}
},
{//4
intro: '11.抵达第二个难关,与德尔麦(26.17)对话进入战斗。',
workFunc: function(cb2){
var checkSkill = (cb3)=>{
var skills = cga.GetSkillsInfo();
var pass = false;
skills.filter((sk)=>{
if(sk.name == '吸血魔法'
|| sk.name.indexOf('陨石魔法') >= 0
|| sk.name.indexOf('冰冻魔法') >= 0
|| sk.name.indexOf('火焰魔法') >= 0
|| sk.name.indexOf('风刃魔法') >= 0){
if(sk.lv >= 8){
pass = true;
}
}
return true;
});
return pass;
}
var nextMap = [
{
moving : true,
mapindex: 24070,
cb : ()=>{
cb2(true);
return true;
}
},
{
moving : true,
mapname: '诅咒的迷宫 地下21楼',
cb : ()=>{
cb2(true);
return true;
}
}
];
var fuckBOSS = ()=>{
cga.turnTo(26, 17);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});
cga.waitForMultipleLocation(nextMap);
}
var wait15 = (counter)=>{
if(cga.GetMapName() != '第二个难关')
{
cga.waitForMultipleLocation(nextMap);
return;
}
if(counter == 0){
fuckBOSS();
return;
} else if(counter == 5){
cga.SayWords("倒计时5秒!", 0, 3, 1);
} else if(counter == 10){
cga.SayWords("倒计时10秒!", 0, 3, 1);
}
setTimeout(wait15, 1000, counter-1);
}
var go = ()=>{
var list = [
[25, 17],
[25, 18],
[25, 17],
[25, 18],
[25, 17],
];
var index = cga.GetMapIndex().index3;
var name = cga.GetMapName();
if (name == '诅咒的迷宫 地下11楼' || index == 24069)
{
list.unshift(
[15, 4, '诅咒的迷宫 地下12楼'],
[24, 15, '诅咒的迷宫 地下13楼'],
[16, 3, '诅咒的迷宫 地下14楼'],
[25, 12, '诅咒的迷宫 地下15楼'],
[22, 5, '诅咒的迷宫 地下16楼'],
[17, 18, '诅咒的迷宫 地下15楼'],
[25, 21, '诅咒的迷宫 地下16楼'],
[22, 18, '诅咒的迷宫 地下17楼'],
[23, 4, '诅咒的迷宫 地下18楼'],
[7, 12, '诅咒的迷宫 地下19楼'],
[18, 18, '第二个难关']
);
}
if (index == 24069)
list.unshift([31, 30, '诅咒的迷宫 地下11楼']);
cga.walkList(list, ()=>{
if(checkSkill()){
fuckBOSS();
} else {
cga.SayWords("拥有任意Lv.8四属性攻击魔法(单体/强力/超强)、吸血魔法与BOSS对话可直接通过,如果15秒内没有队员对话则直接开始战斗!", 0, 3, 1);
setTimeout(wait15, 1000, 15);
}
});
}
if(cga.isTeamLeader){
go();
} else {
cga.waitForMultipleLocation(nextMap.concat({
mapindex: 24028,
pos:[26, 17],
cb : ()=>{
if(checkSkill()){
fuckBOSS();
return true;
}
return false;
}
}));
}
}
},
{//5
intro: '13.抵达第三个难关,与瑟贝塔(20.21)对话进入战斗。',
workFunc: function(cb2){
var checkSkill = (cb3)=>{
var skills = cga.GetSkillsInfo();
var pass = false;
skills.filter((sk)=>{
if(sk.name == '乾坤一掷'
|| sk.name == '连击'
|| sk.name == '诸刃'
|| sk.name == '阳炎'
|| sk.name == '乱射'
|| sk.name == '暗杀'
|| sk.name == '反击'
|| sk.name == '护卫'
|| sk.name == '气功弹'
|| sk.name == '战栗袭心'
|| sk.name == '明镜止水'
|| sk.name == '混乱攻击'
|| sk.name == '圣盾'){
if(sk.lv >= 8){
pass = true;
}
}
return true;
});
return pass;
}
var nextMap = [
{
moving : true,
mapindex: 24071,
cb : ()=>{
cb2(true);
return true;
}
},
{
moving : true,
mapname: '诅咒的迷宫 地下31楼',
cb : ()=>{
cb2(true);
return true;
}
}
];
var fuckBOSS = ()=>{
cga.turnTo(20, 21);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});
cga.waitForMultipleLocation(nextMap);
}
var wait15 = (counter)=>{
if(cga.GetMapName() != '第三个难关')
{
cga.waitForMultipleLocation(nextMap);
return;
}
if(counter == 0){
fuckBOSS();
return;
} else if(counter == 5){
cga.SayWords("倒计时5秒!", 0, 3, 1);
} else if(counter == 10){
cga.SayWords("倒计时10秒!", 0, 3, 1);
}
setTimeout(wait15, 1000, counter-1);
}
var go = ()=>{
var list = [
[20, 20],
[19, 20],
[20, 20],
[19, 20],
[20, 20],
];
var name = cga.GetMapName();
var index = cga.GetMapIndex().index3;
var name = cga.GetMapName();
if (name == '诅咒的迷宫 地下21楼' || index == 24070)
{
list.unshift(
[20, 3, '诅咒的迷宫 地下22楼'],
[7, 4, '诅咒的迷宫 地下23楼'],
[14, 12, '诅咒的迷宫 地下22楼'],
[17, 12, '诅咒的迷宫 地下23楼'],
[27, 2, '诅咒的迷宫 地下24楼'],
[7, 20, '诅咒的迷宫 地下25楼'],
[24, 20, '诅咒的迷宫 地下26楼'],
[17, 5, '诅咒的迷宫 地下27楼'],
[9, 11, '诅咒的迷宫 地下28楼'],
[25, 21, '诅咒的迷宫 地下27楼'],
[23, 16, '诅咒的迷宫 地下28楼'],
[16, 12, '诅咒的迷宫 地下29楼'],
[7, 1, '第三个难关']
);
}
if (index == 24070)
list.unshift([30, 5, '诅咒的迷宫 地下21楼']);
cga.walkList(list, ()=>{
if(checkSkill()){
fuckBOSS();
} else {
cga.SayWords("拥有Lv.8+乾坤一掷、连击、诸刃、阳炎、乱射、暗杀、反击、护卫、气功弹、战栗袭心、明镜止水、混乱攻击或圣盾与BOSS对话可直接通过,如果15秒内没有队员对话则直接开始战斗!", 0, 3, 1);
setTimeout(wait15, 1000, 15);
}
});
}
if(cga.isTeamLeader){
go();
} else {
cga.waitForMultipleLocation(nextMap.concat({
mapindex: 24038,
pos:[20, 21],
cb : ()=>{
if(checkSkill()){
fuckBOSS();
return true;
}
return false;
}
}));
}
}
},
{//6
intro: '15.抵达第四个难关,与亚尔法(15.18)对话进入战斗。',
workFunc: function(cb2){
var checkSkill = (cb3)=>{
var skills = cga.GetSkillsInfo();
var pass = false;
skills.filter((sk)=>{
if(sk.name == '气绝回复'
|| sk.name == '洁净魔法'
|| sk.name.indexOf('补血魔法') >= 0
|| sk.name.indexOf('恢复魔法') >= 0
){
if(sk.lv >= 8){
pass = true;
}
}
return true;
});
return pass;
}
var nextMap = [
{
moving : true,
mapindex: 24072,
cb : ()=>{
cb2(true);
return true;
}
},
{
moving : true,
mapname: '诅咒的迷宫 地下41楼',
cb : ()=>{
cb2(true);
return true;
}
}
];
var fuckBOSS = ()=>{
cga.turnTo(15, 18);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});
cga.waitForMultipleLocation(nextMap);
}
var wait15 = (counter)=>{
if(cga.GetMapName() != '第四个难关')
{
cga.waitForMultipleLocation(nextMap);
return;
}
if(counter == 0){
fuckBOSS();
return;
} else if(counter == 5){
cga.SayWords("倒计时5秒!", 0, 3, 1);
} else if(counter == 10){
cga.SayWords("倒计时10秒!", 0, 3, 1);
}
setTimeout(wait15, 1000, counter-1);
}
var go = ()=>{
var list = [
[16, 18],
[16, 17],
[16, 18],
[16, 17],
[16, 18],
];
var name = cga.GetMapName();
var index = cga.GetMapIndex().index3;
var name = cga.GetMapName();
if (name == '诅咒的迷宫 地下31楼' || index == 24071)
{
list.unshift(
[24, 13, '诅咒的迷宫 地下32楼'],
[15, 12, '诅咒的迷宫 地下33楼'],
[24, 12, '诅咒的迷宫 地下34楼'],
[23, 4, '诅咒的迷宫 地下33楼'],
[6, 13, '诅咒的迷宫 地下34楼'],
[9, 21, '诅咒的迷宫 地下35楼'],
[6, 13, '诅咒的迷宫 地下36楼'],
[9, 21, '诅咒的迷宫 地下37楼'],
[24, 21, '诅咒的迷宫 地下38楼'],
[8, 21, '诅咒的迷宫 地下39楼'],
[23, 25, '第四个难关']
);
}
if (index == 24071)
list.unshift([20, 28, '诅咒的迷宫 地下31楼']);
cga.walkList(list, ()=>{
if(checkSkill()){
fuckBOSS();
} else {
cga.SayWords("拥有Lv.8气绝回复、洁净魔法、补血类魔法(单体/强力/超强)或恢复类魔法(单体/强力/超强)与BOSS对话可直接通过,如果15秒内没有队员对话则直接开始战斗!", 0, 3, 1);
setTimeout(wait15, 1000, 15);
}
});
}
if(cga.isTeamLeader){
go();
} else {
cga.waitForMultipleLocation(nextMap.concat({
mapindex: 24048,
pos:[15, 18],
cb : ()=>{
if(checkSkill()){
fuckBOSS();
return true;
}
return false;
}
}));
}
}
},
{//7
intro: '17.抵达第五个难关,与马帝亚(22.14)对话进入战斗。',
workFunc: function(cb2){
var checkSkill = (cb3)=>{
var skills = cga.GetSkillsInfo();
var pass = false;
skills.filter((sk)=>{
if(
sk.name.indexOf('抗') == 0
|| sk.name.indexOf('石化魔法') >= 0
|| sk.name.indexOf('混乱魔法') >= 0
|| sk.name.indexOf('昏睡魔法') >= 0
|| sk.name.indexOf('酒醉魔法') >= 0
|| sk.name.indexOf('遗忘魔法') >= 0
|| sk.name.indexOf('中毒魔法') >= 0
|| sk.name.indexOf('反弹') >= 0
|| sk.name.indexOf('吸收') >= 0
|| sk.name.indexOf('无效') >= 0
){
if(sk.lv >= 8){
pass = true;
}
}
return true;
});
return pass;
}
var nextMap = [
{
moving : true,
mapindex: 24073,
cb : ()=>{
cb2(true);
return true;
}
},
{
moving : true,
mapname: '诅咒的迷宫 地下51楼',
cb : ()=>{
cb2(true);
return true;
}
}
];
var fuckBOSS = ()=>{
cga.turnTo(22, 14);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});
cga.waitForMultipleLocation(nextMap);
}
var wait15 = (counter)=>{
if(cga.GetMapName() != '第五个难关')
{
cga.waitForMultipleLocation(nextMap);
return;
}
if(counter == 0){
fuckBOSS();
return;
} else if(counter == 5){
cga.SayWords("倒计时5秒!", 0, 3, 1);
} else if(counter == 10){
cga.SayWords("倒计时10秒!", 0, 3, 1);
}
setTimeout(wait15, 1000, counter-1);
}
var go = ()=>{
var list = [
[22, 15],
[21, 15],
[22, 15],
[21, 15],
[22, 15],
];
var name = cga.GetMapName();
var index = cga.GetMapIndex().index3;
var name = cga.GetMapName();
if (name == '诅咒的迷宫 地下41楼' || index == 24072)
{
list.unshift(
[8, 18, '诅咒的迷宫 地下42楼'],
[24, 21, '诅咒的迷宫 地下43楼'],
[23, 4, '诅咒的迷宫 地下44楼'],
[24, 21, '诅咒的迷宫 地下45楼'],
[26, 9, '诅咒的迷宫 地下46楼'],
[9, 2, '诅咒的迷宫 地下47楼'],
[22, 3, '诅咒的迷宫 地下48楼'],
[17, 12, '诅咒的迷宫 地下49楼'],
[9, 2, '第五个难关']
);
}
if (index == 24072)
list.unshift([29, 26, '诅咒的迷宫 地下41楼']);
cga.walkList(list, ()=>{
if(checkSkill()){
fuckBOSS();
} else {
cga.SayWords("拥有Lv.8各种状态魔法(单体/强力/超强)、各种状态抵抗或各种制御魔法时与BOSS对话可直接通过,如果15秒内没有队员对话则直接开始战斗!", 0, 3, 1);
setTimeout(wait15, 1000, 15);
}
});
}
if(cga.isTeamLeader){
go();
} else {
cga.waitForMultipleLocation(nextMap.concat({
mapindex: 24058,
pos:[22, 14],
cb : ()=>{
if(checkSkill()){
fuckBOSS();
return true;
}
return false;
}
}));
}
}
},
{//7
intro: '19.抵达第六个难关,调查封印石(24.19)进入战斗。',
workFunc: function(cb2){
var nextMap = [
{
moving : true,
mapindex: 24074,
cb : ()=>{
cb2(true);
return true;
}
},
];
var fuckBOSS = ()=>{
cga.turnTo(24, 19);
cga.AsyncWaitNPCDialog((err)=>{
if(cga.isInBattle()){
return;
}
if(err){
return;
}
cga.ClickNPCDialog(1, 0);
});