script for market

DeletedUser79647

Guest
anybody has already a script to put automaticatly all the merchants in all village in the offers and just click to the link and nothing else to do.

just specify in the script 1000 for 1000 and iron for clay something like that.


and the script took the maximum of each villa in ressources and merchant


is that possible ?????
 

DeletedUser

Guest
Sort of? Tries to balance out your resources automatically by making a bunch of 1000 resource offers.

Edit: oh you said all villages, well since there is no mass market screen thats not possible, this has to be run in each village.

javascript:doc=document;if(window.frames.length>0)doc=document.main;url=document.URL;var%20start=url.indexOf("village");var%20end=url.indexOf('%26',start);var%20id;if(end>0)id=url.substring(start,end);elseid=url.substring(start);if(url.indexOf('screen=market')==-1||url.indexOf('mode=own_offer')==-1)location.search='?screen=market&mode=own_offer&'+id;else%20{var%20wood=new%20Number(doc.getElementById('wood').innerHTML);var%20clay=new%20Number(doc.getElementById('stone').innerHTML);var%20iron=new%20Number(doc.getElementById('iron').innerHTML);var%20forms=doc.getElementsByTagName('form');var%20table="";for(i=0;i<forms.length&&table=="";i++){if(forms.action.indexOf('action=modify_offers')!=-1){table=forms.getElementsByTagName('table')[0];}}for(i=1;table!=""&&i<table.rows.length-1;i++){child=table.rows.cells[1].childNodes;res=child[0].title;num="";for(j=0;j<child.length;j++){value%20=%20child[j].nodeValue;if(value%20!=%20null)num+=value;}num=num.substring(0,num.length-1);num*=new%20Number(table.rows.cells[2].innerHTML);if(res=='Wood')wood+=num;if(res=='Clay')clay+=num;if(res=='Iron')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;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.rows[0].cells[0].innerHTML;if(cell.indexOf('Merchants:')==0){offers=Math.min(offers,new%20Number(cell.substring(cell.indexOf('%20')+1,cell.indexOf('/'))));}}inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){if(inputs.value=='Create')inputs.focus();}doc.getElementsByName('multi')[0].value=offers;doc.getElementsByName('max_time')[0].value=10;doc.getElementsByName('sell')[0].value=1000;doc.getElementsByName('buy')[0].value=1000;}end();
 

DeletedUser

Guest
He made this post here too??? Tis also in Recruitment and applying for tribes.

I made him look himself, seems now he can be lazy too :icon_rolleyes:
 

DeletedUser79647

Guest
hehe

i asked here to because i post in the wrong section in the 1st time


and i already look in the script collection i was asking if it was possible i think no if i read serata post

thanks
 

DeletedUser68103

Guest
anybody has already a script to put automaticatly all the merchants in all village in the offers and just click to the link and nothing else to do.

just specify in the script 1000 for 1000 and iron for clay something like that.


and the script took the maximum of each villa in ressources and merchant


is that possible ?????
I can't even. What? You make absolutely no sense what so ever. I mean I suppose we all kind of got what you were going for but good lord that was hard to read.
 
Top