javascript:var scouts=1;var config={victim:'FARMS',trainSize:1,units:{ram:0,catapult:0,spear:0,sword:0,axe:0,archer:0,light:10,marcher:0,heavy:0},cookieID:'fake'};var targets='608|602 607|602 606|602 605|602 605|603 605|601 607|601 608|601 607|600 607|605 608|605 610|604 611|603 611|602 611|601 609|607 610|606 610|605 611|605 605|606 604|606 607|608 609|607 607|607';if(targets.replace(/^\s\s*/,'').replace(/\s\s*$/,'')===''){throw('There are no Targets');}var coords=targets.split(' ');function escapeStr(text){var specials=['/','.',',','~','`','@','#','%','-','_','*','+','?','|','$','=',':','!','^','<','>','(',')','[',']','{','}','\\'];var sRE=new RegExp('(\\'+specials.join('|\\')+')','g');return text.replace(sRE,'\\$1');}function zeroPad(number,length){var n=number.toString();while(n.length<length){n='0'+n;}return n;}function fnWriteCookie(index){var cookie_date=new Date(2099,11,11);eleDoc.cookie=vWorld+'$'+config.victim+'$'+config.cookieID+'='+(index+1)+';expires='+cookie_date.toGMTString();}function fnAssignUnits(index,isManualReset){if((index<0)||(index>=coords.length)){index=0;if(eleDoc.fakeSequence==1){alert('cycle restarted');}}eleDoc.getElementById('fake_combo').selectedIndex=index;var villa=coords[index].match(/(\d+)\|(\d+)/);if(!isManualReset&&(eleDoc.fakeSequence<config.trainSize)){eleDoc.fakeSequence++;}else{eleDoc.fakeSequence=(isManualReset?2:1);fnWriteCookie(isManualReset?index-1:index);}var eleForm=eleDoc.getElementById('units_form');eleForm.x.value=villa[1];eleForm.y.value=villa[2];var win=(window.frames.length>0)?window.main:window;win.$("input[class=unitsInput]").attr("value","0");var count;if(scouts>0){count=parseInt(eleForm.spy.nextSibling.nextSibling.innerHTML.match(/\d+/));if(count>0){eleForm.spy.value=Math.min(scouts,count);}}for(var unit in config.units){if(config.units.hasOwnProperty(unit)){if((config.units[unit]>0)&&(typeof(eleForm[unit])!="undefined")){count=parseInt(eleForm[unit].nextSibling.nextSibling.innerHTML.match(/\d+/));if(count>0){eleForm[unit].value=Math.min(config.units[unit],count);break;}}}}}try{var eleDoc=(window.frames.length>0)?window.main.document:document;if(typeof(eleDoc.fakeSequence)=='undefined'){eleDoc.fakeSequence=1;}var scrape,vScreen=(scrape=eleDoc.URL.match(/\&screen=(\w+)/i))?scrape[1]:null;var vWorld=(scrape=eleDoc.URL.match(/\/\/(\w+)\./i))?scrape[1]:null;var village=eleDoc.getElementsByTagName('title')[0].innerHTML.match(/\(\d+\|\d+\)/);if(vScreen=='place'){var index=0;var twCookie=eleDoc.cookie.match('[^|;]s?'+escapeStr(vWorld+'$'+config.victim+'$'+config.cookieID+'=')+'([^;]*)[;|$]');if(twCookie){index=parseInt(twCookie[1],10);}if(!eleDoc.getElementById('fake_combo')){var eleInputs=eleDoc.getElementsByTagName('input');if(eleInputs){for(var ii=0;ii<eleInputs.length;ii++){if(eleInputs[ii].name=='support'){var optionList='';for(var jj=0;jj<coords.length;jj++){optionList+='<option>'+zeroPad(jj+1,4)+':'+coords[jj]+'</option>';}eleInputs[ii].parentNode.parentNode.innerHTML+='<TD rowspan="2"><div id="fakes"><table class="main"><tr><td id="fake_content_value"><span style="font-weight:bold">Current Target:</span><select id="fake_combo" name="fake_combo" size="1" onchange="fnAssignUnits(this.selectedIndex,true);">'+optionList+'</select><span style="font-weight:100;font-style:italic;text-decoration:none;font-size:x-small;"><a href="http://www.crosstrigger.com" target="_blank"> by dalesmckay</a></span></td></tr></table></div></TD>';break;}}}}fnAssignUnits(index,false);}else{throw('Run from the Rally point');}void(0);}catch(objErr){alert(objErr);}