Schnelleisten-Skript:
Bild-URL:
Ziel-URL:
javascript: doc=document; if(window.frames.length>0) doc=document.main; url=document.URL; var start=url.indexOf("village"); var end=url.indexOf('%26',start); var id; if(end>0) id=url.substring(start,end); else id=url.substring(start); if (url.indexOf('screen=market')==-1||url.indexOf('mode=own_offer')==-1) location.search='?screen=market&mode=own_offer&'+id; else { var wood=new Number(doc.getElementById('wood').innerHTML); var clay=new Number(doc.getElementById('stone').innerHTML); var iron=new Number(doc.getElementById('iron').innerHTML); var forms=doc.getElementsByTagName('form'); var sellpreis; var buypreis; var table=""; var max,min,verhaeltnis; for(i=0;i<forms.length && table=="";i++) { if(forms[i].action.indexOf('action=modify_offers')!=-1){ table=forms[i].getElementsByTagName('table')[0]; } } for(i=1;table!=""&&i<table.rows.length-1;i++) { child=table.rows[i].cells[1].childNodes; res=child[0].title; num=""; for(j=0;j<child.length;j++) { value=child[j].nodeValue;
if(value != null) num+=value; } num=num.substring(0,num.length-1); num*=new Number(table.rows[i].cells[2].innerHTML); if(res=='Holz')wood+=num; if(res=='Lehm')clay+=num; if(res=='Eisen')iron+=num; } doc.getElementById('res_sell_wood').checked=wood>clay&&wood>iron; doc.getElementById('res_sell_stone').checked=clay>wood&&clay>iron; doc.getElementById('res_sell_iron').checked=iron>clay&&iron>wood; doc.getElementById('res_buy_wood').checked=wood<clay&&wood<iron; doc.getElementById('res_buy_stone').checked=clay<wood&&clay<iron; doc.getElementById('res_buy_iron').checked=iron<clay&&iron<wood; if(wood>clay&&wood>iron)max="wood"; if(clay>wood&&clay>iron)max="clay"; if(iron>wood&&iron>clay)max="iron"; if(wood<clay&&wood<iron)min="wood"; if(clay<wood&&clay<iron)min="clay"; if(iron<wood&&iron<clay)min="iron"; wood=Math.round(wood/1000);
clay=Math.round(clay/1000); iron=Math.round(iron/1000); offers=Math.max(Math.max(wood,clay),iron)-Math.min(Math.min(wood,clay),iron); offers=Math.round(offers/2); tables=doc.getElementsByTagName('table'); for(i=0;i<tables.length;i++) { cell=tables[i].rows[0].cells[0].innerHTML; if(cell.indexOf('Händler:')==0) { offers=Math.min(offers,new Number(cell.substring(cell.indexOf(' ')+1,cell.indexOf('/')))); } } inputs=doc.getElementsByTagName('input'); for(i=0;i<inputs.length;i++){ if(inputs[i].value=='Create') inputs[i].focus(); } doc.getElementsByName('multi')[0].value=offers; doc.getElementsByName('max_time')[0].value=24; if(max=="wood"){ if(min=="clay"){verhaeltnis=1;} if(min=="iron"){verhaeltnis=1;} } if(max=="clay"){ if(min=="wood"){verhaeltnis=1;} if(min=="iron"){verhaeltnis=1;} } if(max=="iron"){ if(min=="wood"){verhaeltnis=1;} if(min=="clay"){verhaeltnis=1;} } doc.getElementsByName('sell')[0].value=parseInt(1000); doc.getElementsByName('buy')[0].value=parseInt(1000*verhaeltnis);
document.getElementsByTagName('input')[16].click(); }