Lucibear

Untitled

Sep 22nd, 2020 (edited)
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Pokeclicker
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://www.pokeclicker.com/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var toggleClick = false;
  14. var i;
  15. window.toggleClicker = function() {
  16. if (toggleClick) {
  17. document.getElementById("autoClick").style.color = 'red';
  18. clearInterval(i);
  19. toggleClick = false;
  20. } else if (!toggleClick) {
  21. document.getElementById("autoClick").style.color = 'black';
  22. i = setInterval(function(){
  23. if(App.game.gameState == 2){
  24. Battle.clickAttack();
  25. }
  26. else if(App.game.gameState == 3){
  27. GymBattle.clickAttack();
  28. }
  29. else if(App.game.gameState == 4){
  30. DungeonBattle.clickAttack();
  31. DungeonRunner.openChest();
  32. DungeonRunner.startBossFight();
  33. }
  34. },20);
  35. toggleClick = true;
  36. }
  37. }
  38. window.autoFarm = setInterval(function(){
  39. let count = App.game.farming.unlockedPlotCount();
  40. for(let p = 0;p < count; p++){
  41. if(App.game.farming.plotList[p].timeLeft <= 0 && App.game.farming.plotList[p].isUnlocked){
  42. App.game.farming.harvest(p,true);
  43. App.game.farming.plant(p,FarmController.selectedBerry);
  44. }
  45. }},500);
  46. window.autoEgg = setInterval(function(){
  47. for(let s = 0; s < App.game.breeding.eggSlots; s ++){
  48. if(App.game.breeding.eggList[s]().canHatch()){
  49. App.game.breeding.hatchPokemonEgg(s);
  50. }
  51. }
  52. for(let s = 0; s < App.game.breeding.eggSlots; s ++){
  53. if(!App.game.breeding.hasFreeEggSlot()){
  54. break;
  55. }
  56. else if(BreedingController.breedableList().length > 0){
  57. App.game.breeding.gainPokemonEgg(BreedingController.breedableList()[0]);
  58. break;
  59. }
  60. }
  61. },200);
  62. document.querySelector("div.col.no-gutters.clickable").parentNode.parentNode.parentNode.innerHTML += ('<button id="autoClick" style="color:red" onclick="toggleClicker()">"AutoClick"</button>');
  63. })();
Advertisement
Add Comment
Please, Sign In to add comment