forked from s5w95/Tap-Titans-2-Progress-Bot
-
Notifications
You must be signed in to change notification settings - Fork 3
/
TapTitans2AdvancedClickBot.txt
1694 lines (1423 loc) · 30.7 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.3 dev 1]
// edited by djo5296 '17-12-30
SCREEN_SIZE: 480x800
// ----------- do not touch
var #minz 0
var #timeLateAdd 0
// ----------- Click Areas
var #enableFairies 1
//; 1 = collect all fairies
//; 0 = no more ad pop ups will appear
//; more settings below to auto-cancel/accept fairy ads
var #enablePremiumCollect 1
//; 1 = collect all premium pop-ups
//; 0 = do not collect
//; more settings below to auto-cancel/accept fairy ads
var #hatchEggs 1
//; 1 = (default) collect eggs
var #enableClanShip 0
var #enableTapping 1
//; 1 = (default) hit the titans with your sword master
//; 0 = disable hits (except on CQ), no fairies will clicked at all
var #equipStack 1
// 1 = keep clan crates and equips on the floor
var #agree 0
var #decline 0
// agree = 1 if you can skip ads to auto accept fairy ads; aka fairy ads skippable
// decline = 1 if you cannot turn off fairy ads but want to click on all fairies
// you can leave both at 0 if you turn off fairy ads
// do not make both = 1 hahaha
// ----------- Actions ----------- [ Prestige ]
var #enableAutoprestige 1
// 1 for on, 0 for don't prestige
var #lateTournament 0
// use 1 if you want to start at later time defined below in #minz
#minz = 60000 * 125
// starts at 125 mins; else, edit the 125 above
// "lateTournament 1" to start at #minutes = #minz / 60000
#timeLateAdd = #minz
var #prestigeAfterXMinutes 0
//leave as 0, what matters are the start and end times below
var #prestigeStartTime 65
var #prestigeEndTime 77
rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime
// ----------- 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 1
//; 1 = heavenly strike
//; 2 = critical strike
//; 3 = (default) midas
//; 4 = fire blade
//; 5 = heroes
//; 6 = shadow clone
//Action Order | 1,2 = push heroes | 2,1 = push ms
var #orderLevelHeroes 1
var #orderLevelSkills 2
// ----------- Actions ----------- [ ClanQuest ]
var #enableClanQuest 1
//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 #heroIntensity 4
//; 1 = (default)
//; 2-99 = Multiple level ups
// ----------- Actions ----------- [ Skills ]
var #enableSkills 1
//press given skills every X seconds
//check :afterPrestige and copy values!
var #intervalHS 5
var #intervalDS 0
var #intervalFS 0
var #intervalHoM 0
var #intervalWC 0
var #intervalSC 0
//preferably don't edit this
if #lateTournament == 1
#intervalHS = 0
#intervalDS = 0
#intervalFS = 0
#intervalHoM = 0
#intervalWC = 0
#intervalSC = 0
endif
//just level each skill once
var #justUnlockSkills 0
//; 0 = level skills much as possible
//; 1 = (default) just unlock
//run skill check after prestige (0) or now (1)
var #startSkillCheckNow 1
// ----------- Actions ----------- [ Boss ]
//cancel actions if boss fight running
var #checkBossFight 0
var #checkBossDuringRandomTouch 1
// 0 = skip getColor function in :randomTouch and to properly sync time
// if still lags, go to :randomTouch and delete the large nested if section at the start
//wait for given skill (2-6) then start boss
var #startBossSkill 5
//; 2 = critical strike
//; 3 = midas
//; 4 = fire blade
//; 5 = heroes
//; 6 = shadow clone
//optional skill which will be clicked on start (not checked)
var #startBossSecondarySkill 2
//; 2 = critical strike
//; 3 = midas
//; 4 = fire blade
//; 5 = heroes
//; 6 = shadow clone
// ----------- Developer / Expert
var #maxHitCount 9999999
//show current script time
var #showCurrentTime 1
//if you wanna sync the script time with real time you can play around with this value
var #timeScaleAddition 60
if #checkBossDuringRandomTouch == 0
#timeScaleAddition = 11
endif
// ----------- 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 #colorRed 0
var #colorBlue 0
var #colorGreen 0
var #loopDetectionCount 0
var #prestige 0
var #skillsUnlocked 0
var #tryWithDelay 0
var #checkRunning 0
var #clanQuestCount 0
var #calc1 0
var #recheckClanQuest 0
var #count 0
var #hitCount 0
var #skillAvailable 0
var #loopBreak 0
var #unlocked 0
// ----------- Delays
var #btnDelay 150
var #hitDelay 40
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 466
// ----------- Colors
var #colorWhite -65793
var #colorSkillActivated -20993
var #colorInfoNumber 475629
var #colorDia -7970303
var #colorLevelUpAvailable 1338350
var #skillGray 7829367
var #skillBlue 3693762
var #colorBlack 397861
var #colorStatsButton 3826675
var #colorGray 2695200
//var #colorItemBossActive 2432264 127 70
// ----------- TimeSets
var #timeLastActionRun 0
var #timeDiff 0
var #time 0
var #seconds 0
var #secondsTotal 0
var #minutes 0
var #lastPressHS 0
var #lastPressDS 0
var #lastPressFS 0
var #lastPressHoM 0
var #lastPressSC 0
var #lastPressWC 0
var #resultManaPool 0
var #resultCheckBoss 0
var #resultUpdateTime 0
var #resultClanQuest 0
// ----------- MAIN
:start
#loopCount = #loopCount + 1
#resultManaPool = #loopCount % 51
#resultCheckBoss = #loopCount % 302
#resultClanQuest = #loopCount % 101
#resultUpdateTime = #loopCount % 40
#timeDiff = #minutes - #timeLastActionRun
//add general execution delays
#time = #time + #timeScaleAddition
if #resultClanQuest == 0 and #enableClanQuest == 1
goto :checkClanQuest
endif
if #resultUpdateTime == 0
#seconds = (#time/1000)%60
#secondsTotal = #time/1000
#minutes = (#time/1000)/60
if #enableSkills == 1
//copy format if you wanna add your own personal dynamic skill clicks
if #minutes > 25
#intervalHS = 150
endif
if #minutes > 40
#intervalHS = 300
endif
if #minutes > 45
#intervalHS = 0
#intervalWC = 375
#fullManaSkill = 5
endif
if #minutes > 50
#intervalWC = 400
#intervalHoM = 400
endif
if #minutes > 60
#intervalHoM = 700
#intervalWC = 700
endif
if #minutes > 65
#intervalHoM = 240
#intervalWC = 120
endif
if #minutes > 75
#intervalDS = 850
#intervalHoM = 850
#intervalWC = 850
endif
if #minutes > 120
#intervalDS = 1000
#intervalHoM = 1000
#intervalWC = 1000
endif
endif
endif
if #showCurrentTime == 1 and #resultUpdateTime == 0
toast #minutes:#seconds
endif
if #resultUpdateTime == 0 and #enablePremiumCollect == 1 and #agree == 1
touchDown 0 350 630
sleep 50
touchUp 0
sleep 50
#time = #time + 200
endif
if #resultUpdateTime == 0 and #enablePremiumCollect == 1 and #decline == 1
touchDown 0 195 630
sleep 50
touchUp 0
sleep 50
#time = #time + 200
endif
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 #resultManaPool == 0
goto :checkMana
elseif #loopCount == #maxHitCount
#loopCount = 0
goto :randomTouch
else
goto :randomTouch
endif
:end
:afterPrestige
if #prestige = 0
#prestige = 1
endif
#skillsUnlocked = 0
#time = 0
#seconds = 0
#secondsTotal = 0
#minutes = 0
#count = 0
#unlocked = 0
#intervalHS = 5
#intervalDS = 0
#intervalFS = 0
#intervalHoM = 0
#intervalWC = 0
#intervalSC = 0
#fullManaSkill = 1
rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime
goto :init
// ----------- INIT
:init
CheckApp #checkRunning com.gamehivecorp.taptitans2
if #checkRunning == 0
RunApp com.gamehivecorp.taptitans2
WaitApp com.gamehivecorp.taptitans2
sleep 10000
endif
if #enablePremiumCollect == 1 and #agree == 1
touchDown 0 350 630
sleep 50
touchUp 0
sleep 50
#time = #time + 200
endif
if #enablePremiumCollect == 1 and #decline == 1
touchDown 0 195 630
sleep 50
touchUp 0
sleep 50
#time = #time + 200
endif
#lastPressHS = 0
#lastPressDS = 0
#lastPressFS = 0
#lastPressHoM = 0
#lastPressSC = 0
#lastPressWC = 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 50
touchUp 0
sleep #menuSlideDelay
#time = #time + 200
if #enableClanShip == 1
touchPress 0 65 100
sleep #shipDelay
touchPress 0 65 100
sleep #shipDelay
touchPress 0 65 100
sleep #shipDelay
touchPress 0 65 100
sleep #shipDelay
#time = #time + #shipDelay + #shipDelay + #shipDelay + #shipDelay
endif
getColor #color 390 36
if #color == 1204718
touchPress 0 390 36
endif
#timeDiff = #secondsTotal - #lastPressSC
if #timeDiff >= #intervalSC and #intervalSC > 0
#lastPressSC = #secondsTotal
touchPress 0 430 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressWC
if #timeDiff >= #intervalWC and #intervalWC > 0
#lastPressWC = #secondsTotal
touchPress 0 360 710
#time = #time + 200
if #minutes > 60
#lastPressHoM = #secondsTotal
touchPress 0 200 710
#time = #time + 200
endif
endif
#timeDiff = #secondsTotal - #lastPressHoM
if #timeDiff >= #intervalHoM and #intervalHoM > 0
#lastPressHoM = #secondsTotal
touchPress 0 200 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressDS
if #timeDiff >= #intervalDS and #intervalDS > 0
#lastPressDS = #secondsTotal
touchPress 0 120 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressFS
if #timeDiff >= #intervalFS and #intervalFS > 0
#lastPressFS = #secondsTotal
touchPress 0 280 710
#time = #time + 200
endif
#timeDiff = #secondsTotal - #lastPressHS
if #timeDiff >= #intervalHS and #intervalHS > 0
#lastPressHS = #secondsTotal
touchPress 0 40 710
#time = #time + 200
endif
goto :start
// ----------- CHECK MANA
:checkMana
//checking mana bar
getColor #color1 208 638
if #color1 == #colorWhite
//Mana full starting something and dont waste regen time
goto :startSkill
endif
goto :start
:startSkill
if #fullManaSkill == 1
touchPress 0 40 710
elseif #fullManaSkill == 2
touchPress 0 120 710
elseif #fullManaSkill == 3
touchPress 0 200 710
elseif #fullManaSkill == 4
touchPress 0 280 710
elseif #fullManaSkill == 5
touchPress 0 360 710
if #minutes > 50
touchPress 0 200 710
//activate Midas
#lastPressWC = #secondsTotal + 120
#lastPressHoM = #secondsTotal + 120
endif
if #minutes >= 125
touchPress 0 120 710
//activate DS
#lastPressDS = #secondsTotal + 120
endif
elseif #fullManaSkill == 6
touchPress 0 430 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 - boss fight in progress
goto :pressSkills
endif
if #actionStepper == #orderLevelSkills and #enableSkills == 1 and #skillsUnlocked < 6
#skillsUnlocked = 0
goto :openSwordMasterTab
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
// ---------
sleep 100
//open stats
sleep #btnDelay
#time = #time + #btnDelay + 100
touchDown 0 #menuStats #menuY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
//wait for slide
sleep #menuSlideDelay
#time = #time + #menuSlideDelay
//slide top
touchDown 0 280 650
sleep 200
touchMove 0 280 600
sleep 50
touchMove 0 280 700
sleep 50
touchMove 0 280 750
sleep 50
touchMove 0 280 780
touchUp 0
sleep 750
#time = #time + 1100
//lvl up
sleep #btnDelay
sleep 50
#time = #time + #btnDelay + 50
touchDown 0 466 580
sleep 50
touchUp 0
sleep 200
touchDown 0 466 580
sleep 50
touchUp 0
sleep 200
touchDown 0 466 580
sleep 50
touchUp 0
sleep 200
touchDown 0 466 580
sleep 50
touchUp 0
sleep 200
touchDown 0 466 580
sleep 50
touchUp 0
sleep 200
#time = #time + 1250
// ---------
sleep 400
//slide down
touchDown 1 280 740
sleep 200
touchMove 1 280 710
sleep 50
touchMove 1 280 500
sleep 50
touchMove 1 280 410
sleep 50
touchMove 1 280 400
touchUp 1
sleep 300
#time = #time + 650
//slide down
touchDown 1 280 740
sleep 200
touchMove 1 280 710
sleep 50
touchMove 1 280 500
sleep 50
touchMove 1 280 410
sleep 50
touchMove 1 280 400
touchUp 1
sleep 300
#time = #time + 650
//slide down
touchDown 1 280 740
sleep 200
touchMove 1 280 710
sleep 50
touchMove 1 280 500
sleep 50
touchMove 1 280 410
sleep 50
touchMove 1 280 400
touchUp 1
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
:openSwordMasterTab
//open sword master tab
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 #menuStats #menuY
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
//wait for slide
sleep #menuSlideDelay
#time = #time + #menuSlideDelay
//slide top
touchDown 0 280 650
sleep 200
touchMove 0 280 600
sleep 50
touchMove 0 280 700
sleep 50
touchMove 0 280 750
sleep 50
touchMove 0 280 780
touchUp 0
sleep 600
#time = #time + 1100
if #enableSkills == 1 or #enableHeroes == 1
goto :checkSkills
endif
goto :closeMenu
:checkSkills
if #prestige == 0 and #startSkillCheckNow == 0
goto :checkSkillsFinish
endif
if #skillsUnlocked == 6 and #justUnlockSkills == 1
toast skills unlocked, stop now until next prestige
goto :checkSkillsFinish
endif
#skillCheckStepper = #skillCheckStepper + 1
if #skillCheckStepper == 1
sleep #btnDelay
#time = #time + #btnDelay
touchDown 0 466 670
sleep #btnDelay
#time = #time + #btnDelay
touchUp 0
goto :maxHS
elseif #skillCheckStepper <= 6
goto :checkSkillsUnlock
endif
//slide back
touchDown 1 280 650
sleep 200
touchMove 1 280 600
sleep 50
touchMove 1 280 700
sleep 50
touchMove 1 280 750
sleep 50
touchMove 1 280 780
touchUp 1
#time = #time + 350
goto :checkSkillsFinish
:lvlSkill
#time = #time + 100
if #justUnlockSkills == 0
getRGB #colorRed #colorGreen #colorBlue 459 755
if #colorBlue <= -45
sleep 10
#time = #time + 10
goto :endLvlSkill
else
touchPress 0 459 755
sleep 50
touchPress 0 459 755
sleep 50
#time = #time + 100
endif
goto :endLvlSkill
else
if #skillCheckStepper >= 2 and #unlocked >= 5
goto :endLvlSkill
else
touchPress 0 459 755
sleep 50
#time = #time + 50
if #unlocked < 5
#unlocked = #unlocked + 1
endif
goto :endLvlSkill
endif
endif
:endLvlSkill
if #skillCheckStepper == 6
goto :checkSkills
else
goto :checkSkillsSlideDown
endif
:maxHS
// first skill; heavenly strike
#loopBreak = #loopBreak + 1
if #loopBreak > 16
#loopBreak = 0
//slide top
touchDown 0 280 650
sleep 200
touchMove 0 280 600
sleep 50
touchMove 0 280 700
sleep 50
touchMove 0 280 750
sleep 50
touchMove 0 280 780
touchUp 0
sleep 750
#time = #time + 1100
goto :checkSkills
endif
getColor #skillAvailable 460 700
if #skillAvailable >= -7963574 and #skillAvailable <= -7034609
#loopBreak = 0
goto :checkSkills
else
touchPress 0 466 700
sleep 40
#time = #time + 50
goto :maxHS
endif
: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