-
Notifications
You must be signed in to change notification settings - Fork 14
Home
last updated: May 26 (formatting)
Do NOT use Nox. Switch to Memu.
I hope you are using Memu instead of Nox. Nox has memory issues that have something to do with HiroMacro and Nox Android 5 compatibility. This disclaimer was made back in May 26, 2018, so unless Nox has had updates and someone tells me it works, don't use Nox
for some reason, order matters in the :lvlSkill
section, so you need to put the clauses of #justUnlockSkills == 1
first before #justUnlockSkills == 0
as stated in https://github.com/Tune389/Tap-Titans-2-Progress-Bot/issues/80
REPLACE your section of :lvlSkill
with this (just copy paste it)
:lvlSkill
if #minutes >= #maxSkillsAtXMinutes and #maxSkillsAtXMinutes > 0 and #unlocked < 8 and #skillCheckStepper <= 5
touchPress 0 459 755
sleep 300
#time = #time + 300
#unlocked = #unlocked + 1
endif
#time = #time + 100
getRGB #colorRed #colorGreen #colorBlue 459 755
if #colorBlue <= -45
sleep 10
#time = #time + 10
goto :endLvlSkill
elseif #justUnlockSkills == 1
if #skillCheckStepper < 6
if #unlocked < 4
#unlocked = #unlocked + 1
touchPress 0 459 755
sleep #btnDelay
#time = #time + #btnDelay
goto :endLvlSkill
elseif #unlocked >= 4
if #minutes < #maxSkillsAtXMinutes
goto :endLvlSkill
else
if #unlocked < 8
touchPress 0 459 755
sleep #btnDelay
#time = #time + #btnDelay
endif
goto :maxSkill
endif
endif
endif
elseif #justUnlockSkills == 0
goto :maxSkill
endif
goto :endLvlSkill
touchPress
, touchDown
, and touchUp
usually have an accompanying sleep T
Z is for hold; set Z to 1 if you want it to be held. Set to 0 if just a normal tap
X is for X coordinate
Y is for Y coordinate
T is for any number usually 50 at most
Code format/syntax:
touchPress format:
touchPress Z X Y
sleep T
touchDown touchUp combo format:
touchDown Z X Y
sleep T
touchUp Z X Y
sleep T
What you can do:
-
change
sleep
value to a higher number Usually,#btnDelay
should work (its in-code value is 150), but the tradeoff is that it takes a horrible amount of time just to click a button. I do NOT recommend you use#btnDelay
for the hero level up section as this will take forever. The currentsleep
time of 40 +/- 5 seems to work the fastest with the least errors -
switch
touchPress
with thetouchDown
andtouchUp
combo or combinetouchDown
andtouchUp
into justtouchPress
-
use erratic values for the
sleep
timers in between touch commands An example is found in the code below. Notice how thesleep
durations are different. In my runs, this only results to 3 successful taps. It could mean it's related to the number ofsleep
present
touchPress 0 415 750
sleep 34
touchPress 0 415 750
touchPress 0 415 750
touchPress 0 415 750
sleep 45
touchPress 0 415 750
sleep 38
- use both
touchPress
es withtouchDown
andtouchUp
comboes repetitive, but last resort
This is intended. I don't want to waste mana and the workaround for this is to set #runActionsEveryXSeconds
at a duration when all skills are done running. As mentioned already in-code
// recommended equal to total SC+ED+DShift duration minus ~6 or 7 seconds (or whatever skill lasts the longest for you
// ^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
With the latest change having Astral Awakening in the taps section, the displayed time is quite off so find that sweet spot number when your skills just finish (it would also help to have similar activation times for your skills)
if you really do not want this function, look for
:lvlSkill
if #minutes >= #maxSkillsAtXMinutes and #unlocked < 8 and #skillCheckStepper <= 5
touchPress 0 459 755
sleep 300
#time = #time + 300
#unlocked = #unlocked + 1
endif
#time = #time + 100
getRGB #colorRed #colorGreen #colorBlue 459 755
if #colorBlue <= -45
sleep 10
#time = #time + 10
goto :endLvlSkill
elseif #justUnlockSkills == 0
goto :maxSkill
change getRGB #colorRed #colorGreen #colorBlue 459 755
to #colorBlue = 0
most notable recently with
#intervalHS 0
and/or#skipHS 1
Delete the section (or parts) of the code you know you don't want to happen. If you're not familiar with coding, do not delete the section header name itself (e.g. :section
) and the goto :section
s within it (and I guess the accompanying conditionals related to it) just to make sure the code isn't lost. For the more advanced coders, of course, you're free to delete the whole section, with header and exit points, just make sure to redirect other sections to the appropriate after-sections.
Report and post an issue according the guidelines just below this. If you can think of workarounds for me as well, that would be lovely.
Make a new issue here on github. Describe to me the following:
- Are you using Memu instead of Nox?
- Apparently, Nox and Memu don't play scripts the same way, but since Memu has better memory handling, use Memu first if the script works there.
- What was supposed to happen in the script? What problem are you encountering?
- What were the last things the code was trying to do before this problem? Was it upgrading heroes or sword master? Was it trying to scroll down/up?
- Mention the script version by stating the latest date found at the top of the code
- Mention other things you think I should know about or something that happened that normally doesn't
- examples: "I think it kept clicking this area", "I encounter this problem only after CQ", etc.
- You can also speculate/suggest how I can edit the code to fix your problem
Restart your emulator/Hiro/TT2. Maybe your emulator is just slumped with its own processes from running the game and script for quite a while, so running from a fresh instance could maybe do the trick. Works for me~
to quote djo_5296 from https://www.elitepvpers.com/forum/mobile-games/4224861-tap-titans-2-advanced-clickbot-hiromacro-55.html#post36559927
To everyone: Something weird with hiro (or at least mine) because a lot of my code used to work, then at a random point, parts of it just stopped (especially the color detecting for skills) so I had to work around those and as such, maybe like tommy, parts of the code may not work as I intended them to as they do work for me now
One day, your code could just stop working properly, whether you edited anything OR NOT. It's batshit weird and I've gone crazy a few times solving invisible bugs. Then when I don't change anything, it suddenly works again??? I'm sorry, but if the code doesn't work for you, it doesn't work you.
Hiro is a sub-optimal, not 100% reliable coding/script running platform. It has "hidden" limitations like nested conditions can't be too nested (and idek what the limit is since some sections can have 4 nested conditions but some won't work if it has just 3). Don't make it any worse for me to chase invisible/fake bugs because it's probably just Hiro being inefficient and fucking with us. This is why I want people to report bugs and not whine about them because I can't even tell if they're real solvable problems with my code.
Incidentally, our machines can have its own hiccups depending on how beefy your computer is. Aside from lags, do expect more false-positives when the script runs on weaker computers. When the script fails to open menus/click buttons, this is probably it. It should work on the next time it runs that part. Hopefully. lol
Again, I upload my codes as how I use them (so yes, this works for me). But to note, after all the revisions I've done on Tune389's code, low MS scripters may have a hard time finding the right settings for them. The settings are more lenient to be changed for users who are able to max level their skills from a fresh prestige, but as long as you understand (HiroMacro) coding, shouldn't matter much how high/low your MS is when using this.