master of you
Member
- Reaktionspoäng
- 0
skript som vissar kyrkoradie behöver jag...(7an om de spelar roll)
javascript: var doc= (window.frames.length>0) ? window.main.document : document; var colors=['#00FF00','#FFFF00','#FF0000']; function getElementByClass(a,b) { var c=doc.getElementsByTagName(a); for(var x=0; x<c.length; x++) { if(c[x].className==b) { return c[x]; } } return -1; } function setStatusTitle(a,b) { var c=doc.getElementsByTagName("h2"); if(c[0].innerHTML.length>12) { c[0].innerHTML=c[0].innerHTML.replace(c[0].innerHTML.substring(12)," ("+a+"/"+b+")") } else { c[0].innerHTML+=" ("+a+"/"+b+")" } } if(doc.URL.match(/screen=map/)) { el=getElementByClass("table","map"); par=el.getParent('table'); sy = Math.floor(el.rows.length / 2); sx = Math.floor(el.rows[0].cells.length / 2); var teller=1; maxaantal=(el.rows.length*el.rows[1].cells.length); for(var x=0; x<el.rows.length; x++) { for(var y=0; y<el.rows[x].cells.length; y++) { setStatusTitle(teller++,maxaantal); dist = Math.sqrt((sx-x)*(sx-x) + (sy-y)*(sy-y)); if (dist == 0) el.rows[x].cells[y].innerHTML+="<div style = \"position: absolute; background-color:#FFFFFF; filter:alpha(opacity=80); opacity:.8; -moz-opacity:.8; width:53px; height:12px; margin-top:-13px; display:block; color:black;\"></div>"; else if (dist <= 4) el.rows[x].cells[y].innerHTML+="<div style = \"position: absolute; background-color:"+colors[0]+"; filter:alpha(opacity=80); opacity:.8; -moz-opacity:.8; width:53px; height:12px; margin-top:-13px; display:block; color:black;\"></div>"; else if (dist <= 6) el.rows[x].cells[y].innerHTML+="<div style = \"position: absolute; background-color:"+colors[1]+"; filter:alpha(opacity=80); opacity:.8; -moz-opacity:.8; width:53px; height:12px; margin-top:-13px; display:block; color:black;\"></div>"; else if (dist <= 8) el.rows[x].cells[y].innerHTML+="<div style = \"position: absolute; background-color:"+colors[2]+"; filter:alpha(opacity=80); opacity:.8; -moz-opacity:.8; width:53px; height:12px; margin-top:-13px; display:block; color:black;\"></div>"; } } } else { alert("This option can only be used in the map!") } void 0;
som outlander sa,
tack skriptet funka..
mvh master of you