Svet 12 mozilla firefox.Vsetky skripty su povolene a su z tohoto fora:
Hromadna rekrutacia : funguje [SPOIL]
javascript: var configuration=[0,0,0,0,0,0,0,0,0,0]; var archers = true; var units; var unitsNET; var costs; function arrayMin(array) { var value = array[0]; for (var t = 1; t < array.length; t++) { if (array[t] < value) { value = array[t]; } } return value; } function linearDivideArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { if (array2[t] != 0) { value[t] = array1[t] * 1.0 / array2[t]; } else { value[t] = 0; } } } return value; } function linearAddArray(array1, array2) { var value = []; if (array1.length == array2.length) { for (var t = 0; t < array1.length; t++) { value[t] = array1[t] + array2[t]; } } return value; } function getUnitId(unit) { for (var t = 0; t < units.length; t++) { if (unit == unitsNET[t]) { return t; } } return -1; } function getQueue(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells
.childNodes[1].childNodes[1].firstChild.title, 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } function getResources(record) { var value = [0, 0, 0, 0]; var res = record.cells[1].textContent.split("\n"); var farm = record.cells[2].innerHTML.split('/'); value[0] = parseInt(res[1].replace(".", ""), 10); value[1] = parseInt(res[2].replace(".", ""), 10); value[2] = parseInt(res[3].replace(".", ""), 10); value[3] = farm[1] - farm[0]; return value; } function getProduced(record) { var value = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (var u = 3; u < record.cells.length; u++) { try { value[u - 3] = parseInt(record.cells.childNodes[1].textContent.split("\n")[2], 10); } catch (e) { } if (isNaN(value[u - 3])) { value[u - 3] = 0; } } return value; } if (document.URL.match('screen=train') && document.URL.match('mode=mass')) { var records = document.getElementById('mass_train_table').rows; if (archers) { units = ['spear', 'sword', 'axe', 'archer', 'spy', 'light', 'marcher', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Archer', 'Scout', 'Light Cavalry', 'Mounted Archer', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [100, 30, 60, 1], [50, 50, 20, 2], [125, 100, 250, 4], [250, 100, 150, 5], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } else { units = ['spear', 'sword', 'axe', 'spy', 'light', 'heavy', 'ram', 'catapult']; unitsNET = ['Spear Fighter', 'Swordsman', 'Axeman', 'Scout', 'Light Cavalry', 'Heavy Cavalry', 'Ram', 'Catapult']; costs = [[50, 30, 10, 1], [30, 30, 70, 1], [60, 30, 40, 1], [50, 50, 20, 2], [125, 100, 250, 4], [200, 150, 600, 6], [300, 200, 200, 5], [320, 400, 100, 8]]; } for (r = 1; r < records.length; r++) { var subconf = []; var total_costs = [0, 0, 0, 0]; var i; var resources = getResources(records[r]); var queue = getQueue(records[r]); var produced = getProduced(records[r]); for (i = 0; i < units.length; i++) { subconf = configuration - (queue + produced); if (subconf < 0) { subconf = 0; } for (var j = 0; j < 4; j++) { total_costs[j] += costs[j] * subconf; } }; var factor = arrayMin(linearDivideArray(resources, total_costs)); if (factor > 1.0) { factor = 1.0; } for (i = 0; i < units.length; i++) { var number = subconf * factor; if (number < 0) { number = 0; } if (number != 0) { if (records[r].cells[3 + i].childNodes[3] && records[r].cells[3 + i].childNodes[3].disabled == false) { var ibox = records[r].cells[3 + i].childNodes[3]; try { ibox.value = parseInt(number, 10); } catch (e) { alert(e); } } } } } stop(); } else{ window.location=game_data.link_base_pure+"train&mode=mass&group="+game_data.village.group;}[/SPOIL]
Filtrovanie slachty : Nefunguje [SPOIL]
javascript:ag_index = 12;var doc;if(top.frames.length > 1){doc = (top.frames[1].document.URL.match('game.php') =='game.php') ? top.frames[1].document : top.frames[0].document;}else{doc = document;}if(!doc.URL.match('mode=combined')){alert('Musíš zadat kombinovaný náhled');}else{var main = doc.getElementsByTagName('table');for(var a = 0; a < main.length; a++){if(main[a].className == 'main'){var par = main[a].getElementsByTagName('table');for(var i = 0; i < par.length; i++){if(par.className = 'vis'){rows = par.getElementsByTagName('tr');for(var j = 0; j < rows.length; j++){if(rows[j].className == 'nowrap row_a' || rows[j].className == 'nowrap row_b'){var cells = rows[j].getElementsByTagName('td');vill_name = cells[0].getElementsByTagName('a')[0].firstChild.nodeValue;vill_ags = 0;if(cells[ag_index+6].getElementsByTagName('a').length == 0) {vill_ags = parseInt(cells[ag_index+6].firstChild.nodeValue);}else {vill_ags = parseInt(cells[ag_index+6].firstChild.firstChild.nodeValue);}if(vill_ags == 0) {rows[j].parentNode.removeChild(rows[j]);j -= 1;}}}}}}}alert('šlechtici jsou vyfiltrováni!!!');}[/SPOIL]
Premenovanie vesnic : funguje [SPOIL]
javascript:var%20text=prompt('Enter village name');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.id.indexOf('edit_input')!=-1){inputs.value=text;inputs[i+1].click();}}end();[/SPOIL]
Vesnice pod utokom : funguje [SPOIL]javascript:var%20grp=9898;var%20doc=document;if(window.frames.length>0)doc=document.main;url=document.URL;if(url.indexOf('screen=overview_villages')==-1||url.indexOf('mode=combined')==-1||url.indexOf('edit_group='+grp)==-1)location='{game}&screen=overview_villages&mode=combined&page=-1&edit_group='+grp;else{var%20inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){id=inputs.id+'';index=id.indexOf('edit_input');if(index!=-1){if(inputs.parentNode.parentNode.innerHTML.indexOf('attack.png')==-1){inputs.parentNode.parentNode.childNodes[1].checked=false}else{inputs.parentNode.parentNode.childNodes[1].checked=true}}}alert('ok');}end();[/SPOIL]
Trziste (zelezo za hlinu) : funguje [SPOIL]javascript:var d=document;function o(a){b=location.search;c=new RegExp("\\b"+a+"\\b");if(b.match(c)){return 1;}else{location.search=b.replace(/.*?(\bvillage=\d+).*/i,'?$1&'+a);return 0;}}function r(){l=d.getElementsByTagName('table');for(j=0;j<l.length;j++){e=l[j].rows[0].cells[0].innerHTML;if(e.match(/^Obchodník/)){return new Number(e.match(/(\d+)/)[1]);}}return 0;}function v(){var p=new Number(d.getElementById('stone').innerHTML);var q=new Number(d.getElementById('iron').innerHTML);var m=d.getElementsByTagName('form');var k="";for(j=0;j<m.length&&k=="";j++){if(m[j].action.indexOf('action=modify_offers')!=-1){k=m[j].getElementsByTagName('table')[0];}}for(j=1;k!=""&&j<k.rows.length-1;j++){n=k.rows[j].cells[1].childNodes;u=n[0].title;f="";for(g=0;g<n.length;g++){h=n[g].nodeValue;if(h!=null)f+=h;}f=f.substring(0,f.length-1);f*=new Number(k.rows[j].cells[2].innerHTML);if(u=='clay')p+=f;if(u=='iron')q+=f;}d.getElementById('res_sell_stone').checked=p>q;d.getElementById('res_sell_iron').checked=q>p;d.getElementById('res_buy_stone').checked=p<q;d.getElementById('res_buy_iron').checked=q<p;p=Math.round(p/1000);q=Math.round(q/1000);t=Math.max(p,q)-Math.min(p,q);t=Math.min(t,r());}function end(){i='';if(o('screen=market&mode=own_offer')){if(r()>0){t=new Number(d.getElementsByName('sell')[0].value);if(t>0){s=d.getElementsByTagName('input');for(j=0;j<s.length;j++){if(s[j].value=='Nastavit '){s[j].click();return;}}}v();if(t==0){i='No deal';}else{d.getElementsByName('multi')[0].value=t;d.getElementsByName('max_time')[0].value=95;d.getElementsByName('sell')[0].value=1000;d.getElementsByName('buy')[0].value=1000; if(d.getElementById('res_sell_stone').checked){i='Don\'t sell clay';}}}else{i='No merchants';}if(i!=''){s=d.links;for(j=0;j<s.length;j++){if(s[j].accessKey=="d"){location.href=s[j].href;return;}}}}}end();[/SPOIL]
Premenovanie utokov : funguje
[SPOIL]javascript:function labelAttacks(){var arrInputs=document.getElementsByTagName('input');var txtAttack="Útok";var strDate=document.getElementById('serverDate').childNodes[0].nodeValue;strDate=strDate.substring(0,strDate.length-5);var strTime=document.getElementById('serverTime').childNodes[0].nodeValue;var j=0;for(i=0;i<arrInputs.length;i++){if(arrInputs.id.indexOf('editInput')!=-1&&arrInputs.value==txtAttack){j++; arrInputs.value='['+strDate+' '+strTime+']';arrInputs[i+1].click();}}alert("Nových:"+j);}labelAttacks();[/SPOIL]
Zaškrtávanie oznámení : funguje
[SPOIL]javascript: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.id.indexOf('editInput')!=-1){ if((j=inputs.value.indexOf(' útočí na '))!=-1){ inputs.value=inputs.value.substring(j+10); inputs[i+1].click(); }}}void 0;[/SPOIL]
Oznacenie majitela vesnice na mape : nefunguje
[SPOIL]javascript:var prik='';function getElementByClass(a,b){var c=document.getElementsByTagName(a);for(var x=0;x<c.length;x++){if(c[x].className==b){return c[x]}}return-1};function zobraz(vesnice,bonuspic,bodustext,vesbody,hrac,kmen,str1,str2,skupiny,udaj1,udaj2,jlink,lastutdate,lastutpic,lastutpic2,xfalse){hrac=hrac+'';pos=hrac.lastIndexOf('(');hrac=hrac.substring(0,pos-1);if(window.game_data.player.name!=hrac&&hrac!=''){el.rows[x].cells[y].innerHTML+='<div style="position:absolute;background-color:#FAFED3;opacity:.75;-moz-opacity:.75;width:50px;height:12px; margin-left:1px; margin-top:-25px;display:block;color:black;text-align:center">'+hrac.substring(0,7)+'</div>'; if (lastutpic!='')el.rows[x].cells[y].innerHTML+='<div style="position:absolute;width:50px;height:12px;margin-left:1px;margin-top:-35px;text-align:right"><IMG src="graphic/'+lastutpic+'" style="background-color:#FFFFFF;padding:1px"></div>';}}if(document.URL.match(/screen=map/)){el=getElementByClass("table","map");for(var x=0;x<el.rows.length;x++){for(var y=0;y<el.rows[x].cells.length;y++){prik=el.rows[x].cells[y].childNodes[0].getAttribute('onmouseover');if (prik!=undefined){prik=prik+'';prik=prik.replace(/Map\.map_popup\(event\,/,"zobraz(");eval(prik);if (x==(el.rows.length-1)/2 && y==(el.rows[x].cells.length-1)/2) {el.rows[x].cells[y].childNodes[0].style.borderStyle="solid";el.rows[x].cells[y].childNodes[0].style.borderColor="Black";el.rows[x].cells[y].childNodes[0].style.borderWidth="1px"}}}}}else{self.location="{game}&screen=map"};void 0;[/SPOIL]
Vzdialenosti : funguje
[SPOIL]{game}&screen=place&mode=neighbor[/SPOIL]
Info o vesnici (Tw stats) : funguje
[SPOIL]javascript:if(game_data.screen=="info_village"){ var position=document.URL.search(/id=/); var id=document.URL.substring(position+3);window.open("http/"+game_data.market+".twstats.com/"+game_data.world+"/index.php?page=village&id="+id,"_blank");}else{alert("Na této stránce nelze script použít!");}void 0;[/SPOIL]