chrisreyn / Tap-Titans-2-Progress-Bot

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

About "Boss fight" orange box #69

Closed Uriel-FR closed 5 years ago

Uriel-FR commented 5 years ago

Hello,

I did modify largely the script to understand, toast and reshape him for me.

Although, some parts stays blur to me.

When I'm watching the script running, I find that I stay way too much on the state where there is the famous "Boss fight" orange box and wasting time.

I know that it is this piece of code

//click "Fight Boss"
getColor #color 372 24
if #color == 1076975 and #bossLoopCounter <= 4
#bossLoopCounter = #bossLoopCounter + 1
toast FightBoss1
touchPress 0 390 36
sleep #btnDelay
#time = #time + #btnDelay

but I feel like the randomtouch take forever.

Anyone who have an idea to share?

How can we precisely activated boss fight when its orange ?

Uriel-FR commented 5 years ago

My own answer 👍

var #ColorBossMax 1204718
var #ColorBossMin 947179

var #BossX 374
var #BossY 24
...

log #time : #minutes:#seconds pressSkills - Click fightBoss 

    getColor #color1 #BossX #BossY

    if #color1 >= #ColorBossMin and #color1 <= #ColorBossMax         
        touchPress 0 #BossX #BossY
        sleep #btnDelay
        #time = #time + #btnDelay
    endif