s5w95 / Tap-Titans-2-Progress-Bot

A HiroMacro Progress Bot for Tap Titans 2
44 stars 82 forks source link

[FIX/DEV] I've resolved the problem with skills leveling #87

Open atereshkov opened 6 years ago

atereshkov commented 6 years ago

I saw a really big amount of requests to fix this skills level section and all this stuff, so after this fcking research I just found a workaround to stop skill leveling after N minutes and it looks like a temp. solution. Just copy replace this code from // --- Level Skills to // -- Level heroes in your script.

All you need is change the if #minutes >= 1 value to your (1 minute is enough to level up all skilss by some initial value like from 1-5)

// ----------- 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

        // there!
    if #minutes >= 1
        toast minutes >= 1, stop now
        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
        sleep 250
        touchUp 0
        sleep 200
        #time = #time + 550
    endif

    if #justUnlockSkills == 0

        getColor #skillAvailable 466 730
        if #skillAvailable == #skillBlue
            goto :checkSkillsSlideDown
        else
            sleep 50
            #time = #time + 50
        endif

        getColor #skillAvailable 466 730
        if #skillAvailable == #skillBlue
        else
            goto :lvlSkill
        endif
    endif

    if #skillCheckStepper == 6
        goto :checkSkills
    endif
goto :checkSkillsSlideDown

:checkSkillsFinish
    #skillCheckStepper = 0
    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
DaBest1Evar commented 6 years ago

This is a really good workaround! I can't believe I didn't think of this! So far I haven't encountered any bugs.

Thanks!!

MathieuB27 commented 6 years ago

This Fix my problem all the Way. GENIUS !!! Thanks!!!

yagano1 commented 6 years ago

why i set justunlockskill and it doesn't work :(

atereshkov commented 6 years ago

@yagano1 it should work, it only depends on #minutes value that you have to specify in case of using my version of this issue. What do you exactly mean by "it doesn't work"?

yagano1 commented 6 years ago

i use your script and it up max all skill :(

atereshkov commented 6 years ago

@yagano it can't max all skills, use #justUnlockSkills 1

yagano1 commented 6 years ago

it work now after i merge it with your PRESS SKIL cript , i don't know why. how i can turn off all toast message it not correct and so anooying

Zethu5 commented 6 years ago

@yagano1 Literally delete all the lines from the script with 'toast' in the beggining.

Speiky55 commented 6 years ago

hey is there also a way that it doesnt max out heavy strike?

maverik13 commented 6 years ago

@atereshkov can ii manage how many clicks the script will do in every skill when i have justunlockskills 1?