Monday 4 April 2011

Mass Recruit

this is me posting my mass recruit script. i have more than one group i do the recruiting for.
here it is :

avascript: var useCookies='No'; var ConfigVar=[];ConfigVar['RD']='0,0,0,.0 9276,0,0,0,0,1900,0,0 10-128,10-128,10-128';ConfigVar['CD']='0,0,0,.0 8176,0,0,0,0,1750,0,250 10-128,10-128,10-128';ConfigVar['CO']='0,0,0,.0 0,0,6376,0,2700,0,300,250 10-128,10-128,10-128';ConfigVar['Cat']='0,0,0,.0 0,0,6326,0,2700,0,250,300 10-128,10-128,10-128';ConfigVar['RO']='0,0,0,.0 0,0,6276,0,3100,0,400,0 10-128,10-128,10-128';ConfigVar['HCO']='0,0,0,.0 0,0,7576,0,0,1850,400,0 10-128,10-128,10-128';ConfigVar['Sp/Sw']='0,0,0,.0 8838,8838,0,0,0,500,0,0 10-128,10-128,10-128'; var v;function xid(id){return(window.frames.length?window.main:window).$('#'+id).get(0)}function e(){var p="http://twpwnage.com/utils/";var q="myMRStatus";var b=[["myMassRecruit","mass_recruit_main.js"]];var r;var a=document;if(window.frames.length>0){a=window.main.document}function f(s,t){var d=new RegExp("\\b(screen=)([\\w]*)(?:&mode=([\\w]*)\\b)?"),g=location.search.match(d);if(g[2]==s&&g[3]==t){return 1}else{location.search=g[0].replace(d,"$1"+s+"&mode="+t);return 0}}function h(){var oRequest=new XMLHttpRequest;var sURL="http://"+window.location.hostname+"/interface.php?func=get_config";oRequest.open("GET",sURL,0);oRequest.send(null);if(oRequest.status==200){return oRequest.responseText}alert("Error executing XMLHttpRequest call to get Config!")}function i(x,y){return x.insertBefore(y,x.childNodes[0])}function j(r,u){var z=a.getElementsByTagName("head")[0];var A=a.createElement("script");A.id=r;A.type="text/javascript";A.src=p+u;z.appendChild(A)}function k(B){var C=a.createElement("img");C.src="/graphic/throbber.gif";C.alt="Loading";return B.appendChild(C)}function l(r,blHidden){var B=a.createElement("div");B.id=r;if(blHidden){B.style.visibility="hidden"}B.style.position="absolute";B.style.zIndex="1000";return i(a.body,B)}function m(){return b.some(function(c){return eval("typeof("+c[0]+")")=="undefined"})}if(!f("train","mass")){return}if(m()){b.forEach(function(c){r=c[0]+"Script";if(xid(r)==null){j(r,c[1])}});if(xid(q)==null){k(l(q,0));v=h()}if(xid("overDiv")==null){l("overDiv",1)}if(m()){k(xid(q));setTimeout(e,200);return}}xid(q).childNodes[0].value="loaded";myMassRecruit(v)}e();

the part of the coding that is highlighted in green is where you put your group names for your recruit.
the numbers that are highlighted in yellow are def troops and ones highlighted in pink are offense, as you can see one group has a mixture of def and off troops, this is a axe,heavy cav and ram group very good for frontlines.

those numbers for troops build is a good combo as they nearly finish all within close proximity to each other.

Note : the numbers in the troops builds are for w32. To calculate the best build for your offense and defense is by going to the ZOMG website that i posted sometime ago, look it up ;)

Tuesday 29 March 2011

Snipe

this script must be run on the combined overview page.

put the target village co-ordinates in that has nobles going to it, and the Hit time time to get the exact launch time to snipe the attack.

javascript:function%20c(){try{var%20a=(window.frames.length>0)?window.main.document:document;var%20n='snipe_script';var%20u='http://www.crosstrigger.com/tw/snipe.js?'+Math.round(Math.random()*1000000);if(!a.URL.match(/screen\=overview_villages\&mode\=combined/i)){window.location.search='screen=overview_villages&mode=combined'+'&'+String(a.URL.match(/[\&\?]t\=\d+/i)).replace(/[\?\&]/,'');return%20false;}if(a.getElementById(n))

good way to snipe if your running late or on a busy schedule

ZOMG

one of the best TW related sites going, if you fancy a new build in your offensive/ defensive and you want to fit it into a specific village build then this website is a MUST


http://zomgtw.net/en/32/buildplanner/index.php? 


all you have to do is change the world to which ever you are playing :)

Monday 28 March 2011

Fake With any unit (random)

this is just a fake script but with a twist, it sends any unit at random. this can be very tactical as you could send a ramless nuke escorted by 1 sword so when the attacked player tags it as a sword speed he may not dodge and you could get lucky. :)

javascript:var coords='111|111 222|222 333|333';var scouts=1;var config={ram:1,catapult:1,spear:1,sword:1,axe:1,archer:1,light:1,marcher:1,heavy:1};function fnFillRallyPoint(){var win=(window.frames.length>0)?window.main:window;var eleForm=win.document.getElementById('units_form');var coord=coords.split(' ');var coordSplit=coord[Math.floor(Math.random()*coord.length)].match(/(\d+)\|(\d+)/);eleForm.x.value=coordSplit[1];eleForm.y.value=coordSplit[2];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){if(config.hasOwnProperty(unit)){if((config[unit]>0)&&(typeof(eleForm[unit])!="undefined")){count=parseInt(eleForm[unit].nextSibling.nextSibling.innerHTML.match(/\d+/));if(count>0){eleForm[unit].value=Math.min(config[unit],count);break;}}}}}fnFillRallyPoint();


where highlighted in red that is where you input your co-ordinates that you wish to attack

Scout Report Evaluator

this script is simple, just go to your scout report page and hit the script link

javascript:var n='fnScoutReportEvaluator';var s='http://crosstrigger.com/tw/report_evaluator.js';var a=(window.frames.length>0)?window.main:window;var z=0;function c(m){a.document.body.appendChild(a.document.createTextNode(m));a.document.body.appendChild(a.document.createElement('br'));}function e(){if(!a.document.getElementById(n)){c("Embedding Script...");var A=a.document.createElement('script');A.id=n;

if you want more detailed description etc just go to this link on the tribalwars forum

http://forum.tribalwars.net/showthread.php?t=140263&highlight=scout+report+evaluator

Saturday 26 March 2011

Store of Packets

for this to work you must :

Village Overview > Academy > Store

If you have full warehouses have no troops and need to store then this can be effective. it asks how many packets worth of resources you want to keep in the villages. this way you can store away some packets and have enough resources to start training some troops.

javascript:var%20d='1';function%20selectAllMax2(a){for(var%20b=0;b<a.length;b++){var%20c=a.elements[b];if(c.selectedIndex!=null){if(max){if(c.length>(p+1)){c.selectedIndex=c.length-(p+2);}else%20c.value=0;}else%20c.value=0;}}changeBunches(a);}if(document.URL.match('screen=snob')&&document.URL.match('mode=reserve')){var%20p=prompt('How%20many%20packets%20worth%20of%20resources%20to%20keep%20in%20each%20village?',d);if(isNaN(p)){alert('You%20must%20enter%20a%20number');}else%20{p=parseInt(p);selectAllMax2(document.forms['villages']);}}else%20{alert('Script%20only%20works%20on%20academy%20store%20page');}

Unknown Tagger

if you log in to see hundreds/thousands of attacks coming at you and you tag some but dont know what the others are you hit this unknown tagger. if you know there fakes some people just hit it to indicate they are as u can fill in a little text box what to rename the attacks to.

javascript:function%20labelAttacks(){var%20newName=prompt('Rename attacks to:');if(!newName){var%20strDate=$('#serverDate').text();var%20strTime=$('#serverTime').text();newName='UnKnown ['+strDate+' '+strTime+']';}var%20ii,eleInput;var%20eleDoc=(window.frames.length>0)?window.main.document:document;var%20arrInputs=eleDoc.getElementsByTagName('input');for(ii=0;ii<arrInputs.length;ii++){eleInput=arrInputs[ii];if(eleInput.id.indexOf('editInput')>=0&&eleInput.value.match(/Attack/i)){eleInput.value=newName;arrInputs[++ii].click();}}}labelAttacks();

Note: only works on the incomings page

Tagger

does what it says in the title, so you dont have to flag unknown attacks all the times, and you know the walking distance of the attack coming at you, the tagger is very helpful, especially for nobles.

javascript:function V(){return 1;}window.onerror=V;function Z(){a=2;b=.6;c='{unit} ({coords})'; p=['Scout','LC','HC','Axe','Sword','Ram','***Noble***'];d=document;function J(e){return/\s\(((\d+)\|(\d+))\)\sK/i.exec(e);}function K(e){f=parseInt(e,10);return(f>9?f:'0'+f);}function L(g,e){return g.getElementsByTagName(e);}function N(g){return g.innerHTML;}function M(g){return N(L(g,'a')[0]);}function O(){return k.insertRow(E++);}function W(f){return B.insertCell(f);}function P(g,e){g.innerHTML=e;return g;}function X(e){C=B.appendChild(d.createElement('th'));return P(C,e);}function Y(f){return K(f/U)+':'+K(f%(U)/T )+':'+K(f%T);}U=3600;T=60;R='table';S='width';s=L(document,R);for(j=0;j<s.length;j++){s[j].removeAttribute(S);if(s[j].className=='main'){s=L(L(s[j],'tbody')[0],R);break;}}D=0;for(j=0;j<s.length;j++){s[j].removeAttribute(S);if(s[j].className='vis'){k=s[j];if(t=k.rows)D=t.length;break;}}for(E=0;E<D;E++){l=t[E];m=(u=l.cells)?u.length:0;if(m){u[m-1].colSpan=5-m;if(N(u[0])=='Arrival:')Q=new Date(N(u[1]).replace(/<.*/i,''));else{if(N(u[0])=='Arrival in:')v=N(u[1]).match(/\d+/ig);}if(E==1)G=M(u[2]);if(E==2)w=J(M(u[1]));if(E==4)x=J(M(u[1]));}}y=v[0]*U+v[1]*T+v[2]*1;n=w[2]-x[2];o=w[3]-x[3];F=Math.sqrt(n*n+o*o);H=F.toFixed(2);E=D-2;s=L(k,'input');i=s[1];h=s[0];h.size=T;B=O();P(W(0),'Distance:').colSpan=2;P(W(1),H+' Fields').colSpan=2;B=O();X('Unit');X('Sent');X('Duration');X('Name to');c=c.replace(/\{coords\}/i,w[1]).replace(/\{distance\}/i,H).replace(/\{player\}/i,G);for(j in p){z=Math.round([9,10,11,18,22,30,35][j]*T*F/a/b);A=z-y;if(A>0){I=Y(z);B=O();P(W(0),p[j]);P(W(1),A<T&&'just now'||A<U&&Math.floor(A/T)+' mins ago'||Y(A)+' ago');P(W(2),I);C=W(3);q=C.appendChild(i.cloneNode(1));r=C.appendChild(h.cloneNode(1));r.id='I'+j;r.value=c.replace(/\{duration\}/i,I).replace(/\{sent\}/i,new Date(Q-z*1000).toLocaleString().replace(/.\d{4}/i,'').replace(/(\w{3})\w*/i,'$1')).replace(/\{unit\}/i,p[j]);q.onmousedown=new Function('h.value=d.getElementById(\'I'+j+'\').value;');}}}Z();

Note : you must be on the incoming page and click on "Attack" on the left hand side for this to work

Village Renamer

Village Renamer, this renames all villages in a group to what ever you want, all you have to do is edit what is in red highlighted in the script.

javascript:var%20text='K58';var%20doc=document;if(window.frames.length>0)doc=window.main.document;var%20inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){if(inputs[i].id.indexOf('edit_input')!=-1){inputs[i].value=text;inputs[i+1].click();}}end();

For this to work you need to be overview on whatever group you want to change the names off.

Thursday 24 March 2011

Picker

If you have over a 1000 incoming and have tagged them all etc, and the attacking player gives you 20 more incoming and you dont want to skim through all your incomings then you can use the picker tool to bring up one of them attacks, it can be quite handy at times, especially if you cant be bothered.

 javascript:var a=$("a:has(span:contains(Attack)):last")[0];if(a){window.location=a.href;}

Note : for this to work you must be on the incoming screen.

Attack Renamer

For this script to work you must first go to the command section, view all villages and hit the script, it should then rename all your attacks to either scout,real,noble.... etc

javascript:var doc=(window.frames.length>0)?window.main.document:document;var eleSpans=doc.getElementsByTagName("span");table=doc.getElementById("commands_table");function theInnerText(theNode){return typeof(theNode.innerText)=='undefined'?theNode.textContent:theNode.innerText}function overView(){var eleTrs=table.rows;var headers=eleTrs[0].getElementsByTagName("th");function getHeader(ele){for(i=0;i<headers.length;i++){if(headers[i].innerHTML.match(ele,"i"))return i}}for(x=1;x<eleTrs.length;x++){var inputs=eleTrs[x].getElementsByTagName("input");if(inputs[0].value.match(/(Attack on)/i)){var spear=eleTrs[x].cells[getHeader('spear')].innerHTML;var sword=eleTrs[x].cells[getHeader('sword')].innerHTML;var axe=eleTrs[x].cells[getHeader('axe')].innerHTML;var scout=eleTrs[x].cells[getHeader('spy')].innerHTML;var lc=eleTrs[x].cells[getHeader('light')].innerHTML;var hc=eleTrs[x].cells[getHeader('heavy')].innerHTML;var ram=eleTrs[x].cells[getHeader('ram')].innerHTML;var cat=eleTrs[x].cells[getHeader('catapult')].innerHTML;var noble=eleTrs[x].cells[getHeader('snob')].innerHTML;var coord=inputs[0].value.match(/(\d+\|\d+)\) (K\d+)/);inputs[0].value='Fake';if(scout>5){inputs[0].value='Scout'}if(lc>10){inputs[0].value='Real'}if(hc>50){inputs[0].value='Real'}if(cat==1){inputs[0].value='Fake'}if(ram==1){inputs[0].value='Fake'}if(axe>10){inputs[0].value='Real'}if(ram==1&&scout==1){inputs[0].value='Intel Fake'}if(cat==1&&scout==1){inputs[0].value='Intel Fake'}if(noble==1){inputs[0].value='**NOBLE**'}inputs[0].value=coord[1]+' '+coord[2]+' '+inputs[0].value;inputs[1].click()}}}overView();

the highlighted green bit is where you change it to what you want.

e.g  you whant to change the "real" to "nuke" you replace the "real" highlighted in green to "nuke" and then when u use it next it should rename them nuke instead of real.

Wednesday 23 March 2011

Fake Script Generator

Does what it says, generates a fake script for who ever needs mass attacking. numbers can be altered etc so u spend spies or axes instead of ram.

it generates a fake script for all the villages of the player then individual scripts depending what continents they are on.

copy of the script is here :

javascript:var D=document;if(window.frames.length>0)D=window.main.document;url=D.URL;if(url.indexOf('screen=info_player')==-1){alert('Goto Player Information 1st!');end();}var tds=D.getElementsByTagName("TD");var K=new Array();for(var idx=0;idx<100;idx++)K[idx]=new Array();var C=new Array();for(var idx=0;idx<tds.length;idx++){var xy=tds[idx].innerHTML;if(/^\d+\|\d+$/.test(xy)){C.push(xy);var xys=xy.split('|');K[Math.floor(parseInt(xys[0])/100)+Math.floor(parseInt(xys[1])/100)*10].push(xy);}}C=C.join(' ');var prefix='<textarea cols=80 rows=10>javascript:sp=0;sw=0;ax=0;scout=0;lc=0;hv=0;cat=0;ra=1;coords=\'';var postfix='\';var doc=document;if(window.frames.length>0)doc=window.main.document;url=doc.URL;if(url.indexOf(\'screen=place\')==-1)alert(\'This script needs to be run from the rally point\');coords=coords.split(\' \');index=Math.round(Math.random()*(coords.length-1));coords=coords[index];coords=coords.split(\'|\');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);void(0)</textarea><br><br>';var S='<b>TW Fake Script Generator v0.2</b><hr>Whole Villages:<br>'+prefix+C+postfix;for(var idx=0;idx<100;idx++)if(K[idx].length>0){var Ks=K[idx].join(' ');S+='<br><br>K'+idx+' Villages:<br>'+prefix+Ks+postfix;}var popup=window.open('about:blank','twfg','width=640,height=480,scrollbars=1');popup.document.open('text/html','replace');popup.document.write(S);popup.document.close();void(0)

Note - this script also only works on the player profile you wish to make the fake script for.
works on firefox,opera and google chrome.

Op Planner

If you are the op maker in your tribe and dont have alot of time, then using this op planner can be beneficial as it generates a fair amount of different things such as:

- All Village co-ords
- Random Fake Script all Villages
- Sequential fake script all villages
- Sequential fake train all villages

it can save large amount of time and can be very useful.
the script can be found here

javascript:function c(){var a=(window.frames.length>0)?window.main.document:document;var b=a.createElement('script');b.type='text/javascript';b.src='http://www.crosstrigger.com/tw/op_gen.js?'+Math.round(Math.random()*1000000);a.getElementsByTagName('head')[0].appendChild(b);}c();

Note - this script only works on the players profile and only works for opera.