/ ‘grepolis.user.js’

This commit is contained in:
Jan Bader 2014-06-14 22:19:40 +02:00
parent e37b07ae05
commit d7681616e8

View File

@ -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() {