Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
Ikariam General Overview v1.5
An Ikariam game script to gather information from player towns.
- NOT FULLY WORKING WITH FF3 - (updates soon)
Screenshots
Languages / working on servers:
English (UK) (ikariam.org)
English (US) (ikariam.com)
Portuguese (ikariam.com.pt)
German (ikariam.de) [Thanks to t.b.]
Polish (ikariam.pl) [Thanks to sip3k]
Dutch (ikariam.nl) [Thanks to bogyi]
Danish (ikariam.dk) [Thanks to Trigger]
Turkish (ikariam.net) [Thanks to Guybrush]
Spanish (ikariam.es) [Thanks to Pyronhell]
Czech (ikariam.cz) [Thanks to who e-mailed me the language]
Italian (ikariam.it) [Thanks to Boydon]
Swedish (ikariam.se) [Thanks to rEacT]
If you want to, ask for help or just check the code, it should be self-explaining.
Features
- Multi-language (12 of 21 languages currently available)
- Overview of all buildings for each town
- Overview of all resources for each town
- Resources maximum capacity for each town
- Resources production for each island
- Overview of all buildings under construction
- Shortcuts to island resources on the left-side box
- When storage is almost full for a resource, it changes it's color to bright red / when completely full, changes to red
Known Bugs
- On servers other than ikariam.org, name shortcuts to some resources are not translated to the correct language (they appear in english)
- When you open the Overview popup at the Island View, the header will not be visible, therefore you can't close the popup correctly.
ChangeLog
21/05/2008- Version 1 released
- Minor bugfixes
- Added colors to full (and almost full) warehouses
- Added German language
- Added Polish language
- Added Dutch language
- Added Danish language
- Added Turkish language
- Minor bugfixes
- Bugfix: At Island view, towns were on top of the general overview window (Thanks to Pyronhell that submited the bugfix)
- Bugfix: Production of island resources weren't working
- Added Spanish language
- Added Czech language
- Added Italian language
- Added English (US) language
- Added Swedish language
ToDo
- Finishing times for building constructions (or a progress bar)
- Progress bar until resource fulls a warehouse
- Progress bar/clock while upgrading buildings
- Finances table
- Workshop research table
- Research table
- Military table
- Loading all data together
- Script auto-update function
WARNING!
Using this script is forbidden by the game rules!I will not be responsible if your account gets banned.
Quoted from Ikariam rules:
VII. Scripting
* Using a program as interface between the player and his game is prohibited.
Any other form of automatically generated information generated for a group of
players advantage with malicious intentions is forbidden as well.
-
This includes but is not limited to:
- Bots
- Macros
- Automated island databases.
GameForge.
If you have any comments, suggestions, issues... Just comment, please.
You could comment on this script if you were logged in.



login to vote
case 'ikariam.co.il':
keywords[0] = ["בניין העירייה", "מספנה", "נמל סחר", "מחסן", "תחנת סחר", "מגורי חיילים", "ארמון", "מקום מחבוא", "שגרירות", "אקדמיה", "בית-מלאכה", "טברנה", "מוזיאון", "בניין העירייה", "מגורי המושל"];
keywords[1] = ["חומר בנייה","יין","שיש","גבישי קריסטל","גופרית"];
keywords[2] = ["שלב", "סגור", "לחץ לפתיחה\סגירה", "מבט על בניינים\משאבים", "* בכדי לעדכן את המידע עבור כל עיר עבור לעמוד של העיר","ערים", "מבט על הבניינים", "מבט על המשאבים", "קיבולת","בבנייה", "דלוק", "בבנייה", "בניין עד שלב", "ייצור של", "City resources", "קיבלות מקסימלית של המחסן", "בשביל"];
break;
login to vote
Hi !!!
The french translate :
case 'ikariam.fr':
keywords[0] = ["Hotel de ville", "Chantier naval", "Port de commerce", "Entrepot", "Comptoir", "Caserne", "Palais", "Cachette", "Ambassade", "Academie", "Atelier", "Taverne", "Musée", "Mur de fortification", "Résidence du gouverneur"];
keywords[1] = ["Bois","Vins","Marbre","Cristal","Souffre"];
keywords[2] = ["Niveau", "Fermer", "Clique pour ouvrir/fermer", "Informations Batiments ressources", "* Pour actualiser les données de la ville, clique sur la ville correspondante","Batiments", "Vue générale des bâtiments", "Vue général des ressources", "Capacité","en construction", "sur", "en construction", "Augmenter de niveau", "Production de", "Ressources de la ville", "Capacité maximun de l'entrepot", "pour"];
login to vote
Translation to Russian
case 'ikariam.ru':
keywords[0] = ["Ратуша", "Верфь", "Торговый порт", "Склад", "Торговый пост", "Казарма", "Дворец", "Укрытие", "Посольство", "Академия", "Мастерская", "Таверна", "Музей", "Городская стена", "Резиденция губернатора"];
keywords[1] = ["Стройматериалы","Вино","Мрамор","Хрусталь","Сера"];
keywords[2] = ["Уровень", "Закрыть", "Кликнуть для открытия/закрытия", "Обзор строений и ресурсов", "* Для обновления данных о городе откройте страницу этого города","Города", "Обзор строений", "Обзор ресурсов", "Вместимость","Строится", "в", "строится", "Усовершенствование до уровня", "Производство", "Ресурсы города", "Вместимость склада", "для"];
break;
login to vote
I did a really nasty hack on the script today. If you're in the transport page, you can open the overview, hit a button, and it uses the saved warehouse and resource info to fill out the values such that you can send either enough resources to balance out your resources or to max out the destination city.
login to vote
I figured out why the bottom half wasn't working. in getCities(), you need to get rid of the extra space Ikariam puts in the <option>s.
cities[cities.length-1][1] = trim(tmp.childNodes[i].innerHTML);And in currentCity() too
name = trim(name.substring(name.indexOf("")+7, name.length));trim:
function trim(str) {return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
I don't know why this thing is here in the comment --></option>
login to vote
Hello.
You have made a great script.
But I've got one thing to say.
Some things aren't shown when I open the window.
You can see these in this screenshot:
http://www.abload.de/img/unbenanntduu.jpg
The black things work normal and right.
PS: I play at ikariam.de
login to vote
Hello guys!
Thanks a lot for all your submissions. I have to tell you that I've been really busy with my final exams for college. So, has you have already noticed, I've been away from the Ikariam Script.
I want you all to know, that I've been reading all your comments, and I'm just waiting for all these exams to finish to start working on your feature requests, and getting the script work with the new FF3 release.
Thanks for all your support!
login to vote
Some friends askme what thing must change for the auto-translation.
Change this:
resources[8] = getResourcesProduction('island')[1].charAt(0).toUpperCase() + getResourcesProduction('island')[1].substr(1);;for this:
var nombre = getResourcesProduction('island')[1]; if (nombre=='wine'){ resources[8] = keywords[1][1]; } if (nombre=='marble'){ resources[8] = keywords[1][2]; } if (nombre=='crystal'){ resources[8] = keywords[1][3]; } if (nombre=='sulfur'){ resources[8] = keywords[1][4]; }login to vote
If you find that this script stops working, go to Manage User Scripts and rearrange the scripts so that this one is on top or near the top of your other Ikariam scripts. Other scripts may change the DOM in such a way that breaks this script.
One change I'd like to see is reducing the footprint of the IkariamOverview div. With the score linker script, this is pushing the left hand side down and making the rendering of ikariam a little ugly.
login to vote
when you adapt your script for the new version of ikariam, i try to translate in french
login to vote
Don't work whit the new version of Ikariam. (v.0.2.5)
login to vote
Excelent script perfect.
Here an update on the Dutch line
keywords[0] = ["Stadhuis", "Scheepswerf", "Handelspost", "Opslagplaats", "Handelshaven", "Barakken", "Paleis", "Schuilplaats", "Ambassade", "Academie", "Werkplaats", "Taverne", "Museum", "Stadsmuur", "Gouveneurswoning"];
some were not visible now they are (the wall is stadsmuur) and the handelshaven, you had twice handelspost
but thanks, great script
login to vote
// ==UserScript== // @name Ikariam General Overview v1.5 // @namespace IkariamOverview // @description An Ikariam game script to gather information from player towns // @include http://*.ikariam.*/* // @exclude http://board.ikariam.*/ // ==/UserScript== /** ABOUT: » Ikariam General Overview v1.5 By: A. Maia F. (a.maia.ferreira[at]gmail.com) Date: 3 June 08 Languages / working on servers: » (en) English (UK) (ikariam.org) » (us) English (US) (ikariam.com) » (pt) Portuguese (ikariam.com.pt) » (de) German (ikariam.de) [Thanks to t.b. - http://userscripts.org/users/29222] » (pl) Polish (ikariam.pl) [Thanks to sip3k - http://userscripts.org/users/53611] » (nl) Dutch (ikariam.nl) [Thanks to bogyi - http://userscripts.org/users/52238] » (dk) Danish (ikariam.dk) [Thanks to Trigger - http://userscripts.org/users/53662] » (es) Spanish (ikariam.es) [Thanks to Pyronhell - http://userscripts.org/users/52757] » (cz) Czech (ikariam.cz) [Thanks to who e-mailed me the language] » (it) Italiam (ikariam.it) [Thanks to Boydon] » (se) Swedish (ikariam.se) [Thanks to rEacT - http://userscripts.org/users/54856] CHANGELOG: 21/05/2008 * Version 1 released * Minor bugfixes 22/05/2008 * Added colors to full (and almost full) warehouses * Added German language * Added Polish language * Added Dutch language * Added Danish language 23/05/2008 * Added Turkish language * Minor bugfixes 03/06/2008 * Bugfix: At Island view, towns were on top of the general overview window (Thanks to Pyronhell that submited the bugfix - http://userscripts.org/users/52757) * Bugfix: Production of island resources weren't working * Added Spanish language * Added Czech language * Added Italian language * Added English (US) language 05/06/2008 * Added Swedish language WARNING: Using this script with the game is forbidden! I'm not responsible for banned accounts. Quoted from Ikariam Rules: "VII. Scripting * Using a program as interface between the player and his game is prohibited. Any other form of automatically generated information generated for a group of players advantage with malicious intentions is forbidden as well. This includes but is not limited to: * Bots * Macros * Automated island databases. Note: Only exceptions to this are programs that are expressly approved by GameForge." FEATURES: - Multi-language (12 of 21 languages currently available) - Overview of all buildings for each town - Overview of all resources for each town - Resources maximum capacity for each town - Resources production for each island - Overview of all buildings under construction - Shortcuts to island resources on the left-side box - When storage is almost full for a resource, it changes it's color to bright red / when completely full, changes to red. Note: You need to open each city first, to gather the data to complete the table. KNOWN BUGS: - When you open the Overview popup at the Island View, will not be visible. TODO: 1 - Finishing times for building constructions (or a time bar?) 2 - Time bar until resource fulls a silo (to put in the table) 3 - Time bar / clock on upgrading buildings - Finances table - Workshop research table - Research table - Military table ?? - Loading everything together? DONE - Various shortcuts on the script left panel (to resources, to buildings, etc) DONE - Tooltips in capacity fields DONE - Colors when near the maximum capacity **/ /** MAIN VARIABLES STARTUP **/ var scriptName = "Ikariam General Overview v1.5" var allCities = getCities(); var keywords = getLang(); try { getBuildings(allCities, currentCity(allCities)); getResources(allCities, currentCity(allCities)); shortcuts = buildShortcuts(currentCity(allCities)); } catch(e) { } /**** FUNCTIONS ****/ function getLang() { /** returns array with language keywords. TRANSLATIONS BELOW ALL WORDS ARE CASE-SENSITIVE! ALL BUILDING NAMES MUST MATCH THE SERVER BUILDING NAMES. keywords[0] Building names keywords[1] Resources names keywords[2] Various words used in the data tables **/ var keywords = new Array(2); var tHost = window.location.host; tHost = tHost.substring(tHost.indexOf('.')+1, tHost.length) switch (tHost) { case 'ikariam.org': keywords[0] = ["Town hall", "Shipyard", "Trading port", "Warehouse", "Trading post", "Barracks", "Palace", "Hideout", "Embassy", "Academy", "Workshop", "Tavern", "Museum", "Town wall", "Governor´s Residence"]; keywords[1] = ["Wood","Wine","Marble","Crystal","Sulphur"]; keywords[2] = ["Level", "Close", "Click to open/close", "Buildings & resources overview", "* To update the data for each city go to the page of the correspondent city","Towns", "Buildings overview", "Resources overview", "Capacity","Under construction", "on", "under construction", "Building to level", "Production of", "City resources", "Maximum warehouse capacity", "for"]; break; case 'ikariam.com.pt': keywords[0] = ["Câmara Municipal", "Estaleiro", "Porto Mercantil", "Armazém", "Mercado", "Quartel", "Palácio", "Espionagem", "Embaixada", "Academia", "Oficina", "Taberna", "Museu", "Muralha da cidade", "Residência do Governador"]; keywords[1] = ["Madeira","Vinho","Mármore","Cristal","Enxofre"]; keywords[2] = ["Nível", "Fechar", "Clique para abrir/fechar", "Vista geral de edifícios & recursos", "* Para actualizar os dados de uma cidade, abre a página da cidade correspondente", "Cidades", "Vista geral de edifícios", "Vista geral de recursos", "Capacidade", "Em construção", "em", "em construção", "A construir para o nível", "Produção de", "Recursos da cidade", "Capacidade máxima do armazém", "para"]; break; // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 case 'ikariam.de': keywords[0] = ["Rathaus", "Schiffswerft", "Handelshafen", "Lagerhaus", "Kontor", "Kaserne", "Palast", "Versteck", "Botschaft", "Akademie", "Erfinderwerkstatt", "Taverne", "Museum", "Stadtmauer", "Stadthaltersitz"]; keywords[1] = ["Baumaterial","Wein","Marmor","Kristallglas","Schwefel"]; keywords[2] = ["Stufe", "Schließen", "Hier klicken zum Öffnen/Schließen", "Gebäude- & Resourcenübersicht", "* Um die Daten der Städte zu aktualisieren, müssen die Seiten der jeweiligen Städte geladen werden.", "Städte", "Gebäudeübersicht", "Ressourcenübersicht", "Kapazität", "In Bearbeitung", "in", "in Bearbeitung", "Aufwerten auf Level", "Produktion von", "Stadtressourcen", "Maximale Lagerkapazität", "für"]; break; case 'ikariam.pl': keywords[0] = ["Ratusz", "Stocznia", "Port handlowy", "Magazyn", "Bazar", "Koszary", "Pa\u0142ac", "Kryj\u00F3wka", "Ambasada", "Akademia", "Warsztat", "Tawerna", "Muzeum", "Mur miejski", "Rezydencja Gubernatora"]; keywords[1] = ["Material budowlany","Wino","Marmur","Kryszta\u0142","Siarka"]; keywords[2] = ["Poziom", "Zamknij", "Kliknij by otworzyc/zamknac", "Podsumowanie budynk\u00F3w i zasob\u00F3w", "* Aby pobrac dane przejdz przez wszystkie miasta", "Miasto", "Podsumowanie budynk\u00F3w", "Podsumowanie surowc\u00F3w", "Pojemnosc", "W trakcie rozbudowy", "w", "W trakcie rozbudowy", "Rozbudowa do levelu", "Wydobycie", "Zasoby miasta", "Pojemnosc magazynu", "dla"]; break; case 'ikariam.nl': keywords[0] = ["Stadhuis", "Scheepswerf", "Handelspost", "Opslagplaats", "Handelspost", "Barakken", "Paleis", "Schuilplaats", "Ambassade", "Academie", "Werkplaats", "Taverne", "Museum", "Muur", "Gouveneurswoning"]; keywords[1] = ["Hout","Wijn","Marmer","Kristal","Zwavel"]; keywords[2] = ["Level", "Sluiten", "Klik om te opene/sluiten", "Gebouwen en Middelen overzicht", "* Om de data te updaten, ga apart naar elke stad","Steden", "Gebouwen overzicht", "Middelen overzicht", "Capiciteit","In aanbouw", "Aan", "In Aanbouw", "Aan het bouwen naar level", "Productie van", "Stad middelen", "Maximum opslagplaats capiciteit", "Voor"]; break; case 'ikariam.dk': keywords[0] = ["Rådhus", "Skibsværft", "Handelshavn", "Lagerbygning", "Handelsstation", "Kaserne", "Palads", "Skjulested", "Ambassade", "Akademi", "Værksted", "Værtshus", "Museum", "Bymur", "Guvernørs Residens"]; keywords[1] = ["Træ","Vin","Marmor","Krystal","Svovl"]; keywords[2] = ["Level", "Luk", "Klik for at åbne/lukke", "Bygnings & ressource oversigt", "* For at opdatere data for hver by gå til siden med den relevante by","Byer", "Bygningsoversigt", "Ressourceoversigt", "Kapacitet","Under opførsel", "på", "under opførsel", "Bygnings næste level", "Produktion af", "By ressourcer", "Maximal lager kapacitet", "for"]; break; case 'ikariam.net': keywords[0] = ["Belediye Binası", "Donanma Tersanesi", "Ticaret Limani", "Depo", "Ticaret Merkezi", "Kışla", "Saray", "İstihbarat Merkezi", "Büyük Elçilik", "Akademi", "Mucit Atölyesi", "Taverna", "Müze", "Sur", "Vali Konağı"]; keywords[1] = ["Odun","Şarap","Mermer","Kristal Cam","Sülfür"]; keywords[2] = ["Seviye", "Kapat", "Click to open/close", "Bina ve Kaynaklara Genel Bakış", "* Bilgiyi güncellemek için şehrin sayfasına gidin.","Şehir", "Bina Seviyeleri", "Kaynak Miktarları", "Kapasite","Yükseltiliyor", "on", "Yükseltiliyor", "Yükseltilen Seviye=", "Üretim=", "Şehir Kaynakları", "Maksimum depo kapasitesi", "için"]; break; case 'ikariam.es': keywords[0] = ["Intendencia", "Astillero de guerra", "Puerto comercial", "Depósito", "Comercio", "Cuartel", "Palacio", "Escondite", "Embajada", "Academia", "Taller de invenciones", "Taberna", "Museo", "Muro de la ciudad", "Residencia del gobernador"]; keywords[1] = ["Madera","Vino","Mármol","Cristal","Azufre"]; keywords[2] = ["Nivel", "Cerrar", "Click para abrir/cerrar", "Resumen de la ciudad", "* Para actualizar los datos de cada ciudad abre la página de cada ciudad.","Ciudades", "Resumen de construcciones", "Resumen de recursos", "Capacidad","En construcción", "en", "en construcción", "Actualizando al nivel", "Producción de", "Recursos de la ciudad", "Capacidad máxima del depósito", "para"]; break; case 'ikariam.cz': keywords[0] = ["Městská radnice", "Loděnice", "Obchodní přístav", "Sklad", "Tržiště", "Kasárna", "Palác", "Úkryt", "Ambasáda", "Akademie", "Dílna", "Hostinec", "Muzeum", "Městská zeď", "Guvernérova Rezidence"]; keywords[1] = ["Stavební materiál","Víno","Mramor","Krystalické sklo","Síra"]; keywords[2] = ["Úroveň", "Zavřít", "Klikni pro otevření/zavření", "Přehled budov & zdrojů", "* Pro aktualizaci dat jednotlivých měst je potřeba tyto města navštívit","Města", "Přehled budov", "Přehled zdrojů", "Kapacita","Staví se", "v", "staví se", "Úroveň budovy", "Produkce ", "Zdroje města", "Kapacita skladu", "pro"]; break; case 'ikariam.it': keywords[0] = ["Municipio", "Cantiere Navale", "Porto", "Magazzino", "Mercato", "Caserma", "Palazzo", "Nascondiglio", "Ambasciata", "Accademia", "Officina", "Taverna", "Museo", "Mura della città", "Residenza del Governatore"]; keywords[1] = ["Legno","Vino","Marmo","Cristallo","Zolfo"]; keywords[2] = ["Livello", "Chiudi", "Fare click per aprire/chiudere", "Panoramica Edifici e Risorse", "* Per aggiornare i dati di una città, visitare la pagina rispettiva.","Città", "Panoramica edifici", "Panoramica risorse", "Capacità","In costruzione", "a", "in costruzione", "In espansione al livello", "Produzione di", "Risorse prodotte dalla città", "Capacità massima del magazzino", "a"]; break; case 'ikariam.com': keywords[0] = ["Town hall", "Shipyard", "Trading port", "Warehouse", "Trading post", "Barracks", "Palace", "Hideout", "Embassy", "Academy", "Workshop", "Tavern", "Museum", "Town wall", "Governor´s Residence"]; keywords[1] = ["Wood","Wine","Marble","Crystal","Sulphur"]; keywords[2] = ["Level", "Close", "Click to open/close", "Buildings & resources overview", "* To update the data for each city go to the page of the correspondent city","Towns", "Buildings overview", "Resources overview", "Capacity","Under construction", "on", "under construction", "Building to level", "Production of", "City resources", "Maximum warehouse capacity", "for"]; break; case 'ikariam.se': keywords[0] = ["Rådhus", "Skeppsvarv", "Handelshamn", "Lagerlokal", "Handelsstation", "Kasern", "Palats", "Gömställe", "Ambassad", "Akademi", "Verkstad", "Taverna", "Museum", "Stadsmur", "Guvernörsresidens"]; keywords[1] = ["Trä","Vin","Marmor","Kristall","Svavel"]; keywords[2] = ["Nivå", "Stäng", "Klicka för att öppna/stänga", "Byggnader & resurser översikt", "* För att uppdatera informationen för varje stad gå till sidan för respektive stad","Städer", "Byggnader översikt", "Resurser översikt", "Kapacitet","Under utbyggnad", "på", "under utbyggnad", "Byggnadens nästa nivå", "Produktion av", "Stadsresurser", "Maximal lagerkapacitet", "för"]; break; } return keywords; } function getResourcesProduction(type) { /** returns array with all data related to resources produced on the current island tradeGood[0] How much resource is being produced (ie: "+120") tradeGood[1] Name of the resource tradeGood[2] HREF to resource production spot **/ var tradeGood = new Array(2); tradeGood[0] = document.getElementsByTagName('script')[document.getElementsByTagName('script').length-2].innerHTML; var islandID = document.getElementById('breadcrumbs').childNodes[3].href; islandID = islandID.substring(islandID.indexOf("id=")+3, islandID.length); switch (type) { case 'island': tradeGood[0] = tradeGood[0].substring(tradeGood[0].indexOf("startTradegoodDelta")+22, tradeGood[0].length); tradeGood[1] = tradeGood[0].substring(tradeGood[0].lastIndexOf("value_")+6, tradeGood[0].length); tradeGood[1] = tradeGood[1].substring(0, tradeGood[1].indexOf("'")); tradeGood[2] = "?view=tradegood&type=tradegood&id=" + islandID; break; case 'wood': tradeGood[0] = tradeGood[0].substring(tradeGood[0].indexOf("startResourcesDelta")+22, tradeGood[0].length); tradeGood[1] = "wood"; tradeGood[2] = "?view=resource&type=resource&id=" + islandID; break; } tradeGood[0] = tradeGood[0].substring(0, tradeGood[0].indexOf(";")); tradeGood[0] = "+" + Math.round(tradeGood[0]*3600); return tradeGood; } function getCities() { /** returns array with ata related to cities cities[][0] City ID cities[][1] City name cities[][2] City HREF cities[][3] City update time **/ var tmp = document.getElementById('citySelect'); var cities = new Array(); for (i=0; i < tmp.childNodes.length; i++) { if (tmp.childNodes[i].innerHTML != undefined) { cities[cities.length] = new Array(3); cities[cities.length-1][0] = tmp.childNodes[i].getAttribute('value'); cities[cities.length-1][1] = tmp.childNodes[i].innerHTML; cities[cities.length-1][2] = "?view=city&id=" + tmp.childNodes[i].getAttribute('value'); } } var name = document.getElementsByTagName('li')[0].innerHTML; name = name.substring(name.indexOf("")+7, name.length); for (i=0; i < cities.length; i++) { if (cities[i][1] == name) { cities[i][3] = new Date(); } } return cities; } function currentCity(cities) { /** return the selected city index **/ var name = document.getElementsByTagName('li')[0].innerHTML; name = name.substring(name.indexOf("")+7, name.length); for (i=0; i < cities.length; i++) { if (cities[i][1] == name) { return i; } } } function getResources(cities, currentCity) { /** sets a GM script value with the resources in the current city resources[0] Wood resources[1] Wine resources[2] Marble resources[3] Crystal resources[4] Sulphur resources[5] How much wood is being produced (ie: "+120") resources[6] HREF to island saw mill resources[7] How much wine/marble/crystal/sulphur is being produced (ie: "+120") resources[8] Name of the specific island resource (possible values: wine/marble/crystal/sulpfur) resources[9] Specific island resource depot HREF resources[10] Wood storage resources[11] Wine storage resources[12] Marble storage resources[13] Crystal storage resources[14] Sulphur storage resources[15] Wood almost full? ---------------------- resources[16] Wine almost full? | resources[17] Marble almost full? (CSS style to use in the <td>) resources[18] Crystal almost full? | resources[19] Sulphur almost full? ------------------- **/ var resources = new Array(19); var storage; resources[0] = document.getElementById('value_wood').innerHTML; resources[1] = document.getElementById('value_wine').innerHTML; resources[2] = document.getElementById('value_marble').innerHTML; resources[3] = document.getElementById('value_crystal').innerHTML; resources[4] = document.getElementById('value_sulfur').innerHTML; resources[5] = getResourcesProduction('wood')[0]; resources[6] = getResourcesProduction('wood')[2]; resources[7] = getResourcesProduction('island')[0]; var a = getResourcesProduction('island')[1]; if (a=='wine'){ resources[8] = keywords[1][1]; } if (a=='marble'){ resources[8] = keywords[1][2]; } if (a=='crystal'){ resources[8] = keywords[1][3]; } if (a=='sulfur'){ resources[8] = keywords[1][4]; } // var regTest = new RegExp(resources[8].substring(0,3), "i"); // alert(keywords[1].join('\n')); // for (i=0; i < keywords[1].length; i++) { // if (regTest.test(keywords[1][i])) { // resources[8] = keywords[1][i]; // } // } resources[9] = getResourcesProduction('island')[2]; storage = document.getElementById('value_wood').parentNode.childNodes[5].textContent; storage = storage.substring(storage.indexOf(':')+2, storage.length); resources[10] = storage; storage = document.getElementById('value_wine').parentNode.childNodes[5].textContent; storage = storage.substring(storage.indexOf(':')+2, storage.length); resources[11] = storage; storage = document.getElementById('value_marble').parentNode.childNodes[5].textContent; storage = storage.substring(storage.indexOf(':')+2, storage.length); resources[12] = storage; storage = document.getElementById('value_crystal').parentNode.childNodes[5].textContent; storage = storage.substring(storage.indexOf(':')+2, storage.length); resources[13] = storage; storage = document.getElementById('value_sulfur').parentNode.childNodes[5].textContent; storage = storage.substring(storage.indexOf(':')+2, storage.length); resources[14] = storage; for (i=15; i <= 19; i++) { var testStorage1 = resources[i-15].replace(/,/,""); testStorage1 = testStorage1.replace(/\./,""); //because dot cell dividers var testStorage2 = resources[i-5].replace(/,/,""); testStorage2 = testStorage2.replace(/\./,""); //because dot cell dividers if ((parseFloat(testStorage1) / parseFloat(testStorage2)) == 1) { resources[i] = "background-color: red; font-weight: bold;"; } else if ((parseFloat(testStorage1) / parseFloat(testStorage2)) >= 0.75) { resources[i] = "background-color: #FF9B9A; border: 1px solid red;"; } else { resources[i] = ""; } } GM_setValue("resources_" + currentCity, resources.toSource()); } function getBuildings(cities, currentCity) { /** sets a GM script value with the buildings in the current city buildings[currentCity][buildID][0] currentCity; buildings[currentCity][buildID][1] Name buildings[currentCity][buildID][2] HREF buildings[currentCity][buildID][3] Under construction? (possible values: 0, 1) **/ var tmp, buildID; var buildings = new Array(cities.length-1); for (i=0; i < cities.length; i++) { buildings[i] = new Array(14); } for (i=0; i < 15; i++) { tmp = document.getElementById('position' + i).childNodes[3]; for (j=0; j < cities.length; j++) { if (tmp.href.substring(tmp.href.lastIndexOf("id=")+3, tmp.href.lastIndexOf("&")) == cities[j][0]) { currentCity = j; } } var tempName = tmp.title.substring(0, tmp.title.lastIndexOf(keywords[2][0])-1); switch(tempName) { case keywords[0][0]: buildID = 0; break; case keywords[0][1]: buildID = 1; break; case keywords[0][2]: buildID = 2; break; case keywords[0][3]: buildID = 3; break; case keywords[0][4]: buildID = 4; break; case keywords[0][5]: buildID = 5; break; case keywords[0][6]: buildID = 6; break; case keywords[0][7]: buildID = 7; break; case keywords[0][8]: buildID = 8; break; case keywords[0][9]: buildID = 9; break; case keywords[0][10]: buildID = 10; break; case keywords[0][11]: buildID = 11; break; case keywords[0][12]: buildID = 12; break; case keywords[0][13]: buildID = 13; break; case keywords[0][14]: buildID = 6; break; //Governors residence = palace default: buildID = "error"; } buildings[currentCity][buildID] = new Array(3); buildings[currentCity][buildID][0] = currentCity; buildings[currentCity][buildID][1] = tmp.title.substring(tmp.title.lastIndexOf(" ")+1, tmp.title.length); buildings[currentCity][buildID][2] = tmp.href; buildings[currentCity][buildID][3] = tmp.firstChild.innerHTML.search(keywords[2][9]); GM_setValue("city_" + currentCity, buildings[currentCity].toSource()); } } function buildShortcuts(currCity) { /** returns an array with important data for box shortcut shortcuts[0] Wood production shortcuts[1] HREF to saw mill shortcuts[2] Island resource production shortcuts[3] Name of the island resource shortcuts[4] HREF to the island resource **/ var temp_resources = eval(GM_getValue("resources_" + currCity, undefined)); var shortcuts = new Array(2); shortcuts[0] = temp_resources[5]; shortcuts[1] = temp_resources[6]; shortcuts[2] = temp_resources[7]; shortcuts[3] = temp_resources[8]; shortcuts[4] = temp_resources[9]; return shortcuts; } //Add Javascript to the source code function addJS(where, js) { var head, jscript; head = document.getElementsByTagName(where)[0]; if (!head) { return; } jscript = document.createElement('script'); jscript.type = 'text/javascript'; jscript.innerHTML = js; head.appendChild(jscript); } //NEW INFOBOX var newElement = document.createElement('div'); newElement.className = 'dynamic'; newElement.id = 'IkariamOverview'; newElement.innerHTML = ''
+ ' '
+ '';
infoBox = document.getElementById('mainview');
if (infoBox) {
infoBox.parentNode.insertBefore(newElement, infoBox);
}
//Create the function to show/hide the CSS popup
addJS('head', 'function showHide() {'
+ 'var overviewPopup;'
+ 'overviewPopup = document.getElementById("overviewPopup");'
+ 'if (overviewPopup.style.display != "block") {'
+ 'overviewPopup.style.display = "block";'
+ '} else {'
+ 'overviewPopup.style.display = "none";'
+ '}'
+'}'
)
//BUILDING LEVELS - Create the data table inside the popup
var table_buildsLvl = '<table width="940px">';
table_buildsLvl += '<tr><td>' + keywords[2][6] + '</td></tr>';
table_buildsLvl += '<tr>';
table_buildsLvl += '<td width="110px">' + keywords[2][5] + '</td>';
for (i=0; i < (keywords[0].length-1); i++) {
table_buildsLvl += '<td>' + keywords[0][i] + '</td>';
}
table_buildsLvl += '</tr>';
for (i=0; i < allCities.length; i++) {
table_buildsLvl += '<tr><td>' + allCities[i][1] + '</td>';
try {
var temp_builds = eval(GM_getValue("city_" + i, "undefined"));
} catch (e) {
}
for (j=0; j < (keywords[0].length-1); j++) {
try {
if (temp_builds[j][1] != "Ground") {
if (temp_builds[j][3] == -1) {
table_buildsLvl += '<td title="' + keywords[0][j] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_builds[j][1] + '</td>';
} else {
var elevated = parseInt(temp_builds[j][1])+1;
table_buildsLvl += '<td title="' + keywords[0][j] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + ' ' + keywords[2][11] + '. ' + '(' + keywords[2][12] + ' ' + elevated + ')">' + temp_builds[j][1] + '</td>';
}
} else {
table_buildsLvl += '<td>-</td>';
}
} catch (e) {
table_buildsLvl += '<td> - </td>';
}
}
table_buildsLvl += '</tr>';
}
table_buildsLvl += '</table>';
//RESOURCES - Create the data table inside the popup
var table_resources = '<table width="610px">';
table_resources += '<tr><td>' + keywords[2][7] + '</td></tr>';
table_resources += '<tr>';
table_resources += '<td width="110px">' + keywords[2][5] + '</td><td width="100px">' + keywords[1][0] + '</td><td width="100px">' + keywords[1][1] + '</td><td width="100px">' + keywords[1][2] + '</td><td width="100px">' + keywords[1][3] + '</td><td width="100px">' + keywords[1][4] + '</td></tr>';
for (i=0; i < allCities.length; i++) {
try {
var temp_resources = eval(GM_getValue("resources_" + i, "-"));
} catch (e) {
var temp_resources = new Array(15)
for (j=0; j < temp_resources.length; j++) {
temp_resources[j] = "-";
}
}
table_resources += '<tr><td>' + allCities[i][1] + '</td>';
switch (temp_resources[8]) {
case 'Wine':
table_resources += '<td title="' + keywords[1][0] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[0] + ' (' + temp_resources[5] + ')</td><td title="' + keywords[1][1] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[1] + ' (' + temp_resources[7] + ')</td><td title="' + keywords[1][2] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[2] + '</td><td title="' + keywords[1][3] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[3] + '</td><td title="' + keywords[1][4] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[4] + '</td>';
break;
case 'Marble':
table_resources += '<td title="' + keywords[1][0] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[0] + ' (' + temp_resources[5] + ')</td><td title="' + keywords[1][1] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[1] + '</td><td title="' + keywords[1][2] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[2] + ' (' + temp_resources[7] + ')</td><td title="' + keywords[1][3] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[3] + '</td><td title="' + keywords[1][4] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[4] + '</td>';
break;
case 'Crystal':
table_resources += '<td title="' + keywords[1][0] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[0] + ' (' + temp_resources[5] + ')</td><td title="' + keywords[1][1] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[1] + '</td><td title="' + keywords[1][2] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[2] + '</td><td title="' + keywords[1][3] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[3] + ' (' + temp_resources[7] + ')</td><td title="' + keywords[1][4] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[4] + '</td>';
break;
case 'Sulfur':
table_resources += '<td title="' + keywords[1][0] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[0] + ' (' + temp_resources[5] + ')</td><td title="' + keywords[1][1] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[1] + '</td><td title="' + keywords[1][2] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[2] + '</td><td title="' + keywords[1][3] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[3] + '</td><td title="' + keywords[1][4] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[4] + ' (' + temp_resources[7] + ')</td>';
break;
default:
table_resources += '<td title="' + keywords[1][0] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[0] + ' (' + temp_resources[5] + ')</td><td title="' + keywords[1][1] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[1] + '</td><td title="' + keywords[1][2] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[2] + '</td><td title="' + keywords[1][3] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[3] + '</td><td title="' + keywords[1][4] + ' ' + keywords[2][10] + ' ' + allCities[i][1] + '">' + temp_resources[4] + '</td>';
}
table_resources += '</tr>';
table_resources += '<tr title="' + keywords[2][15] + ' ' + keywords[2][16] + ' ' + allCities[i][1] + '"><td>' + keywords[2][8] + '</td><td>' + temp_resources[10] + '</td><td>' + temp_resources[11] + '</td><td>' + temp_resources[12] + '</td><td>' + temp_resources[13] + '</td><td>' + temp_resources[14] + '</td></tr>';
}
table_resources += '</table>';
//Create the CSS popup window
addJS('body', 'overviewPopup = document.createElement("div");'
+ 'overviewPopup.id = "overviewPopup";'
+ 'overviewPopup.style.display = "none";'
+ 'overviewPopup.style.position = "absolute";'
+ 'overviewPopup.style.left = "-230px";'
+ 'overviewPopup.style.top = "30px";'
+ 'overviewPopup.style.height = "400px";'
+ 'overviewPopup.style.width = "950px";'
+ 'overviewPopup.style.border = "thick double #D2AC77";'
+ 'overviewPopup.style.backgroundColor = "#F6EBBC";'
+ 'overviewPopup.style.zIndex = 9999;'
+ 'overviewPopup.innerHTML = \'Only replace the resources[8] thing for this:General Overview v1.5
' + '» ' + keywords[2][3] + '
'; try { newElement.innerHTML += '' + keywords[2][14] + ':
' + '» ' + keywords[1][0] + ' (' + shortcuts[0] + ')
' + '» ' + shortcuts[3] + ' (' + shortcuts[2] + ')
'; } catch(e) { } newElement.innerHTML += '
<table width="100%"><tr><td>Ikariam General Overview v1.5 (by Maia)</td><td>' + keywords[2][1] + '</td></tr></table>
' + table_buildsLvl + table_resources + '' + keywords[2][4] + '
' + '\';' + 'textBox = document.getElementById("mainview");' + 'textBox.appendChild(overviewPopup);');</td>var a = getResourcesProduction('island')[1]; if (a=='wine'){ resources[8] = keywords[1][1]; } if (a=='marble'){ resources[8] = keywords[1][2]; } if (a=='crystal'){ resources[8] = keywords[1][3]; } if (a=='sulfur'){ resources[8] = keywords[1][4]; }login to vote
@rEacT
Thanks for your translation. :-)
login to vote
Swedish translation:
case 'ikariam.se':
keywords[0] = ["Rådhus", "Skeppsvarv", "Handelshamn", "Lagerlokal", "Handelsstation", "Kasern", "Palats", "Gömställe", "Ambassad", "Akademi", "Verkstad", "Taverna", "Museum", "Stadsmur", "Guvernörsresidens"];
keywords[1] = ["Trä","Vin","Marmor","Kristall","Svavel"];
keywords[2] = ["Nivå", "Stäng", "Klicka för att öppna/stänga", "Byggnader & resurser översikt", "* För att uppdatera informationen för varje stad gå till sidan för respektive stad","Städer", "Byggnader översikt", "Resurser översikt", "Kapacitet","Under utbyggnad", "på", "under utbyggnad", "Byggnadens nästa nivå", "Produktion av", "Stadsresurser", "Maximal lagerkapacitet", "för"];
break;
login to vote
@ThisIsNotMyRealName
Thanks for your kind words. Yes, "alarm and overview table script" has a lot of features. I already message the script author but with no answer until now. I'll add your features request to the ToDo section.
Thanks a lot!
login to vote
This is the best visually looking script out there. You did a great job. And the code is super clean too!!
I wish it had gold income and the time that any of the resources are full, under "City Resources". The "Buildings & resources overview' doesn't quite have the muscle that "alarm and overview table script" has, but yours is more intuitive. You guys should join forces!
login to vote
@ordan
Thanks
You want me to change the close button from the right to the left side?
login to vote
thank you for script, can you add close button to left side, thank you
login to vote
All submited languages and bugfixes, are now applied.
Thanks to you all that e-mailed me and commented here!
I'll try to add new features soon. If you have any request or any idea that it isn't stated at ToDo section, be my guest to e-mail me or post it here.
Again, thank you all for all support!
login to vote
@tryxter
Ok, sorry, I missed out this section.
No problem, I'll help with my poor js knowledge as much as I can.
login to vote
@Pyronhell
Ok, thanks a lot! :-)
That minor bug is a known bug as stated at "Known Bugs" section, first line.
Anyway, thanks a lot for the great work! I'll try to implement your bugfix soon, seen I've been a little busy.
Again, thanks!
login to vote
@tryxter
Yes, I've tested it on my account and it work's perfetly.
I only noticed this:
But it is a minor bug.
Again, good work :D
login to vote
@Pyronhell
Thanks for the translation and the bugfix. Have you tested it and it worked, right?
I'll try to implement this really really soon!
login to vote
To solve the bug, search:
+ 'overviewPopup.style.border = "thick double #D2AC77";'+ 'overviewPopup.style.backgroundColor = "#F6EBBC";'
at the end of the script and paste after this:
+ 'overviewPopup.style.zIndex = 9999;'Happy gaming!