Travian: Antifarm\Troop saver - Original

By m4rtini Last update Jan 30, 2009 — Installed 153,225 times.

updates

in
Subscribe to updates 21 posts, 13 voices



m4rtini Script's Author

i will be updating several of my script in the coming month. give me some suggestions if you have some. and notify me of any bugs you may find.

 
m4rtini Script's Author

if anyone has an account they don't need anymore i would be very happy if they'd consider giving\lending it to me so i can start updating this for multi-village use. contact me at m4rtini89<at>gmail<dot>com</dot></at>

 
m4rtini Script's Author

i will also see if i can find a more clever method of retreating the troops since from what I've heard is "kinda" buggy :P

 
NOrack Scriptwright

My first and the only current suggestion: Let the players, who have more than one village, have the opportunity to get the benefit of your script. I don't have idea of how to realize my suggestion. If you check the incoming attack from resources page, then how about if you check from gathering spot (to where the troops gather)?

I have an account, for you to conduct your experiments with, at s1.travian.co.id if you are interested.

Cheers,
NOrack
from Indonesia

[EDITED] Ooops, forgot one important thing: Only one village left, others have been destroyed in a war. So I think my account will be no good for your multi-villages troop management experiment purpose. :D

 
Fantasia User

I experimented your script but troops don't return.

Now I try with a villo's friend .

Do you know if troops are send like a renforcement or like an attak?

Please reply Tanks

F.

 
m4rtini Script's Author

i did a small update so that it retreats the last wave. before it would assume that there was just one to retreat and take the first it found. still working on making the retreat function more stable.

 
disciple User

I just installed this script, and haven't tested it yet, but it's a very cool script.

However, I have a few questions. If you would be kind enough to answer them for me, I'd be very grateful.

1) Do I need to change the URL in the script code to the server I'm playing on? Or will it work with the '*' wildcard in it?

2) Since this is a browser script, I'm sure it doesn't work if I'm not logged in on my browser, is that correct?

Thanks for creating a cool script!

 
m4rtini Script's Author

the wildcard will be enough. and yes you need to be logged in and have the page open to make it work.

 
disciple User

First off, I want to say you kick ass m4rtini. Thanks for taking the time to create this script. To the morons who come on here and bad mouth and whine about this or that, screw 'em. I do websites, and people always whine about this or that, but they don't have the skills to do it themselves, so they should be grateful for what they get, especially when it is free.

Secondly, thanks for replying back and answering my question.

One more question though. If I have another persons reinforcements in my village, will this script work for them as well? Or does it only apply to my one village's troops? I understand to make it for reinforcements would be much more work, so I don't expect it to, but if it does, that's a bonus.

 
m4rtini Script's Author

thanks =)

no it don't work for reinforcements. I mainly use it the first few weeks of the server to keep my troops alive. and at that stage of the game reinforcements isn't a issue.

 
LiorE User

hi m4rtini, first i would like to compliment you on your script, as a programmer i know
it's not easy doing stuff like that. keep up the good work.
i would really like to help making this script better, with your permission.
but my js skills are a little lacking, if you're willing, and if you don't mind,
i'll bother you with questions (privately of course) about the code you've written.
it would really help if you could publish or just give me a more documented version of the script,
it would make the understanding of the code quicker.
what do ya say?

 
m4rtini Script's Author

i don't have any other more documented version of it. is that some standard practice among programmers to do? (As i neither work with or study programing i had to ask :P)

I guess you'll just have to ask and I'll try to answer as good as i can :)
m4rtini89@gmail.com

 
dapidmini User

umm... since the other discussion topic is locked i'll have to ask here.. how do i test this script? i only have one village so i can't attack myself..

btw, many thanks for the script, this is by far the most useful travian script for me.

 
rosco1 User

Has anyone managed to get this to work as I can not?

 
tzvika pik User

If any one need to know :
totSeconds < 30 - means start saving troops 30 seconds before.
cValue or C - means if the attack is reinforce , attack or raid. you need to change this line in the code: ....'&c='+cValue+'..... to '&c='+'X'+'..... where X is the option:
X=2 reinforce
X=3 attack
X=4 raid
hope it will help people...

 
lie Scriptwright

is it true that this script not compatible with travian beyond3 ? because i never got this script work..

 
totoro User

Very nice script. Thanks for sharing it with us.
Just a note on the use of parseInt() in the source. You may need to add the radix (10) as the second argument so it won't treat "08" and "09" as octal and return 0.

 
m4rtini Script's Author

i don't use beyond so i wouldn't know. just deactivate and test.

 
dennis_kok Scriptwright

Hey m4rtini. The script works! but only 1 thing. The troop didn't come back after going to reinforcement. I must click withdraw at that person village I just can withdraw my troops. Izzit possible for you to make the troops automatically cancel the reinforcement and come back after few second?

 
hit^ User

15 min is way too much for my closest attacker, so I made the script to reload every 60 sec (60000 ms) and totSeconds < 70, also some debuging right after that "if-line":

GM_log("Arrival: " + arrival + " Time: " + totSeconds + " < 70 seconds");

Troops are retreated after 40 sec (40000 ms).
The problem is, my troops are always killed, because script sends them away at totSeconds < 600 and they get back before attacker arrives. Question, why 600?

-- edit
I think I found solution, though I need some testing and no one attacks me when needed :mad:

-- edit 2
Worked one time now, so must be fine.


hours = parseInt(arrival.split(':')[0], 10);
minutes = parseInt(arrival.split(':')[1], 10);
seconds = parseInt(arrival.split(':')[2], 10);

Otherwise javascript parses numbers with leading zeros as octals, not decimals and calculating correct time will fail.

lie: I use Beyond3.

 
igimax User
FirefoxWindows

Hi m4rtini
first of all, Thanks for your great script. I use FireFox 3.5.1
and your script do not work on it! any updates?! New Tips?!

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel