javascript: var cookieName = "akk";
function div(val, by) {
return (val - val % by) / by;
}
var lc = 0;
var coords = '449|568:160;450|568:84;450|567:491;';
var doc = document;
var url = document.URL;
if (url.search(/screen=place/) != -1 && url.search(/try=confirm/) === -1 && document.forms[0].x.value === "" && document.forms[0].y.value === "") {
if (window.frames.length > 0) {
doc = window.main.document;
}
url = document.URL;
if (url.indexOf('screen=place') == -1) {
alert('This script needs to be run from the rally point');
}
coords = coords.split(";");
var index = 0;
farmcookie = document.cookie.match('(^|
?' + cookieName + '
[^;]*)(;|$)');
if (farmcookie != null) {
index = parseInt(farmcookie[2]);
}
if (index >= coords.length) {
index = 0;
}
coords = coords[index];
lc = div(coords.split(':')[1] , 40);
if (lc < 1) lc = 1;
if (lc > 5) lc = 5;
coords = coords.split(':')[0].split("|");
index = index + 1;
cookie_date = new Date(2020, 12, 12);
document.cookie = cookieName + "=" + index + ";expires=" + cookie_date.toGMTString();
doc.forms[0].x.value = coords[0];
doc.forms[0].y.value = coords[1];
insertUnit(doc.forms[0].spear, 0);
insertUnit(doc.forms[0].sword, 0);
insertUnit(doc.forms[0].axe, 0);
insertUnit(doc.forms[0].spy, 0);
insertUnit(doc.forms[0].light, lc);
insertUnit(doc.forms[0].heavy,0);
insertUnit(doc.forms[0].ram, 0);
insertUnit(doc.forms[0].catapult, 0);
} end()