diff --git a/grepolis.user.js b/grepolis.user.js index cdc5f56..20fe945 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -10,7 +10,7 @@ // // @match http://*.grepolis.com/game/* // -// @version 1.0.53 +// @version 1.0.57 // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // ==/UserScript== @@ -19,7 +19,8 @@ lastAmounts = ""; console.log("Initializing..."); windows = {}; - farm_ids = [1225, 1226, 1228, 1229, 1230, 1231]; + //farm_ids = [1225, 1226, 1228, 1229, 1230, 1231]; + farm_ids = [20466, 20472, 20471]; farm_ids.forEach(function(xFarmId) { console.log("Setting timer to 5s for Farm " + xFarmId); setTimeout(getWaresTick(xFarmId), 5000); @@ -49,6 +50,14 @@ logWindowElement.scrollTop(logWindowElement[0].scrollHeight); } + function rand(min, max) { + return Math.floor((Math.random() * (max-min) * 1000) + min * 1000); + } + + function rand(max) { + return Math.floor((Math.random() * max * 1000)); + } + setTimeout(getWaresTick, 5000); function getWaresTick(xFarmId) { return function() {