-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autoAchievement #240
base: master
Are you sure you want to change the base?
Add autoAchievement #240
Conversation
Auto complete achievements for Route, Gyms and Dungeons Original Credit: Bowbylone Script Modified by: Dionisos94
currentDungeon = newDungeon; | ||
player.subregion = TownList[newDungeon].subRegion; | ||
MapHelper.moveToTown(newDungeon); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really work?
When you go from a dungeon to another, does the script keep working?
When playing around with it, I needed to leave the dungeon before going to another one...
So I added this:
// DungeonRunner.dungeonLeave()
DungeonRunner.dungeonFinished(true);
DungeonRunner.fighting(false);
DungeonRunner.fightingBoss(false);
MapHelper.moveToTown(DungeonRunner.dungeon.name);
If you want to take a look: AreaDestroyer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for flagging it, I will have a look during the day !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just did a test.
Are you talking about the next dungeon not starting or the fact the character is not physically moved to the right subregion ?
In Galar, I went from Rose Tower to Dusty Bowl to Courageous Cavern without trouble.
Only issue I had is that my character was not on the Courageous Cavern but on Hammerlocke city when I quitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be that you beated all Dungeons to more than 500 (assuming you didn't change the value in the code) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enter a dungeon, then try to enter it again ;)
MapHelper.moveToTown(player.town().dungeon.name);
It end up breaking something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try ! Thanks for raising it
let regionDungeons = GameConstants.RegionDungeons[player.region]; | ||
for(let j = 0; j < regionDungeons.length; j ++) | ||
{ | ||
if(getDefeatedOnDungeon(regionDungeons[j]) < GameConstants.ACHIEVEMENT_DEFEAT_DUNGEON_VALUES[GameConstants.ACHIEVEMENT_DEFEAT_DUNGEON_VALUES.length-1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to check if it's unlocked: dungeonList[dgs[j]].isUnlocked()
let regionGyms = GameConstants.RegionGyms[player.region]; | ||
for(let j = 0; j < regionGyms.length; j ++) | ||
{ | ||
if(getDefeatedOnGym(regionGyms[j]) < GameConstants.ACHIEVEMENT_DEFEAT_GYM_VALUES[GameConstants.ACHIEVEMENT_DEFEAT_GYM_VALUES.length-1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to check if it's unlocked: GymList[gym[j]].isUnlocked()
let regionRoutes = Routes.getRoutesByRegion(player.region); | ||
for(let j = 0; j < regionRoutes.length; j ++) | ||
{ | ||
if(getDefeatedOnRoute(player.region, regionRoutes[j].number) < GameConstants.ACHIEVEMENT_DEFEAT_ROUTE_VALUES[GameConstants.ACHIEVEMENT_DEFEAT_ROUTE_VALUES.length-1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to check if it's unlocked: regionRoutes[j].isUnlocked()
Route achievement don't seem to be working in johto up to kalos. Kanto, alola and galar is working fine. |
This now has enough votes, but it requires attention still due to merge conflicts. |
would also like to say it's bugged for Hoenn, likely due to Orre |
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. |
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 :) |
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. |
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. |
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. |
Thank you, im going to start testing it out today. I will keep you updated! |
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.
// can't do anything if we're catching a pokemon
if (App.game.gameState === GameConstants.GameState.dungeon && DungeonBattle.catching()) {
return;
} This was the only issue i found after a couple hours of testing. i made a PR for this here MrPandaa#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. |
@MrPandaa were you able to take a look at the code? |
Auto complete achievements feature for Route, Gyms and Dungeons
For the region the user is on, if button is green:
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)