/ ‘grepolis.user.js’

This commit is contained in:
Jan Bader 2014-06-06 22:50:05 +02:00
parent 6f3fd0714d
commit c87d2769bd

View File

@ -10,7 +10,7 @@
// //
// @match http://*.grepolis.com/game/* // @match http://*.grepolis.com/game/*
// //
// @version 1.0.51 // @version 1.0.52
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
// ==/UserScript== // ==/UserScript==
@ -102,6 +102,17 @@
return; return;
} }
var loots = $(wndElement).find("#farmtown_loot").children().last().text().split('/');
var loot_current = parseFloat(loots[0]);
var loot_maximum = parseFloat(loots[1]);
if(loot_current + 24*3 > loot_maximum) {
log("Wait 15:00 for Farm " + xFarmId + " to reset");
wnd.close();
timeout = 15 * 60 * 1000;
return;
}
getWaresFromFarm(wnd, mood, xFarmId); getWaresFromFarm(wnd, mood, xFarmId);
} finally { } finally {
setTimeout(getWaresTick(xFarmId), timeout); setTimeout(getWaresTick(xFarmId), timeout);