You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After v0.10.22 update, mining system was overhauled, and Enhanced Auto Mine seems to no longer work. Which is sad, because there are new achievements tied to miming
Helpers aren't automatically using battery (so not upgrading new Oak Item towards "Level all 12 Oak Items to maximum level" achievement).
Also, helpers using chisel, hammer, bomb and survey tools aren't count towards "Use chisel tool 1000 times", "Use hammer tool 2000 times", "Use bomb tool 5000 times", "Use survey tool 50 times", "Use any tool 10000 times" achievements.
So, without Enhanced Auto Mine it is near impossible to get 6 achievements.
Plus, unlike Hatchers and Farm hands, you can only use ONE mine helper at a time. So, even without achievements, using helpers just really SLOWER than using Enhanced Auto Mine
Reacted by Santiago Dorgan, Markus Rothlübbers, CptGryps and MarissaBlackwing
I have some helper working in underground mine for a three weeks now (started with Steve and Alex, waited until they are at least at level 50, switched to Gemma, waited until she is at least at level 50, switched to Sharlene, waited until she is at least at level 50, switched to Jones, waited until he is at least at level 50, switched to Darwin, waited until he is lat least at evel 50, switched back to Steve and Alex, and they are currently at level 87), I don't even turn off my computer when I go to work, and my underground mine is still only at level 45. Without "Enhanced Auto Mine" it's borderline impossible to get an achievement "Reach Underground Level 50"
I am also a bit bummed, but I made my own thing, at least kind of. There's a reason the file is called stupidmine.js.
What this does is it waits 5 seconds on initial load and then spam clicks the first square in the list every 0.1s / 100ms with your selected tool, which in my case is the bomb. This works great as soon as your bomb has unlimited durability.
I tried several times to integrate this different approach for the new underground system classes into the existing ephenia script, especially to also get interactability, but didn't manage to do it.
I'm posting my approach in case it helps someone more accustomed to maybe update the script.
var autoMineTimer;
// Wait a few seconds to not mine before underground is fully loaded
setTimeout(() => {
autoMineTimer = setInterval(function () {
doAutoMine();
}, 100);
}, 5000);
function doAutoMine(){
UndergroundController.clickModalMineSquare(1);
}
To activate the battery, the method should be App.game.underground.battery.discharge() (at least that is what's bound to the button).
If you want to use potions, I think only the part that tries to use them needs to be discarded, as the helpers use them automatically if you have it enabled. Just the buying part would be kept.
I am also a bit bummed, but I made my own thing, at least kind of. There's a reason the file is called stupidmine.js.
What this does is it waits 5 seconds on initial load and then spam clicks the first square in the list every 0.1s / 100ms with your selected tool, which in my case is the bomb. This works great as soon as your bomb has unlimited durability.
I tried several times to integrate this different approach for the new underground system classes into the existing ephenia script, especially to also get interactability, but didn't manage to do it.
I'm posting my approach in case it helps someone more accustomed to maybe update the script.
var autoMineTimer;
// Wait a few seconds to not mine before underground is fully loaded
setTimeout(() => {
autoMineTimer = setInterval(function () {
doAutoMine();
}, 100);
}, 5000);
function doAutoMine(){
UndergroundController.clickModalMineSquare(1);
}
To activate the battery, the method should be App.game.underground.battery.discharge() (at least that is what's bound to the button).
If you want to use potions, I think only the part that tries to use them needs to be discarded, as the helpers use them automatically if you have it enabled. Just the buying part would be kept.
You know what, this is perfect for me, so I'll take it. Thank you for sharing!
Based on this thread, I worked on a prototype, here is the script itself. I think it can help to quickly update your underground level.
Features:
Auto mine: first use the bomb, then back to chisel if all items are partially found
Auto battery discharge
Auto sell: regularly sell all treasures
Auto small restore (I basically use the same code, I need to double check this one).
Limitations:
I was not able to test everything yet
No control over what to sell. I guess it would be too complicated now that treading is here.
It does not handle helpers, you have to do it on your own
It is not able to control the frequency of the refresh. I hard-coded it to 0.05 seconds, and it suits my need.
// ==UserScript==// @name [Pokeclicker] Enhanced Auto Mine// @namespace Pokeclicker Scripts// @author Ephenia (Credit: falcon71, KarmaAlex, umbralOptimatum, Pastaficionado, bsegault)// @description Automatically mines the Underground with Bombs. Features adjustable settings as well.// @copyright https://github.com/Ephenia// @license GPL-3.0 License// @version 3.0// @homepageURL https://github.com/Ephenia/Pokeclicker-Scripts/// @supportURL https://github.com/Ephenia/Pokeclicker-Scripts/issues// @downloadURL https://raw.githubusercontent.com/Ephenia/Pokeclicker-Scripts/master/enhancedautomine.user.js// @updateURL https://raw.githubusercontent.com/Ephenia/Pokeclicker-Scripts/master/enhancedautomine.user.js// @match https://www.pokeclicker.com/// @icon https://www.google.com/s2/favicons?domain=pokeclicker.com// @grant unsafeWindow// @run-at document-idle// ==/UserScript==varmineState;varautoSellState;varsmallRestoreState;varsetThreshold;varautoMineTimer;functioninitAutoMine(){constminerHTML=document.createElement("div");minerHTML.innerHTML=`<div id="auto-miner"><button id="auto-mine-start" class="col-12 col-md-2 btn btn-${mineState ? 'success' : 'danger'}">Auto Mine [${mineState ? 'ON' : 'OFF'}]</button><button id="auto-sell-start" class="col-12 col-md-3 btn btn-${autoSellState ? 'success' : 'danger'}">Auto Sell items [${autoSellState ? 'ON' : 'OFF'}]</button><button id="small-restore-start" class="col-12 col-md-3 btn btn-${smallRestoreState ? 'success' : 'danger'}">Auto Small Restore [${smallRestoreState ? 'ON' : 'OFF'}]</button><span class="col-12 col-md-3"><img title="Money" src="assets/images/currency/money.svg" height="25px"> <input title="Value at which to stop buying Small Restores." type="text" id="small-restore"></span></div>`document.querySelectorAll('#mineModal .modal-body')[0].prepend(minerHTML);$("#auto-mine-start").unwrap();document.getElementById('small-restore').value=setThreshold.toLocaleString('en-US');document.getElementById('auto-mine-start').addEventListener('click',event=>{startAutoMine(event);});document.getElementById('small-restore-start').addEventListener('click',event=>{autoRestore(event);});document.getElementById('auto-sell-start').addEventListener('click',event=>{autoSell(event);});document.querySelector('#small-restore').addEventListener('input',event=>{setThreshold=+event.target.value.replace(/[A-Za-z!@#$%^&*()]/g,'').replace(/[,]/g,"");localStorage.setItem("autoBuyThreshold",setThreshold);event.target.value=setThreshold.toLocaleString('en-US');});addGlobalStyle('#auto-miner { display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:space-evenly;align-items:center; }');addGlobalStyle('#small-restore { width:150px; }');if(mineState){// Wait a few seconds to not mine before underground is fully loadedsetTimeout(setAutoMineInterval,5000);}}functionsetAutoMineInterval(){autoMineTimer=setInterval(function(){doAutoMine();},50);// Happens every .05 second}functionstartAutoMine(event){constelement=event.target;mineState=!mineStatemineState ? element.classList.replace('btn-danger','btn-success') : element.classList.replace('btn-success','btn-danger');element.textContent=`Auto Mine [${mineState ? 'ON' : 'OFF'}]`;if(mineState){setAutoMineInterval();}else{clearInterval(autoMineTimer)}localStorage.setItem('autoMineState',mineState);}functiondoAutoMine(){if(Mine.loadingNewLayer){// Do nothing while the new layer is loadingreturn;}if(autoSellState){UndergroundItems.list.forEach(i=>{if(i.hasSellValue()){UndergroundTrading.sellAmount=player.itemList[i.itemName]();UndergroundTrading.selectedTradeFromItem=i;UndergroundTrading.sell();}});}if(smallRestoreState){if((ItemList["SmallRestore"].price()==30000)&&(player.itemList["SmallRestore"]()==0)&&(App.game.wallet.currencies[GameConstants.Currency.money]()>=setThreshold+30000)){ItemList["SmallRestore"].buy(1);}}if(App.game.underground.battery.charges===App.game.underground.battery.maxCharges){App.game.underground.battery.discharge();}// Use the bomb if not all items have been discoveredif(App.game.underground.mine._itemsPartiallyFound()<App.game.underground.mine._itemsBuried()){App.game.underground.tools.useTool(2,1,0);}else{// Get all tiles with rewardsconsttilesWithReward=App.game.underground.mine.grid.map((tile,i)=>({...tile,index: i})).filter(tile=>tile._reward&&!tile._reward.rewarded)constuncoveredTileWithReward=tilesWithReward.filter(tile=>tile._layerDepth()>0);// Use chisel on each tileuncoveredTileWithReward.forEach(tile=>{const{x, y}=App.game.underground.mine.getCoordinateForGridIndex(tile.index);App.game.underground.tools.useTool(0,x,y);});}}functionautoSell(event){constelement=event.target;autoSellState=!autoSellState;autoSellState ? element.classList.replace('btn-danger','btn-success') : element.classList.replace('btn-success','btn-danger');element.textContent=`Auto Small Restore [${autoSellState ? 'ON' : 'OFF'}]`;localStorage.setItem('autoSellState',autoSellState);}functionautoRestore(event){constelement=event.target;smallRestoreState=!smallRestoreState;smallRestoreState ? element.classList.replace('btn-danger','btn-success') : element.classList.replace('btn-success','btn-danger');element.textContent=`Auto Small Restore [${smallRestoreState ? 'ON' : 'OFF'}]`;localStorage.setItem('autoSmallRestore',smallRestoreState);}if(!validParse(localStorage.getItem('autoMineState'))){localStorage.setItem("autoMineState",false);}if(!validParse(localStorage.getItem('autoSellState'))){localStorage.setItem("autoSellState",false);}if(!validParse(localStorage.getItem('autoSmallRestore'))){localStorage.setItem("autoSmallRestore",false);}if(!validParse(localStorage.getItem('autoBuyThreshold'))){localStorage.setItem("autoBuyThreshold",0);}mineState=JSON.parse(localStorage.getItem('autoMineState'));autoSellState=JSON.parse(localStorage.getItem('autoSellState'));smallRestoreState=JSON.parse(localStorage.getItem('autoSmallRestore'));setThreshold=JSON.parse(localStorage.getItem('autoBuyThreshold'));functionvalidParse(key){try{if(key===null){thrownewError;}JSON.parse(key);returntrue;}catch(e){returnfalse;}}functionaddGlobalStyle(css){varhead,style;head=document.getElementsByTagName('head')[0];if(!head){return;}style=document.createElement('style');style.type='text/css';style.innerHTML=css;head.appendChild(style);}functionloadEpheniaScript(scriptName,initFunction,priorityFunction){functionreportScriptError(scriptName,error){console.error(`Error while initializing '${scriptName}' userscript:\n${error}`);Notifier.notify({type: NotificationConstants.NotificationOption.warning,title: scriptName,message: `The '${scriptName}' userscript crashed while loading. Check for updates or disable the script, then restart the game.\n\nReport script issues to the script developer, not to the Pokéclicker team.`,timeout: GameConstants.DAY,});}constwindowObject=!App.isUsingClient ? unsafeWindow : window;// Inject handlers if they don't exist yetif(windowObject.epheniaScriptInitializers===undefined){windowObject.epheniaScriptInitializers={};constoldInit=Preload.hideSplashScreen;varhasInitialized=false;// Initializes scripts once enough of the game has loadedPreload.hideSplashScreen=function(...args){varresult=oldInit.apply(this,args);if(App.game&&!hasInitialized){// Initialize all attached userscriptsObject.entries(windowObject.epheniaScriptInitializers).forEach(([scriptName,initFunction])=>{try{initFunction();}catch(e){reportScriptError(scriptName,e);}});hasInitialized=true;}returnresult;}}// Prevent issues with duplicate script namesif(windowObject.epheniaScriptInitializers[scriptName]!==undefined){console.warn(`Duplicate '${scriptName}' userscripts found!`);Notifier.notify({type: NotificationConstants.NotificationOption.warning,title: scriptName,message: `Duplicate '${scriptName}' userscripts detected. This could cause unpredictable behavior and is not recommended.`,timeout: GameConstants.DAY,});letnumber=2;while(windowObject.epheniaScriptInitializers[`${scriptName}${number}`]!==undefined){number++;}scriptName=`${scriptName}${number}`;}// Add initializer for this particular scriptwindowObject.epheniaScriptInitializers[scriptName]=initFunction;// Run any functions that need to execute before the game startsif(priorityFunction){$(document).ready(()=>{try{priorityFunction();}catch(e){reportScriptError(scriptName,e);// Remove main initialization functionwindowObject.epheniaScriptInitializers[scriptName]=()=>null;}});}}if(!App.isUsingClient||localStorage.getItem('enhancedautomine')==='true'){loadEpheniaScript('enhancedautomine',initAutoMine);}
Hello everyone,
I took the liberty to propose a version of the script Auto Mine compatible with version 0.10.23. This script is relatively simple and probably needs some optimization, but at least it works! It clicks on tiles that contain rewards using all available tools. Combined with automatic mine switching, it's very convenient!
Bye bye!
Activity
aheadfrogg commentedon Nov 14, 2024
Use the helpers?
K0STYURIK commentedon Nov 15, 2024
Helpers aren't automatically using battery (so not upgrading new Oak Item towards "Level all 12 Oak Items to maximum level" achievement).
Also, helpers using chisel, hammer, bomb and survey tools aren't count towards "Use chisel tool 1000 times", "Use hammer tool 2000 times", "Use bomb tool 5000 times", "Use survey tool 50 times", "Use any tool 10000 times" achievements.
So, without Enhanced Auto Mine it is near impossible to get 6 achievements.
Plus, unlike Hatchers and Farm hands, you can only use ONE mine helper at a time. So, even without achievements, using helpers just really SLOWER than using Enhanced Auto Mine
K0STYURIK commentedon Dec 7, 2024
I have some helper working in underground mine for a three weeks now (started with Steve and Alex, waited until they are at least at level 50, switched to Gemma, waited until she is at least at level 50, switched to Sharlene, waited until she is at least at level 50, switched to Jones, waited until he is at least at level 50, switched to Darwin, waited until he is lat least at evel 50, switched back to Steve and Alex, and they are currently at level 87), I don't even turn off my computer when I go to work, and my underground mine is still only at level 45. Without "Enhanced Auto Mine" it's borderline impossible to get an achievement "Reach Underground Level 50"
kosmirion-epos commentedon Jan 3, 2025
I am also a bit bummed, but I made my own thing, at least kind of. There's a reason the file is called stupidmine.js.
What this does is it waits 5 seconds on initial load and then spam clicks the first square in the list every 0.1s / 100ms with your selected tool, which in my case is the bomb. This works great as soon as your bomb has unlimited durability.
I tried several times to integrate this different approach for the new underground system classes into the existing ephenia script, especially to also get interactability, but didn't manage to do it.
I'm posting my approach in case it helps someone more accustomed to maybe update the script.
To activate the battery, the method should be
App.game.underground.battery.discharge()(at least that is what's bound to the button).If you want to use potions, I think only the part that tries to use them needs to be discarded, as the helpers use them automatically if you have it enabled. Just the buying part would be kept.
CptGryps commentedon Jan 12, 2025
You know what, this is perfect for me, so I'll take it. Thank you for sharing!
Ybanca commentedon Jan 17, 2025
Hello,
Does anyone have an alternate script that works ?
KissVeiL commentedon Feb 3, 2025
i think they still dont have the script, I am also waiting hehe
bsegault commentedon Feb 20, 2025
Hi,
Based on this thread, I worked on a prototype, here is the script itself. I think it can help to quickly update your underground level.
Features:
Limitations:
LysisLou-FR commentedon Jul 3, 2025
Hello everyone,
I took the liberty to propose a version of the script Auto Mine compatible with version 0.10.23. This script is relatively simple and probably needs some optimization, but at least it works! It clicks on tiles that contain rewards using all available tools. Combined with automatic mine switching, it's very convenient!
Bye bye!