Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Pokeclicker
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://www.pokeclicker.com/
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var toggleClick = false;
- var i;
- window.toggleClicker = function() {
- if (toggleClick) {
- document.getElementById("autoClick").style.color = 'red';
- clearInterval(i);
- toggleClick = false;
- } else if (!toggleClick) {
- document.getElementById("autoClick").style.color = 'black';
- i = setInterval(function(){
- if(App.game.gameState == 2){
- Battle.clickAttack();
- }
- else if(App.game.gameState == 3){
- GymBattle.clickAttack();
- }
- else if(App.game.gameState == 4){
- DungeonBattle.clickAttack();
- DungeonRunner.openChest();
- DungeonRunner.startBossFight();
- }
- },20);
- toggleClick = true;
- }
- }
- window.autoFarm = setInterval(function(){
- let count = App.game.farming.unlockedPlotCount();
- for(let p = 0;p < count; p++){
- if(App.game.farming.plotList[p].timeLeft <= 0 && App.game.farming.plotList[p].isUnlocked){
- App.game.farming.harvest(p,true);
- App.game.farming.plant(p,FarmController.selectedBerry);
- }
- }},500);
- window.autoEgg = setInterval(function(){
- for(let s = 0; s < App.game.breeding.eggSlots; s ++){
- if(App.game.breeding.eggList[s]().canHatch()){
- App.game.breeding.hatchPokemonEgg(s);
- }
- }
- for(let s = 0; s < App.game.breeding.eggSlots; s ++){
- if(!App.game.breeding.hasFreeEggSlot()){
- break;
- }
- else if(BreedingController.breedableList().length > 0){
- App.game.breeding.gainPokemonEgg(BreedingController.breedableList()[0]);
- break;
- }
- }
- },200);
- document.querySelector("div.col.no-gutters.clickable").parentNode.parentNode.parentNode.innerHTML += ('<button id="autoClick" style="color:red" onclick="toggleClicker()">"AutoClick"</button>');
- })();
Advertisement
Add Comment
Please, Sign In to add comment