market offer script

Status
Not open for further replies.

DeletedUser

Guest
Hello,

I need a form-filling script that fills in 1000 in both the "offer" and "for" slot, *some number* for the "number of offers" slot and preferably fills out the radio buttons (wood/clay/iron for wood/clay/iron).
Should be simple enough. Does anyone have such a script?
 

DeletedUser

Guest
Hello,

I need a form-filling script that fills in 1000 in both the "offer" and "for" slot, *some number* for the "number of offers" slot and preferably fills out the radio buttons (wood/clay/iron for wood/clay/iron).
Should be simple enough. Does anyone have such a script?

I don't use the market offer scripts, so I don't have one. However, when our mod comes on I'm sure he'll tell you to check the scripts section of the TW forums for all approved scripts, and that this is not the correct area for this.

Not trying to be unhelpful, but that's what Da Wolf is going to tell you, almost guaranteed.

~Morningfrost
 

earthquake girl

Guest
I don't use the market offer scripts, so I don't have one. However, when our mod comes on I'm sure he'll tell you to check the scripts section of the TW forums for all approved scripts, and that this is not the correct area for this.

Not trying to be unhelpful, but that's what Da Wolf is going to tell you, almost guaranteed.

~Morningfrost

Yup. Then he'll lock the thread because posting for a script on this forum is inappropriate.
 

DeletedUser

Guest
i only need a script that fills a form. however i have limited knowledge of javascript to create such a script, and need help :|

If a script merely fills out values in a forum, and does not perform any game actions it does not require approval to be used. Examples are scripts that enter coordinates and units to the rally point, scripts that fill out the 'send resources' or 'make offer' forms, etc.​

or am i absolutely forced to go to the scripts forum?
 
Last edited by a moderator:

DeletedUser105209

Guest
why wouldn't you check there first? its a lot less effort to search there than post here and be trolled for it,
its in the approved script section.:icon_confused:
 

DeletedUser

Guest
[spoil]javascript:if (document.URL.match(/&screen=info_village&id/g)) { var c = document.getElementById("content_value"); var b = c.getElementsByTagName("table"); if (b.length >= 2) { tableid = 1; } var table = c.getElementsByTagName("table")[tableid]; var rows = table.getElementsByTagName("a"); if (rows[0].innerText == game_data.player.name) { for (x = 1; x < rows.length - 1; x++) { if (rows[x].innerHTML.match(/overview/g)) { var link = rows[x].getAttribute("href").replace("&screen=overview", "&screen=market&mode=own_offer"); window.navigate(link); break; } } } else { alert("Your user name has not been found"); }}else if(!(document.URL.match(/mode=own_offer/g))){ var sec = document.URL.split("&screen")[0] + "&screen=market&mode=own_offer"; window.navigate(sec);}else if (document.URL.match(/mode=own_offer/g) && document.getElementsByName('buy')[0].value == "") { var wood = new Number(document.getElementById('wood').innerHTML); var clay = new Number(document.getElementById('stone').innerHTML); var iron = new Number(document.getElementById('iron').innerHTML); var forms = document.getElementsByTagName('form'); var table = ""; 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 = child[j].nodeValue; if (value != null) num += value; } num = num.substring(0, num.length - 1); num *= new Number(table.rows.cells[2].innerHTML); if (res == 'Wood') wood += num; if (res == 'Clay') clay += num; if (res == 'Iron') iron += num; } document.getElementById('res_sell_wood').checked = wood > clay && wood > iron; document.getElementById('res_sell_stone').checked = clay > wood && clay > iron; document.getElementById('res_sell_iron').checked = iron > clay && iron > wood; document.getElementById('res_buy_wood').checked = wood < clay && wood < iron; document.getElementById('res_buy_stone').checked = clay < wood && clay < iron; document.getElementById('res_buy_iron').checked = iron < clay && iron < wood; wood = Math.round(wood / 700); clay = Math.round(clay / 700); iron = Math.round(iron /700); offers = Math.max(Math.max(wood, clay), iron) - Math.min(Math.min(wood, clay), iron); offers = Math.round(offers / 2); tables = document.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 Number(cell.substring(cell.indexOf(' ') + 1, cell.indexOf('/')))); } } inputs = document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs.value == 'Create') inputs.focus(); } document.getElementsByName('multi')[0].value = offers; document.getElementsByName('max_time')[0].value = 12; document.getElementsByName('sell')[0].value = 1000; document.getElementsByName('buy')[0].value = 700;}else { document.getElementsByTagName("input")[document.getElementsByTagName("input").length - 1].click();}void (0);[/spoil]
Take it before thread gets locked
 

Deleted User - 10770065

Guest
[spoil]javascript:if (document.URL.match(/&screen=info_village&id/g)) { var c = document.getElementById("content_value"); var b = c.getElementsByTagName("table"); if (b.length >= 2) { tableid = 1; } var table = c.getElementsByTagName("table")[tableid]; var rows = table.getElementsByTagName("a"); if (rows[0].innerText == game_data.player.name) { for (x = 1; x < rows.length - 1; x++) { if (rows[x].innerHTML.match(/overview/g)) { var link = rows[x].getAttribute("href").replace("&screen=overview", "&screen=market&mode=own_offer"); window.navigate(link); break; } } } else { alert("Your user name has not been found"); }}else if(!(document.URL.match(/mode=own_offer/g))){ var sec = document.URL.split("&screen")[0] + "&screen=market&mode=own_offer"; window.navigate(sec);}else if (document.URL.match(/mode=own_offer/g) && document.getElementsByName('buy')[0].value == "") { var wood = new Number(document.getElementById('wood').innerHTML); var clay = new Number(document.getElementById('stone').innerHTML); var iron = new Number(document.getElementById('iron').innerHTML); var forms = document.getElementsByTagName('form'); var table = ""; 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 = child[j].nodeValue; if (value != null) num += value; } num = num.substring(0, num.length - 1); num *= new Number(table.rows.cells[2].innerHTML); if (res == 'Wood') wood += num; if (res == 'Clay') clay += num; if (res == 'Iron') iron += num; } document.getElementById('res_sell_wood').checked = wood > clay && wood > iron; document.getElementById('res_sell_stone').checked = clay > wood && clay > iron; document.getElementById('res_sell_iron').checked = iron > clay && iron > wood; document.getElementById('res_buy_wood').checked = wood < clay && wood < iron; document.getElementById('res_buy_stone').checked = clay < wood && clay < iron; document.getElementById('res_buy_iron').checked = iron < clay && iron < wood; wood = Math.round(wood / 700); clay = Math.round(clay / 700); iron = Math.round(iron /700); offers = Math.max(Math.max(wood, clay), iron) - Math.min(Math.min(wood, clay), iron); offers = Math.round(offers / 2); tables = document.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 Number(cell.substring(cell.indexOf(' ') + 1, cell.indexOf('/')))); } } inputs = document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs.value == 'Create') inputs.focus(); } document.getElementsByName('multi')[0].value = offers; document.getElementsByName('max_time')[0].value = 12; document.getElementsByName('sell')[0].value = 1000; document.getElementsByName('buy')[0].value = 700;}else { document.getElementsByTagName("input")[document.getElementsByTagName("input").length - 1].click();}void (0);[/spoil]
Take it before thread gets locked


I'm sure he'll still be able to take it even if the thread is locked...
 
Status
Not open for further replies.
Top