RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Author
RedAlert
Contributors
N/A
Quickbar Entry
javascript:$.getScript('https://twscripts.dev/scripts/loyaltyCalculator.js');
Public?
Public
Loyalty Calculator

Approved:
t14092877

loyalty-calculator.png

This script runs from:
/game.php?village=xxxxx&screen=overview
(so runs on village overview)

The goal of the script is to calculate/estimate the possible loyalty on a newly nobled village which has nobles inbound. The script finds the nearest noble and it uses that one to calculate what the loyalty on the time when that noble lands will be. For this to work Incomings need to be correctly tagged. If you have incomings untagged the script wont be able to calculate anything. The script is based on the premise that everywhere Noble attacks are labeled with "Noble" so they have noble as part of the tag.

This is how the script would look in practice:

For any bugs, suggestions or if you need help with the script, let me know by replying on the thread.
 
Last edited:
Upvote 1

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Script updated to v2.0.0

1648648880670.png


1648649002429.png

1648649252821.png

1648649311229.png

Changelog:
-
added a loyalty calculator for attacks

The attacks loyalty calculator is based on a report which has loyalty drop.

You need to run the script on the report first. Then you can go on the village under attack and re-run the script there.

If the script can find information regarding that village it will start calculating based on that, otherwise it will show e notice.

For any bugs, suggestions or if you need help with the script, let me know by replying on the thread.
 

Swiftblade

New Member
Reaction score
6
Does this one still work as expected? I just tried it on en139.

I went to a report of me attacking another village:
  • Battle time: Apr 10, 2024 14:37:53:133
  • Loyalty: Dropped from 51 to 25
1712790801657.png

Then I visited the village's page (screen=info_village) and used the script again.

I was expecting an estimate of about 40 loyalty. But instead I got this:

1712790491445.png
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Does this one still work as expected? I just tried it on en139.

I went to a report of me attacking another village:
  • Battle time: Apr 10, 2024 14:37:53:133
  • Loyalty: Dropped from 51 to 25
View attachment 12734

Then I visited the village's page (screen=info_village) and used the script again.

I was expecting an estimate of about 40 loyalty. But instead I got this:

View attachment 12733
Try clearing localStorage and try again.

I just tested the script and seems to be okay.

1712861380413.png
 
Top