You are on page 1of 2

javascript: var cookieName="sat1";

var sp=0;
var sw=0;
var ax=0;
var scout=0;
var lc=10;
var hv=0;
var cat=0;
var ra=0;
var coords='549|354 546|352 546|356
357 551|360 543|359 546|347 546|361
363 558|351 558|357 540|347 537|352
346 560|359 549|341 535|352 549|340
354 546|339 535|346 560|364 561|363
367 559|339';
var doc=document;
var url=document.URL;

550|357
557|354
553|364
538|344
537|366

549|350
549|363
555|345
534|356
535|364

552|352
546|363
550|342
536|362
561|364

545|350
539|357
536|357
552|368
538|367

551|348
558|353
552|342
548|339
557|368

542|
543|
538|
533|
537|

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];
coords=coords.split("|");
index=index+1;
cookie_date=new Date(2019,11,11);
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,sp);
insertUnit(doc.forms[0].sword,sw);
insertUnit(doc.forms[0].axe,ax);
insertUnit(doc.forms[0].spy,scout);
insertUnit(doc.forms[0].light,lc);
insertUnit(doc.forms[0].heavy,hv);
insertUnit(doc.forms[0].ram,ra);
insertUnit(doc.forms[0].catapult,cat);
document.forms[0].attack.click();

}
else if(url.search(/screen=place/)!= -1 && url.search(/try=confirm/)===-1 && par
seInt(doc.forms[0].x.value)>0 && parseInt(doc.forms[0].x.value)<999 && parseInt(
doc.forms[0].y.value)>0 && parseInt(doc.forms[0].y.value)<999)
{
document.forms[0].attack.click();
}
else if(url.search(/screen=place/)!= -1 && url.search(/try=confirm/)!=-1)
{
document.forms[0].submit.click();
}
end();

You might also like