Ephenia / Pokeclicker-Scripts

Various scripts & enhancements for the game Pokéclicker.
https://github.com/Ephenia/Pokeclicker-Scripts
GNU General Public License v3.0
184 stars 263 forks source link

enhancedautoclicker not working anymore (v0.10.20) #396

Closed KlayFrog closed 2 weeks ago

KlayFrog commented 2 weeks ago

Since the lastest update (v0.10.20) there is an error message after choosing a save: "The 'enhancedautoclicker' userscript crashed while loading. Check for updates or disable the script, then restart the game." Auto Click, Auto Dungeon and Auto Gym doesn't work anymore (other scripts don't seem to be impacted afaik)

Realswitzer commented 2 weeks ago
VM399:1076 Uncaught TypeError: player.route is not a function
    at EnhancedAutoClicker.hasPlayerMoved (<anonymous>:1076:34)
    at EnhancedAutoClicker.calcClickStats (<anonymous>:971:18)
    at <anonymous>:957:76
VM399:632 Uncaught TypeError: player.town is not a function
    at EnhancedAutoClicker.canStartAutoDungeon (<anonymous>:632:136)
    at EnhancedAutoClicker.toggleAutoDungeon (<anonymous>:334:31)
    at HTMLButtonElement.<anonymous> (<anonymous>:203:109)

Any script relying upon player.route and player.town needs fixing,

> player.route
0
> player.town
Town {name: string, region: number, ...}

Truthfully not sure what they had returned in v0.10.19, but in theory it seems as simple as not calling them and using the getters.

Search "player.(route|town)" > 15 results - 3 files

catchfilterfantasia.user.js
enhancedautoclicker.user.js
custom/autosafarizone.user.js
Realswitzer commented 2 weeks ago

Found a fix, will make a PR. After testing the affected scripts, autosafarizone is still broken (modalUtils is not defined) so I'll look into fixing that, Fixed enhancedautoclicker has some other broken parts to it, namely the Auto Dungeon aspect, though that seems to be the only bug with the autoclicker portion. Fixed

Testing final script, checking for errors, and pushing a PR.

VincentPS commented 2 weeks ago

I love this community

Realswitzer commented 2 weeks ago

After testing everything I could think of, all affected scripts should be functional again with #397. If there are any more problems, feel free to note broken scripts on the PR.

Apganda617 commented 2 weeks ago

Hi Desktop Version still don't work for me.