DaWolf85

Non-stop Poster
Reaction score
583
Author
Dawolf85
Contributors
oreg/silicina
Quickbar Entry
javascript:$.getScript('https://dl.dropboxusercontent.com/s/dukcaol8u27wxg2/watchtower_timer.js');void(0);
Public?
Public
This is a fully working, English-translated version of this watchtower timer script from oreg/silicina on the .hu forums.

I would like to thank lodi94 for giving me the idea with his version for both the Italian and International versions. Unfortunately, his version does not work for me, and his code is too obfuscated to try and fix - so I went back to the source, fixed it up a bit, translated it to English, and got it approved for .net (ticket number t13893927).

For anyone looking to edit this script in the future - some of the comments I could not translate perfectly (as I do not speak Hungarian, I used Google Translate). For these, I have attached a (?) to the end of the comment, to denote questionable English.


Description:

This script will calculate when an incoming attack will enter your watchtower's range, and display a countdown for each incoming you have. It will create a new column for this, labeled "Watchtower".

If the incoming is already detected by a watchtower, the script will print "Detected". If the incoming will not fall inside a watchtower's range, it will print "Undetectable". Otherwise, it will show a countdown to the time the attack will be detected by a watchtower.


Usage:
  1. Click the script to be taken to the appropriate incomings page. It requires that you be on the 'unignored' incomings page, so even if you think you are on the incomings page, it may still refresh the page to take you where it wants to be.
  2. Click the script again to actually run it.
Additionally, you must make sure your incomings are tagged IN ENGLISH, or the script will not be able to detect their speed. To see the tags the script checks for, open the spoiler below.
  • Sword-speed attacks should include "Sword" in their name.
  • Axe/Spear-speed attacks should include "Axe" or "Spear" in their name.
  • Scout-speed attacks should include "Scout" or "Spy" in their name.
  • Light Cavalry-speed attacks should include "LCav" or "Light" in their name.
  • Heavy Cavalry-speed attacks should include "HCav" or "Heavy" in their name.
  • Ram/Cat-speed attacks should include "Ram", "Cat", or "Catapult" in their name.
  • Noble-speed attacks should include "Noble" in their name.
These expected tags are not case-sensitive.
If an incoming's name includes two of these tags, the script will pick the first one from this list.


With all of that out of the way, here is the script itself:
Code:
javascript:$.getScript('https://dl.dropboxusercontent.com/s/dukcaol8u27wxg2/watchtower_timer.js');void(0);
 
Last edited:
Upvote 8

DaWolf85

Non-stop Poster
Reaction score
583
oreg is the Hungarian scripter
The account name was öreg, now he uses silicina on the Hungarian servers

As far as I see you upgraded the script because originally it couldn't handle if the command name used more than 1 word (ram, noble and so on) so thank you for that!
Edited to reflect the original author, thank you!

And yeah, it originally only supported very basic tagging; changing that was part of 'fixing it up' for me, as it seemed pretty likely most people who wanted to use it would also use more advanced taggers.
 

Deleted User - 11387559

Guest
Hello,

is this still working for everyone?
Because I got calculated only first attack. (see on img.)
1592846988063.png

Am I doing something wrong?
Please help.

I'm playing on Slovak 62 server.

Thanks.
 

Frying Pan Warrior

Still Going Strong
Reaction score
578
Hello,

is this still working for everyone?
Because I got calculated only first attack. (see on img.)
View attachment 4920

Am I doing something wrong?
Please help.

I'm playing on Slovak 62 server.

Thanks.

Well the other attacks don't have the will be detected by watch tower icon, so they already were detected? But I suppose DaWolf said the script should say Detected in that instance.
 

Deleted User - 11387559

Guest
Yes, they were already detected. But as you said, it shhould say Detected. Also he said "a countdown for each incoming" will be displayed.

Now I have the same result with no attacks being already detected.
1593001990813.png

Is it working for you?


Thanks!
 

Frying Pan Warrior

Still Going Strong
Reaction score
578
Yes, they were already detected. But as you said, it shhould say Detected. Also he said "a countdown for each incoming" will be displayed.

Now I have the same result with no attacks being already detected.
View attachment 4937

Is it working for you?


Thanks!

If you're able to open your browser's javascript console when you use the script, are there any error messages coming up?
 

Deleted User - 11387559

Guest
Okey so I got some errors.

1593033796704.png

But it is interesting. Now I got "results" for all attacks but it is undetectable but attacks are detected. (I tested it with my friend and after he opened console he now also got undetectable for all attacks but his attacks has not been detected yet.
Can it be also because I have two watchtowers?

Thanks!
 
Last edited by a moderator:

DaWolf85

Non-stop Poster
Reaction score
583
Thanks to @Reidarm for contributing a fix for all the unnecessary requests this script was making (approved as ticket t14044720), and thanks to @Frying Pan Warrior for encouraging me to make the script case-insensitive. An additional bug has been fixed where attacks might be erroneously marked as 'Undetectable'.

@BuHy Try now, I think you tried it while I was in the middle of fixing it there (I accidentally pushed a broken version to the production script).
 

Deleted User - 11387559

Guest
Hi, I tried it but unfortunately it is still not working properly.
Now even if attack was detected I got time and again it is only for the first attack.
1593103584808.png
Is there someone who is running this script properly and without any issues?


Thanks!
 

DaWolf85

Non-stop Poster
Reaction score
583
Is there someone who is running this script properly and without any issues?
Yes, it was working perfectly for me yesterday. For some reason it appears to be calculating a negative time for you; I don't know why.
 

Deleted User - 11387559

Guest
Okay and why is it showing only for the first attack please?
1593282351866.png
 
Last edited by a moderator:

Deleted User - 848893470

Guest
For me its is showing also only the first attack... and the -time thing got fixed thats is working fine for me
 

Deleted User - 11387559

Guest
Hello, please, did you find time to look at it?

Thanks!
 

Frying Pan Warrior

Still Going Strong
Reaction score
578
Hello, please, did you find time to look at it?

Thanks!

I was recoding it with a couple new features but I didn't have a chance to finish it. I might just release what I've done and let someone else continue it if I don't find a chance to work on it by the end of next week.
 
Top