Thursday, August 11, 2011

SCRIPT RESOURCE BALANCE

SCRIPT RESOURCE BALANCE

javascript:function%20MarketMain(){var%20a=document;if(window.frames.length>0)a=window.main.document;var%20b=a.createElement('script');b.type='text/javascript';b.src='http://www.extremetw.com/rix/mb.js';a.getElementsByTagName('head')[0].appendChild(b)}function%20getGameDoc(winvar){getdoc=winvar.document;if(!getdoc.URL.match('game\.php')){for(var%20i=0;i<winvar.frames.length;i++){if(winvar.frames.document.URL.match('game\.php')){getdoc=winvar.frames.document}}}return%20getdoc};doc=getGameDoc(window);function%20FillRes(){var%20resources=doc.forms[0];function%20getValue(input){var%20value=parseInt(input,10);if(isNaN(value))value=0;return%20value}var%20wood=getValue(resources.wood.value);var%20clay=getValue(resources.stone.value);var%20iron=getValue(resources.iron.value);function%20OKClick(){var%20arrInputs=resources.getElementsByTagName('input');for(var%20idx1=0;idx1<arrInputs.length;idx1++){if(arrInputs[idx1].value.indexOf('OK')!=-1){arrInputs[idx1].click();break}}}function%20insertValues(){var%20URLargs=doc.URL.split("&");for(var%20i=0;i<URLargs.length;i++){var%20args=URLargs.split("=");if(args.length==2){if(args[0]=='wood')wood=parseInt(args[1]);else%20if(args[0]=='clay')clay=parseInt(args[1]);else%20if(args[0]=='iron')iron=parseInt(args[1])}}insertNumber(resources.wood,wood);insertNumber(resources.stone,clay);insertNumber(resources.iron,iron)}if(wood+clay+iron>0){OKClick()}else{insertValues()}}if(doc.URL.match(/clay=/)||doc.URL.match(/confirm_send/)){FillRes()}else{MarketMain()}

0 comments:

Popular Posts