DeletedUser
Guest
[SPOIL]javascript:
(function(d, w) {
var v = d.getElementById('production_table'),
a = [];
if(v === null || v === undefined) {
if(!d.URL.match(/clay=/) && !d.URL.match(/confirm_send/))
return w.location.href = game_data.link_base_pure +'overview_villages&mode=prod';
var r = d.forms[0], t = 0;
d.URL.split("&").forEach(function(e) {
a = e.split("=");
if(a[0] == 'clay') a[0] = 'stone';
if(r[a[0]] !== undefined) {
insertNumber(r[a[0]], parseInt(a[1], 10));
t += a[1];
}
});
return (t > 0 || r.id === 'market-confirm-form') ? r.submit() : false;
}
var s = d.URL.match(/t=\d+/) || "sitter",
c = [],
l, u,
p = w.open('', '_blank');
for(var j = 1; j < v.rows.length; j++) {
l = v.rows[j].cells;
u = l[1].getElementsByTagName('a')[0];
c[0] = u.textContent.trim() +' ';
c[1] = u.href.match(/village=\d+/)[0].split('=')[1];
c[2] = c[0].match(/\d+\|\d+/);
t = l[3].textContent.split(/\s/);
for(var z = 3; z < 6; z++)
c[z] = t[z - 3].replace('.', '');
c[6] = l[5].textContent.split('/')[0];
c[7] = l[4].textContent;
/*t = l[6].textContent.split('/');
c[8] = t[1] > 24000 ? t[0] - t[1] + 24000 : t[0];*/
a.push(c.join("\^ "));
}
var h = '<!DOCTYPE HTML><html><head><title>TW Res Balancer</title></head><body onload="window.focus()"><form action="http/www.extremetw.com/cgi-bin/ResourceBalancer.py" method="post"><textarea name="input" rows="14" cols="60">'+ a.join("\& ") +'</textarea><br><input type="hidden" name="server" value="'+ d.URL.split("/")[2] +'"><input type="submit" value="Submit">'+ (s != "sitter" ? '<input type="hidden" name="sitter" value="'+ s +'&">' : '') +'<h3>Nastavení:</h3>Maximální vzdálenost:<br><select name="maxFields">';
[0,25,50,100,200,300,500].forEach(function(e) {
h += '<option value="'+ e +'">'+ (e > 0 ? e : 'Bez omezení') +'</option>';
});
h += '</select><br>Poslat přebytečné suroviny:<br><input type="checkbox" name="extra" value="True"> (pošle suroviny vesnicím bez selského dvora na úrovni 30)<br>Ponechat sruoviny:';
['wood','clay','iron'].forEach(function(e) {
h += '<br><select id="'+ e +'_select" name="'+ e +'"><option value="0">Žádné</option>';
for(var j = 50; j <= 400; j += 50)
h += '<option value="'+ j +'000">'+ j +' 000</option>';
h += '</select>';
});
h += '</body></html>';
p.document.write(h);
p.document.close();
})(document, window);[/SPOIL]
Tak tady máš to balancování surek. Není zač :cool
[SPOIL]No dobře, tak jsem ho jen našel ardon[/SPOIL]
(function(d, w) {
var v = d.getElementById('production_table'),
a = [];
if(v === null || v === undefined) {
if(!d.URL.match(/clay=/) && !d.URL.match(/confirm_send/))
return w.location.href = game_data.link_base_pure +'overview_villages&mode=prod';
var r = d.forms[0], t = 0;
d.URL.split("&").forEach(function(e) {
a = e.split("=");
if(a[0] == 'clay') a[0] = 'stone';
if(r[a[0]] !== undefined) {
insertNumber(r[a[0]], parseInt(a[1], 10));
t += a[1];
}
});
return (t > 0 || r.id === 'market-confirm-form') ? r.submit() : false;
}
var s = d.URL.match(/t=\d+/) || "sitter",
c = [],
l, u,
p = w.open('', '_blank');
for(var j = 1; j < v.rows.length; j++) {
l = v.rows[j].cells;
u = l[1].getElementsByTagName('a')[0];
c[0] = u.textContent.trim() +' ';
c[1] = u.href.match(/village=\d+/)[0].split('=')[1];
c[2] = c[0].match(/\d+\|\d+/);
t = l[3].textContent.split(/\s/);
for(var z = 3; z < 6; z++)
c[z] = t[z - 3].replace('.', '');
c[6] = l[5].textContent.split('/')[0];
c[7] = l[4].textContent;
/*t = l[6].textContent.split('/');
c[8] = t[1] > 24000 ? t[0] - t[1] + 24000 : t[0];*/
a.push(c.join("\^ "));
}
var h = '<!DOCTYPE HTML><html><head><title>TW Res Balancer</title></head><body onload="window.focus()"><form action="http/www.extremetw.com/cgi-bin/ResourceBalancer.py" method="post"><textarea name="input" rows="14" cols="60">'+ a.join("\& ") +'</textarea><br><input type="hidden" name="server" value="'+ d.URL.split("/")[2] +'"><input type="submit" value="Submit">'+ (s != "sitter" ? '<input type="hidden" name="sitter" value="'+ s +'&">' : '') +'<h3>Nastavení:</h3>Maximální vzdálenost:<br><select name="maxFields">';
[0,25,50,100,200,300,500].forEach(function(e) {
h += '<option value="'+ e +'">'+ (e > 0 ? e : 'Bez omezení') +'</option>';
});
h += '</select><br>Poslat přebytečné suroviny:<br><input type="checkbox" name="extra" value="True"> (pošle suroviny vesnicím bez selského dvora na úrovni 30)<br>Ponechat sruoviny:';
['wood','clay','iron'].forEach(function(e) {
h += '<br><select id="'+ e +'_select" name="'+ e +'"><option value="0">Žádné</option>';
for(var j = 50; j <= 400; j += 50)
h += '<option value="'+ j +'000">'+ j +' 000</option>';
h += '</select>';
});
h += '</body></html>';
p.document.write(h);
p.document.close();
})(document, window);[/SPOIL]
Tak tady máš to balancování surek. Není zač :cool
[SPOIL]No dobře, tak jsem ho jen našel ardon[/SPOIL]