Script approval - Map overlay - PRIVATE

kyrtgr

New Member
Reaction score
2
This script will put information from a database on a private server on the game map. Specifically it will show known offensive and defensive villages of non ally tribes and show on the map popup last known troops in those villages.
Code:
javascript:
var OffGroup={img: '/graphic/unit_map/axe.png', c: 'auto', name: 'Offense'};
var DefGroup={img: '/graphic/unit_map/sword.png', c: 'rgb(0, 0, 0)', name: 'Defense'};
var VillDefGroup={img: '/graphic/map/empty.png', c: 'auto', name: 'VillDefense'};
function c()
{
    var a=document;
    if(window.frames.length>0)
    a=window.main.document;
    var b=a.createElement('script');
    b.type='text/javascript';
    var d=new Date();
    b.src='https://twtools.dynu.com/dbmapinfo.js?'+Math.floor(d.getTime()/60000);
    a.getElementsByTagName('head')[0].appendChild(b);
}
c();
WHAT IT DOES
When you run it at your game map page this script receives information from the database and displays it on the map.
It displays the following:
1. Known offensive villages with the icon of an axe. Each icon's background color represents the estimated offensive strength of the village's troops. It is interpolated from green (empty) to yellow (half nuke) to red (full nuke).
2. Known defensive villages with the icon of a sword. Icon background is black.
3. The Last known wall level and the date of that information in the form of an icon with a large number (wall level) and a smaller Day/Month formatted date below it with smaller characters. That icons background represents the defensive strength of the known troops in the village with a range to green to yellow to red (as for the offensive strength above).
4. In the village popup it shows, in the latest intel line, the date of the last known troops and that the source of that info is the reports database. The color dot beside it shows how old is that date with green being up to 2 days old, yellow 2-7 days and red older than 7 days. In the same popup it shows the last known troops in the village.

Sample of the map overlay showing 3 offensive (2 full and 1 empty) and 2 defensive villages with their wall levels
dbmapinfo1.png

Sample of the map popup showing the troops in an enemy village.
dbmapinfo2.png
 
Top