Request All Requests

Stotty2009

Guest
Post all your requests you want for scripts here with as much detail as possible.
 

Stotty2009

Guest
can someone make me 2 scripts for rally point. one to send 100 sp 1sc 4cat the 2nd to contain 100 axe 1sc and 4 cat. pls and thank you in advance, but if you tell me to go to twfr i swear ill jump thru this monitor and defecate on your face
[spoil]
Code:
javascript: var coords = "";
var troops = {
    spear: [100, 2],
    sword: [0, 0],
    axe: [0, 0],
    spy: [1, 2],
    light: [400, 0],
    marcher: [0, 0],
    heavy: [0, 0],
    ram: [0, 0],
    catapult: [4, 2],
    snob: [0, 0]
};
$.getScript("http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/fill_troops_main.js");
void(0);

Code:
javascript: var coords = "";
var troops = {
    spear: [0, 0],
    sword: [0, 0],
    axe: [100, 2],
    spy: [1, 2],
    light: [400, 0],
    marcher: [0, 0],
    heavy: [0, 0],
    ram: [0, 0],
    catapult: [4, 2],
    snob: [0, 0]
};
$.getScript("http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/fill_troops_main.js");
void(0);

[/spoil]

I'm using a script that extracts coordinates. This is the script

Code:
javascript:var villas=$("table[class=content-border]").html().match(/\d+\|\d+/g);alert((villas&&(villas.length>0)?villas.join(" "):"No co-ordinates were found"));void(0);

Could someone make a script for me that deletes duplicate coordinates, but still extracts all the coordinates from the page? Because it's really annoying having to go back and delete all the duplicates from it.

[spoil]
Modified to remove duplicates:
[SPOIL]
Code:
javascript:var villas=($('table[class="content-border"]').html().match(/\d+\|\d+/g)||[]).filter(function(a,b,c){return c.lastIndexOf(a)===b;});alert((villas&&(villas.length>0)?villas.join(' '):'No co-ordinates were found'));void(0);
[/SPOIL]
[/spoil]

i want incoming troops overview script who can calculate how many plunder resources are coming in ur village it is useful for not overflowing ur warehouse
[spoil]
Code:
javascript:ukScript="http://ftp.innogames.net/~tracey/scripts/twcheese_commandHauls.js";s=document.createElement('script');s.type='text/javascript';s.src=ukScript+'?'+Math.floor((new Date()).valueOf()/604800000);document.getElementsByTagName('head')[0].appendChild(s);void 0;
[/spoil]

A while ago (around V5.0) I used a script that renamed all commands (outgoing or incoming). It had a pop up box that asked for the name, I can no longer find it. Could anyone please modify this script to include the prompt? Thanks
Code:
javascript:function labelAttacks(){var ii,eleInput;var eleDoc=(window.frames.length>0)?window.main.document:document;var arrInputs=eleDoc.getElementsByTagName('input');var strDate=$('#serverDate').text();var strTime=$('#serverTime').text();var newName='RAM';for(ii=0;ii<arrInputs.length;ii++){eleInput=arrInputs[ii];if(eleInput.id.indexOf('editInput')>=0&&eleInput.value.match(/Attack/i)){eleInput.value=newName;arrInputs[++ii].click();}}}labelAttacks();

[spoil]
Here is a pop up box version that renames all that are still named attack:

[spoil]
Code:
javascript:var%20text=prompt('Rename attacks to:');var%20doc=document;if(window.frames.length>0)doc=window.main.document;var%20inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){if(inputs[i].id.indexOf('editInput')!=-1){if(inputs[i].value.substring(0,6)=='Attack'){inputs[i].value=text;inputs[i+1].click();}}}end();
[/spoil]
[/spoil]

[SPOIL]Script result
[SPOIL]
lasttimeattackscripttes.png
[/SPOIL]

The script that need fixes
[SPOIL]LA Map Overlay tags: 7.1, DaleSMckay, LastApparatus, map overlay, time elapsed, time passed, map farming tool
Shows times since each village on the map was last attacked. Also color codes based on most recent hauls.

» More information

Code:
javascript:(window.main||self).$.getScript('http://ftp.innogames.net/~tracey/scripts/map_attack_overlay.js',function(){var script=new MapAttackOverlay();script.execute();});void(0);
[/SPOIL]

I don't know much about scripts, but I guess this scripts is hard to fix without the admin or founder of the link that the script has.

And if it's not possible to fix it, is there another script that has the same function? If it's not I'm willing to pay some pp for a fresh private script :) Just send me a pm

Kthxbaii[/SPOIL]

This is the latest version of the Script.
I can't confirm whether it is working or not since I don't currently have premium active.

Map Attack Overlay Script:
[SPOIL]
Code:
javascript:(window.main||self).$.getScript('http://dl.dropbox.com/u/25377948/twscripts/map_attack_overlay.js',function(){var script=new MapAttackOverlay();script.execute();});void(0);
[/SPOIL]

Market Scripts

Script Name: Offer Generator
Short Description: Creates offers on the market depending on current resources in that village

Script:
javascript: $.getScript("http://dl.dropbox.com/u/24469843/Tribalwars/Scripts/CreateMarketOffers.js"); void(0);

from
http://forum.tribalwars.net/showthread.php?t=243208


Using this script, works great. Only one tiny detail.

I was wondering if it would be possible to release a similar script, but with the possibility to user-define settings to the Offer Maximum Duration.

Or to release one with a different time defined.
i.e. 12hrs ( instead of the 40 hrs defined )

Thank you


There you go, I'm sure you can work it out from here [spoil]
Code:
javascript:var TIME=40;var SELL=500;var BUY=1000; $.getScript("http://dl.dropbox.com/u/13191442/CreateMarketOffers.js"); void(0);
[/spoil]

Isn't there a time-stopper script or is i illegal? don't remember on which world, but people have used it

to explain it: Stops the time on the commands on the rally point.
for example when you are about to send snipe and there is some troops coming hope just that time. Then you can use time-stopper to make the clock for that command to stop(servertime still going) so that it doesn't interrupt the snipe.


don't have it myself, but would appreciate if someone told me if it is legal and if it is, post it.

:)
[spoil]
Code:
javascript: if (timers.length > 0) {      tmptimers = timers;      timers = [];  } else {      timers = tmptimers;  }  void(0);
[/spoil]
 
Last edited:

Stotty2009

Guest
is there any fake script that fill rally points with the troops that is only available on the village? if not. can someone try and make one? :p

[spoil]I just added to my favorites bar in IE the select all link & that then fills in all troops.

The script behind the link is javascript:selectAllUnits(true)

Maybe try that in your quick bar[/spoil]
 
Last edited:

DeletedUser106296

Guest
Dear Mod,

im like using micro farm like :

format 1 : 1sc+3LC
format 2 : 5sp+5axe+1sc

is that possible to make farm script wich run with format 1 first till not enough this kind troops in village and it run swicht to format2 type ?

now im using 2 farm script or using one but i need changing it format each time and i dont like bookmark farming.

Tq

Rgds,

Raja
 

Subwind

Guest
Dear Mr Stotty,

We have not spoken in a long time, but I wonder if you would be so kind as to attempt this quick script for me please?

All I need is a script that will grab the village ID from the overview page, and then insert this into a web address and open in a new tab.

Code:
http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid=<village id from script here>

~Matt
 

DeletedUser

Guest
hi, i need a nonpremium script,

I would like to send one scout to each cord in order -

313|595 308|587 313|591 303|586 313|600 310|587 301|586 313|589 315|596 314|590 309|605 299|586 294|594 294|593 296|588 316|591 300|584 316|589 315|603 295|584 305|594 307|597 305|592 302|594 308|594 301|596 308|592 305|590 310|595 307|590 309|599 309|591 305|601 307|601 299|593 312|594 300|590 303|602 310|589 312|591 312|599 298|591 298|599 297|592 301|603 301|604 309|604 313|601 305|605 299|603 297|601 316|596 307|606 308|584 315|601 310|606 312|584 304|591 304|601 311|598 310|585

can you please help, i had one before but can't find it , thankyou
 

dalesmckay

Guest
[SPOIL]Dear Mr Stotty,

We have not spoken in a long time, but I wonder if you would be so kind as to attempt this quick script for me please?

All I need is a script that will grab the village ID from the overview page, and then insert this into a web address and open in a new tab.

Code:
http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid=<village id from script here>

~Matt[/SPOIL]

This will grab your current village ID from any page and open that URL in a new Tab:
Code:
javascript:window.open('http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid='+(window.main||self).game_data.village.id);void(0);
 

Subwind

Guest
This will grab your current village ID from any page and open that URL in a new Tab:
Code:
javascript:window.open('http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid='+(window.main||self).game_data.village.id);void(0);

Thank you Dale. I think I explained it wrong, the village ID I need is of the target village, not the current village.

Coordinates: 844|845
Points: 9.737
Player: kubra
Tribe: Gas Hit Squad
» Center map
» Send troops
» Send resources
» Make a noble claim for the village
» Add to favorites
» Highlight on map
» Village file (external link)

From the above view.

~Matt
 

DeletedUser

Guest
Code:
javascript:var YourURL=String(window.location);var VillageID=YourURL.split('&id=');window.open('http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid='+VillageID[1]);void(0);

give it a try I havent tested it
 

Subwind

Guest
Code:
javascript:var YourURL=String(window.location);var VillageID=YourURL.split('&id=');window.open('http://www.mytwstats.com/reports.php?hash=14fc12ba92bdaf052e41&ad_t=D&RV_view=view_village&vid='+VillageID[1]);void(0);

give it a try I havent tested it

No, that doesn't even open a window.

~Matt
 

Subwind

Guest
Dale,

Is there anyway you could add the target player name to your awesome outbound renamer at all?

~Matt
 

DeletedUser

Guest
Can someone edit this for a non-archer world please:

[spoil]
Code:
javascript:var%20archers%20=%20true;%20var%20configuration%20=%20[0,0,0,0,0,0,0,0,0,0];var%20units;var%20unitsNET;var%20costs;function%20arrayMin(array){var%20value=array[0];for(var%20%20t=1;t%3Carray.length;t++){if(array[t]%3Cvalue){value=array[t];}}return%20%20value;}function%20linearDivideArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){if(array2[t]!=0){value[t]=array1[t]*1.0/array2[t];}else{value[t]=0;}}}return%20%20value;}function%20linearAddArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){value[t]=array1[t]+array2[t];}}return%20%20value;}function%20getUnitId(unit){for(var%20%20t=0;t%3Cunits.length;t++){if(unit==unitsNET[t]){return%20%20t;}}return-1;}function%20getQueue(record){var%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].childNodes[1].firstChild.title,10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}function%20getResources(record){var%20%20value=[0,0,0,0];var%20res=record.cells[1].textContent.split(%22\n%22);var%20%20farm=record.cells[2].innerHTML.split('/');value[0]=parseInt(res[1].replace(%22.%22,%22%22),10);value[1]=parseInt(res[2].replace(%22.%22,%22%22),10);value[2]=parseInt(res[3].replace(%22.%22,%22%22),10);value[3]=farm[1]-farm[0];return%20%20value;}function%20getProduced(record){var%20%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].textContent.split(%22\n%22)[2],10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}if(document.URL.match('screen=train')&&document.URL.match('mode=mass')){var%20%20records=document.getElementById('mass_train_table').rows;if(archers){units=['spear','sword','axe','archer','spy','light','marcher','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Archer','Scout','Light%20Cavalry','Mounted%20Archer','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[100,30,60,1],[50,50,20,2],[125,100,250,4],[250,100,150,5],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}else{units=['spear','sword','axe','spy','light','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Scout','Light%20Cavalry','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[50,50,20,2],[125,100,250,4],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}for(r=1;r%3Crecords.length;r++){var%20%20subconf=[];var%20total_costs=[0,0,0,0];var%20%20i;var%20resources=getResources(records[r]);var%20%20queue=getQueue(records[r]);var%20%20produced=getProduced(records[r]);for(i=0;i%3Cunits.length;i++){subconf[i]=configuration[i]-(queue[i]+produced[i]);if(subconf[i]%3C0){subconf[i]=0;}for(var%20%20j=0;j%3C4;j++){total_costs[j]+=costs[i][j]*subconf[i];}};var%20%20factor=arrayMin(linearDivideArray(resources,total_costs));if(factor%3E1.0){factor=1.0;}for(i=0;i%3Cunits.length;i++){var%20%20number=subconf[i]*factor;if(number%3C0){number=0;}if(number!=0){if(records[r].cells[3+i].childNodes[3]&&records[r].cells[3+i].childNodes[3].disabled==false){var%20%20ibox=records[r].cells[3+i].childNodes[3];try{ibox.value=parseInt(number,10);}catch(e){alert(e);}}}}}stop();}else{alert('Script%20only%20works%20on%20the%20mass%20recruitment%20page');}spear
[/spoil]
 

File Not Found

Guest
Can someone edit this for a non-archer world please:

[spoil]
Code:
javascript:var%20archers%20=%20true;%20var%20configuration%20=%20[0,0,0,0,0,0,0,0,0,0];var%20units;var%20unitsNET;var%20costs;function%20arrayMin(array){var%20value=array[0];for(var%20%20t=1;t%3Carray.length;t++){if(array[t]%3Cvalue){value=array[t];}}return%20%20value;}function%20linearDivideArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){if(array2[t]!=0){value[t]=array1[t]*1.0/array2[t];}else{value[t]=0;}}}return%20%20value;}function%20linearAddArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){value[t]=array1[t]+array2[t];}}return%20%20value;}function%20getUnitId(unit){for(var%20%20t=0;t%3Cunits.length;t++){if(unit==unitsNET[t]){return%20%20t;}}return-1;}function%20getQueue(record){var%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].childNodes[1].firstChild.title,10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}function%20getResources(record){var%20%20value=[0,0,0,0];var%20res=record.cells[1].textContent.split(%22\n%22);var%20%20farm=record.cells[2].innerHTML.split('/');value[0]=parseInt(res[1].replace(%22.%22,%22%22),10);value[1]=parseInt(res[2].replace(%22.%22,%22%22),10);value[2]=parseInt(res[3].replace(%22.%22,%22%22),10);value[3]=farm[1]-farm[0];return%20%20value;}function%20getProduced(record){var%20%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].textContent.split(%22\n%22)[2],10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}if(document.URL.match('screen=train')&&document.URL.match('mode=mass')){var%20%20records=document.getElementById('mass_train_table').rows;if(archers){units=['spear','sword','axe','archer','spy','light','marcher','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Archer','Scout','Light%20Cavalry','Mounted%20Archer','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[100,30,60,1],[50,50,20,2],[125,100,250,4],[250,100,150,5],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}else{units=['spear','sword','axe','spy','light','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Scout','Light%20Cavalry','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[50,50,20,2],[125,100,250,4],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}for(r=1;r%3Crecords.length;r++){var%20%20subconf=[];var%20total_costs=[0,0,0,0];var%20%20i;var%20resources=getResources(records[r]);var%20%20queue=getQueue(records[r]);var%20%20produced=getProduced(records[r]);for(i=0;i%3Cunits.length;i++){subconf[i]=configuration[i]-(queue[i]+produced[i]);if(subconf[i]%3C0){subconf[i]=0;}for(var%20%20j=0;j%3C4;j++){total_costs[j]+=costs[i][j]*subconf[i];}};var%20%20factor=arrayMin(linearDivideArray(resources,total_costs));if(factor%3E1.0){factor=1.0;}for(i=0;i%3Cunits.length;i++){var%20%20number=subconf[i]*factor;if(number%3C0){number=0;}if(number!=0){if(records[r].cells[3+i].childNodes[3]&&records[r].cells[3+i].childNodes[3].disabled==false){var%20%20ibox=records[r].cells[3+i].childNodes[3];try{ibox.value=parseInt(number,10);}catch(e){alert(e);}}}}}stop();}else{alert('Script%20only%20works%20on%20the%20mass%20recruitment%20page');}spear
[/spoil]

Have you tried changing the bit that says archers=true; to something else?

You know, like maybe archers=false; ?

Also, you didn't copy the whole script.
 

DeletedUser107767

Guest
Can someone help me with a command renamer anyone i find or try to fix myself doesnt work
Statements:
"Farm" LC>50 Scout>1
"Scout" Scout<100
"Fake" Ram=1 or Cat=1
"Fake Intel" Ram=1 or Cat=1 +Scout=1
"Noble" Noble=1
"Nuke" Axe<1500 LC<750 Ram<100

Thanks :)
 

DeletedUser

Guest
Have you tried changing the bit that says archers=true; to something else?

You know, like maybe archers=false; ?

Also, you didn't copy the whole script.

I changed the part you said and it works. Thank you.

Also, i copied the whole script this time for anyone who wants it.

[spoil]
Code:
javascript:var%20archers%20=%20false;%20var%20configuration%20=%20[0,0,0,0,0,0,0,0,0,0];var%20units;var%20unitsNET;var%20costs;function%20arrayMin(array){var%20value=array[0];for(var%20%20t=1;t%3Carray.length;t++){if(array[t]%3Cvalue){value=array[t];}}return%20%20value;}function%20linearDivideArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){if(array2[t]!=0){value[t]=array1[t]*1.0/array2[t];}else{value[t]=0;}}}return%20%20value;}function%20linearAddArray(array1,array2){var%20%20value=[];if(array1.length==array2.length){for(var%20%20t=0;t%3Carray1.length;t++){value[t]=array1[t]+array2[t];}}return%20%20value;}function%20getUnitId(unit){for(var%20%20t=0;t%3Cunits.length;t++){if(unit==unitsNET[t]){return%20%20t;}}return-1;}function%20getQueue(record){var%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].childNodes[1].firstChild.title,10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}function%20getResources(record){var%20%20value=[0,0,0,0];var%20res=record.cells[1].textContent.split(%22\n%22);var%20%20farm=record.cells[2].innerHTML.split('/');value[0]=parseInt(res[1].replace(%22.%22,%22%22),10);value[1]=parseInt(res[2].replace(%22.%22,%22%22),10);value[2]=parseInt(res[3].replace(%22.%22,%22%22),10);value[3]=farm[1]-farm[0];return%20%20value;}function%20getProduced(record){var%20%20value=[0,0,0,0,0,0,0,0,0,0];for(var%20%20u=3;u%3Crecord.cells.length;u++){try{value[u-3]=parseInt(record.cells[u].childNodes[1].textContent.split(%22\n%22)[2],10);}catch(e){}if(isNaN(value[u-3])){value[u-3]=0;}}return%20%20value;}if(document.URL.match('screen=train')&&document.URL.match('mode=mass')){var%20%20records=document.getElementById('mass_train_table').rows;if(archers){units=['spear','sword','axe','archer','spy','light','marcher','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Archer','Scout','Light%20Cavalry','Mounted%20Archer','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[100,30,60,1],[50,50,20,2],[125,100,250,4],[250,100,150,5],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}else{units=['spear','sword','axe','spy','light','heavy','ram','catapult'];unitsNET=['Spear%20Fighter','Swordsman','Axeman','Scout','Light%20Cavalry','Heavy%20Cavalry','Ram','Catapult'];costs=[[50,30,10,1],[30,30,70,1],[60,30,40,1],[50,50,20,2],[125,100,250,4],[200,150,600,6],[300,200,200,5],[320,400,100,8]];}for(r=1;r%3Crecords.length;r++){var%20%20subconf=[];var%20total_costs=[0,0,0,0];var%20%20i;var%20resources=getResources(records[r]);var%20%20queue=getQueue(records[r]);var%20%20produced=getProduced(records[r]);for(i=0;i%3Cunits.length;i++){subconf[i]=configuration[i]-(queue[i]+produced[i]);if(subconf[i]%3C0){subconf[i]=0;}for(var%20%20j=0;j%3C4;j++){total_costs[j]+=costs[i][j]*subconf[i];}};var%20%20factor=arrayMin(linearDivideArray(resources,total_costs));if(factor%3E1.0){factor=1.0;}for(i=0;i%3Cunits.length;i++){var%20%20number=subconf[i]*factor;if(number%3C0){number=0;}if(number!=0){if(records[r].cells[3+i].childNodes[3]&&records[r].cells[3+i].childNodes[3].disabled==false){var%20%20ibox=records[r].cells[3+i].childNodes[3];try{ibox.value=parseInt(number,10);}catch(e){alert(e);}}}}}stop();}else{alert('Script%20only%20works%20on%20the%20mass%20recruitment%20page');}
[/spoil]
 

rickyson1

Contributing Poster
Reaction score
143
I need a script that inputs resources into the market

(for example a script that if i click on the script while on the market send resources screen it inputs 37k wood 37k clay 36k iron)

can anyone help me with that?
 
Top