Greasy Fork

来自缓存

Greasy Fork is available in English.

Plant random berry and auto harvest - pokeclicker.com

Automatically plant and harvest berries.

当前为 2021-09-21 提交的版本,查看 最新版本

// ==UserScript==
// @name        Plant random berry and auto harvest - pokeclicker.com
// @namespace   Violentmonkey Scripts
// @match       https://www.pokeclicker.com/
// @grant       none
// @version     1.1
// @author      DrAK
// @description Automatically plant and harvest berries.
// ==/UserScript==

var whichBerry = Math.floor(Math.random() * 8);


function loopFarm() {
  var farmLoop = setInterval(function () {

    
for (let i = 0; i < 25; i++) {
App.game.farming.harvest(i, true);

if (i == 12) { 
  i++; 
App.game.farming.harvest(i, true);
}

whichBerry = Math.floor(Math.random() * 7.5);

if (whichBerry == 0) {
App.game.farming.plant(i, BerryType.Cheri, true);
} else if (whichBerry == 1) {
App.game.farming.plant(i, BerryType.Chesto, true);
} else if (whichBerry == 2) {
App.game.farming.plant(i, BerryType.Pecha, true);
} else if (whichBerry == 3) {
App.game.farming.plant(i, BerryType.Rawst, true);
} else if (whichBerry == 4) {
App.game.farming.plant(i, BerryType.Aspear, true);
} else if (whichBerry == 5) {
App.game.farming.plant(i, BerryType.Leppa, true);
} else if (whichBerry == 6) {
App.game.farming.plant(i, BerryType.Oran, true);
} else if (whichBerry == 7) {
App.game.farming.plant(i, BerryType.Sitrus, true);
} else {
App.game.farming.plant(i, BerryType.Sitrus, true);
}
  
} 


    
  }, 10000); // Every 10 seconds
}

loopFarm();