TrAnxZ
Tidligere CM
- Reaksjonspoeng
- 297
[spoil]
[/spoil]
Forklaring (engelsk):
[spoil]Use the script on the combined overview page. Sorts the villages according to the time to reach a village.
Input the coordinates of the village under consideration. Input the timing. Sorts useful villages in green and not useful villages to red. Leaving the time window blank leaves the timings in black color. Can be used to attack or snipe or stack a village in time. When you run the script for the first time do remember to check the troop speeds if they match your world. To do this either use this section Useful Data or use this script Troop Speed and copy the output to the Multipurpose Snipe Script.
[/spoil]
Er dette scriptet tillatt - eller kan det bli tillatt?
Om det er tillatt, eller vil bli, noen som vet speeden til verdenene på .no? var speed={spy:8,light:8.89,marcher:8.89,knight:8.89,heavy:9.78,spear:16,axe:16,bow:16,archer:16,sword:19.56,ram:26.67,catapult:26.67,snob:31.11} står i scriptet, og det vet jeg ikke helt hvordan jeg regner ut/fungerer
-TrAnxZ
Kode:
javascript:var speed={spy:8,light:8.89,marcher:8.89,knight:8.89,heavy:9.78,spear:16,axe:16,bow:16,archer:16,sword:19.56,ram:26.67,catapult:26.67,snob:31.11};function srtfnc(a,b){if(Number(a[0])<Number(b[0]))return -1;if(Number(b[0])<Number(a[0]))return 1;return 0;}function zeroPad(number,length){var n=number.toString();while(n.length<length){n="0"+n;}return n;}var doc=(window.frames.length>0)?window.main.document:document;var destby=String(doc.title.match(/\d+\|\d+/))||'500|500';destby=prompt("Choose Destination",destby);destby=destby.split("|");var maxdelay;while(true){maxdelay=prompt("Select a maximum duration (eg, 3:48:50), leave blank for no maximum limit","");maxdelay=(maxdelay?maxdelay.split(":"):[]);while(maxdelay.length<3){maxdelay.splice(0,0,0);}if(maxdelay.length==3){break;}}maxdelay=maxdelay.map(function(x){return parseInt(x,10);});var maxdelaytime=(maxdelay[0]*60*60)+(maxdelay[1]*60)+maxdelay[2];var diffx;var diffy;function fnGetMode(){var scrape;var mode=(scrape=window.location.href.match(/&mode\=(\w+)/i))?scrape[1]:null;if(!mode){var win=(window.frames.length>0)?window.main:window;var srcHTML=win.$("td[class=selected]").html();if(srcHTML){mode=(scrape=srcHTML.match(/;mode\=(\w+)/i))?scrape[1]:null;}}return mode;}if(doc.URL.match(/screen\=overview_villages/i)&&(fnGetMode()=='combined')){var t=doc.getElementById('combined_table');if(t.rows[0].cells[0].innerHTML=='Village'){rs=[];for(j=1;j<t.rows.length;j++){by=t.rows[j].cells[0].innerHTML.match(/\((\d+\|\d+)\)\s*K\d+/i);by=by[1].split("|");diffx=destby[0]-by[0];diffy=destby[1]-by[1];dist=Math.sqrt(diffx*diffx+diffy*diffy);for(c=0;c<t.rows[j].cells.length;c++){if(t.rows[0].cells[c].innerHTML.match(/graphic\/unit\/unit_(\w+).png/)){unit=t.rows[0].cells[c].innerHTML.match(/graphic\/unit\/unit_(\w+).png/)[1];time=dist*speed[unit]*60;h=zeroPad(Math.floor(time/3600),2);mm=zeroPad(Math.floor(time/60)%2560,2);s=zeroPad(Math.round(time%2560),2);res=h+':'+mm+':'+s;if(t.rows[j].cells[c].className=='hidden'){t.rows[j].cells[c].innerHTML=res;}else if(maxdelaytime==0){t.rows[j].cells[c].innerHTML="<B>"+t.rows[j].cells[c].innerHTML+"</B><BR>"+res;}else if(time<maxdelaytime){t.rows[j].cells[c].innerHTML="<FONT COLOR=\"#00FF00\"><B>"+t.rows[j].cells[c].innerHTML+"</B><BR>"+res+"</FONT>";}else{t.rows[j].cells[c].innerHTML="<FONT COLOR=\"#FF0000\"><B>"+t.rows[j].cells[c].innerHTML+"</B><BR>"+res+"</FONT>";}}}rs.push([dist,t.rows[j].innerHTML]);}rs=rs.sort(srtfnc);while(t.rows.length>1){t.deleteRow(1);}t.rows[0].insertCell(1).innerHTML="<B>Distance</B>";for(j=0;j<rs.length;j++){rr=t.insertRow(j+1);rr.innerHTML=rs[j][1];rr.insertCell(1).innerHTML=Number(Math.round(rs[j][0]*100)/100);}for(j=1;j<t.rows.length;j++){t.rows[j].className=((j%252==1)?'nowrap row_a':'nowrap row_b');}}}void(0);
Forklaring (engelsk):
[spoil]Use the script on the combined overview page. Sorts the villages according to the time to reach a village.
Input the coordinates of the village under consideration. Input the timing. Sorts useful villages in green and not useful villages to red. Leaving the time window blank leaves the timings in black color. Can be used to attack or snipe or stack a village in time. When you run the script for the first time do remember to check the troop speeds if they match your world. To do this either use this section Useful Data or use this script Troop Speed and copy the output to the Multipurpose Snipe Script.
[/spoil]
Er dette scriptet tillatt - eller kan det bli tillatt?
Om det er tillatt, eller vil bli, noen som vet speeden til verdenene på .no? var speed={spy:8,light:8.89,marcher:8.89,knight:8.89,heavy:9.78,spear:16,axe:16,bow:16,archer:16,sword:19.56,ram:26.67,catapult:26.67,snob:31.11} står i scriptet, og det vet jeg ikke helt hvordan jeg regner ut/fungerer
-TrAnxZ
Sist redigert av en moderator: