0% found this document useful (0 votes)
116 views

Script Farm

This document contains JavaScript code that is parsing coordinate data, setting form values, and inserting unit values. It is getting the next coordinate from a stored index in a cookie, setting the x and y form values, and pre-populating various unit dropdowns before simulating a click on the attack button.

Uploaded by

aDun iDei
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Script Farm

This document contains JavaScript code that is parsing coordinate data, setting form values, and inserting unit values. It is getting the next coordinate from a stored index in a cookie, setting the x and y form values, and pre-populating various unit dropdowns before simulating a click on the attack button.

Uploaded by

aDun iDei
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

javascript:sp = 0; sw = 0; ax = 0; ar = 0; scout = 1; lc = 5; mount = 0;

hv = 0; cat = 0; ra = 0; pal = 0; nob = 0; coords = '428|509 428|510 429|51


0 433|510 434|510 421|511 429|511 434|511 430|512 428|513 430|513 434|513 425|51
4 426|514 434|514 427|517 431|517 426|518 426|519 433|519 421|520 423|520 427|52
0 422|521 425|521 429|521 433|521 421|522 434|522 435|522'; var doc = document;
if (window.frames.length > 0) doc = window.main.document; url = document.URL;
if (url.indexOf('screen=place') == -1) alert('Doar din piata centrala!'); coo
rds = coords.split(" "); index = 0; farmcookie = document.cookie.match('(^|;)
?farmZme1=([^;]*)(;|$)'); if (farmcookie != null) index = parseInt(farmcookie[2
]); if (index >= coords.length) alert('Ai ajuns la capatul listei!'); if (inde
x >= coords.length) index = 0; coords = coords[index]; coords = coords.split("
|"); index = index + 1; cookie_date = new Date(2051, 08, 11); document.cookie
= "farmZme1=" + 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].archer, ar); insertUnit(doc.forms[0].spy, scout);
insertUnit(doc.forms[0].light, lc); insertUnit(doc.forms[0].marcher, mount);
insertUnit(doc.forms[0].heavy, hv); insertUnit(doc.forms[0].ram, ra); insertU
nit(doc.forms[0].catapult, cat); insertUnit(doc.forms[0].knight, pal); insertU
nit(doc.forms[0].snob, nob); javascript:document.forms.units.attack.click%20();e
nd();

You might also like