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

Travian under-attack check

Travian under-attack check

set this to false to make it not freeze the screen when running a check, village hop more probable then!

var freezeWhenCheck = true;

bugfix:
- bug that made the freezescreen to not disappear and the second time on the same page.

Now there is a possibility to call your own external pages\scripts to do some kind of response(like sending you a email) when you're under attack.

var externalUrl = "";
var externalPostData = "";
var runEveryTime = false;

These are the parameters that you have to edit.
externalUrl: the url to your script, here you can also include GET variables to the end like this www.url.com?var=value&var2=value2

externalPostData: The postdata to be sent, ex: var=value&var2=value2

runEveryTime; Defines if the external script should run every time it detects that you're under attack. if not it will only run the first time it detect the attack.

Donations




5 hours ago
badowl16 User

does this keep you logged in. im trying to work on a script that keeps you logged in all day so task que works all day long.

 
Aug 3, 2008
Andrada6 User

maybe some gmail calendar like gsms notificafion would be great :D

 
Aug 1, 2008
GuldM User

Very nice script. Thank you..

Is there any way to make the script open a mp3/wave file on my computer instead of an url?

 
Jul 30, 2008
HannaH021 User

I just want to say THANK YOU, i've been looking for something like this,
Thanks again a lot...

But one more question... Can we change it to only sound in the last 15mins or something?

And what if we have more than one village? what do we need to change?

Thanks

 
Jul 21, 2008
Nux User

I have a question: How often does the script check if there are incoming attaacks? And if I want to modify that time how can I do?
Thanks

 
Jul 18, 2008
runner75 User

Hi to all,
Is it possible to have an example of an external script that runs?
It would be usefull to have an e-mail or a mp3 playing....

Thank you
Runner75

 
Jun 24, 2008
szerelem Scriptwright

travianfun: my script ( http://userscripts.org/scripts/show/25340 ) use dorf1.php to check the units. Try that.

 
Jun 21, 2008
travianfun User

Please help me m4rtini!
Your script doesn't work on hungarian server 3 because the dorf3.php working with travian plus account.
Can you resolve that the script use dorf1.php or anything else?

 
Jun 21, 2008
zacki User

How can i run a mail script? I tried imacros url but doesn't work, the script alerts me but it doesn't open any page

 
Jun 19, 2008
m4rtini Script's author

now working on fx3 and newest version i think. doesn't give any error on load at least. Strangest error ever tho, apparently I'm not allowed to name a function 'external' anymore, renaming it to 'external2' works fine. lol :P

 
Jun 17, 2008
justass User

thanks Adam, it started working after removing external function and reference to it

 
Jun 17, 2008
Adam Novak User

The script did not want to work on the new version of Greasemonkey. So I looked inside the script and found, that the error is in the "external" function. I removed the function "external" and all references to it. Now the script works fine.

 
Jun 17, 2008
Adam Novak User

After upgrading Greasemonkey from version 0.7... to 0.8..... the script stopped working. In the log I found the message "Illegal value". I had to go back to old version of Greasemonkey and the script start working again.
So probably the script is not compatible with new version of Greasemonkey.

 
Jun 16, 2008
justass User

Same problem here as vp3, error on 344 line. As i understand script fail to execute this part of code GM_getValue('underAttackFlag', false); and don't get that variable

 
Jun 16, 2008
vp3 Scriptwright

I use to really like this script but lately it doesn't work. I checked it out with Firebug and it says something about there being an illegal value on line 344. I'm not sure what that means so I hope you can fix it soon.

I'm using it on the us6 and speed servers. I get the same error on both servers.

 
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

 
Jun 6, 2008
toLGa User

do i have to logout and then login for the script to check the attacks ?

 
May 21, 2008
castaban User

Excellent!!!
One question, if I am playing at multiple servers and all of them open under different tabs, will this check all? If not what determines which one will be checked?

 
May 8, 2008
kingoleg Scriptwright

It does not work on firefox 3b5 on Ubuntu/Linux. How I can debug it?

 
May 7, 2008
moep User

Is it possible that the programm only alert when the attack is 30 minutes and less

 
May 7, 2008
moep User

Hello,
the script works great, but i think there are more options than i know. Can anybody explain me the script. My english is very bad so maybe is there are german guy... (english is also ok, but i don't understand programmer language. Var,nameA, so i don't know what i have to edit by this script)
Thanks

 
Apr 22, 2008
m4rtini Script's author

ok, this is gonna be just theoretical since i don't any specific site to reference too.

lets say that, 'www.sendfreemails.com/send.php' is a page that allows you to send mails.
lets say that it allows you to loginn through POST or GET variables(if you don't know about those google it)

externalURL would then be 'www.sendfreemails.com/send.php?username=mailuser&password=mysupersecretpassword&message=Under attack&recipient=myownmail@something.com'
if the page don't allow GET variables but post variables(or maybe a mix) put the variables that i put in the link in the externalPostData like this:
externalPostData = 'username=myusername&password=mysupersecretpassord....'

 
Apr 21, 2008
no1wafer User

Hi
I was wondering
How am I supposed to use the externalUrl function to send myself an email?
Can you teach us how to do that exactly?
THANKS

 
Apr 19, 2008
m4rtini Script's author

I'm prioritizing my other scripts before this one because this meets my own needs at the time. When i feel i have the time i might start working on this again.

@Lexi
for the time being that is not a possibility, tho an interesting idea that i might add if i get the time.

@daBeetle
You can't for the time being.

 
Apr 16, 2008
Lexi User

Hello m4rtini, i like this script very much, thank you!

Do you know if there is a possibility to switch off the alert for only ONE village, if it is under attack? So i could sill get an alert, if there is coming another attack to one of the other villages :-)

If anyone know the answer, i would be thankful for it!

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