-
Notifications
You must be signed in to change notification settings - Fork 82
/
TapTitans2AdvancedClickBot.txt
1307 lines (1123 loc) · 24.5 KB
/
TapTitans2AdvancedClickBot.txt
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
// - Tap Titans 2 AdvancedClickBot by Tune389 [ v1.6 dev 3 ]
SCREEN_SIZE: 480x800
// ----------- Settings
var #enablePremiumCollect 0
//; 1 = collect all premium popups
//; 0 = (default)
var #hatchEggs 1
//; 1 = (default) collect eggs
var #enableClanShip 1
//; 1 = click glowing clan ship (default)
var #enableTapping 1
//; 1 = (default) hit the titans with your sm
//; 0 = disable hits (execept on cq), no fairies will clicked at all
// ----------- Actions ----------- [ General ]
//level ms, heroes, skills every x minutes
var #runActionsEveryXMinutes 3
//; 3 = (default)
//; 1-99 = in Minutes
var #runActionsOnStart 1
//; 1 = (default) run actions on script start
//; 0 = run actions after given run time above
var #fullManaSkill 3
//; 2 = critical strike
//; 3 = (default) midas
//; 4 = fire blade
//; 5 = heroes
//; 6 = shadow clone
//Action Order | 1,2,3 = push heroes | 2,3,1 = push ms
var #orderLevelHeroes 1
var #orderLevelMaster 2
var #orderLevelSkills 3
// ----------- Actions ----------- [ ClanQuest ]
var #enableClanQuest 0
//fight the clan boss with max possible hits
var #clanQuestRunsPerReadyUp 1
//; 1 = (default) attack every ready up once for free
//; 2-99 = spend dias for more attacks
// ----------- Actions ----------- [ Heroes ]
var #enableHeroes 1
//clicks on level up per run
var #skillIntensity 2
//; 2 = (default)
//; 2-99 = Multiple level ups
var #maxOutHero 1
//; 1 = Damon (Mage)
//; 2 = Nohni (Melee)
//; 3 = Finn (Ranged)
var #focusMainHero 1
//; increase main hero level runs
var #mainHeroRoundTripLevelUps 5
//; level up count on every action run for your main hero
// ----------- Actions ----------- [ Skills ]
var #enableSkills 1
//prevent sword master leveling after all skills are unlocked ( > lvl 600)
var #stopMasterAfterSkillsUnlocked 0
//force max level on heavenly strike - option above must be disabled
var #maxOutHeavenlyStrike 1
//press given skills every X seconds
var #intervalStrike 0
var #intervalCrit 0
var #intervalFireBlade 0
var #intervalMidas 0
var #intervalHeroes 1
var #intervalShadowClone 0
//just level each skill once
var #justUnlockSkills 1
//; 0 = level skills much as possible
//; 1 = (default) just unlock
//run skill check after prestige or now
var #startSkillCheckNow 1
// ----------- Actions ----------- [ Boss ]
//cancel actions if boss fight running
var #checkBossFight 0
//wait for given skill (2-6) then start boss
var #startBossSkill 4
//; 2 = critical strike
//; 3 = midas
//; 4 = fire blade (default)
//; 5 = heroes
//; 6 = shadow clone
//optional skill which will be clicked on start (not checked)
var #startBossSecondarySkill 0
//; 2 = critical strike
//; 3 = midas
//; 4 = fire blade
//; 5 = heroes
//; 6 = shadow clone
// ----------- Actions ----------- [ Prestige ]
var #enableAutoprestige 0
var #prestigeAfterXMinutes 45
// ----------- Developer / Expert
var #maxHitCount 9999999
//show current script time
var #showCurrentTime 0
//if you wanna sync the script time with real time you can play around with this value
var #timeScaleAddition 17
// ----------- Dec
var #randomX 0
var #randomY 0
var #color1 0
var #color2 0
var #loopCount 0
var #clanQuestLoopCount 0
var #pressLevelUpLoopCount 0
var #skillCheckStepper 0
var #actionStepper 0
var #levelHeroesStepper 0
var #bossFightInProgress 0
var #skillActive 0
var #levelMainHero 0
var #colorRed 0
var #colorBlue 0
var #colorGreen 0
var #loopDetectionCount 0
var #prestige 0
var #tryWithDelay 0
var #checkRunning 0
var #clanQuestCount 0
var #calc1 0
var #recheckClanQuest 0
var #skillsUnlocked 0
var #lastSkillUnlocks 0
// ----------- Delays
var #btnDelay 150
var #hitDelay 40
var #shipDelay 200
var #menuSlideDelay 200
var #menuPopUpDelay 500
var #loadingClanQuestDelay 3000
// ----------- Menu Coords
var #menuY 780
var #menuStats 15
var #menuHeroes 120
var #menuCloseY 455
var #menuCloseX 470
// ----------- Colors
var #colorWhite -65793
var #colorSkillActivated -20993
var #colorInfoNumber 475629
var #colorDia -7970303
var #colorLevelUpAvailable 1338350
var #colorBlack 397861
var #colorStatsButton 3826675
var #colorGray 2695200
// ----------- TimeSets
var #timeLastActionRun 0
var #timeDiff 0
var #time 0
var #seconds 0
var #secondsTotal 0
var #minutes 0
var #lastPressStrike 0
var #lastPressCrit 0
var #lastPressFireBlade 0
var #lastPressMidas 0
var #lastPressShadowClone 0
var #lastPressHeroes 0
var #resultManaPool 0
var #resultLevelMainHero 0
var #resultCheckBoss 0
var #resultUpdateTime 0
var #resultClanQuest 0
// ----------- MAIN
:start
#loopCount = #loopCount + 1
#resultManaPool = #loopCount % 901
#resultLevelMainHero = #loopCount % 201
#resultCheckBoss = #loopCount % 302
#resultClanQuest = #loopCount % 101
#resultUpdateTime = #loopCount % 80
#timeDiff = #minutes - #timeLastActionRun
//add general execution delays
#time = #time + #timeScaleAddition
if #resultClanQuest == 0 and #enableClanQuest == 1
goto :checkClanQuest
endif
if #showCurrentTime == 1 and #resultUpdateTime == 0
toast #minutes:#seconds
endif
if #resultUpdateTime == 0
#seconds = (#time/1000)%60
#secondsTotal = #time/1000
#minutes = (#time/1000)/60
endif
//collect ads
if #resultUpdateTime == 0 and #enablePremiumCollect == 0
touchDown 0 100 625
sleep 250
touchUp 0
sleep 250
elseif #resultUpdateTime == 0 and #enablePremiumCollect == 1
touchDown 0 350 630
sleep 250
touchUp 0
sleep 250
endif
//end ads
if #resultUpdateTime == 0 and #timeDiff < #runActionsEveryXMinutes
goto :pressSkills
endif
if #loopCount == 1 and #enableClanQuest == 1
goto :checkClanQuest
elseif #loopCount == 2
goto :init
elseif #minutes >= #prestigeAfterXMinutes and #enableAutoprestige == 1
goto :checkPrestige
elseif #timeDiff >= #runActionsEveryXMinutes
goto :runActions
elseif #resultCheckBoss == 0
goto :checkBoss
elseif #resultLevelMainHero == 0 and #focusMainHero == 1
#levelMainHero = 1
goto :levelHeroes
elseif #resultManaPool == 0
goto :checkMana
elseif #loopCount == #maxHitCount
#loopCount = 0
goto :randomTouch
else
goto :randomTouch
endif
:end
:afterPrestige
#prestige = #prestige+1
#skillsUnlocked = 0
#time = 0
#seconds = 0
#secondsTotal = 0
#minutes = 0
goto :init
// ----------- INIT
:init
CheckApp #checkRunning com.gamehivecorp.taptitans2
if #checkRunning == 0
RunApp com.gamehivecorp.taptitans2
WaitApp com.gamehivecorp.taptitans2
sleep 10000
endif
//collect ads
if #enablePremiumCollect == 0
touchDown 0 100 625
else
touchDown 0 350 630
endif
sleep 250
touchUp 0
sleep 250
//end ads
#lastPressStrike = 0
#lastPressCrit = 0
#lastPressFireBlade = 0
#lastPressMidas = 0
#lastPressShadowClone = 0
#lastPressHeroes = 0
#timeLastActionRun = 0
touchDown 0 #menuCloseX #menuCloseY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
sleep #menuSlideDelay
#time = #time + #menuSlideDelay
if #runActionsOnStart == 1
goto :runActions
endif
goto :start
:loopDetected
toast loop detected - restarting ...
#loopCount = 0
#loopDetectionCount = 0
goto :init
// ----------- PRESS SKILLS
:pressSkills
// check running state
CheckApp #checkRunning com.gamehivecorp.taptitans2
if #checkRunning == 0
RunApp com.gamehivecorp.taptitans2
sleep 10000
goto :init
endif
touchDown 0 #menuCloseX #menuCloseY
sleep #btnDelay
touchUp 0
sleep #btnDelay
touchDown 0 #menuCloseX #menuCloseY
sleep #btnDelay
touchUp 0
sleep #menuSlideDelay
#time = #time + 200
//collect ads
sleep 100
if #enablePremiumCollect == 0
touchDown 0 100 625
else
touchDown 0 350 630
endif
sleep 100
touchUp 0
sleep 100
//end ads
#timeDiff = #secondsTotal - #lastPressStrike
if #timeDiff >= #intervalStrike and #intervalStrike > 0
#lastPressStrike = #secondsTotal
touchPress 0 40 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressHeroes
if #timeDiff >= #intervalHeroes and #intervalHeroes > 0
#lastPressHeroes = #secondsTotal
touchPress 0 360 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressCrit
if #timeDiff >= #intervalCrit and #intervalCrit > 0
#lastPressCrit = #secondsTotal
touchPress 0 120 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressFireBlade
if #timeDiff >= #intervalFireBlade and #intervalFireBlade > 0
#lastPressFireBlade = #secondsTotal
touchPress 0 280 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressMidas
if #timeDiff >= #intervalMidas and #intervalMidas > 0
#lastPressMidas = #secondsTotal
touchPress 0 200 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressShadowClone
if #timeDiff >= #intervalShadowClone and #intervalShadowClone > 0
#lastPressShadowClone = #secondsTotal
touchPress 0 430 710
#time = #time + 200
endif
goto :start
// ----------- CHECK MANA
:checkMana
//checking Manabar
getColor #color1 208 638
if #color1 == #colorWhite
//Mana full starting something and dont waste regen time
goto :startSkill
endif
goto :start
:startSkill
if #fullManaSkill == 2
touchPress 0 120 710
elseif #fullManaSkill == 3
touchPress 0 200 710
elseif #fullManaSkill == 5
touchPress 0 360 710
elseif #fullManaSkill == 6
touchPress 0 430 710
elseif #fullManaSkill == 4
touchPress 0 280 710
endif
#time = #time + 200
goto :start
:runActions
#timeLastActionRun = #minutes
#actionStepper = #actionStepper + 1
if #checkBossFight == 1
getColor #color1 139 85
endif
if #checkBossFight == 1 and #color1 == #colorWhite
touchPress 0 #menuCloseX #menuCloseY
toast skipping actions - bossfight in progress
goto :pressSkills
endif
if #actionStepper == #orderLevelMaster and #skillsUnlocked < 5 and #stopMasterAfterSkillsUnlocked == 1
goto :levelUp
elseif #actionStepper == #orderLevelMaster and #stopMasterAfterSkillsUnlocked == 0
goto :levelUp
elseif #actionStepper == #orderLevelSkills and #enableSkills == 1 and #skillsUnlocked < 5
#skillsUnlocked = 0
goto :checkSkills
elseif #actionStepper == #orderLevelSkills and #enableSkills == 1 and #skillsUnlocked == 5 and #maxOutHeavenlyStrike == 1
#skillsUnlocked = 0
goto :checkSkills
elseif #actionStepper == #orderLevelHeroes and #enableHeroes == 1
goto :levelHeroes
elseif #actionStepper == 5 and #enableClanQuest == 1
#actionStepper = 0
goto :checkClanQuest
else
#actionStepper = 0
goto :checkBoss
endif
goto :runActions
// ----------- CHECK PRESTIGE
:checkPrestige
sleep 1000
#time = #time + 1000
//open stats
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 #menuStats #menuY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
sleep #btnDelay
#time = #time + #btnDelay
//wait for slide
sleep #menuSlideDelay
#time = #time + #menuSlideDelay
//slide down (recorded + optimized)
touchDown 0 202 747
sleep 17
touchMove 0 203 747
sleep 2
touchMove 0 203 746
sleep 4
touchMove 0 203 745
sleep 2
touchMove 0 203 744
sleep 4
touchMove 0 204 741
touchMove 0 205 737
sleep 3
touchMove 0 205 735
sleep 2
touchMove 0 207 725
sleep 4
touchMove 0 207 724
sleep 6
touchMove 0 224 556
sleep 4
touchMove 0 229 514
sleep 3
touchMove 0 230 501
sleep 3
touchMove 0 236 460
sleep 2
touchMove 0 237 454
sleep 2
touchMove 0 244 409
sleep 4
touchMove 0 249 381
sleep 2
touchMove 0 252 358
sleep 4
touchMove 0 260 304
sleep 3
touchMove 0 265 275
sleep 3
touchMove 0 270 248
sleep 4
touchMove 0 272 231
touchMove 0 0 0
touchUp 0
sleep 300
#time = #time + 650
touchDown 0 400 720
touchUp 0
sleep #menuPopUpDelay
#time = #time + #menuPopUpDelay
touchDown 0 240 640
sleep #btnDelay
touchUp 0
sleep #menuPopUpDelay
getColor #color1 430 540
if #color1 == 6384247
touchDown 0 330 535
sleep #btnDelay
touchUp 0
sleep 9000
goto :afterPrestige
else
touchPress 470 450
touchPress 470 450
touchPress 470 450
touchPress 470 450
goto :checkPrestige
endif
goto :start
// ----------- CHECK CLAN QUEST
:checkClanQuest
getRGB #colorRed #colorGreen #colorBlue 72 21
getColor #color1 65 795
if #colorRed < 190 and #colorRed > 120 and #color1 == #colorStatsButton
#recheckClanQuest = 1
goto :checkClanQuestReady
endif
goto :start
:checkClanQuestReady
//open menu
sleep #btnDelay
touchDown 0 80 25
sleep #btnDelay
touchUp 0
sleep #btnDelay
//touch clan icon bottom
touchDown 0 100 730
sleep #btnDelay
touchUp 0
sleep #loadingClanQuestDelay
getColor #color1 420 725
if #color1 == -1785765 and #clanQuestCount == 0
#recheckClanQuest = 0
goto :clanQuestClose
endif
//boss progress color
getColor #color1 175 335
#clanQuestLoopCount = 0
if #color1 == 2055160
//boss up
touchDown 0 310 740
sleep #btnDelay
touchUp 0
sleep #menuPopUpDelay
goto :clanQuestCheckDias
elseif #color1 == 0
//boss down
#recheckClanQuest = 0
endif
//close (and recheck)
goto :clanQuestClose
:clanQuestCheckDias
getColor #color1 40 215
if #color1 == -7775689
//no dias left
#recheckClanQuest = 0
goto :clanQuestClose
else
touchDown 0 325 450
sleep #btnDelay
touchUp 0
sleep 3000
getColor #color1 20 770
goto :clanQuestHit
endif
:clanQuestHit
if #color1 == -28929 and #clanQuestLoopCount == 0
//add quest
#clanQuestCount = #clanQuestCount + 1
endif
#clanQuestLoopCount = #clanQuestLoopCount + 1
if #color1 == -28929 and #clanQuestLoopCount < 1000
//hit the boss
touchDown 0 180 730
touchUp 0
sleep 28
#time = #time + #btnDelay
goto :clanQuestHit
elseif #clanQuestLoopCount > 950
goto :clanQuestClose
endif
:clanQuestClose
getColor #color1 65 795
if #color1 == #colorStatsButton
goto :clanQuestCloseCheck
else
touchDown 0 415 45
touchUp 0
sleep 200
touchDown 0 420 210
touchUp 0
sleep 200
#time = #time + #btnDelay
goto :clanQuestClose
endif
:clanQuestCloseCheck
if #recheckClanQuest == 1 and #clanQuestCount < #clanQuestRunsPerReadyUp
goto :checkClanQuestReady
else
#clanQuestCount = 0
goto :start
endif
// ----------- LEVEL SKILLS
:checkSkills
if #prestige == 0 and #startSkillCheckNow == 0
goto :checkSkillsFinish
endif
if #skillsUnlocked == 5 and #justUnlockSkills == 1 and #maxOutHeavenlyStrike == 0
toast skills unlocked, stop now until next prestige
goto :checkSkillsFinish
endif
#skillCheckStepper = #skillCheckStepper + 1
if #maxOutHeavenlyStrike == 1
#colorBlue = 2
else
getRGB #colorRed #colorGreen #colorBlue 450 634
endif
if #skillCheckStepper == 1 and #colorBlue == 2
// first skill
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 466 680
sleep #btnDelay
touchUp 0
sleep #btnDelay
touchDown 0 466 680
sleep #btnDelay
touchUp 0
sleep #btnDelay
touchDown 0 466 680
sleep #btnDelay
touchUp 0
#time = #time + 400
goto :checkSkills
elseif #maxOutHeavenlyStrike == 1 and #skillCheckStepper == 2 and #lastSkillUnlocks == 5
goto :checkSkillsFinish
elseif #skillCheckStepper <= 7
goto :checkSkillsUnlock
elseif #skillCheckStepper <= 8
goto :checkSkillsSlideUp
endif
#time = #time + 350
goto :checkSkillsFinish
:checkSkillsSlideUp
//slide back (recorded + optimized)
touchDown 0 252 510
sleep 38
touchMove 0 252 511
sleep 3
touchMove 0 252 512
sleep 5
touchMove 0 252 515
sleep 4
touchMove 0 252 517
sleep 4
touchMove 0 252 521
sleep 5
touchMove 0 252 531
sleep 2
touchMove 0 252 535
sleep 3
touchMove 0 252 538
sleep 4
touchMove 0 251 545
sleep 2
touchMove 0 250 554
sleep 3
touchMove 0 248 567
sleep 2
touchMove 0 247 573
sleep 2
touchMove 0 245 583
sleep 2
touchMove 0 245 587
sleep 5
touchMove 0 222 733
sleep 2
touchMove 0 220 755
sleep 3
touchMove 0 220 770
sleep 2
touchMove 0 219 796
sleep 4
touchMove 0 219 811
sleep 2
touchMove 0 218 836
sleep 3
touchMove 0 218 854
sleep 2
touchMove 0 218 873
sleep 4
touchMove 0 216 953
sleep 2
touchMove 0 213 993
sleep 3
touchMove 0 0 0
touchUp 0
goto :checkSkills
:checkSkillsUnlock
sleep 200
#time = #time + 250
getRGB #colorRed #colorGreen #colorBlue 450 660
if #colorBlue == 2 or #colorBlue == 5
#skillsUnlocked = #skillsUnlocked + 1
endif
if #colorBlue == 2
sleep 100
touchDown 0 466 660
sleep 250
touchUp 0
sleep 200
#time = #time + 450
endif
if #justUnlockSkills == 0
touchPress 0 466 730
sleep 50
touchPress 0 466 730
sleep 50
touchPress 0 466 730
sleep 50
#time = #time + 750
endif
if #skillCheckStepper == 6
goto :checkSkills
endif
goto :checkSkillsSlideDown
:checkSkillsFinish
#skillCheckStepper = 0
if #lastSkillUnlocks < 5 and #skillsUnlocked == 5 and #justUnlockSkills == 1 and #maxOutHeavenlyStrike == 1
toast skills unlocked, just going for hs now
endif
if #lastSkillUnlocks < 5
#lastSkillUnlocks = #skillsUnlocked
else
#skillsUnlocked = 5
endif
if #enableHeroes == 1
goto :runActions
endif
goto :closeMenu
:checkSkillsSlideDown
//slide
touchDown 1 280 750
sleep 200
touchMove 1 280 725
sleep 50
touchMove 1 280 660
sleep 50
touchMove 1 280 655
sleep 50
touchMove 1 280 649
sleep 200
touchUp 1
#time = #time + 550
goto :checkSkills
:closeMenu
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 #menuCloseX #menuCloseY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
sleep #menuSlideDelay
#time = #time + #menuSlideDelay
goto :runActions
// ----------- LEVEL HEROES
:levelHeroes
//collect gold
touchDown 0 15 230
sleep #btnDelay
touchUp 0
//open menu
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 #menuHeroes #menuY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
sleep 2000
#time = #time + 2000
if #tryWithDelay == 1
sleep 3000
endif
getColor #color1 95 765
if #color1 == #colorWhite
#tryWithDelay = 0
#loopDetectionCount = 0
#time = #time + 2000
goto :levelHeroesMaxOutMain
endif
#tryWithDelay = 1
goto :levelHeroes
:levelHeroesScrollUp
#loopDetectionCount = #loopDetectionCount + 1
if #loopDetectionCount == 50
goto :loopDetected
endif
getColor #color1 475 510
if #color1 == #colorGray
//wait scroll out
sleep 400
//slide 1 hero up
touchDown 1 325 740
touchMove 1 325 720
sleep 50
touchMove 1 325 700
sleep 50
touchMove 1 325 680
touchMove 1 325 670
sleep 20
touchMove 1 325 650
sleep 50
touchMove 1 325 630
sleep 80
touchMove 1 325 610
sleep 100
touchMove 1 325 600
sleep 200
touchUp 1
sleep 200
#loopDetectionCount = 0
goto :closeMenu
endif
//slide top
touchDown 0 252 510
sleep 38
touchMove 0 252 511
sleep 3
touchMove 0 252 512
sleep 5
touchMove 0 252 515
sleep 4
touchMove 0 252 517
sleep 4
touchMove 0 252 521
sleep 5
touchMove 0 252 531
sleep 2
touchMove 0 252 535
sleep 3
touchMove 0 252 538
sleep 4
touchMove 0 251 545
sleep 2
touchMove 0 250 554
sleep 3
touchMove 0 248 567
sleep 2
touchMove 0 247 573
sleep 2
touchMove 0 245 583
sleep 2
touchMove 0 245 587
sleep 5
touchMove 0 222 733
sleep 2
touchMove 0 220 755
sleep 3
touchMove 0 220 770
sleep 2
touchMove 0 219 796
sleep 4
touchMove 0 219 811
sleep 2
touchMove 0 218 836
sleep 3
touchMove 0 218 854
sleep 2
touchMove 0 218 873
sleep 4
touchMove 0 216 953
sleep 2
touchMove 0 213 993
sleep 3
touchMove 0 0 0
touchUp 0
sleep 250
#time = #time + 470
goto :levelHeroesScrollUp
:levelHeroesMaxOutMain
#loopDetectionCount = #loopDetectionCount + 1
if #maxOutHero == 1
touchDown 1 466 549
elseif #maxOutHero == 2
touchDown 1 466 624