Pokeclicker-Scripts icon indicating copy to clipboard operation
Pokeclicker-Scripts copied to clipboard

Add autoAchievement

Open Dionisos94 opened this issue 2 years ago • 12 comments

Auto complete achievements feature for Route, Gyms and Dungeons

For the region the user is on, if button is green:

  1. For routes, fight until 10 000 achievement is successful, then move to next road (only on same region)
  2. For gyms, fight until 1 000 achievement is successful, then move to next gym (only on same region)
  3. For dungeons, fight until 500 achievement is successful, then move to next dungeon(only on same region)

image

I tested the code at my best but there may be some bugs. Do not hesitate to test, raise concerns/issues or correct.

Original Credit: Bowbylone (https://github.com/Bowbylone/UpgradedAutoClicker/blob/63376c3027845f3b9d74aa435fc19afad416e549/upgradedAutoClicker.js)

Script Modified by: Dionisos94 (added Gyms, updated to match v2.7)

Dionisos94 avatar Oct 27 '22 14:10 Dionisos94

Route achievement don't seem to be working in johto up to kalos. Kanto, alola and galar is working fine.

ahlfred avatar Nov 09 '22 09:11 ahlfred

This now has enough votes, but it requires attention still due to merge conflicts.

Ephenia avatar Aug 01 '23 21:08 Ephenia

would also like to say it's bugged for Hoenn, likely due to Orre

NAFEDUDE avatar Aug 28 '23 07:08 NAFEDUDE

Gotta try this one, this is getting very close to an auto-play script XD even if it's once per minute something like this could move regions/routes/dungeons/safari and find the first one with an active quest, PKRS, achieve, etc and try to complete that

Keep up the amazing work

Do we know where about in the code the conflict is? I can take a peek.

JohnyDL avatar Apr 10 '24 12:04 JohnyDL

I am working on a version where I took the code from this pr and try to fix everything. Right now I am testing if my changed code still works there were quite a few bugs as it was originally maybe due to changes in the game code since the original Code was quite old at this point. If anyone is interested in helping me test the code if there are any bugs please tell me. I am quite new to the game and I don't have all of Kanto at 100% achievements so I cannot test everything.

MrPandaa avatar Jun 12 '24 09:06 MrPandaa

I am working on a version where I took the code from this pr and try to fix everything. Right now I am testing if my changed code still works there were quite a few bugs as it was originally maybe due to changes in the game code since the original Code was quite old at this point. If anyone is interested in helping me test the code if there are any bugs please tell me. I am quite new to the game and I don't have all of Kanto at 100% achievements so I cannot test everything.

Any update on this one? Im very interested in this script :)

VincentPS avatar Jun 27 '24 17:06 VincentPS

it had quite some bugs I am still working on trying to fix Routes seem to be at least working and gyms mostly Auto Dungeon some times stops working I am working on fixing it. If you want I can give you an Beta Version to see how it works for you

MrPandaa avatar Jun 27 '24 21:06 MrPandaa

I won't have a lot of time to test things this weekend, but sure. If you can send me the branch i can make sure to check it out and test the functionalities.

VincentPS avatar Jun 28 '24 15:06 VincentPS

ok my fork is up and public go take a look if everything seems fine i can make a PR (from my testing everything seems fine) but i would help if had some input. unfortunately i used vscode with my auto Format on save so the file looks completely different. is there some guide lines on this because it makes the Diff unreadable since nearly every line is affected.

MrPandaa avatar Jun 28 '24 22:06 MrPandaa

Thank you, im going to start testing it out today. I will keep you updated!

VincentPS avatar Jun 29 '24 09:06 VincentPS

@MrPandaa

As I'm not a professional Front-end developer but instead a professional Back-end developer i won't be able to easily resolve the issues listed below. I am going to try nonetheless, but keep it in mind.

  • When auto achievement is handling a dungeon, and you switch to handling routes it wont continue to the next pokemon. There is no exception or anything, so i recon this is unintended behavior and needs to be checked for. After further investigating this, it happens when in a dungeon you try to catch a pokemon and then try to switch to the routes option.
  • ^ Issue above has been resolved by adding
// can't do anything if we're catching a pokemon
if (App.game.gameState === GameConstants.GameState.dungeon && DungeonBattle.catching()) {
    return;
}

image

This was the only issue i found after a couple hours of testing.

i made a PR for this here https://github.com/MrPandaa/Pokeclicker-Scripts/pull/1

Not sure why i couldn't create a branch and just a PR so i forked it and created a PR like that.

I also updated the file with the newest version from this repository as it was quite behind, and made sure the autoachievement changes are still included, also fixed a bug where switching to autocomplete routes while catching a pokemon in a dungeon the game would freeze. (The bug i reported here earlier)

If you'd like then please take the updated code from https://github.com/VincentPS/Pokeclicker-Scripts/tree/newest-version-and-bug-fix and make a PR in this repository. I think that will also resolve the weird path I've created with the extra fork.

VincentPS avatar Jun 29 '24 13:06 VincentPS

@MrPandaa were you able to take a look at the code?

VincentPS avatar Jul 15 '24 20:07 VincentPS