Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Travian: Attack builder

Attack builder - auto sending of waves

Features:
- Set up multiple waves
- Automatic sending of those waves in one click
- Catapult targeting available
- Multiple coordinates possible
- The village 'hopping'-problem is resolved
- Fast and easy mass scouting
- Time the arrival of an attack.
- Save presets of waves. (Alt+shift+[0-9] to save. Shift+[0-9] to load)

New features planed:
- Global and wave specific catapult targeting.
- show a 'total troops' column
- Specify a (circa) delay between waves.
- scouting target per wave basis.
- suggestions?

Known Problems:
- waves will not be timed correctly if your browser\server\line is slow

Chinese version: http://userscripts.org/scripts/show/19962 (translated by yicry)

If you want your language supported you have to translate the text in the text and cataText array in the start of the script and send it to me on email or in the comments here.

m4rtini89@gmail.com (mark any email with the subject "Travian: attack builder)

Donations






Aug 20, 2008
skibumstevo Scriptwright

My buddy and I did the randomization thing... M4tini...if you are reading you should contact me. I'd love to get this new code incorporated into your version for distro!

http://userscripts.org/scripts/show/31432

 
Aug 13, 2008
tw User

I just want to say, great job. I appreciate all of the time and detail you put into this. I, personally, wouldn't have time to play this game if I didn't have time-savers like this.

@toLGa
That was answered on an ealier post. I had the same question.

I have a question myself though. It's easy enough to change the default time from 500 to something less to be more efficient or something more to be less conspicuous. But, can you incorporate a random number generator for "variety" in the delay between attacks? This could be in the form of X + random or a random number between X and Y. It would be great if we could input X and Y. I expect a number too small might cause errors in and of itself.

 
Aug 8, 2008
chunkyyluvr53 User

well i'm not sure what ERROR:Unable to get active village. Assuming one village account\\ means but i have been getting that since as of now i only have one village... A suggestion would be to sort of make it like an auto farming thing... Like send 10 clubbies and then after "x" amount of time send more... It should not require all troops to be present for it to do it.. like if i have 10 clubswingers and i set up two waves with 10 clubswingers that are ("X" amount of time)apart then it should do so... It would also be nice to set up with a specific time between each individual wave.. instead of "x" amount of time between all waves it should be "x"amount of time between first and seconds and "y" between third and fourth.

 
Jul 31, 2008
Cerafil User

Just an error that needs some explaining.

ERROR:Unable to get active village. Assuming one village account\\

AND
I need to know if this script can attack without me being on the pc.. like attack all night

 
Jul 16, 2008
_christine_ User

Very. very helpful! Thank you! :o)

But I've a suggestion. When u click on a player and use "send troops", the coords are automatically added in your form. Thats great, but I miss is a possibility to add the coords of _all_ his villages to send some nice fakes. ^^

 
Jul 7, 2008
binglu User

good very good

 
Jun 16, 2008
Mica User

Glad to see you back martini, you should look at bluelovers, its got a really nice interface, I like the ability to choose the time delay too. Too bad it screws up with QP Targets auto scout and other features.

 
Jun 15, 2008
m4rtini Script's author

I just finished my last exam so i will probably get more time to work on my script from now on. Sorry for the long time without any activity

 
May 30, 2008
Joe Black User

Okay, got a small problem. When I go to my village to send out waves to a inactive village, I enter 1 wave as the following
Wave setup:
#* = 1, Maces: 8
then it says
ERROR: not enough troops! (Troop #1)

I've tried different things like #*=2, Maces:4 etc, what is the right way to do it? Sorry for the noobie question

 
May 29, 2008
m4rtini Script's author

Spanish and Portuguese translations added

 
May 26, 2008
mbg User

Script works great except the fact that the Timed arrival feature is acting up. From what I could tell, it doesn't sync the time properly. Any solutions/fixes for this?

 
May 25, 2008
pablo99master User

hi all!

could somebody explain me how i can use option 'Time the arrival of an attack' ??

 
May 23, 2008
Diego2002 User

At my friend, the script (the window) doesn't appears on the screen at s*.travian.*/a2b.php. Only the standard unit sending.

Otherwise, there's another script, which didn't load in, so don't work at all.

What can cause this problem?

Greasemonkey Installed, Firefox 2.0.0.14.
At this moment, only Multi crop finder is installed.

 
May 23, 2008
toLGa User

is there a way to make 1 or 2 second delay between attacks ?

 
May 22, 2008
dare1zen User

Excuse me.

But I think the "arrival time" is not working correctly.

 
May 21, 2008
m4rtini Script's author

did a quick bugfix. what they did (i think) was to move the ending form tag for the original form to the end of the page. i now moved the script below there again to make it work =)
sorry for not responding to any request lately, but lot's of exams coming up now, first one tomorrow actually :O

 
May 19, 2008
ScriptUser User

Yes, I'm experiencing the same situation. Seems like another one of those fun code changes they sneak in there with actual upgrades to screw with us.

 
May 7, 2008
Melhior User

@m4rtini
great work, man, thank you!

I've got 2 troubles:
1. why does script make a mess with cata targets in waves after loading saved preset?
2. why does script sends the 1st wave as a 2nd so often?

 
May 6, 2008
calhemp User

my translate in spanish

with server .net

case "et"://by jeje

text = ["Ataca!!! =)","Tipo de ataque invalido!","No hay coordenadas!","No hay suficientes Tropas! (Tropas #","No tropas introducidas","Empezando","Problamente malas coordenadas","No hay exploradores","Correcto-Hecho","Configurar Ataque:","Añadir nuevo ataque","Resetear","Configurar ataque:","Tipo de ataque:","Normal","Refuerzos","Atraco","Acechar Produccion/Tropas","Achechar Defensas/Tropas","Coordenadas","Ataca camarada! =)","Tiempo de Llegada","Llegara a las :","Establecer tiempo de llegada","Numero de ataques de esta estrategia","con '|' ex: 0,0|1,1","ERROR:","Incapaz de encontrar la aldea activa. Assuming one village account","Tiempo de llegada establecido a las:"];
cataText = ["Selecciona un objectivo =)","Aleatorio","Leñador","Barrena","Mina Hierro","Campo de Cereales","Serreria","Ladrillar","Fundicion","Molino","Panaderia","Almacen","Granero","Herreria","Armeria","Plaza de Torneos","Edificio Principal","Plaza de Reuniones","Mercado","Embajada","Cuartel","Establo","Oficina","Academia","Ayuntamiento","Residencia","Palacio","Oficina de comercio","Cuartel Grande","Establo Grande","Casa del Heroe","Almacen Grande","Granero Grande","Maravilla","Tesoro"];

break;

 
May 2, 2008
calhemp User

Hi, thanks for your script, but I have a litlle question in my little expierence with javascript.

I see, with adding a alert after init function
detectLanguage();
alert(sLang);

that your function returns a 2 char of domain name,
but I play in my server Spanish and Catalan, that have 3 chars on domain ".net" and ".cat"

It's posible to add this funcionality in the function detectLanguage() for translate de cataText later?

thanks in advance.

 
Apr 30, 2008
BmW User

@SAPikachu

It would be cool if you would upload your version here or somewhere else, so that it would be more easyer for other people to get your version, cuz some dont know how to modify the script :P

Just an suggestion :) No offence...

 
Apr 30, 2008
BmW User

case "si"://by BmW
text = ["Trganje Gat =)","Napačen tip napada!","Ni koordinat!","ni dovolj enot! (Enot #","Enote niso vpisane","Začenjam","Verjetno slabe koordinate","Ni skavtov","Končano","Nastavitve valov:","Nov val","Resetiranje","Nastavitve napadov:","Tip napada:","Polni","Okrepitve","Roparski","Poizvej o surovinah/enotah","Poizvej o obrambi/enotah","Koordinate","Trgaj Gate! =)","Čas prihoda","Prihod ob:","Nastavi čas prihoda","Število teh valov","z '|' npr: 0,0|1,1","NAPAKA: ","Ni mogoče naji aktivne vasi. Verjetno ima račun eno vas","Čas prihoda nastavljen ob:"];

cataText = ["Izberi tarčo =)","Naključen","Gozdar","Glinokop","Rudnik železa","Žitno polje","Žaga","Opekarna","Talilnica železa","Mlin","Pekarna","Skladišče","Žinica","Izdelovalec orožja","Izdelovalec oklepov","Vadbišče","Gradbeni ceh","Zbirališče","Tržnica","Ambasada","Barake","Konjušnica","Izdelovalec oblegovalnih naprav","Akademija","Mestna hiša","Rezidenca","Palača","Trgovski center","Velike barake","Velika konjušnica","Herojeva rezidenca","Veliko skladišče","Velika žitnica","Čudo sveta","Zakladnica"];
break;

 
Apr 25, 2008
SAPikachu User

The comment system messed up my code... This is code in the end:


    //if (tHours == hours && tMinutes == minutes && tSeconds == seconds)
    if (difference>=0&&difference<60000)
//Modified code end
      {
      myimbabutton.click();

 
Apr 25, 2008
SAPikachu User

@syntax53
Sorry for my mistake. Here is the code with original code after modified blocks.

//...
//New code start
var initialClientTime, initialServerTime;
//New code end
//Skal implementeres asap
function getArrivalTime(tempWaveNumber, Xcord, Ycord)
{
//...

if (tag.snapshotLength)
  {
	document.getElementById('arrivalTimeDiv').innerHTML = text[21] +':' + tag.snapshotItem(0).innerHTML;
	referenceTime = new Date().getTime();
//New code start
	initialClientTime = new Date();
	
    count = tag.snapshotItem(0).innerHTML.split(':');
    initialServerTime = new Date(2000,1,1,count[0],count[1],count[2]).getTime();
//New code end
	clearInterval(timerIntervalId);

	timerIntervalId = setInterval(function(){arrivalCounter()},1000);
//....

function arrivalCounter()
{
diffTime = Math.round((new Date().getTime() - referenceTime)/1000);
if (diffTime >= 1)
{
//Modified code start
/*
 count = document.getElementById('arrivalTimeDiv').innerHTML.split(':');
 hours = count[1];
 minutes = count[2];
 seconds = count[3];
seconds = parseInt(seconds,10) + parseInt(diffTime,10);
 if (seconds >= 60)
 {
 minutes++;
 seconds = seconds - 60;
 }
 if (minutes >= 60)
 {
 hours++
 minutes = minutes - 60;
 }
 if (hours >= 24)
 {
 hours = 0;
 }
*/
 var now = new Date();
 var serverNow = new Date();
 serverNow.setTime(now - initialClientTime + initialServerTime);
 seconds = serverNow.getSeconds().toString(); 
 minutes = serverNow.getMinutes().toString(); 
 hours = serverNow.getHours().toString(); 
//Modified code end
 seconds = seconds.replace(/\b(\d)\b/g, '0$1');
 minutes = minutes.replace(/\b(\d)\b/g, '0$1');
 hours = hours.replace(/\b(\d)\b/g, '0$1');
//...

    tSeconds = tTimer[2]
    tMinutes = tTimer[1]
    tHours = tTimer[0]
//Modified code start
	var difference = new Date(0,0,0,hours,minutes,seconds) - new Date(0,0,0,tHours,tMinutes,tSeconds);
    //if (tHours == hours && tMinutes == minutes && tSeconds == seconds)
    if (difference>=0&&difference<60000>

 
Apr 22, 2008
SAPikachu User

By the way, the code trimmed in the end is insignificant, the main part is complete.

You could comment on this script if you were logged in.