FANDOM


코드가 이상하게 깨져서 보인다면 편집하기 버튼을 눌러서 원본을 확인해면 된다.

그러나 지난 업뎃이후 전혀 작동하지 않는다.

스크립트의 전문가가 절실히 필요한 때이다.

이카리님은 어디로 가셨나?


javascript:var d = new Date();var nyy = d.getFullYear();var nnn = d.getMonth()+1;var ndd = d.getDate();var nhh = d.getHours();var nmm = d.getMinutes();var nss = d.getSeconds();var basicView=false;var i,j;Math.roundf=function(val,precision){var p=this.pow(10,precision);return this.round(val*p)/p;};Number.prototype.pad0=function(){var n='00';var r;return r=n.substring(0,2-String(this).length)+this;};var basespeed={en24:1.5,en36:1,kr1x:1,kr2:1,kr3:1,kr4:1.5,kr5:1};var unitspeed;if(basicView)unitspeed={light:600,axe:1080,ram:1800,snob:2100};else unitspeed={spy:540,light:600,heavy:660,axe:1080,sword:1320,ram:1800,snob:2100};var root=(window.frames.length>0)?window.main:window;var D=root.document;var url=D.URL;var reurl=new String(/\/\/\w+/.exec(url)).substr(2);for(i in unitspeed)unitspeed[i]/=basespeed[reurl];if(url.indexOf('screen=overview')==-1){alert('This script needs to be run from the overview.')}else{var coord=prompt('타겟 좌표.','000|000');coord=coord.split('|');var coordx=parseInt(coord[0]);var coordy=parseInt(coord[1]);var records=[];var Vs=D.getElementsByTagName("SPAN");for(i=0;i<Vs.length;i++)if(Vs[i].id.substr(0,11)=="label_text_"){var rex=/ \((\d+)\|/.exec(Vs[i].innerHTML);var rey=/\|(\d+)\) K/.exec(Vs[i].innerHTML);var vx=parseInt(rex[1]);var vy=parseInt(rey[1]);var d=Math.sqrt(Math.pow(coordx-vx,2)+Math.pow(coordy-vy,2));records.push({id:Vs[i].id.substr(11),name:Vs[i].innerHTML,x:vx,y:vy,dist:d});}records.sort(function(a,b){return a.dist-b.dist});var S='Distance Calculator


Target Coord: '+coordx+'|'+coordy+'

';for(i in unitspeed)S+=;S+=;for(i=0;i<records.length;i++){ii=i+1;S+=;for(j in unitspeed){var dd=ndd;var nn=nnn;var hhh=0;var ss=Math.round(records[i].dist*unitspeed[j]);var hh=parseInt(ss/3600);ss%=3600;var mm=parseInt(ss/60);ss%=60;hh+=nhh;mm+=nmm;ss+=nss;if(ss>=60){ss-=60;mm+=1;}if(mm>=60){mm-=60;hh+=1;}if(hh>=24){hhh = Math.floor(hh/24);hh%=24;dd+=hhh;}if(dd>=29&&nnn == 2){nn += 1;dd -= 28;}else if (dd>=31&&(nn == 4 || nn == 6 || nn == 9 || nn == 11)){nn += 1;dd -= 30;}else if (dd>=32&&(nn == 1 || nn == 3 || nn == 5 || nn == 7 || nn == 8 || nn == 10 || nn == 12)){nn += 1;dd -= 31;}if(hh>=0&&hh<=7)S += ' ';}S+='</td><td> <a href=' + D.location.pathname + '?village=' + records[i].id + '&screen=place><img src=/graphic/buildings/place.png></a> <a href=' + D.location.pathname + '?village=' + records[i].id + '&screen=market><img src=/graphic/buildings/market.png></a></td>';}S+='</table>';var pop=window.open('about:blank');pop.document.open('text/html','replace');pop.document.write(S);pop.document.close();void(0)}</td></tr></table>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on FANDOM

Random Wiki
Num.Village<img src=/graphic/unit/unit_'+i+'.png>
'+ii+'[coord]'+records[i].x+'|'+records[i].y+'[/coord]' + nyy + "/" + nn + "/" + dd + "-" + hh.pad0() + ':' + mm.pad0() + ':' + ss.pad0() + '</font></td>';else S+=''+nyy +"/"+nn+"/"+dd+"-"+hh.pad0()+':'+mm.pad0()+':'+ss.pad0()+'