Split Army Table!!
|
|
Hello,
I have a little issue...
and thank you |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
maybe the same at the buildings?
or if it would be easier, use pictures instead words like at the armee/fleet table. I could decrease the pictures and host them for you. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
thanks frechi for your comment
maybe it is better to include the pictures rather than the names
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
I've tested a little bit.
For the test i chanched the discription into a link to the picture, i know it's a simple way, but on this way i only changed one language. I think kchen will find a better way to implemet it. I've test also a little bit at the army table but without any solution. The only way will be to split the table like alreemi wrote in the first posting here. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
I has edited the script for icon in building table with size (65px-65px) and I has succeedwith it but the wall's icon is too weird. So I don't khow but if you want to change it you can try this. This is the full script but it just support Vietnamese and English.
//**************************************************
//==Ikariam kchen Overview
//Original script by kchen at http://userscripts.org/scripts/show/35879
//Remix by LxL
//**************************************************
var _startTime = new Date().getTime();
var scriptversion = "v0.2.8.031";
var scriptname = "kChen Overview"; // please don't change
var scriptinstall = "http://userscripts.org/scripts/source/35879.user.js";
var scriptsource = "http://userscripts.org/scripts/review/35879?format=txt";
var scriptsite = "http://userscripts.org/scripts/show/35879";
var default_style = <><![CDATA[
#overview__table .resources_table, #overview__table .buildings_table, #overview__table .army_table,
#overview__table .favorites_table, #overview__table .players_table, #overview__table .transporters_table,
#overview__table .research_table {
text-align: center;
border-style: dotted;
width: 980px;
}
.time_counter {
font-weight: bold;
color: #C00000;
}
.lf {
border-left: double;
border-color: #542C0F;
}
.rf {
border-right: double;
border-color: #542C0F;
}
.current_city_highlight {
background-color: #CDA55F;
}
#overview__table table td {
padding: 0px;
height: auto;
white-space: nowrap;
}
#overview__table .upgrading {
background-color: #B4DC8C;
}
#overview__table tr.table_header {
border-bottom: double;
font-weight: bold;
padding: 0px;
background-color: #E6C88C;
color: #542C0F;
}
#overview__table th.table_header {
text-align: center;
font-weight: bold;
padding: 0px;
color: #542C0F;
background-color: #E6C88C;
}
#overview__table tr.table_footer {
border-top: double;
}
#overview__table td.table_footer { /*also for army table's last column*/
font-weight: bold;
}
#overview__table .vacation {
background-color: #B4DC8C;
}
#overview__table .banned {
background-color: #F09090;
}
#overview__table .inactivity {
background-color: #C0C0C0;
}
#overview__table img {
vertical-align: middle;
}
.arrivinggoods {
font-weight: bold;
color: #C00000;
}
td.arrivinggoodstooltip {
padding: 3px;
}
td.arrivinggoodstooltip {
border-width: 1px;
border-style: dotted;
}
/****************** progress bar styles *******************/
table.myPercent {
height: 4px;
width: 100%;
}
tr.myPercent {
height: 4px;
}
td.myPercentRemaining {
// background-color: #CDA55F;
}
td.myPercentNormal { /* normal state. you have plenty of rooms */
background-color: green;
}
td.myPercentWarning { /* warehose is getting full */
background-color: #A00000;
}
td.myPercentAlmostFull { /* warehouse is almost full */
background-color: #C00000;
}
td.myPercentFull { /* warehouse is full */
background-color: #ff0000;
}
/****************** highscore styles *******************/
tr.hs_ownally {
background-color: #DAF887 !important;
}
tr.hs_friendlyally {
background-color: #FFFF80 !important;
}
tr.hs_hostileally {
background-color: #FF979B !important;
}
/****************** population full *******************/
td.populationfull {
color: red;
font-weight: bold;
}
/****************** current building *******************/
#overview__table table th.current_building {
background-color: #E6C88C;
color: #424994;
}
th.current_building {
background-color: #E6C88C;
color: #424994;
}
td.current_building {
}
]></>.toXMLString();
var server = /\/\/([a-z._0-9]+)\//.exec(document.URL);
server = RegExp.$1;
var config = getConfig();
var players = getPlayers();
var langtype = "lf";
var language = setLanguage();
var buildings;
var texts;
getLocalizedTexts(language);
var actioncode = getActionCode();
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, ""); }
String.prototype.RTrim = function() { return this.replace(/(\s*$)/g, ""); }
String.prototype.TrimHTML = function() { return this.replace(/(<[^>]*>)/g, ""); }
function rand(min,max) {
return Math.floor(Math.random()*(max-min+1)+min);
}
function getConfig() {
var config = unserialize(getVar("config", ""));
if (config == null || config == undefined || config == "" || ("".config == "NaN")) {
config = new Object();
}
if (config.cfg == undefined) {
config.cfg = new Object();
}
return config;
}
function saveConfig() {
setVar("config", serialize(config));
}
function getPlayers() {
var players;
try {
players = eval(getVar("players", "({})"));
} catch (e) {
log("Error while unserializing 'players': "+e);
log("Stored data: "+getVar("players", ""));
}
if (players == null || players == undefined || ("".players == "NaN")) {
players = new Object();
}
if (players.cities == undefined) {
players.cities = new Object();
}
if (players.playersCities == undefined) {
players.playersCities = new Object();
}
if (players.islands == undefined) {
players.islands = new Object();
}
return players;
}
function savePlayers() {
setVar("players", uneval(players));
}
function CheckupDate(text){
if (/scriptversion.*=.*\"([v0-9.]+.+)\"/.exec(text) == null) return;
var newversion = RegExp.$1;
var newver = newversion.split("\.");
var oldver = scriptversion.split("\.");
var update = (newver.length != oldver.length) ? true : false;
if (!update) {
for(var i=0; i<newver>< inewver) update = true;
if (update) {
if (confirm(texts["NewVersion"].replace(/%s/,newversion))) {
location.href = scriptinstall;
}
}
}
function VersionUpdate(){
var lastSearch = getCfgValue("LAST_UPDATE", 0);
var searchFreq = 8 * 3600 * 1000; //
if(_startTime - lastSearch > searchFreq) {
setCfgValue("LAST_UPDATE", _startTime);
get(scriptsource, CheckupDate);
}
}
function log(msg) {
if ((config.cfg["DEBUG_LOG"] == true) && (console != undefined)) {
console.log("[kChenOverview] "+msg);
}
}
function xpath(query) {
return document.evaluate(query, document, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
}
function getCfgValue(key, defaultValue) {
return ((config.cfg != undefined && config.cfg[key] != undefined) ? config.cfg[key] : defaultValue);
}
function getCfgValueNonEmpty(key, defaultValue) {
return ((config.cfg != undefined && config.cfg[key] != undefined && config.cfg[key] != "") ? config.cfg[key] :
defaultValue);
}
function setCfgValue(key, value) {
config.cfg[key] = value;
setVar("config", serialize(config));
}
function playSound(sound, volume) {
var body = document.getElementsByTagName("body")[0];
var emb = document.createElement("embed");
emb.src = sound;
emb.setAttribute("autostart", "true");
emb.setAttribute("loop", "false");
emb.setAttribute("hidden", "true");
emb.setAttribute("volume", volume);
body.appendChild(emb);
}
function getRefreshTime() {
return (parseInt(MIN) + Math.round(Math.random() * (MAX - MIN))) * 1000;
}
function setLanguage() {
var arr = server.split("\.");
var lang = arr[arr.length - 1];
if (lang == "com" && arr.length == 4) { //for example: http://s1.ba.ikariam.com
lang = arr[1];
}
if (lang == "net" && arr.length == 3) { //for example: http://s1.ikariam.net/
lang = "tr";
}
var l = getCfgValueNonEmpty("LANGUAGE", language);
if (l != undefined) {
lang = l;
}
return lang;
}
var TimeUnits = { day: 86400, hour: 3600, minute: 60, second: 1 };
var academyCapacities = [0, 8, 12, 16, 22, 28, 35, 43, 51, 60, 69, 79, 89, 100, 111, 122, 134, 146, 159, 172, 185,
198, 212, 227, 241];
var warehouseWoodCapacities = [0, 1160, 2200, 3576, 5336, 7424, 9975, 12799, 16152, 19944, 24200, 28791,
34040, 43520, 54439, 66528, 80024, 320096, 640192, 1280384, 2560768, 5121536, 10243072, 20486144,
40972288, 81944576, 163889152, 327778304, 655556608, 1311113216, 2622226432, 5244452864,
10488905728];
var warehouseOtherCapacities = [0, 420, 500, 1152, 2052, 2248, 3507, 3780, 5332, 7179, 9347, 11784, 14499,
20028, 23548, 27484, 34932, 139728, 279456, 558912, 1117824, 2235648, 4471296, 8942592, 17885184,
35770368, 71540736, 143081472, 286162944, 572325888, 1144651776, 2289303552, 4579607104];
var tavernWineUsage = [0, 3, 5, 8, 11, 14, 17, 21, 25, 29, 33, 38, 42, 47, 52, 57, 63, 68, 73, 79, 85, 91, 97,
103, 109];
var townHallSpaces = [0, 60, 96, 143, 200, 263, 333, 410, 492, 580, 672, 769, 871, 977, 1087, 1201, 1320,
1441, 1567, 1696, 1828, 1964, 2103, 2246, 2391, 2540, 2691, 2845, 3003, 3163, 3326, 3492, 3660];
var unitScoreBasePoints = {"wood": 0.02, "wine": 0.16, "glass": 0.04, "sulfur": 0.04};
var unitScoreBaseIndex = {"wood": "w", "wine": "W", "glass":"C", "sulfur":"S"};
var costs = {
"townHall" : [{}, {w:70, t:"34m 48s"}, {w:98, t:"56m 24s"}, {w:65, M:17, t:"1h 24m"}, {w:129, M:28, t:"1h
58m"}, {w:236, M:66, t:"2h 40m"}, {w:402, M:95, t:"3h 29m"}, {w:594, M:156, t:"4h 25m"}, {w:849, M:243, t:"5h 30m"},
{w:1176, M:406, t:"6h 43m"}, {w:1586, M:579, t:"8h 5m"}, {w:2101, M:799, t:"9h 35m"}, {w:3280, M:1348, t:"11h 15m"},
{w:4937, M:2124, t:"13h 3m"}, {w:7171, M:2951, t:"15h 1m"}, {w:10139, M:4409, t:"17h 9m"}, {w:14537, M:6461, t:"20h
11m"}, {w:18420, M:8187, t:"22h 44m"}, {w:22896, M:10176, t:"1D 1h"}, {w:28047, M:12466, t:"1D 4h"}, {w:33934,
M:15082, t:"1D 7h"}, {w:40623, M:18055, t:"1D 10h"}, {w:48107, M:21381, t:"1D 14h"}, {w:56511, M:25116, t:"1D
17h"}, {w:226044, M:100464, t:"6D 23h"}, {w:452088, M:200928, t:"13D 22h"}, {w:904176, M:401856, t:"27D 21h"},
{w:1808352, M:803712, t:"55D 19h"}, {w:3616704, M:1607424, t:"111D 15h"}, {w:7233408, M:3214848, t:"223D 6h"},
{w:14466816, M:6429696, t:"446D 12h"}, {w:28933632, M:12859392, t:"893D 19m"}],
"academy" : [{w:36, t:"14m 24s"}, {w:58, t:"28m 48s"}, {w:84, t:"48m"}, {w:79, C:30, t:"1h 19m"}, {w:159,
C:73, t:"1h 57m"}, {w:302, C:210, t:"2h 48m"}, {w:535, C:285, t:"3h 52m"}, {w:889, C:467, t:"5h 6m"}, {w:1423, C:712,
t:"6h 36m"}, {w:2174, C:999, t:"8h 16m"}, {w:3221, C:1307, t:"10h 16m"}, {w:4639, C:1960, t:"12h 27m"}, {w:7155,
C:3267, t:"15h"}, {w:10630, C:4573, t:"17h 45m"}, {w:15224, C:6264, t:"20h 44m"}, {w:20358, C:8853, t:"1D 7m"},
{w:81432, C:35412, t:"4D 28m"}, {w:162864, C:70824, t:"8D 57m"}, {w:325728, C:141648, t:"16D 1h"}, {w:651456,
C:283296, t:"32D 3h"}, {w:1302912, C:566592, t:"64D 7h"}, {w:2605824, C:1133184, t:"128D 15h"}, {w:5211648,
C:2266368, t:"257D 6h"}, {w:10423296, C:4532736, t:"514D 13h"}],
"port" : [{w:18, t:"10m 48s"}, {w:31, t:"24m 29s"}, {w:44, t:"50m 24s"}, {w:87, M:33, t:"1h 26m"}, {w:156,
M:48, t:"2h 18m"}, {w:266, M:93, t:"2h 58m"}, {w:425, M:126, t:"3h 41m"}, {w:653, M:215, t:"4h 52m"}, {w:963, M:344,
t:"5h 37m"}, {w:1381, M:529, t:"7h 6m"}, {w:1915, M:777, t:"7h 48m"}, {w:2604, M:1100, t:"9h 30m"}, {w:3790, M:1731,
t:"10h 36s"}, {w:5349, M:2301, t:"11h 53m"}, {w:7333, M:3017, t:"11h 59m"}, {w:9808, M:4265, t:"13h 56m"},
{w:39232, M:17060, t:"2D 7h"}, {w:78464, M:34120, t:"4D 15h"}, {w:156928, M:68240, t:"9D 7h"}, {w:313856,
M:136480, t:"18D 14h"}, {w:627712, M:272960, t:"37D 4h"}, {w:1255424, M:545920, t:"74D 8h"}, {w:2510848,
M:1091840, t:"148D 17h"}, {w:5021696, M:2183680, t:"297D 11h"}],
"shipyard" : [{w:38, t:"22m 41s"}, {w:67, t:"52m 49s"}, {w:96, t:"1h 50m"}, {w:152, M:57, t:"2h 31m"},
{w:272, M:83, t:"4h 1m"}, {w:388, M:135, t:"4h 20m"}, {w:609, M:180, t:"5h 17m"}, {w:810, M:266, t:"6h 2m"}, {w:1091,
M:390, t:"6h 22m"}, {w:1551, M:594, t:"7h 58m"}, {w:1921, M:780, t:"7h 50m"}, {w:2600, M:1098, t:"9h 29m"}, {w:3530,
M:1612, t:"9h 19m"}, {w:4555, M:1960, t:"10h 7m"}, {w:6228, M:2563, t:"10h 10m"}, {w:7702, M:3349, t:"10h 57m"},
{w:30808, M:13396, t:"1D 19h"}, {w:61616, M:26792, t:"3D 15h"}, {w:123232, M:53584, t:"7D 7h"}, {w:246464,
M:107168, t:"14D 14h"}, {w:492928, M:214336, t:"29D 4h"}, {w:985856, M:428672, t:"58D 9h"}, {w:1971712,
M:857344, t:"116D 19h"}, {w:3943424, M:1714688, t:"233D 14h"}, {w:7886848, M:3429376, t:"467D 4h"},
{w:15773696, M:6858752, t:"934D 9h"}, {w:31547392, M:13717504, t:"1868D 19h"}, {w:63094784, M:27435008,
t:"3737D 14h"}, {w:126189568, M:54870016, t:"7475D 4h"}, {w:252379136, M:109740032, t:"14950D 9h"},
{w:504758272, M:219480064, t:"29900D 19h"}, {w:1009516544, M:438960128, t:"59801D 14h"}],
"warehouse" : [{w:42, t:"27m 36s"}, {w:91, t:"1h 7m"}, {w:79, M:13, t:"1h 40m"}, {w:145, M:43, t:"2h 25m"},
{w:255, M:62, t:"3h 8m"}, {w:396, M:110, t:"4h 2m"}, {w:565, M:134, t:"4h 54m"}, {w:799, M:237, t:"5h 57m"}, {w:1203,
M:387, t:"7h 6m"}, {w:1619, M:558, t:"8h 24m"}, {w:2135, M:780, t:"9h 54m"}, {w:2761, M:1167, t:"11h 27m"}, {w:4198,
M:1917, t:"13h 12m"}, {w:5746, M:2472, t:"15h 12m"}, {w:7655, M:3150, t:"17h 22m"}, {w:10032, M:5235, t:"19h
48m"}, {w:40128, M:20940, t:"3D 7h"}, {w:80256, M:41880, t:"6D 14h"}, {w:160512, M:83760, t:"13D 4h"}, {w:321024,
M:167520, t:"26D 9h"}, {w:642048, M:335040, t:"52D 19h"}, {w:1284096, M:670080, t:"105D 15h"}, {w:2568192,
M:1340160, t:"211D 7h"}, {w:5136384, M:2680320, t:"422D 14h"}, {w:10272768, M:5360640, t:"845D 5h"},
{w:20545536, M:10721280, t:"1690D 10h"}, {w:41091072, M:21442560, t:"3380D 21h"}, {w:82182144, M:42885120,
t:"6761D 19h"}, {w:164364288, M:85770240, t:"13523D 15h"}, {w:328728576, M:171540480, t:"27047D 6h"},
{w:657457152, M:343080960, t:"54094D 12h"}, {w:1314914304, M:686161920, t:"108189D 19m"}],
"wall" : [{w:72, t:"1h 12m"}, {w:74, M:13, t:"1h 50m"}, {w:100, M:32, t:"2h 29m"}, {w:155, M:58, t:"3h
16m"}, {w:227, M:69, t:"4h 12m"}, {w:324, M:113, t:"4h 37m"}, {w:442, M:131, t:"4h 59m"}, {w:593, M:195, t:"5h 18m"},
{w:777, M:278, t:"5h 32m"}, {w:998, M:382, t:"5h 42m"}, {w:1255, M:509, t:"6h 24m"}, {w:1564, M:661, t:"7h 8m"},
{w:2159, M:950, t:"8h 55m"}, {w:2317, M:1058, t:"8h 44m"}, {w:2784, M:1301, t:"9h 7m"}, {w:3308, M:1423, t:"9h
27m"}, {w:3902, M:1728, t:"9h 43m"}, {w:4559, M:1876, t:"9h 56m"}, {w:5296, M:2245, t:"10h 4m"}, {w:6119, M:2661,
t:"10h 9m"}, {w:7020, M:3120, t:"10h 8m"}, {w:7533, M:3348, t:"10h 2m"}, {w:8065, M:3584, t:"9h 51m"}, {w:8613,
M:3828, t:"9h 34m"}, {w:34452, M:15312, t:"1D 14h"}, {w:68904, M:30624, t:"3D 4h"}, {w:137808, M:61248, t:"6D 9h"},
{w:275616, M:122496, t:"12D 18h"}, {w:551232, M:244992, t:"25D 12h"}, {w:1102464, M:489984, t:"51D 57m"},
{w:2204928, M:979968, t:"102D 1h"}, {w:4409856, M:1959936, t:"204D 3h"}, {w:8819712, M:3919872, t:"408D 7h"},
{w:17639424, M:7839744, t:"816D 15h"}, {w:35278848, M:15679488, t:"1633D 6h"}, {w:70557696, M:31358976,
t:"3266D 13h"}, {w:141115392, M:62717952, t:"6533D 2h"}, {w:282230784, M:125435904, t:"13066D 5h"},
{w:564461568, M:250871808, t:"26132D 11h"}, {w:1128923136, M:501743616, t:"52264D 23h"}, {w:2257846272,
M:1003487232, t:"104529D 22h"}, {w:4515692544, M:2006974464, t:"209059D 20h"}, {w:9031385088,
M:4013948928, t:"418119D 16h"}, {w:18062770176, M:8027897856, t:"836239D 8h"}, {w:36125540352,
M:16055795712, t:"1672478D 17h"}, {w:72251080704, M:32111591424, t:"3344957D 10h"}, {w:144502161408,
M:64223182848, t:"6689914D 21h"}, {w:289004322816, M:128446365696, t:"13379829D 18h"}, {w:578008645632,
M:256892731392, t:"26759659D 12h"}, {w:1156017291264, M:513785462784, t:"53519319D 57m"},
{w:2312034582528, M:1027570925568, t:"107038638D 1h"}, {w:4624069165056, M:2055141851136,
t:"214077276D 3h"}, {w:9248138330112, M:4110283702272, t:"428154552D 7h"}, {w:18496276660224,
M:8220567404544, t:"856309104D 15h"}, {w:36992553320448, M:16441134809088, t:"1712618209D 6h"},
{w:73985106640896, M:32882269618176, t:"3425236418D 13h"}],
"tavern" : [{w:25, t:"13m 20s"}, {w:112, M:12, t:"55m 12s"}, {w:196, M:46, t:"1h 49m"}, {w:297, M:88,
t:"3h 5m"}, {w:494, M:162, t:"4h 2m"}, {w:766, M:274, t:"4h 58m"}, {w:1127, M:432, t:"5h 47m"}, {w:1588, M:644, t:"7h
17m"}, {w:2177, M:920, t:"7h 57m"}, {w:2895, M:1274, t:"9h 34m"}, {w:3756, M:1715, t:"9h 55m"}, {w:4803, M:2244,
t:"11h 35m"}, {w:6030, M:2594, t:"11h 29m"}, {w:7468, M:3307, t:"13h 8m"}, {w:9117, M:3751, t:"12h 25m"}, {w:11804,
M:5133, t:"13h 59m"}, {w:47216, M:20532, t:"2D 7h"}, {w:94432, M:41064, t:"4D 15h"}, {w:188864, M:82128, t:"9D
7h"}, {w:377728, M:164256, t:"18D 15h"}, {w:755456, M:328512, t:"37D 7h"}, {w:1510912, M:657024, t:"74D 14h"},
{w:3021824, M:1314048, t:"149D 4h"}, {w:6043648, M:2628096, t:"298D 8h"}],
"museum" : [{w:282, M:84, t:"1h 28m"}, {w:760, M:272, t:"2h 57m"}, {w:1616, M:656, t:"4h 56m"},
{w:2996, M:1319, t:"7h 25m"}, {w:5035, M:2353, t:"8h 40m"}, {w:7901, M:3499, t:"11h 35m"}, {w:11746, M:4979, t:"14h
54m"}, {w:16776, M:7456, t:"18h 38m"}, {w:67104, M:29824, t:"3D 2h"}, {w:134208, M:59648, t:"6D 5h"}, {w:268416,
M:119296, t:"12D 10h"}, {w:536832, M:238592, t:"24D 20h"}, {w:1073664, M:477184, t:"49D 16h"}, {w:2147328,
M:954368, t:"99D 9h"}, {w:4294656, M:1908736, t:"198D 19h"}, {w:8589312, M:3817472, t:"397D 15h"},
{w:17178624, M:7634944, t:"795D 7h"}, {w:34357248, M:15269888, t:"1590D 14h"}, {w:68714496, M:30539776,
t:"3181D 5h"}, {w:137428992, M:61079552, t:"6362D 10h"}, {w:274857984, M:122159104, t:"12724D 21h"},
{w:549715968, M:244318208, t:"25449D 19h"}, {w:1099431936, M:488636416, t:"50899D 15h"}, {w:2198863872,
M:977272832, t:"101799D 6h"}],
"palace" : [{w:648, t:"4h"}, {w:5600, M:536, t:"8h"}, {w:20880, M:7317, C:4878, t:"9h"}, {w:57600,
W:12800, M:32000, C:25600, t:"8h"}, {w:230400, W:102400, M:153600, C:102400, t:"8h"}, {w:460800, W:204800,
M:307200, C:204800, t:"8h"}, {w:921600, W:409600, M:614400, C:409600, t:"8h"}, {w:1843200, W:819200,
M:1228800, C:819200, t:"8h"}, {w:3686400, W:1638400, M:2457600, C:1638400, t:"8h"}, {w:7372800, W:3276800,
M:4915200, C:3276800, t:"8h"}, {w:14745600, W:6553600, M:9830400, C:6553600, t:"8h"}, {w:29491200,
W:13107200, M:19660800, C:13107200, t:"8h"}],
"palaceColony" : [{w:648, t:"4h"}, {w:5600, M:536, t:"8h"}, {w:20880, M:7317, C:4878, t:"9h"}, {w:57600,
W:12800, M:32000, C:25600, t:"8h"}, {w:230400, W:102400, M:153600, C:102400, t:"8h"}, {w:460800, W:204800,
M:307200, C:204800, t:"8h"}, {w:921600, W:409600, M:614400, C:409600, t:"8h"}, {w:1843200, W:819200,
M:1228800, C:819200, t:"8h"}, {w:3686400, W:1638400, M:2457600, C:1638400, t:"8h"}, {w:7372800, W:3276800,
M:4915200, C:3276800, t:"8h"}, {w:14745600, W:6553600, M:9830400, C:6553600, t:"8h"}, {w:29491200,
W:13107200, M:19660800, C:13107200, t:"8h"}],
"embassy" : [{w:46, M:14, t:"50m 25s"}, {w:120, M:42, t:"1h 42m"}, {w:212, M:63, t:"2h 23m"}, {w:334,
M:110, t:"2h 59m"}, {w:489, M:175, t:"3h 29m"}, {w:681, M:261, t:"3h 53m"}, {w:1001, M:406, t:"4h 38m"}, {w:1428,
M:603, t:"5h 25m"}, {w:1967, M:866, t:"6h 15m"}, {w:2635, M:1203, t:"7h 6m"}, {w:3472, M:1622, t:"7h 58m"}, {w:4481,
M:1928, t:"8h 53m"}, {w:5693, M:2521, t:"9h 49m"}, {w:7122, M:2931, t:"10h 46m"}, {w:8804, M:3732, t:"11h 45m"},
{w:10770, M:4683, t:"12h 45m"}, {w:43080, M:18732, t:"2D 3h"}, {w:86160, M:37464, t:"4D 6h"}, {w:172320, M:74928,
t:"8D 12h"}, {w:344640, M:149856, t:"17D 19m"}, {w:689280, M:299712, t:"34D 38m"}, {w:1378560, M:599424, t:"68D
1h"}, {w:2757120, M:1198848, t:"136D 2h"}, {w:5514240, M:2397696, t:"272D 5h"}, {w:11028480, M:4795392,
t:"544D 10h"}, {w:22056960, M:9590784, t:"1088D 20h"}, {w:44113920, M:19181568, t:"2177D 16h"}, {w:88227840,
M:38363136, t:"4355D 9h"}, {w:176455680, M:76726272, t:"8710D 19h"}, {w:352911360, M:153452544, t:"17421D
15h"}, {w:705822720, M:306905088, t:"34843D 7h"}, {w:1411645440, M:613810176, t:"69686D 14h"}],
"branchOffice" : [{w:15, t:"17m 17s"}, {w:38, t:"43m 12s"}, {w:104, M:32, t:"1h 32m"}, {w:222, M:66, t:"2h
7m"}, {w:426, M:152, t:"2h 45m"}, {w:643, M:246, t:"3h 40m"}, {w:933, M:417, t:"4h 45m"}, {w:1301, M:660, t:"5h 56m"},
{w:1765, M:1010, t:"7h 17m"}, {w:2317, M:1481, t:"8h 44m"}, {w:3002, M:2104, t:"10h 21m"}, {w:3799, M:2615, t:"12h
3m"}, {w:4754, M:3579, t:"13h 56m"}, {w:5839, M:4325, t:"15h 54m"}, {w:7618, M:6294, t:"18h 3m"}, {w:9131, M:8116,
t:"20h 17m"}, {w:36524, M:32464, t:"3D 9h"}, {w:73048, M:64928, t:"6D 18h"}, {w:146096, M:129856, t:"13D 12h"},
{w:292192, M:259712, t:"27D 1h"}, {w:584384, M:519424, t:"54D 2h"}, {w:1168768, M:1038848, t:"108D 5h"},
{w:2337536, M:2077696, t:"216D 10h"}, {w:4675072, M:4155392, t:"432D 20h"}, {w:9350144, M:8310784, t:"865D
16h"}, {w:18700288, M:16621568, t:"1731D 9h"}, {w:37400576, M:33243136, t:"3462D 19h"}, {w:74801152,
M:66486272, t:"6925D 15h"}, {w:149602304, M:132972544, t:"13851D 7h"}, {w:299204608, M:265945088,
t:"27702D 14h"}, {w:598409216, M:531890176, t:"55405D 5h"}, {w:1196818432, M:1063780352, t:"110810D 10h"}],
"safehouse" : [{w:20, t:"15m 8s"}, {w:49, M:10, t:"42m"}, {w:95, M:27, t:"1h 8m"}, {w:163, M:48, t:"1h
41m"}, {w:266, M:88, t:"2h 10m"}, {w:407, M:146, t:"2h 38m"}, {w:594, M:228, t:"3h 23m"}, {w:867, M:352, t:"4h 25m"},
{w:1179, M:498, t:"5h 22m"}, {w:1559, M:686, t:"6h 26m"}, {w:2012, M:919, t:"7h 12m"}, {w:2674, M:1250, t:"8h 17m"},
{w:3343, M:1438, t:"9h 1m"}, {w:4127, M:1828, t:"9h 40m"}, {w:5021, M:2066, t:"10h 15m"}, {w:6304, M:2672, t:"11h
12m"}, {w:7533, M:3276, t:"11h 36m"}, {w:8910, M:3960, t:"11h 52m"}, {w:9833, M:4370, t:"12h 1m"}, {w:11232,
M:4992, t:"12h 28m"}, {w:44928, M:19968, t:"2D 1h"}, {w:89856, M:39936, t:"4D 3h"}, {w:179712, M:79872, t:"8D 7h"},
{w:359424, M:159744, t:"16D 15h"}, {w:718848, M:319488, t:"33D 6h"}, {w:1437696, M:638976, t:"66D 13h"},
{w:2875392, M:1277952, t:"133D 2h"}, {w:5750784, M:2555904, t:"266D 5h"}, {w:11501568, M:5111808, t:"532D
11h"}, {w:23003136, M:10223616, t:"1064D 23h"}, {w:46006272, M:20447232, t:"2129D 22h"}, {w:92012544,
M:40894464, t:"4259D 20h"}, {w:184025088, M:81788928, t:"8519D 16h"}, {w:368050176, M:163577856, t:"17039D
8h"}, {w:736100352, M:327155712, t:"34078D 17h"}, {w:1472200704, M:654311424, t:"68157D 10h"},
{w:2944401408, M:1308622848, t:"136314D 21h"}, {w:5888802816, M:2617245696, t:"272629D 18h"},
{w:11777605632, M:5234491392, t:"545259D 12h"}, {w:23555211264, M:10468982784, t:"1090519D 57m"}],
"barracks" : [{w:35, t:"6m 58s"}, {w:45, t:"16m 12s"}, {w:68, t:"31m 12s"}, {w:76, t:"56m 24s"}, {w:67,
M:22, t:"1h 39m"}, {w:76, M:24, t:"1h 44m"}, {w:124, M:46, t:"2h 3m"}, {w:183, M:56, t:"2h 15m"}, {w:235, M:82, t:"2h
23m"}, {w:336, M:100, t:"2h 55m"}, {w:455, M:150, t:"3h 23m"}, {w:616, M:220, t:"4h"}, {w:755, M:289, t:"4h 18m"},
{w:980, M:398, t:"5h"}, {w:1170, M:494, t:"4h 48m"}, {w:1477, M:650, t:"5h 29m"}, {w:1797, M:821, t:"5h 25m"},
{w:2120, M:991, t:"5h 50m"}, {w:2435, M:1048, t:"5h 24m"}, {w:2831, M:1254, t:"5h 48m"}, {w:3208, M:1320, t:"5h
14m"}, {w:3763, M:1595, t:"5h 43m"}, {w:4296, M:1869, t:"5h 5m"}, {w:4874, M:2166, t:"5h 24m"}, {w:19496, M:8664,
t:"21h 39m"}, {w:38992, M:17328, t:"1D 19h"}, {w:77984, M:34656, t:"3D 14h"}, {w:155968, M:69312, t:"7D 5h"},
{w:311936, M:138624, t:"14D 10h"}, {w:623872, M:277248, t:"28D 21h"}, {w:1247744, M:554496, t:"57D 18h"},
{w:2495488, M:1108992, t:"115D 12h"}, {w:4990976, M:2217984, t:"231D 57m"}, {w:9981952, M:4435968, t:"462D
1h"}, {w:19963904, M:8871936, t:"924D 3h"}, {w:39927808, M:17743872, t:"1848D 7h"}, {w:79855616, M:35487744,
t:"3696D 15h"}, {w:159711232, M:70975488, t:"7393D 6h"}, {w:319422464, M:141950976, t:"14786D 13h"},
{w:638844928, M:283901952, t:"29573D 2h"}, {w:1277689856, M:567803904, t:"59146D 5h"}, {w:2555379712,
M:1135607808, t:"118292D 11h"}, {w:5110759424, M:2271215616, t:"236584D 23h"}, {w:10221518848,
M:4542431232, t:"473169D 22h"}, {w:20443037696, M:9084862464, t:"946339D 20h"}, {w:40886075392,
M:18169724928, t:"1892679D 16h"}, {w:81772150784, M:36339449856, t:"3785359D 8h"}, {w:163544301568,
M:72678899712, t:"7570718D 17h"}, {w:327088603136, M:145357799424, t:"15141437D 10h"}, {w:654177206272,
M:290715598848, t:"30282874D 21h"}, {w:1308354412544, M:581431197696, t:"60565749D 18h"},
{w:2616708825088, M:1162862395392, t:"121131499D 12h"}, {w:5233417650176, M:2325724790784,
t:"242262999D 57m"}, {w:10466835300352, M:4651449581568, t:"484525998D 1h"}, {w:20933670600704,
M:9302899163136, t:"969051996D 3h"}, {w:41867341201408, M:18605798326272, t:"1938103992D 7h"}],
"workshop-army" : [{w:26, M:8, t:"18m 36s"}, {w:55, M:20, t:"33m 37s"}, {w:102, M:30, t:"52m 48s"}, {w:163,
M:54, t:"1h 12m"}, {w:236, M:85, t:"1h 31m"}, {w:277, M:106, t:"1h 34m"}, {w:371, M:151, t:"1h 53m"}, {w:465, M:197,
t:"2h 7m"}, {w:545, M:240, t:"2h 15m"}, {w:682, M:311, t:"2h 34m"}, {w:810, M:379, t:"2h 47m"}, {w:980, M:422, t:"3h
6m"}, {w:1037, M:460, t:"3h 2m"}, {w:1197, M:493, t:"3h 15m"}, {w:1509, M:640, t:"3h 28m"}, {w:1925, M:837, t:"3h
48m"}, {w:2352, M:1046, t:"4h 1m"}, {w:2672, M:1188, t:"4h 14m"}, {w:2883, M:1281, t:"4h 16m"}, {w:3089, M:1373,
t:"4h 17m"}, {w:3305, M:1469, t:"4h 19m"}, {w:3913, M:1739, t:"4h 49m"}, {w:4233, M:1881, t:"4h 57m"}, {w:4563,
M:2028, t:"5h 4m"}, {w:18252, M:8112, t:"20h 16m"}, {w:36504, M:16224, t:"1D 16h"}, {w:73008, M:32448, t:"3D 9h"},
{w:146016, M:64896, t:"6D 18h"}, {w:292032, M:129792, t:"13D 12h"}, {w:584064, M:259584, t:"27D 57m"},
{w:1168128, M:519168, t:"54D 1h"}, {w:2336256, M:1038336, t:"108D 3h"}],
};
var unit_cost = {
"unit slinger" : {p:1,w:40,b:"12m",u:8,m:1,o:4,a:7,d:7,A:2,D:2,s:10,c:"Human",v:20},
"unit swordsman" :
{p:2,w:47,S:16,b:"17m",u:16,m:3,o:5,a:18,d:14,A:4,D:3,s:12,c:"Human",v:20,x:"Assault"},
"unit phalanx" :
{p:4,w:104,S:64,b:"40m",u:24,m:4,o:7,a:24,d:40,A:6,D:10,s:14,c:"Human",v:20,x:"Resistance"},
"unit ram" : {p:8,w:198,S:128,b:"42m",u:52,m:5,o:8,a:14,d:18,A:3,D:4,s:16,c:"Machina",v:20,x:"Ram"},
"unit archer" : {p:4,w:172,S:86,b:"49m",u:32,m:7,o:10,a:40,d:40,A:10,D:10,s:12,c:"Human",v:20},
"unit catapult" : {p:10,w:342,S:232,b:"49m",u:72,m:10,o:14,a:36,d:28,A:9,D:7,s:16,c:"Machina",v:20,x:"Ram"},
"unit marksman" : {i:"marksman",p:7,w:355,S:154,b:"1h
23m",u:58,m:14,o:18,a:80,d:64,A:18,D:14,s:10,c:"Human",v:20},
"unit mortar" : {p:12,w:1325,S:938,b:"1h
53m",u:128,m:19,o:21,a:64,d:64,A:15,D:15,s:16,c:"Machina",v:20,x:"Ram"},
"unit steamgiant" : {i:"steamgiant",p:6,w:1150,S:716,b:"1h
45m",u:68,m:16,o:20,a:100,d:140,A:20,D:30,s:14,c:"Machina",v:20,x:"Resistance"},
"unit gyrocopter" : {p:8,w:1250,S:670,b:"1h
2m",u:97,m:12,o:16,a:112,d:112,A:25,D:25,s:12,c:"Machina",v:20},
"unit bombardier" : {p:24,w:2270,S:878,b:"2h
10m",u:228,m:22,o:24,a:200,d:165,A:45,D:35,s:14,c:"Machina",v:20,x:"Assault"},
"unit medic" : {i:"medic",p:6,w:640,C:361,b:"1h
2m",u:244,m:11,o:12,a:4,d:28,A:0,D:0,s:14,c:"Human",v:20,x:"Healer"},
"unit cook" :
{p:4,w:520,W:103,b:"38m",u:138,m:8,o:8,a:6,d:26,A:0,D:0,s:16,c:"Human",v:20,x:"Regeneration"},
"unit ship_ram" : {p:6,w:56,S:21,b:"34m",u:20,m:1,o:3,a:16,d:16,A:4,D:4,s:10,c:"Sailer",v:10},
"unit ship_ballista" :
{p:5,w:72,S:29,b:"47m",u:24,m:3,o:5,a:20,d:28,A:5,D:7,s:11,c:"Sailer",v:8,x:"Resistance"},
"unit ship_flamethrower" : {p:5,w:105,S:77,b:"1h
55m",u:45,m:5,o:7,a:40,d:40,A:10,D:10,s:12,c:"Steamship",v:8,x:"Assault"},
"unit ship_catapult" : {p:10,w:173,S:76,b:"3h 11m",u:57,m:7,o:10,a:60,d:60,A:12,D:12,s:16,c:"Sailer",v:6},
"unit ship_mortar" : {p:22,w:456,S:282,b:"3h
38m",u:130,m:12,o:15,a:160,d:160,A:35,D:35,s:14,c:"Steamship",v:4},
"unit ship_steamboat" : {i:"steamboat",p:12,w:513,S:167,b:"4h
8m",u:114,m:10,o:13,a:100,d:90,A:20,D:18,s:13,c:"Steamship",v:8,x:"Assault"},
"unit ship_submarine" : {i:"submarine",p:16,w:493,C:378,b:"5h
5m",u:126,m:15,o:16,a:110,d:155,A:20,D:30,s:10,c:"Steamship",v:2,x:"Resistance"},
};
var unitsAndShipsIndexes = {
"unit slinger" : 0,
"unit swordsman" : 1,
"unit phalanx" : 2,
"unit ram" : 3,
"unit archer" : 4,
"unit catapult" : 5,
"unit marksman" : 6,
"unit mortar" : 7,
"unit steamgiant" : 8,
"unit gyrocopter" : 9,
"unit bombardier" : 10,
"unit medic" : 11,
"unit cook" : 12,
"unit ship_ram" : 13,
"unit ship_ballista" : 14,
"unit ship_flamethrower" : 15,
"unit ship_catapult" : 16,
"unit ship_mortar" : 17,
"unit ship_steamboat" : 18,
"unit ship_submarine" : 19,
};
var icons = {
gold: "/skin/resources/icon_gold.gif",
wood: "/skin/resources/icon_wood.gif",
wine: "/skin/resources/icon_wine.gif",
glass: "/skin/resources/icon_glass.gif",
marble: "/skin/resources/icon_marble.gif",
sulfur: "/skin/resources/icon_sulfur.gif",
time: "/skin/resources/icon_time.gif",
citizens: "/skin/resources/icon_citizen.gif",
upkeep: "/skin/resources/icon_upkeep.gif",
bulb: "/skin/layout/bulb-on.gif",
attack: "/skin/layout/sword-icon-report.gif",
defend: "/skin/layout/shield-icon-report.gif",
speed:
"data:image/gif;base64,R0lGODlhEgAUAOZjAK2hf8vBpploQpVWNX5tP8qqjotULE0mFNK6qJqMZYJTOE4wJHM/Id
m8pPbx4d3UvGtCKm9PPmIwGZ5eQZCBWPru26SOfbadivHs2uPcx8ZxMrZnLrtpL6ZdK5t7SoJyRsyDTNlgHeB6MlE
3H3tfU6ZWJNxLC4gtB6lfK49iKVBGQKqZhnZkMu/p1o9EG6E4CnIqC5xXKaFaKpNlJPjy4jYoGm1XPYFvWoxNJTEP
BoVLJXVXG3tpNmo5H1I9DZWHYJFkRmE1Hl40G4JTDr6CGvK6LczFre7m1uveyUMzGTMgDottUQ0KCG9UN/Dq3I
VvUr25rnVjMrqzp7SRcpGDbbOPbHhxZufg0WlbQXpmVHZlNeXfyv7663JdSca7osS+seLczoyEe1NFLf///wAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAHoA2MALAAAAAASABQAAAeygGOCg4SFggCGiYQBiQIDiQSG
BQYHCIYJiQoLDA2FDg+JEBESE4UUiRVjFgcXhBgZhhobHB0eCoQfhiAhIh0bIySDuYYlJicdKCkqK2MsLYkuLzAxMj
M0NTY3ijg5Mjg6O4I8imM9OgwMPT5jP+RjQEFCQkNERUbuY0dISUo2S/iDlDAZ08QJvidLmECJImWKIipVllgRFGlM
kiuJsGQZpGWLIC5dxngp9AWMojBiJhIKBAA7",
};
var title_icons = {
"unit slinger" : "/skin/characters/military/x40_y40/y40_slinger_faceright.gif",
"unit swordsman" : "/skin/characters/military/x40_y40/y40_swordsman_faceright.gif",
"unit phalanx" : "/skin/characters/military/x40_y40/y40_phalanx_faceright.gif",
"unit ram" : "/skin/characters/military/x40_y40/y40_ram_faceright.gif",
"unit archer" : "/skin/characters/military/x40_y40/y40_archer_faceright.gif",
"unit catapult" : "/skin/characters/military/x40_y40/y40_catapult_faceright.gif",
"unit marksman" : "/skin/characters/military/x40_y40/y40_marksman_faceright.gif",
"unit mortar" : "/skin/characters/military/x40_y40/y40_mortar_faceright.gif",
"unit steamgiant" : "/skin/characters/military/x40_y40/y40_steamgiant_faceright.gif",
"unit gyrocopter" : "/skin/characters/military/x40_y40/y40_gyrocopter_faceright.gif",
"unit bombardier" : "/skin/characters/military/x40_y40/y40_bombardier_faceright.gif",
"unit medic" : "/skin/characters/military/x40_y40/y40_medic_faceright.gif",
"unit cook" : "/skin/characters/military/x40_y40/y40_cook_faceright.gif",
"unit ship_ram" : "/skin/characters/fleet/40x40/ship_ram_r_40x40.gif",
"unit ship_ballista" : "/skin/characters/fleet/40x40/ship_ballista_r_40x40.gif",
"unit ship_flamethrower" : "/skin/characters/fleet/40x40/ship_flamethrower_r_40x40.gif",
"unit ship_catapult" : "/skin/characters/fleet/40x40/ship_catapult_r_40x40.gif",
"unit ship_mortar" : "/skin/characters/fleet/40x40/ship_mortar_r_40x40.gif",
"unit ship_steamboat" : "/skin/characters/fleet/40x40/ship_steamboat_r_40x40.gif",
"unit ship_submarine" : "/skin/characters/fleet/40x40/ship_submarine_r_40x40.gif",
"townHall" : "/skin/img/city/building_townhall.gif",
"academy" : "/skin/img/city/building_academy.gif",
"port" : "/skin/img/city/building_port.gif",
"shipyard" : "/skin/img/city/building_shipyard.gif",
"warehouse" : "/skin/img/city/building_warehouse.gif",
"wall" : "/skin/img/city/building_wall.gif",
"tavern" : "/skin/img/city/building_tavern.gif",
"museum" : "/skin/img/city/building_museum.gif",
"palace" : "/skin/img/city/building_palace.gif",
"palaceColony" : "/skin/img/city/building_palaceColony.gif",
"embassy" : "/skin/img/city/building_embassy.gif",
"branchOffice" : "/skin/img/city/building_branchOffice.gif",
"safehouse" : "/skin/img/city/building_safehouse.gif",
"barracks" : "/skin/img/city/building_barracks.gif",
"workshop-army" : "/skin/img/city/building_workshop.gif",
}
var unitsAndShipsIndexesR = getUnitsShipsIndexesR();
function getLocalizedTexts(lang) {
switch (lang) {
case "vn" :
buildings = {
"townHall" : ["tòa thị chính", "tòa thị chính"],
"academy" : ["Học viện", "Học viện"],
"port" : ["Cảng giao dịch", "Cảng giao dịch"],
"shipyard" : ["Xưởng đóng tàu", "Xưởng đóng tàu"],
"warehouse" : ["Kho hàng", "Kho hàng"],
"wall" : ["Tường thành", "Tường thành"],
"tavern" : ["Quán rượu", "Quán rượu"],
"museum" : ["Viện bảo tàng", "Viện bảo tàng"],
"palace" : ["Cung điện", "Cung điện"],
"palaceColony" : ["Phủ thủ hiến", "Phủ thủ hiến"],
"embassy" : ["Tòa Đại sứ", "Tòa Đại sứ"],
"branchOffice" : ["Trạm giao dịch", "Trạm giao dịch"],
"safehouse" : ["Nơi ẩn náu", "Nơi ẩn náu"],
"barracks" : ["Trại lính", "Trại lính"],
"workshop-army" : ["Xưởng", "Xưởng"],
//"carpentering" : ["Thợ mộc", "Thợ mộc"],
//"forester" : ["Kiểm lâm", "kiểm lâm"],
//"stonemason" : ["Thợ đẽo đá", "Thợ đẽo đá"],
//"glassblowing" : ["Thổi cốc", "Thổi cốc"],
//"winegrower" : ["Trồng nho", "Trồng nho"],
//"alchemist" : ["Luyện kim", "Luyện kim"],
//"architect" : ["Kiến trúc sư", "Kiến trúc sư"],
//"optician" : ["Nhà quang học", "Nhà quang học"],
//"vineyard" : ["Vườn nho", "Vườn nho"],
//"fireworker" : ["Công nhân", "Công nhân"],
};
texts = {
"cityName" : "Tên Thành phố",
"ActionPoints" : "Điểm hoạt động",
"Coordinate" : "Tọa độ ",
"Population" : "Dân cư",
"Incomegold" : "Vàng",
"Corruption" : "Tham nhũng",
"Woodworkers" : "Công nhân Gỗ",
"Specialworkers" : "Công nhân Đặc biệt",
"Resource" : "Tài nguyên",
"wood" : "Gỗ",
"wine" : "Rượu Nho",
"marble" : "Cẩm Thạch",
"crystal" : "Pha Lê",
"sulfur" : "Lưu Huỳnh",
"currentlyBuilding" : "Đang xây dựng",
"summary" : "Tổng cộng:",
"hide_settings" : "Ẩn tùy chỉnh",
"show_settings" : "Hiện tùy chỉnh",
"scienceReport" : "Kết quả nghiên cứu",
"constructionLevel" : "Cấp độ học viện",
"scientists" : "Nhà khoa học",
"production" : "Thành quả",
"costs" : "Tốn",
"goTo" : "Chuyển đến ",
"armyReport" : "Thông báo quân tình",
"resourcesReport" : "Thông báo nguồn tài nguyên",
"buildingsReport" : "Thông báo các tòa nhà",
"transportReport" : "Thông báo giao thông vận tải",
"m" : "phút",
"h" : "giờ",
"day" : "ngày",
"hoursToFull" : "giờ để đầy",
"hoursToEmpty" : "giờ để trống",
"available" : "(sức chứa)",
"fullness" : "đầy",
"lastUpdate" : "Lần cập nhật cuối cùng",
"appendDestn" : "Thêm vào điểm đến hữu ích",
"removeDestn" : "Hủy bỏ điểm đến hữu ích",
"appendDestnName" : "Đặt một tên cho liên kết các điểm đến",
"removeDestnConfirm" : "Bạn có chắc chắn muốn xoá bỏ các điểm đến từ danh sách?",
"addFavorites" : "Thêm vào yêu thích",
"removeFavorites" : "Hủy bỏ yêu thích",
"addFavoriteName" : "Đặt tên cho thành phố",
"removeFavoriteConfirm" : "Bạn có chắc chắn muốn xoá %s từ danh sách favorties?",
"NameLabelError" : "Tên được quy định là không hợp lệ, hãy thử lại",
"RESET_DATA_CONFIRM" : "Bạn có chắc chắn muốn xoá Tất cả dữ liệu lưu trữ?",
"RESET_PLAYERS_DATA" : "Bạn có chắc chắn muốn xoá Tất cả dữ liệu người chơi?",
"PREMIUM_VIEW" : "Kiểu xem Premium",
"ALERT_SOUNDS" : "Âm thanh cảnh báo",
"ALERT_VOLUME" : "Âm lượng tới hạn",
"WARNING_VOLUME" : "Âm lượng cảnh báo",
"AUTO_REFRESH" : "Tự động làm mới",
"AUTO_REFRESH_MIN_SECS" : "Tự động làm mới với thời gian tối thiểu",
"AUTO_REFRESH_MAX_SECS" : "Tự động làm mới với thời gian tối đa",
"TABLE_RESOURCES" : "Hiển thị bảng nguồn tài nguyên",
"TABLE_CITIES" : "Hiển thị bảng thành phố",
"TABLE_BUILDINGS" : "Hiển thị bảng xây dựng",
"TABLE_ARMYFLEET" : "Hiển thị bảng quân và fleet",
"TABLE_RESEARCH" : "Hiển thị bảng nghiên cứu",
"TABLE_TRANSPORT" : "Hiển thị bảng giao thông vận tải",
"TABLE_PLAYERS" : "Hiển thị bảng người chơi và thành phố",
"TABLE_FAVORITES" : "Hiển thị bảng yêu thích của tôi",
"TECH_LETTERCHUTE" : "Nghiên cứu xong Buồng thư?",
"TECH_PULLEY" : "Nghiên cứu xong Ròng rọc?",
"TECH_GEOMETRY" : "Nghiên cứu xong Hình học?",
"TECH_SPIRITLEVEL" : "Nghiên cứu xong Thước thủy cân bằng?",
"PLAYERS_NORMAL" : "Hiển thị người chơi bình thường",
"PLAYERS_INACTIVITY" : "Hiển thị người chơi không hoạt động",
"PLAYERS_BANNED" : "Hiển thị người chơi bị cấm",
"PLAYERS_VACATION" : "Hiển thị người chơi nghỉ phép",
"PROGRESS_BAR_MODE" : "Thanh kiểm tra tài nguyên",
"SETTING_EXPANDED" : "Mở rộng các nguồn lực của giao thông vận tải tàu",
"off" : "Tắt",
"time" : "dựa trên thời gian còn lại",
"percent" : "dựa trên tỷ lệ phần trăm đầy",
"LANGUAGE" : "Ngôn ngữ",
"LANGUAGE_AUTO" : "Tự động từ tên máy chủ",
"ownAlly" : "Liên minh của bạn (tên ngắn)",
"friendlyAllies" : "Liên minh liên kết (tên ngắn, cách nhau bằng dấu phẩy)",
"hostileAllies" : "Liên minh thù địch (tên ngắn, cách nhau bằng dấu phẩy)",
"DEBUG_LOG" : "Đăng nhập tin nhắn debug",
"Refresh_table" : "Làm mới bảng",
"Reset_all_data" : "Thiết lập lại tất cả các dữ liệu",
"Reset_players_data" : "Thiết lập lại dữ liệu người chơi",
"Players" : "Người chơi",
"Alliance" : "Liên minh",
"Score" : "Điểm",
"StartCity" : "Thành phố bắt đầu",
"DestinationCity" : "Thành phố đích",
"Mission" : "Nhiệm vụ",
"FinishTime" : "Thời gian kết thúc",
"FinishResources" : "Khi tàu đến,nguồn lực này của thành phố sẽ là",
"Point" : "Điểm",
"Loading" : "Đang tải",
"Wait" : "Đợi",
"Remaining" : "Còn lại",
"Upgrade" : "nâng cấp",
"UpgradeConfirm" : "Bạn có chắc chắn rằng bạn muốn nâng cấp công trình trên?",
"Level" : "Cấp",
"Happiness" : "Hài lòng",
"Growth" : "Tốc độ tăng trưởng",
"FreeWorkers" : "Công nhân rảnh",
"full" : "Đầy",
"empty" : "Trống",
"NewVersion" : "Có một phiên bản mới hơn của "+scriptname+"\n%s\nBấm OK nếu bạn muốn cập nhật ngay bây giờ",
"Attack" : "Tấn công",
"Action" : "Hành động",
"Remark" : "Remark",
"DeleteConfirm" : "Bạn có chắc chắn muốn xoá %s?",
"ResourceNeeds" : "Nguồn tài nguyên cần thiết",
"unitInfo" : "Thông tin Đơn vị",};
break;
default :
buildings = {
"townHall" : ["Town Hall", "Town Hall"],
"academy" : ["Academy", "Academy"],
"port" : ["Trading Port", "Trading Port"],
"shipyard" : ["Shipyard", "Shipyard"],
"warehouse" : ["Warehouse", "Warehouse"],
"wall" : ["Wall", "Wall"],
"tavern" : ["Tavern", "Tavern"],
"museum" : ["Museum", "Museum"],
"palace" : ["Palace", "Palace"],
"palaceColony" : ["Governor's Residence", "Governor"],
"embassy" : ["Embassy", "Embassy"],
"branchOffice" : ["Trading Post", "Trading Post"],
"safehouse" : ["Hideout", "Hideout"],
"barracks" : ["Barracks", "Barracks"],
"workshop-army" : ["Workshop", "Workshop"],
// "carpentering" : ["Carpenter", "Carpenter"],
// "forester" : ["forester", "forester"],
// "stonemason" : ["stonemason", "stonemason"],
// "glassblowing" : ["glassblowing", "glassblowing"],
// "winegrower" : ["winegrower", "winegrower"],
// "alchemist" : ["alchemist", "alchemist"],
// "architect" : ["architect", "architect"],
// "optician" : ["optician", "optician"],
// "vineyard" : ["vineyard", "vineyard"],
// "fireworker" : ["fireworker", "fireworker"],
};
texts = {
"cityName" : "City name",
"ActionPoints" : "Action Points",
"Coordinate" : "Coordinate",
"Population" : "Population",
"Incomegold" : "Net gold",
"Corruption" : "Corruption",
"Woodworkers" : "Wood Workers",
"Specialworkers" : "Speciald Workers",
"Resource" : "Resource",
"wood" : "wood",
"wine" : "wine",
"marble" : "marble",
"crystal" : "crystal",
"sulfur" : "sulfur",
"currentlyBuilding" : "Currently building",
"summary" : "Summary:",
"hide_settings" : "Hide settings",
"show_settings" : "Show settings",
"scienceReport" : "Science Report",
"constructionLevel" : "Construction Level",
"scientists" : "Scientists",
"production" : "Production",
"costs" : "Costs",
"goTo" : "Go to ",
"armyReport" : "Army Report",
"resourcesReport" : "Resources Report",
"buildingsReport" : "Buildings Report",
"transportReport" : "Transport Report",
"m" : "m",
"h" : "h",
"day" : "day",
"hoursToFull" : "hours to full",
"hoursToEmpty" : "hours to empty",
"available" : "available",
"fullness" : "fullness",
"lastUpdate" : "last update",
"appendDestn" : "Append to usefull destinations",
"removeDestn" : "Remove from usefull destinations",
"appendDestnName" : "Type a name for the destination link",
"removeDestnConfirm" : "Are you sure you want to remove the destination from the list?",
"addFavorites" : "Add Favorites",
"removeFavorites" : "Remove Favorites",
"addFavoriteName" : "Type a name for the city",
"removeFavoriteConfirm" : "Are you sure you want to remove %s from the favorties list?",
"NameLabelError" : "The specified name is invalid, try again",
"RESET_DATA_CONFIRM" : "Are you sure you want to delete ALL stored data?",
"RESET_PLAYERS_CONFIRM" : "Are you sure you want to delete ALL players data?",
"PREMIUM_VIEW" : "Premium view",
"ALERT_SOUNDS" : "Alert sounds",
"ALERT_VOLUME" : "Alert volume",
"WARNING_VOLUME" : "Warning volume",
"AUTO_REFRESH" : "Auto refresh",
"AUTO_REFRESH_MIN_SECS" : "Auto refresh min seconds",
"AUTO_REFRESH_MAX_SECS" : "Auto refresh max seconds",
"TABLE_RESOURCES" : "Show resources table",
"TABLE_CITIES" : "Show cities table",
"TABLE_BUILDINGS" : "Show buildings table",
"TABLE_ARMYFLEET" : "Show army and fleet table",
"TABLE_RESEARCH" : "Show research table",
"TABLE_TRANSPORT" : "Show transport table",
"TABLE_PLAYERS" : "Show players and cities table",
"TABLE_FAVORITES" : "Show my favorites table",
"TECH_LETTERCHUTE" : "Finish Letter Chute?",
"TECH_PULLEY" : "Finish Pulley?",
"TECH_GEOMETRY" : "Finish Geometry?",
"TECH_SPIRITLEVEL" : "Finish Spirit Level?",
"PLAYERS_NORMAL" : "Show normal players",
"PLAYERS_INACTIVITY" : "Show inactivity players",
"PLAYERS_BANNED" : "Show banned players",
"PLAYERS_VACATION" : "Show vacation players",
"PROGRESS_BAR_MODE" : "Resource progress bar mode",
"SETTING_EXPANDED" : "Expand the resources of transport ship",
"off" : "off",
"time" : "based on remaining time",
"percent" : "based on fullness percentage",
"LANGUAGE" : "Language",
"LANGUAGE_AUTO" : "Automatic from server name",
"ownAlly" : "Own alliance (short name)",
"friendlyAllies" : "Friendly alliances (short names, separated by comma)",
"hostileAllies" : "Hostile alliances (short names, separated by comma)",
"DEBUG_LOG" : "Log debug messages",
"Refresh_table" : "Refresh table",
"Reset_all_data" : "Reset all data",
"Reset_players_data" : "Reset players data",
"Players" : "Players",
"Alliance" : "Alliance",
"Score" : "Score",
"StartCity" : "Start City",
"DestinationCity" : "Destination City",
"Mission" : "Mission",
"FinishTime" : "Finish Time",
"FinishResources" : "When finish mission, the start city of resources",
"Point" : "Point",
"Loading" : "Loading",
"Wait" : "Wait",
"Remaining" : "Remaining",
"Upgrade" : "Upgrade",
"UpgradeConfirm" : "Are you sure you want to upgrade building?",
"Level" : "Level",
"Happiness" : "Satisfaction",
"Growth" : "Growth",
"FreeWorkers" : "Free workers",
"full" : "full",
"empty" : "empty",
"NewVersion" : "There is a newer version of "+scriptname+"\n%s\nClick on OK if you would like to update
now",
"Attack" : "Attack",
"Action" : "Action",
"Remark" : "Remark",
"DeleteConfirm" : "Are you sure you want to delete %s?",
"ResourceNeeds" : "Resource Needs",
"unitInfo" : "Unit Information",
};
break;
}
}
VersionUpdate();
var ALERT_SOUNDS = getCfgValue("ALERT_SOUNDS", false); //play sound when you are under attack, or you
have undreaded message
var AUTO_REFRESH = getCfgValue("AUTO_REFRESH", false); //automatically refreshes browser window (useful
when ALERT_SOUNDS is true)
var DEBUG_LOG = getCfgValue("DEBUG_LOG", false); //log debug messages to console
var PROGRESS_BAR_MODE = getCfgValue("PROGRESS_BAR_MODE", "time"); //have to be a global variable
var SETTING_EXPANDED = getCfgValue("SETTING_EXPANDED", true);
var PREMIUM_VIEW = getCfgValue("PREMIUM_VIEW", false);
var alertSound = [ "http://simplythebest.net/sounds/WAV/events_WAV/event_WAV_files/alarm_3.wav",
"http://boxstr.com/files/4137377_atuik/alarm_3.wav" ];
var warningSound = [ "http://www.ilovewavs.com/Effects/Beeps/FlyinOff.wav",
"http://boxstr.com/files/4137365_xsmmz/FlyinOff.wav" ];
var WARNING_VOLUME = getCfgValue("WARNING_VOLUME", "50"); // "0" = silent "100" = full volume
var ALERT_VOLUME = getCfgValue("ALERT_VOLUME", "100"); // "0" = silent "100" = full volume
var MIN = getCfgValue("AUTO_REFRESH_MIN_SECS", 300); // seconds
var MAX = getCfgValue("AUTO_REFRESH_MAX_SECS", 600); // seconds
var TECH_LETTERCHUTE = getCfgValue("TECH_LETTERCHUTE", false);
var TECH_PULLEY = getCfgValue("TECH_PULLEY", false);
var TECH_GEOMETRY = getCfgValue("TECH_GEOMETRY", false);
var TECH_SPIRITLEVEL = getCfgValue("TECH_SPIRITLEVEL", false);
var TABLE_FAVORITES = getCfgValue("TABLE_FAVORITES", false);
var TABLE_PLAYERS = getCfgValue("TABLE_PLAYERS", false);
if (ALERT_SOUNDS) {
var resWarning = xpath("//a[contains(@class, 'normalactive')]");
var resAlert = xpath("//a[contains(@class, 'normalalert')]");
if (resAlert.snapshotLength > 0 && ALERT_VOLUME != 0) {
playSound(alertSound[rand(0, alertSound.length-1)], ALERT_VOLUME);
} else if (resWarning.snapshotLength > 0 && WARNING_VOLUME !=0) {
playSound(warningSound[rand(0, warningSound.length-1)], WARNING_VOLUME);
}
}
if (AUTO_REFRESH) {
var cities = $x("//select[@id='citySelect']/option", $("citySelect"));
var idx = $("citySelect").selectedIndex+1;
idx %= cities.length;
var city_id = $x("//select[@id='citySelect']/option", $("citySelect"))[idx].value;
var strurl = postUrl("?action=header&function=changeCurrentCity&oldView=city&view=city&cityId="+
city_id);
var timeID = setTimeout("location.href= '"+strurl+"'", getRefreshTime());
}
if (PREMIUM_VIEW) {
GM_addStyle("#advisors #advCities a.normal {background-image:url
('/skin/layout/advisors/mayor_premium.gif');}");
GM_addStyle("#advisors #advCities a.normalactive {background-image:url
('/skin/layout/advisors/mayor_premium_active.gif');}");
GM_addStyle("#advisors #advMilitary a.normal {background-image:url
('/skin/layout/advisors/general_premium.gif');}");
GM_addStyle("#advisors #advMilitary a.normalactive {background-image:url
('/skin/layout/advisors/general_premium_active.gif');}");
GM_addStyle("#advisors #advMilitary a.normalalert {background-image:url
('/skin/layout/advisors/general_premium_alert.gif');}");
GM_addStyle("#advisors #advResearch a.normal {background-image:url
('/skin/layout/advisors/scientist_premium.gif');}");
GM_addStyle("#advisors #advResearch a.normalactive {background-image:url
('/skin/layout/advisors/scientist_premium_active.gif');}");
GM_addStyle("#advisors #advDiplomacy a.normal {background-image:url
('/skin/layout/advisors/diplomat_premium.gif');}");
GM_addStyle("#advisors #advDiplomacy a.normalactive {background-image:url
('/skin/layout/advisors/diplomat_premium_active.gif');}");
}
var city_id = getIntValue(getNode_value("//option[@class='avatarCities coords' and @selected='selected']"), 0);
if (city_id == 0){
city_id = getIntValue(getNode_value("//option[@class='avatarCities' and @selected='selected']"), 0);
}
if (city_id == 0){
city_id = getIntValue(getNode_value("//option[@class='avatarCities tradegood1' and @selected='selected']"), 0);
}
if (city_id == 0){
city_id = getIntValue(getNode_value("//option[@class='avatarCities tradegood2' and @selected='selected']"), 0);
}
if (city_id == 0){
city_id = getIntValue(getNode_value("//option[@class='avatarCities tradegood3' and @selected='selected']"), 0);
}
if (city_id == 0){
city_id = getIntValue(getNode_value("//option[@class='avatarCities tradegood4' and @selected='selected']"), 0);
}
var city_name = getNodeValue("id('breadcrumbs')/*[@class='city']");
var island_coord = getNodeValue("id('breadcrumbs')//a[@class='island']");
if ( island_coord == undefined || island_coord == 0 )
island_coord = getNodeValue("id('breadcrumbs')//span[@class='island']");
if ( island_coord == undefined || island_coord == 0 ) {
if (/(\[[0-9]+:[0-9]+\])/.exec(getNode("id('breadcrumbs')").innerHTML) != null)
island_coord = RegExp.$1;
}
if ( island_coord == undefined || island_coord == 0 ) {
var node = getNode("id('breadcrumbs')");
if (node!=null) {
node = node.getElementsByTagName("a")[0];
if (node!=null) {
var strhref = node.getAttribute("href");
if (/islandX=([0-9]+).+islandY=([0-9]+)/.exec(strhref) != null)
island_coord = "["+RegExp.$1+":"+RegExp.$2+"]";
}
}
}
if ( island_coord == undefined || island_coord == 0 ) {
var idx = $("citySelect").selectedIndex;
island_coord = $x("//option", $("citySelect"))[idx].title;
}
var city_idmainView = getNode_value("//option[@class='avatarCities coords' and text()='"+TrimIsland(island_coord)+"
"+city_name+"']", 0);
if (city_idmainView == 0){
city_idmainView = getNode_value("//option[@class='avatarCities' and text()=' "+city_name+"']", 0);
}
if (city_idmainView == 0){
city_idmainView = getNode_value("//option[@class='avatarCities tradegood1' and @selected='selected' and text()
='"+city_name+"']", 0);
}
if (city_idmainView == 0){
city_idmainView = getNode_value("//option[@class='avatarCities tradegood2' and @selected='selected' and text()
='"+city_name+"']", 0);
}
if (city_idmainView == 0){
city_idmainView = getNode_value("//option[@class='avatarCities tradegood3' and @selected='selected' and text()
='"+city_name+"']", 0);
}
if (city_idmainView == 0){
city_idmainView = getNode_value("//option[@class='avatarCities tradegood4' and @selected='selected' and text()
='"+city_name+"']", 0);
}
var city_coord_node = getNode("//div[@id='breadcrumbs']/*[@class='island' and contains(text(), '[')]", "");
log("city_coord_1:"+city_coord_node);//city_coord.innerHTML+" tag:"+city_coord.tagName+ " " + city_coord);
if (city_coord_node == null) {
city_coord_node = getNode("//a[contains(@href, '?view=island')]/span[contains(text(), '[')]", "");
if (city_coord_node != null) {
city_coord_node = city_coord_node.parentNode;
}
}
else {
log("city_coord_1.1:"+city_coord_node.innerHTML+" tag:"+city_coord_node.tagName+ " " + city_coord_node);
}
log("city_coord_2:"+city_coord_node);
var island_id = "";
var city_coord = "";
if (city_coord_node != null) {
log("city_coord_2.1:"+city_coord_node.innerHTML+" tag:"+city_coord_node.tagName+ " " + city_coord_node);
if (/(\[[0-9:]+\])/.exec(city_coord_node.innerHTML)) {
city_coord = RegExp.$1;
if (/[?&]id=([0-9]+)/.exec(city_coord_node.href) != null) {
island_id = RegExp.$1;
}
}
}
log("city_coord_3:"+city_coord);
log("island_id_3:"+island_id);
if (island_id == "" && (/view=island&id=([0-9]+)/.exec(document.URL) != null)) {
island_id = RegExp.$1;
}
var body_id = $X("//body").id;
log("server:"+server+", language:"+language+", city_id:"+city_id+", city_idmainView:"+city_idmainView+",
city_coord:"+city_coord+", island_id:"+island_id + ", city_name:"+city_name + ", bodyid:"+body_id);
function getUnitsShipsIndexesR() {
var ret = [];
for(key in unitsAndShipsIndexes) {
ret[unitsAndShipsIndexes[key]] = key;
}
return ret;
}
function getVar(varname, vardefault) {
var res = GM_getValue(server+varname);
if (res == undefined) {
return vardefault;
}
return res;
}
function setVar(varname, varvalue) {
GM_setValue(server+varname, varvalue);
}
function getCity(city_id) {
city_id = "city_"+city_id;
if (config[city_id] == undefined) {
config[city_id] = new Resource();
}
return config[city_id];
}
function getPath(node) {
if (node == null || node == undefined) {
return "/";
}
return getPath(node.parentNode) + "/" + node.nodeName + "["+node.id+"]";
}
function getNode(path) {
var value = xpath(path);
log("path: "+path+", size:"+value.snapshotLength);
if (value.snapshotLength == 1) {
return value.snapshotItem(0);
}
for(var i = 0; i < value.snapshotLength; i++) {
log(i+".: "+getPath(value.snapshotItem(i)));
}
return null;
}
function getNodeValue(path, defaultValue) {
var value = getNode(path);
if (value != null) {
return value.textContent;
}
return defaultValue;
}
function getNode_value(path, defaultValue) {
var value = getNode(path);
if (value != null) {
return value.value;
}
return defaultValue;
}
//get node's title attribute
function getNodeTitle(path, defaultValue) {
var value = getNode(path);
if (value != null) {
if (value.title != "" && value.title != undefined)
return value.title;
}
return defaultValue;
}
function getIntValue(str, defaultValue) {
var temp = ""+str;
temp = temp.replace(/[^0-9]+/g, "");
temp = parseInt(temp);
if (defaultValue != undefined && (temp == undefined || (""+temp == "NaN"))) {
return defaultValue;
}
return temp;
}
function mynumberformat(num, alwaysShowSign) {
var s = ""+Math.round(num);
if (num == undefined || s == "NaN") {
return "-";
}
if (num == "?") {
return num;
}
var negative = "";
if (s.substring(0, 1) == "-") {
negative = "-";
s = s.substring(1);
} else if (alwaysShowSign == true) {
negative = "+";
}
var i = s.length-3;
while (i > 0) {
s = s.substring(0, i) + "," + s.substring(i);
i -= 3;
}
return negative + s;
}
var _cachedDecimalPoint = undefined;
function getDecimalPoint() { //hack
if (_cachedDecimalPoint == undefined) {
_cachedDecimalPoint = new Number(1.5).toLocaleString().substring(1, 2);
if (_cachedDecimalPoint == undefined || _cachedDecimalPoint == "") {
_cachedDecimalPoint = ",";
}
}
return _cachedDecimalPoint;
}
function floatFormat(num, fracdigits, alwaysShowSign) {
var s = ""+num;
if (num == "?") {
return num;
}
var negative = "";
if (s.substring(0, 1) == "-") {
negative = "-";
s = s.substring(1);
} else if (alwaysShowSign == true) {
negative = "+";
}
var p = s.indexOf(".");
if (p >= 0) {
var i = s.substring(0, p);
var frac = s.substring(p + 1, p + 1 + fracdigits);
while (frac.length < fracdigits) {
frac += "0";
}
s = i + getDecimalPoint() + frac;
}
return negative + s;
}
function getDecl(variable, root) {
variable = "var "+ variable;
var tag = $X('//script[contains(.,"'+ variable +'")]', root);
var js = new RegExp(variable +"\\s*=\\s*\\S*?(\\({.*?}\\))", "m");
var v = tag.innerHTML.replace(/\s+/g, " ").match(js);
if (v) return eval(v[1]);
}
function digProducedResources(res, root) {
var vWood = getDecl("woodCounter", root);
var vTradegood = getDecl("tradegoodCounter", root);
var sTradeGoodName = vTradegood.valueElem.split("value_")[1];
res.prodwood = parseFloat(vWood.production)*3600;
res.prodwine = 0;
res.prodmarble = 0;
res.prodglass = 0;
res.prodsulfur = 0;
res.prodtime = ""+new Date().getTime();
sTradeGoodName =(sTradeGoodName == "crystal") ? "glass" : sTradeGoodName;
res.type = sTradeGoodName;
res["prod"+res.type] = parseFloat(vTradegood.production)*3600;
}
function getCurrentResourceAmount(currenttime, startTime, startAmount, factPerHour) {
var elapsedhours = (currenttime - startTime) / 1000.0 / 3600.0;
return Math.max(0, Math.floor(startAmount + elapsedhours * factPerHour));
}
function TimeResourceCounter() {
var currenttime = new Date().getTime();
var counters = xpath("//font[contains(@id, 'ResourceCounter')]");
for(var i=0; i < counters.snapshotLength; i++) {
var c = counters.snapshotItem(i);
if (c.color != "#ff0000") {
var arr = c.lang.split(",");
var startTime = arr[0];
var startAmount = parseFloat(arr[1]);
var factPerHour = parseFloat(arr[2]);
c.innerHTML = mynumberformat(getCurrentResourceAmount(currenttime, startTime, startAmount, factPerHour));
}
}
return (counters.snapshotLength > 0);
}
function createTooltipAttribute(tooltip, title) {
if (tooltip == undefined || tooltip == "") {
return "";
}
if (title == undefined || title == "") {
title = "";
}
else
title = ", TITLE, '"+title+"', TITLEALIGN , 'center', TITLEFONTCOLOR, '#542C0F'";
var html = "
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
the width of the pictures should be 35px max.
Example for default language:
"townHall" : ["Town Hall", "<img src='/skin/buildings/y100/townHall.gif' width='35'>"],
"academy" : ["Academy", "<img src='/skin/buildings/y100/academy.gif' width='35'>"],
"port" : ["Trading Port", "<img src='/skin/buildings/y100/port.gif' width='35'>"],
"shipyard" : ["Shipyard", "<img src='/skin/buildings/y100/shipyard.gif' width='35'>"],
"warehouse" : ["Warehouse", "<img src='/skin/buildings/y100/warehouse.gif' width='35'>"],
"wall" : ["Wall", "<img src='/skin/buildings/y100/wall.gif' width='35'>"],
"tavern" : ["Tavern", "<img src='/skin/buildings/y100/tavern.gif' width='35'>"],
"museum" : ["Museum", "<img src='/skin/buildings/y100/museum.gif' width='35'>"],
"palace" : ["Palace", "<img src='/skin/buildings/y100/palace.gif' width='35'>"],
"palaceColony" : ["Governor's Residence", "<img src='/skin/buildings/y100/palaceColony.gif' width='35'>"],
"embassy" : ["Embassy", "<img src='/skin/buildings/y100/embassy.gif' width='35'>"],
"branchOffice" : ["Trading Post", "<img src='/skin/buildings/y100/branchOffice.gif' width='35'>"],
"safehouse" : ["Hideout", "<img src='/skin/buildings/y100/safehouse.gif' width='35'>"],
"barracks" : ["Barracks", "<img src='/skin/buildings/y100/barracks.gif' width='35'>"],
"workshop-army" : ["Workshop", "<img src='/skin/buildings/y100/workshop.gif' width='35'>"],
"carpentering" : ["Carpenter", "<img src='/skin/buildings/y100/carpentering.gif' width='35'>"],
"forester" : ["forester", "<img src='/skin/buildings/y100/forester.gif' width='35'>"],
"stonemason" : ["stonemason", "<img src='/skin/buildings/y100/stonemason.gif' width='35'>"],
"glassblowing" : ["glassblowing", "<img src='/skin/buildings/y100/glassblowing.gif' width='35'>"],
"winegrower" : ["winegrower", "<img src='/skin/buildings/y100/winegrower.gif' width='35'>"],
"alchemist" : ["alchemist", "<img src='/skin/buildings/y100/alchemist.gif' width='35'>"],
"architect" : ["architect", "<img src='/skin/buildings/y100/architect.gif' width='35'>"],
"optician" : ["optician", "<img src='/skin/buildings/y100/optician.gif' width='35'>"],
"vineyard" : ["vineyard", "<img src='/skin/buildings/y100/vineyard.gif' width='35'>"],
"fireworker" : ["fireworker", "<img src='/skin/buildings/y100/fireworker.gif' width='35'>"],
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
You shouldn't change the language array because if kChen you it somewhere that you didn't khow then it won't work. You can Change it by this way:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||