From 8a2e73d09ec9ed2c0e963f61703876313fc66007 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Thu, 7 Aug 2014 21:13:34 +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 | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/grepolis.user.js b/grepolis.user.js index fabd478..131776d 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -10,7 +10,7 @@ // // @match http://*.grepolis.com/game/* // -// @version 1.1.37 +// @version 1.1.38 // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // ==/UserScript== @@ -95,7 +95,6 @@ var choose = $("#choosefarmduration")[0]; choose.onchange = function() { farmDuration = this.value; - log("Duration changed to: " + farmDuration); } }, 15000); @@ -118,11 +117,10 @@ return function() { var timeout = 60000; try { - var amounts = $.map($(".indicator .amount"),function(v){return $(v).text()}).join(", "); - if(amounts != lastAmounts) { - log(amounts); - lastAmounts = amounts; - } + // var amounts = $.map($(".indicator .amount"),function(v){return $(v).text()}).join(", "); + // if(amounts != lastAmounts) { + // lastAmounts = amounts; + // } var windowId = windows[xFarmId]; if(windowId == undefined){ @@ -161,10 +159,7 @@ var hours = ts.substring(0,1); var minutes = ts.substring(2,4); var seconds = hours * 60 * 60 + minutes * 60 + ts.substring(5,7) * 1; - - log("Wait " + ts + " for Farm " + xFarmId); wnd.close(); - timeout = seconds * 1000 + 1000; return; } @@ -174,9 +169,7 @@ var loot_maximum = parseFloat(loots[1]); var count_per_loot = parseFloat($(wndElement).find(".farm_claim_res0").text()); if(loot_current + count_per_loot*3 > loot_maximum) { - log("Wait 15:00 for Farm " + xFarmId + " to reset"); wnd.close(); - timeout = 15 * 60 * 1000; return; } @@ -196,14 +189,14 @@ var town = ITowns.getTown(xTownId); if(town.getCastedPower("forced_loyalty")) { - log("Plündere " + xFarmId + " @ forced_loyalty "); + // log("Plündere " + xFarmId + " @ forced_loyalty "); xWindow.call('claimLoad', xFarmId.toString(), 'double', farmDuration); } else if(xMood-6 > 80) { - log("Plündere " + xFarmId + " @ Mood: " + xMood); + // log("Plündere " + xFarmId + " @ Mood: " + xMood); xWindow.call('claimLoad', xFarmId.toString(), 'double', 300); return 300; } else { - log("Fordere " + xFarmId + " @ Mood: " + xMood); + // log("Fordere " + xFarmId + " @ Mood: " + xMood); xWindow.call('claimLoad', xFarmId.toString(), 'normal', farmDuration); } return farmDuration;