From 4135e1bfefdd5176ce4045634887e9901fef9095 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 4 Jun 2014 12:16:31 +0200 Subject: [PATCH] =?UTF-8?q?/=20=E2=80=98grepolis.user.js=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grepolis.user.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/grepolis.user.js b/grepolis.user.js index a7d5252..a73fde0 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -10,7 +10,7 @@ // // @match http://*.grepolis.com/game/* // -// @version 1.0.25 +// @version 1.0.26 // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // ==/UserScript== @@ -90,16 +90,17 @@ } function getWares(xGetWaresButton, xMood) { - console.log("Getting wares @ Mood: " + xMood); farm_ids.forEach(function(xFarmId) { getWaresFromFarm(xGetWaresButton, xMood, xFarmId); }); } - function getWaresFromFarm(xGetWaresButton, xFarmId, xMood) { + function getWaresFromFarm(xGetWaresButton, xMood, xFarmId) { if(xMood > 80) { + console.log("Plündere " + xFarmId + " @ Mood: " + xMood); w(xGetWaresButton).call('claimLoad', xFarmId.toString(), 'double', 300); } else { + console.log("Fordere " + xFarmId + " @ Mood: " + xMood); w(xGetWaresButton).call('claimLoad', xFarmId.toString(), 'normal', 300); } }