Azelphur / PokemonGo-CalcyIV-Renamer

Uses adb to send fake tap events to your phone, alongside Calcy IV to automatically rename all your pokemon.
GNU General Public License v3.0
76 stars 33 forks source link

Refining Addtion #10

Closed AVellucci closed 6 years ago

AVellucci commented 6 years ago

Now that there has been quite a change to the script, and it can now favorite/trash/mark pokemon for trade. Is it possible to add an option (toggleable or set to certain IVs or higher) to refine the scanned pokemon? From what I would see this would require 3 - 4 new taps to hit refine record option and then appraise. After that, it would require 5 - 9 additional taps with a short delay in between to cycle through the Leader's Appraisal text. Putting the Tap location in a "dead" spot this should safeguard from accidentally levelling up/evolving a pokemon.

Once the refining is done the script would continue about its merry way with the rest of the normally programmed steps. this could be a huge amount of work needed but I think it might just require a loop with a counter on it to loop through the maximum amount of taps and then move on. This would give you some unnecessary taps for some pokemon appraisals but it would essentially cover all outcomes, in case your pokemon has 3 stats and is either big/tiny/light/heavy.

Azelphur commented 6 years ago

This is already done, I just forgot to document it, whoops!

You can do this with the conditions and actions functionality. For example, if you wanted to appraise any pokemon that are potentially greater than 90 IV, you could do something like this:

actions:
    - conditions:
        iv: # The pokemon must not already have an exact IV match
        iv_max__ge: 90 # The maximum possible IV must be (g)reater than or (e)qual to 90
        appraised: false # The pokemon must not already be appraised (otherwise we can get stuck in a loop)
      actions:
        appraise: # Perform appraisal
    - actions:
        rename-calcy: # Rename normally

I haven't tested out the appraisal stuff much, but it does seem to work. One issue is that Calcy IV only watches the screen for 15 seconds, and I have yet to figure out how to increase this time. Taking a screenshot and checking every step of the appraisal process takes more than 15 seconds. For now I've set it to spam through the first 3 messages, and then check the rest, which seems to work.

AVellucci commented 6 years ago

I haven't run this yet but when appraising manually it only takes me about 5 seconds to run through the whole appraisal with Calcy on record. I'm not sure why the script would require more than 15 seconds to do the same task. Even with a wait of 1 second between each action, you should still get away with at least a few seconds to spare. I'll pull the latest commit and run it locally but I'll have to re-install pillow as I see the dependency has returned for that.