// May 10, 2019 // - Tap Titans 2 AdvancedClickBot by Tune389 [ v1.3 dev 1] // edited by djo5296 '17-12-30 // now fully handled by chrisreyn // thanks to tommy8208 for testing // code and suggestions from atereshkov, GitGud2018 SCREEN_SIZE: 480x800 // ---------- Click Areas var #enableFairies 1 var #enablePremiumCollect 1 var #agree 1 var #decline 0 var #megaBoost 0 var #enableTapping 0 // 1 = (default) hit the titans with your sword master // 0 = disable hits (except on CQ) var #enableCO 1 var #PHoM 1 var #astralAwakening 1 // #astralAwakening is also affected by #equipStack below var #equipStack 0 // if set to 1, will skip some heroes when tapping for Astral Awakening // ---------- Actions ---------- [ Prestige ] var #enableAutoprestige 1 var #lateRun 0 // if 0, no change to run // if #lateRun > 0, will resume run at #minutes = #lateRun // 2nd run onwards (aka after prestige) will NOT adjust time var #prestigeStartTime 31 // input minimum time in minutes before prestige // prestige time range is ALWAYS +10 more minutes greater than StartTime to prevent teapot // ---------- Actions ---------- [ General ] var #runActionsEveryXSeconds 94 // recommended equal to total SC+ED+DShift duration minus ~6 or 7 seconds // ^esp if you cant level SC in the first run // ^so that when runActions runs, SC is done and script can level up SC // also note that displayed run time is not very accurate with real time // IMPORTANT go to line 248 and edit the settings there var #runActionsOnStart 1 // 1 = (default) run actions on script start // 0 = run actions after given run time above // ---------- Actions ---------- [ Change Helm ] var #changeHelmVARIABLE 0 var #gear1 2 var #gear2 1 var #timeChangeHelm 200 // ---------- Actions ---------- [ ClanQuest ] var #enableClanQuest 0 //clan boss with max possible hits var #clanQuestRunsPerReadyUp 3 // 1 = (default) attack every ready up once for free // 2-99 = spend dias for more attacks // ---------- Actions ---------- [ Heroes ] var #enableHeroes 1 var #heroIntensity 2 var #topHeroes 0 //level top hero every X seconds, leave at 0 to disable // ---------- Actions ---------- [ Skills ] var #enableSkills 1 var #skipHS 0 var #fullManaSkill 6 // 1 = HS // 2 = DS // 3 = HoM // 4 = FS // 5 = WC // 6 = SC //press given skills every X seconds var #intervalHS 0 var #intervalDS 6 var #intervalFS 6 var #intervalHoM 6 var #intervalWC 6 var #intervalSC 6 var #scActiveCheck 1 //used mainly for SC+Mana Siphon procs //0 = Activate skills every X seconds normally //1 = Activate skills every X seconds only if SC is active and has 1/4 duration left // 1/4th duration of SC is usually enough to generate mana from a decent level of Mana Siphon var #unlocked 0 // ^dont edit unless you know what it's for //these will be the skill intervals when #lateRun > 0 //time dependent variable changes in :start will still apply, be sure to check :start section if #lateRun > 0 #intervalHS = 0 #intervalDS = 11 #intervalFS = 31 #intervalHoM = 11 #intervalWC = 11 #intervalSC = 11 if #lateRun > #maxSkillsAtXMinutes #unlocked = 8 else #unlocked = 4 endif endif //just level each skill once var #justUnlockSkills 0 // 1 = (default) just unlock // 0 = level skills much as possible // will always max HS and SC whether 1 or 0 // see Tune389 Issue 80 if using #justUnlockSkills 1 //only applicable when #justUnlockSkills == 1 // use 0 if you don't like var #maxSkillsAtXMinutes 34 var #stopLevelSkillMins 3 //run skill check after prestige (0) or now (1) var #startSkillCheckNow 1 // ---------- Actions ---------- [ Boss ] //wait for given skill (2-6) then start boss var #startBossSkill 6 //optional skill which will be clicked on start (not checked) var #startBossSecondarySkill 2 // ---------- Developer / Expert var #maxHitCount 9999999 //show current script runtime var #showCurrentTime 1 //if you wanna sync the script time with real time you can play around with this value var #timeScaleAddition 20 // ---------- Dec var #detour 1 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 #skillActive 0 var #colorRed 0 var #colorBlue 0 var #colorGreen 0 var #loopDetectionCount 0 var #skillsUnlocked 0 var #tryWithDelay 0 var #checkRunning 0 var #clanQuestCount 0 var #recheckClanQuest 0 var #count 0 var #hitCount 0 var #skillAvailable 0 var #loopBreak 0 set #rAEXS #runActionsEveryXSeconds set #iHS #intervalHS set #iDS #intervalDS set #iFS #intervalFS set #iHoM #intervalHoM set #iWC #intervalWC set #iSC #intervalSC calc #minz #lateRun * 60000 calc #prestigeEndTime #prestigeStartTime + 10 var #prestigeAfterXMinutes 60 if #prestigeStartTime > 0 rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime else set #prestigeStartTime 40 endif var #maxedOutSkills 0 if #lateRun > 0 #maxedOutSkills = 2 #startSkillCheckNow = 0 endif var #tournyFirstRunTimer 0 if #tournyFirstRunTimer > 0 #prestigeAfterXMinutes = #tournyFirstRunTimer #prestigeStartTime = 35 #timeChangeHelm = 30 endif var #prestigeSlide 0 var #manualMax 0 var #hero 0 var #scAC 0 // ---------- Delays var #btnDelay 150 var #hitDelay 40 var #hitDelay2 20 var #menuSlideDelay 400 var #menuPopUpDelay 500 var #loadingClanQuestDelay 3000 var #shipDelay 200 var #skillDelay 50 // ---------- Menu Coords var #menuY 780 var #menuStats 15 var #menuHeroes 120 var #menuCloseY 455 var #menuCloseX 466 var #gearX 395 if #gear1 == 1 set #gear1 590 elseif #gear1 == 2 set #gear1 670 elseif #gear1 == 3 set #gear1 750 endif if #gear2 == 1 set #gear2 590 elseif #gear2 == 2 set #gear2 670 elseif #gear2 == 3 set #gear2 750 endif // ---------- 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 3695603 var #colorGray 2695200 // ---------- 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 #lastTopHeroes 0 var #resultManaPool 0 var #resultCheckBoss 0 var #resultUpdateTime 0 var #resultClanQuest 0 // ---------- MAIN :start #loopCount = #loopCount + 1 #resultManaPool = #loopCount % 901 #resultCheckBoss = #loopCount % 302 #resultClanQuest = #loopCount % 101 #resultUpdateTime = #loopCount % 75 #timeDiff = #secondsTotal - #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 //time dynamic skill interval clicks if #minutes > 10 #runActionsEveryXSeconds = 50 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 30 touchUp 0 sleep 30 #time = #time + 60 endif if #resultUpdateTime == 0 and #enablePremiumCollect == 1 and #decline == 1 touchDown 0 195 630 sleep 30 touchUp 0 sleep 30 #time = #time + 60 endif if #resultUpdateTime == 0 and #timeDiff < #runActionsEveryXSeconds 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 >= #runActionsEveryXSeconds goto :runActions elseif #resultCheckBoss == 0 toast Prestiging at #prestigeAfterXMinutes minutes goto :checkBoss elseif #resultManaPool == 0 goto :checkMana elseif #loopCount == #maxHitCount #loopCount = 0 goto :randomTouch else goto :randomTouch endif :end :afterPrestige #detour = 1 #count = 0 #skillsUnlocked = 0 #time = 0 #seconds = 0 #secondsTotal = 0 #minutes = 0 #unlocked = 0 #lateRun = 0 #runActionsEveryXSeconds = #rAEXS #maxedOutSkills = 0 #prestigeSlide = 0 #startSkillCheckNow = 1 #intervalHS = #iHS #intervalDS = #iDS #intervalFS = #iFS #intervalHoM = #iHoM #intervalWC = #iWC #intervalSC = #iSC rand #prestigeAfterXMinutes #prestigeStartTime #prestigeEndTime goto :switchHelm2 :switchHelm2 if #changeHelmVARIABLE == 2 sleep 100 //open equipment tab sleep #btnDelay touchDown 0 200 780 sleep #btnDelay touchUp 0 sleep 20 //wait for menu open sleep #menuSlideDelay //check if opened right sleep #menuSlideDelay getRGB #colorRed #colorGreen #colorBlue 330 480 if #colorRed != 85 or #colorGreen != 82 or #colorBlue != 81 or #loopBreak < 5 sleep 300 #loopBreak = #loopBreak + 1 goto :switchHelm2 endif //open helm tab #loopBreak = 0 touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay sleep 500 //equip 2nd gear touchPress 0 #gearX #gear1 sleep #btnDelay touchPress 0 #gearX #gear1 sleep #btnDelay touchPress 0 #gearX #gear1 sleep #btnDelay touchPress 0 #gearX #gear1 sleep #btnDelay //close equipment sleep #btnDelay touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep #menuSlideDelay #changeHelmVARIABLE = 1 endif goto :init // ---------- INIT :init if #enablePremiumCollect == 1 if #agree == 1 touchDown 0 350 630 sleep 50 touchUp 0 sleep 50 #time = #time + 100 endif if #decline == 1 touchDown 0 195 630 sleep 50 touchUp 0 sleep 50 #time = #time + 100 endif 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 #actionStepper = 0 goto :runActions endif goto :start :loopDetected toast loop detected - repeating ... #loopCount = 0 #loopDetectionCount = 0 goto :start // ---------- PRESS SKILLS :pressSkills //click "Fight Boss" getColor #color1 372 24 if #color1 == 1076975 toast FightBoss1 touchPress 0 390 36 sleep 40 touchUp sleep 40 #time = #time + 80 goto :pressSkills endif touchDown 0 #menuCloseX #menuCloseY sleep 40 touchUp 0 sleep #menuSlideDelay #time = #time + #menuSlideDelay + 40 // ------- LAZY MODE ACTIVATE ALL SKILLS //check if missed skills getRGB #colorRed #colorGreen #colorBlue 441 729 if #colorRed > -100 goto: openSwordMasterTab endif touchPress 0 433 716 sleep 200 touchPress 0 359 716 sleep 200 touchPress 0 279 716 sleep 200 touchPress 0 200 716 sleep 200 touchPress 0 120 716 sleep 200 #time = #time + 1000 // ------- END LAZY MODE ACTIVATE ALL SKILLS if #enableCO == 1 touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay #time = #time + 4 * #shipDelay endif #timeDiff = #secondsTotal - #lastPressSC if #timeDiff >= #intervalSC and #intervalSC > 0 #lastPressSC = #secondsTotal touchPress 0 430 710 sleep #skillDelay touchPress 0 430 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif #timeDiff = #secondsTotal - #lastPressHoM if #timeDiff >= #intervalHoM and #intervalHoM > 0 if #scActiveCheck == 1 if #scAC == 0 #scAC = 1 getRGB #colorRed #colorGreen #colorBlue 423 688 #time = #time + 100 endif if #colorRed == -1 and #colorBlue == 0 and #intervalHoM > 0 #lastPressHoM = #secondsTotal touchPress 0 200 710 sleep #skillDelay touchPress 0 200 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif elseif #scActiveCheck == 0 #lastPressHoM = #secondsTotal touchPress 0 200 710 sleep #skillDelay touchPress 0 200 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif endif goto :pressSkillsB :pressSkillsB #timeDiff = #secondsTotal - #lastPressDS if #timeDiff >= #intervalDS and #intervalDS > 0 if #scActiveCheck == 1 if #scAC == 0 #scAC = 1 getRGB #colorRed #colorGreen #colorBlue 423 688 #time = #time + 100 endif if #colorRed == -1 and #colorBlue == 0 and #intervalDS > 0 #lastPressDS = #secondsTotal touchPress 0 120 710 sleep #skillDelay touchPress 0 120 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif elseif #scActiveCheck == 0 #lastPressHoM = #secondsTotal touchPress 0 120 710 sleep #skillDelay touchPress 0 120 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif endif #timeDiff = #secondsTotal - #lastPressWC if #timeDiff >= #intervalWC and #intervalWC > 0 if #scActiveCheck == 1 if #scAC == 0 #scAC = 1 getRGB #colorRed #colorGreen #colorBlue 423 688 #time = #time + 100 endif if #colorRed == -1 and #colorBlue == 0 and #intervalWC > 0 #lastPressWC = #secondsTotal touchPress 0 360 710 sleep #skillDelay touchPress 0 360 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif elseif #scActiveCheck == 0 #lastPressHoM = #secondsTotal touchPress 0 360 710 sleep #skillDelay touchPress 0 360 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif endif goto :pressSkillsC :pressSkillsC #timeDiff = #secondsTotal - #lastPressFS if #timeDiff >= #intervalFS and #intervalFS > 0 if #scActiveCheck == 1 if #scAC == 0 #scAC = 1 getRGB #colorRed #colorGreen #colorBlue 423 688 #time = #time + 100 endif if #colorRed == -1 and #colorBlue == 0 and #intervalFS > 0 #lastPressFS = #secondsTotal touchPress 0 280 710 sleep #skillDelay touchPress 0 280 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif elseif #scActiveCheck == 0 #lastPressHoM = #secondsTotal touchPress 0 280 710 sleep #skillDelay touchPress 0 280 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif endif #timeDiff = #secondsTotal - #lastPressHS if #timeDiff >= #intervalHS and #intervalHS > 0 if #scActiveCheck == 1 if #scAC == 0 #scAC = 1 getRGB #colorRed #colorGreen #colorBlue 423 688 #time = #time + 100 endif if #colorRed == -1 and #colorBlue == 0 and #intervalHS > 0 #lastPressHS = #secondsTotal touchPress 0 40 710 sleep #skillDelay touchPress 0 40 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif elseif #scActiveCheck == 0 #lastPressHoM = #secondsTotal touchPress 0 40 710 sleep #skillDelay touchPress 0 40 710 sleep #skillDelay #time = #time + #skillDelay * 2 endif endif #scAC = 0 if #detour == 1 #detour = 0 sleep 1200 goto :levelHeroes2 endif goto :pressSkillsD :pressSkillsD if #topHeroes > 0 #timeDiff = #secondsTotal - #lastTopHeroes if #timeDiff >= #topHeroes #lastTopHeroes = #secondsTotal sleep 100 //open stats sleep #btnDelay #time = #time + #btnDelay + 100 touchDown 0 #menuHeroes #menuY sleep #btnDelay touchUp 0 sleep 1000 #time = #time + 1000 + #btnDelay //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 sleep 50 touchUp 0 sleep 750 sleep #btnDelay #time = #time + #btnDelay + 1150 //level top heroes touchPress 0 410 580 sleep #btnDelay touchPress 0 410 650 sleep #btnDelay touchPress 0 410 730 sleep #btnDelay #time = #time + #btnDelay * 3 //close stats sleep #btnDelay #time = #time + #btnDelay touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep #menuSlideDelay #time = #time + #menuSlideDelay endif endif goto :start // ---------- CHECK MANA :checkMana getColor #color1 208 638 if #color1 == #colorWhite 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 elseif #fullManaSkill == 6 touchPress 0 430 710 endif #time = #time + 150 goto :start :runActions #timeLastActionRun = #secondsTotal #actionStepper = #actionStepper + 1 //since skills should have been maxed, it wont go to openSwordMasterTab after if #unlocked >= 8 or #maxedOutSkills > 1 and #actionStepper == 1 #actionStepper = #actionStepper + 1 endif if #justUnlockSkills == 0 and #minutes >= #stopLevelSkillMins and #actionStepper == 1 #actionStepper = #actionStepper + 1 endif if #actionStepper == 1 and #enableSkills == 1 and #skillsUnlocked < 6 #skillsUnlocked = 0 goto :openSwordMasterTab elseif #actionStepper == 2 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 4000 //#time = #time + 4000 if #agree == 1 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 endif sleep 100 //open stats sleep #btnDelay touchDown 0 #menuStats #menuY sleep #btnDelay touchUp 0 sleep 30 //#time = #time + #btnDelay + #btnDelay + 130 //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 sleep 50 touchUp 0 sleep 800 sleep #btnDelay 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 sleep 50 touchUp 0 sleep 800 sleep #btnDelay 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 sleep 50 touchUp 0 sleep 800 sleep #btnDelay //#time = #time + #btnDelay + 1200 //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 //#time = #time + 750 sleep 400 goto :checkPrestigeB :checkPrestigeB touchDown 0 400 675 // --------hit Prestige button sleep 30 touchUp 0 sleep 30 sleep #menuPopUpDelay //#time = #time + #menuPopUpDelay + 60 touchDown 0 240 715 // ---- 2nd Prestige button sleep #btnDelay touchUp 0 sleep #menuPopUpDelay sleep 500 getColor #color1 355 570 if #color1 == -3234500 touchDown 0 355 570 sleep #btnDelay touchUp 0 sleep 23000 goto :afterPrestige else touchPress 350 550 touchPress 350 550 touchPress 350 550 touchPress 350 550 #prestigeSlide = 0 goto :checkPrestige endif goto :start // ---------- CHECK CLAN QUEST :checkClanQuest sleep 300 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 if #agree == 1 sleep 3500 //getRGB #colorRed #colorGreen #colorBlue 428 639 //if #colorRed == -216 or #colorGreen == -96 touchDown 0 300 630 sleep 50 touchUp 0 sleep 50 touchDown 0 300 630 sleep 50 touchUp 0 sleep 50 touchDown 0 300 630 sleep 50 touchUp 0 sleep 1100 //endif endif //open CQ menu sleep #btnDelay touchDown 0 80 25 sleep #btnDelay touchUp 0 sleep #btnDelay sleep 250 sleep 250 //touch clan icon bottom touchDown 0 110 720 sleep #btnDelay touchUp 0 sleep #loadingClanQuestDelay sleep 3000 //check titan progress if still active or basically if you can hit titan getRGB #colorRed #colorGreen #colorBlue 0 0 //420 725 //420 730 //if #color1 == -1785765 and #clanQuestCount == 0 #recheckClanQuest = 0 goto :clanQuestClose endif //check boss HP > 0 getRGB #colorRed #colorGreen #colorBlue 116 145 #clanQuestLoopCount = 0 if #colorRed == 0 or #colorGreen == -77 and #colorBlue == -57 //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 //330 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 goto :clanQuestHit elseif #clanQuestLoopCount > 950 goto :clanQuestClose endif :clanQuestClose getColor #color1 65 788 if #color1 == #colorStatsButton goto :clanQuestCloseCheck else touchDown 0 415 45 sleep 35 touchUp 0 sleep 200 touchDown 0 420 210 sleep 35 touchUp 0 sleep 200 goto :clanQuestClose endif :clanQuestCloseCheck if #recheckClanQuest == 1 and #clanQuestCount < #clanQuestRunsPerReadyUp goto :checkClanQuestReady else #clanQuestCount = 0 goto :start endif // ---------- LEVEL SKILLS :openSwordMasterTab if #count < 2 if #lateRun < 1 and #count < 2 if #count == 0 sleep 300 //open sword master tab sleep #btnDelay touchDown 0 #menuStats #menuY sleep #btnDelay touchUp 0 sleep 20 //wait for menu open sleep #menuSlideDelay //check if opened right sleep #menuSlideDelay getColor #SMTab 468 448 if #SMTab != 5328981 sleep 300 goto :openSwordMasterTab endif #time = #time + #btnDelay + 100 #time = #time + #btnDelay #time = #time + #menuSlideDelay endif //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 sleep 50 touchUp 0 sleep 750 //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 sleep 50 touchUp 0 sleep 750 //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 sleep 50 touchUp 0 sleep 750 //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 sleep 50 touchUp 0 sleep 750 sleep #btnDelay #time = #time + #btnDelay + 4600 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 + 750 endif if #lateRun > 0 and #count < 1 #time = #time + #minz #seconds = (#time/1000)%60 #secondsTotal = #time/1000 #minutes = (#time/1000)/60 #lateRun = 0 endif if #count < 2 #count = #count + 1 endif if #count < 2 goto :openSwordMasterTab endif endif //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 1000 #time = #time + 1350 if #enableSkills == 1 or #enableHeroes == 1 goto :maxSkills endif goto :closeMenu :maxSkills //scroll to HS touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 655 sleep 60 touchMove 0 280 640 sleep 60 touchMove 0 280 635 sleep 60 touchMove 0 280 630 sleep 200 touchUp 0 sleep 40 //max HS touchPress 0 405 680 sleep 100 touchPress 0 280 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 100 // scroll to DS touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 655 sleep 60 touchUp 0 sleep 30 //max DS touchPress 0 405 680 sleep 100 touchPress 0 280 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 100 //scroll to HoM touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 655 sleep 60 touchUp 0 sleep 30 //max Hom touchPress 0 405 680 sleep 100 touchPress 0 280 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 100 //scroll to FS touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 655 sleep 60 touchUp 0 sleep 30 //Max FS touchPress 0 405 680 sleep 100 touchPress 0 280 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 100 //scroll to WC touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 655 sleep 60 touchUp 0 sleep 30 //Max WC touchPress 0 405 680 sleep 100 touchPress 0 280 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 50 touchPress 0 405 680 sleep 100 //scroll to SC touchDown 0 280 750 sleep 200 touchMove 0 280 725 sleep 60 touchMove 0 280 660 sleep 60 touchMove 0 280 640 sleep 60 touchMove 0 280 625 sleep 60 touchUp 0 sleep 30 //Max SC touchPress 0 405 650 sleep 100 touchPress 0 280 650 sleep 50 touchPress 0 405 650 sleep 50 touchPress 0 405 650 sleep 50 touchPress 0 405 650 sleep 100 //Mega Boost if #megaBoost == 1 touchPress 0 405 750 sleep 200 endif //scroll to 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 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 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 + 7540 goto :closeMenu // ---------- LEVEL HEROES :levelHeroes //collect gold touchDown 0 30 230 sleep 50 touchUp 0 sleep 50 #time = #time + 100 if #agree == 1 sleep 2000 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 touchDown 0 350 630 sleep 30 touchUp 0 sleep 30 #time = #time + 2180 endif if #decline == 1 sleep 2000 touchDown 0 200 630 sleep 30 touchUp 0 sleep 30 touchDown 0 200 630 sleep 30 touchUp 0 sleep 30 #time = #time + 2120 endif if #minutes < 1 goto :closeMenu endif goto :levelHeroes2 :levelHeroes2 //open stats sleep #btnDelay touchDown 0 #menuHeroes #menuY sleep #btnDelay touchUp 0 sleep 1000 //wait for slide sleep #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 sleep 50 touchUp 0 sleep 750 sleep #btnDelay //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 sleep 50 touchUp 0 sleep 750 sleep #btnDelay //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 sleep 50 touchUp 0 sleep 750 sleep #btnDelay touchPress 0 460 670 sleep #btnDelay touchPress 0 460 670 sleep #btnDelay touchPress 0 460 670 sleep #btnDelay touchPress 0 460 670 sleep #btnDelay //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 goto :levelHeroesPressLevelUp :levelHeroesPressLevelUp #pressLevelUpLoopCount = #pressLevelUpLoopCount + 1 touchDown 1 466 720 sleep 40 touchUp 1 sleep 40 touchDown 1 466 700 sleep 40 touchUp 1 sleep 40 touchDown 1 466 680 sleep 40 touchUp 1 sleep 40 touchDown 1 466 660 sleep 40 touchUp 1 sleep 40 touchDown 1 466 640 sleep 40 touchUp 1 sleep 40 touchDown 1 466 620 sleep 40 touchUp 1 sleep 40 touchDown 1 466 600 sleep 40 touchUp 1 sleep 40 touchDown 1 466 580 sleep 40 touchUp 1 sleep 40 touchDown 1 466 560 sleep 40 touchUp 1 sleep 40 touchDown 1 466 540 sleep 40 touchUp 1 sleep 40 if #pressLevelUpLoopCount < #heroIntensity goto :levelHeroesPressLevelUp endif #pressLevelUpLoopCount = 0 goto :levelHeroesSlideUpCollection :levelHeroesSlideUpCollection #loopDetectionCount = #loopDetectionCount + 1 if #loopDetectionCount > 4 #loopDetectionCount = 0 toast levelHeroesSlideUpCollection loop //Level Sword Master sleep 20 touchDown 0 #menuStats #menuY sleep #btnDelay touchUp 0 sleep 200 touchPress 0 405 580 sleep 100 #time = #time + 300 goto :closeMenu endif touchDown 1 280 510 sleep 20 touchMove 1 280 512 touchMove 1 280 514 touchMove 1 280 516 sleep 20 touchMove 1 280 520 touchMove 1 280 540 sleep 20 touchMove 1 280 580 touchMove 1 280 600 sleep 20 touchMove 1 280 630 touchMove 1 280 670 sleep 20 touchMove 1 280 690 touchMove 1 280 700 sleep 20 touchMove 1 280 736 touchMove 1 280 738 sleep 20 touchMove 1 280 740 touchMove 1 280 742 sleep 200 touchUp 1 touchPress 1 280 750 // getColor #color1 275 527 // getColor #color2 275 508 // if #color1 == #colorGray and #color2 == #colorGray // #loopDetectionCount = 0 // goto :closeMenu // endif goto :levelHeroesPressLevelUp :closeMenu //close stats sleep #btnDelay #time = #time + #btnDelay touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep 200 touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep 200 touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep 1000 touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep 200 touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep #menuSlideDelay #time = #time + #menuSlideDelay + 1600 if #detour == 1 sleep 400 #lastPressHS = -200 #lastPressDS = -200 #lastPressFS = -200 #lastPressHoM = -200 #lastPressSC = -200 #lastPressWC = -200 goto :pressSkills endif goto :switchHelm1 :switchHelm1 if #changeHelmVARIABLE == 2 toast done changing else toast change helm now?? endif if #minutes >= #timeChangeHelm sleep 100 toast checking minutes goto :switchHelm15 endif goto :runActions :switchHelm15 if #changeHelmVARIABLE == 1 sleep #btnDelay touchDown 0 200 780 sleep #btnDelay touchUp 0 sleep 900 getRGB #colorRed #colorGreen #colorBlue 330 480 if #colorRed != 84 or #colorGreen != 76 or #colorBlue != 76 or #loopBreak < 5 sleep 300 #loopBreak = #loopBreak + 1 goto :switchHelm15 endif #loopBreak = 0 touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay touchPress 0 130 545 sleep #btnDelay sleep 500 touchPress 0 #gearX #gear2 sleep #btnDelay touchPress 0 #gearX #gear2 sleep #btnDelay touchPress 0 #gearX #gear2 sleep #btnDelay touchPress 0 #gearX #gear2 sleep #btnDelay if #changeHelmVARIABLE == 1 and #minutes > 23 #changeHelmVARIABLE = 2 toast done changing endif sleep #btnDelay touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY touchPress 0 #menuCloseX #menuCloseY sleep #menuSlideDelay endif goto :runActions // ---------- CHECK BOSS :checkBoss getColor #color1 139 85 if #color1 == #colorWhite goto :pressSkills endif getColor #color2 459 29 if #startBossSkill == 2 getColor #color1 108 685 elseif #startBossSkill == 4 getColor #color1 268 685 elseif #startBossSkill == 3 getColor #color1 189 685 elseif #startBossSkill == 5 getColor #color1 348 685 elseif #startBossSkill == 6 getColor #color1 428 685 endif if #color1 == #colorWhite and #color2 == #colorBlack goto :startBossWithSkills elseif #color2 == #colorBlack and #startBossSkill == 0 toast FightBoss2 touchDown 0 390 36 sleep #btnDelay touchUp 0 sleep #btnDelay touchDown 0 390 36 sleep #btnDelay touchUp 0 sleep #btnDelay #time = #time + 4 * #btnDelay endif //hatchEggs touchPress 0 30 285 sleep 30 touchUp 0 sleep #btnDelay #time = #time + #btnDelay goto :pressSkills :startBossWithSkills getColor #color1 372 24 if #color1 == 1204718 toast FightBoss3 touchPress 0 390 36 sleep 300 #time = #time + 300 goto :startBossWithSkills endif #time = #time + 400 if #enableCO == 1 touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay touchPress 0 175 410 sleep #shipDelay #time = #time + #shipDelay * 4 endif if #startBossSkill == 2 touchPress 0 120 710 sleep 200 goto :startBossWithSecondarySkill elseif #startBossSkill == 3 touchPress 0 200 710 sleep 200 goto :startBossWithSecondarySkill elseif #startBossSkill == 4 touchPress 0 280 710 sleep 200 goto :startBossWithSecondarySkill elseif #startBossSkill == 5 touchPress 0 360 710 sleep 200 goto :startBossWithSecondarySkill elseif #startBossSkill == 6 touchPress 0 430 710 sleep 200 goto :startBossWithSecondarySkill endif :startBossWithSecondarySkill if #startBossSecondarySkill == 2 touchPress 0 120 710 elseif #startBossSecondarySkill == 3 touchPress 0 200 710 elseif #startBossSecondarySkill == 4 touchPress 0 280 710 elseif #startBossSecondarySkill == 5 touchPress 0 360 710 elseif #startBossSecondarySkill == 6 touchPress 0 430 710 endif #time = #time + 400 goto :pressSkills // ---------- RANDOM ATTACK :randomTouch rand #randomX 60 415 if #enableFairies == 1 rand #randomY 160 420 else rand #randomY 270 420 endif //equipment stacking if #equipStack == 1 if #randomX > 300 and #randomX < 420 and #randomY > 280 goto :randomTouch endif endif //prevent hero story window if #randomY > 184 and #randomY < 233 and #randomX > 403 goto :randomTouch endif if #enableTapping == 1 touchDown 0 #randomX #randomY touchUp 0 endif sleep #hitDelay2 #time = #time + #hitDelay if #astralAwakening == 1 #hero = #hero + 1 if #equipmentStacking == 1 if #hero == 1 or #hero == 6 #hero = #hero + 1 endif endif if #hero == 1 //Maya touchDown 0 350 400 touchUp 0 elseif #hero == 2 //Zato touchDown 0 135 400 touchUp 0 sleep 50 touchDown 0 133 342 touchUp 0 elseif #hero == 3 //Sophia touchDown 0 435 390 touchUp 0 elseif #hero == 4 //Lance touchDown 0 100 395 touchUp 0 elseif #hero == 5 //Pingo touchDown 0 100 315 touchUp 0 elseif #hero == 6 //Rosabella touchDown 0 400 305 touchUp 0 elseif #hero == 7 //Gulbrand touchDown 0 55 275 touchUp 0 elseif #hero == 8 //Captain Davey touchDown 0 455 305 touchUp 0 sleep 50 touchDown 0 169 354 touchUp 0 elseif #hero == 9 //Rhys touchDown 0 35 305 touchUp 0 elseif #hero == 10 //Kronus touchDown 0 50 375 touchUp 0 endif endif goto :randomTouchB :randomTouchB if #astralAwakening == 1 if #equipmentStacking == 1 if #hero == 11 or #hero == 19 #hero = #hero + 1 endif endif if #hero == 11 //Cosette touchDown 0 400 400 touchUp 0 elseif #hero == 12 //Kiki touchDown 0 10 305 touchUp 0 sleep 50 touchDown 0 204 361 touchUp 0 elseif #hero == 13 //Maddie touchDown 0 75 410 touchUp 0 elseif #hero == 14 //Beany touchDown 0 425 305 touchUp 0 elseif #hero == 15 //Sawyer touchDown 0 400 225 touchUp 0 elseif #hero == 16 //Lil' Ursa touchDown 0 465 410 touchUp 0 elseif #hero == 17 //Saje touchDown 0 20 380 touchUp 0 sleep 50 touchDown 0 240 357 touchUp 0 elseif #hero == 18 //Wally touchDown 0 15 210 touchUp 0 elseif #hero == 19 //Jayce touchDown 0 380 365 touchUp 0 elseif #hero == 20 //Great Pharaoh touchDown 0 445 205 touchUp 0 endif endif goto :randomTouchC :randomTouchC if #astralAwakening == 1 if #equipmentStacking == 1 if #hero == 22 #hero = #hero + 1 endif endif if #hero == 21 //Boomoh Doctor touchDown 0 50 225 touchUp 0 elseif #hero == 22 //Dex-1000 touchDown 0 375 305 touchUp 0 sleep 50 touchDown 0 276 356 touchUp 0 elseif #hero == 23 //Great Madame Cass touchDown 0 470 225 touchUp 0 elseif #hero == 24 //Lala touchDown 0 80 225 touchUp 0 elseif #hero == 25 //Aya touchDown 0 75 305 touchUp 0 elseif #hero == 26 //Lady Lucy touchDown 0 445 170 touchUp 0 elseif #hero == 27 //Jazz touchDown 0 415 170 touchUp 0 sleep 50 touchDown 0 312 349 touchUp 0 elseif #hero == 28 //Maple touchDown 0 370 170 touchUp 0 elseif #hero == 29 //Kin touchDown 0 95 190 touchUp 0 elseif #hero == 30 //Princess Titania touchDown 0 25 175 touchUp 0 endif endif goto :randomTouchD :randomTouchD if #astralAwakening == 1 if #hero == 31 //Miki touchDown 0 425 225 touchUp 0 elseif #hero == 32 //Mina touchDown 0 465 120 touchUp 0 elseif #hero == 33 //Yzafa touchDown 0 385 135 touchUp 0 elseif #hero == 34 //Zolom touchDown 0 60 170 touchUp 0 sleep 50 touchDown 0 347 340 touchUp 0 elseif #hero == 35 //Finn touchDown 0 465 125 touchUp 0 elseif #hero == 36 //Nohni touchDown 0 120 145 touchUp 0 elseif #hero == 37 //Damon touchDown 0 420 80 touchUp 0 endif sleep #hitDelay2 #time = #time + #hitDelay if #hero > 36 #hero = 0 endif endif if #hitCount > 12 #hitCount = 0 goto :extra endif if #agree == 1 or #decline == 1 or #PHoM == 1 #hitCount = #hitCount + 1 endif goto :start :extra #hitCount = 0 if #PHoM == 1 touchDown 0 270 370 sleep 12 touchUp 0 sleep 14 touchPress 0 270 370 sleep 2 touchUp sleep 3 touchPress 0 270 370 sleep 16 touchUp 0 sleep 18 touchDown 0 270 370 sleep 10 touchUp 0 sleep 18 #time = #time + 60 endif if #agree == 1 touchDown 0 300 630 sleep 40 touchUp 0 sleep 40 touchDown 0 300 630 sleep 40 touchUp 0 sleep 40 #time = #time + 180 endif if #decline == 1 touchDown 0 200 630 sleep 30 touchUp 0 sleep 30 touchDown 0 200 630 sleep 30 touchUp 0 sleep 30 #time = #time + 150 endif goto :randomTouch