ikariam alarm and overview table

By Suller Andras Last update Jun 2, 2008 — Installed 63,870 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 260 posts, 74 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
fornax User

updated version here: http://userscripts.org/scripts/show/29431

 
hal8999 User

There is a line var nScript = document.getElementById("cityResources").getElementsByTagName("script")[0]; which is causing the script to fail. The id "cityResources" no longer has a tag "script"?

 
johnlee123 User

new version out and it's not working anymore on v0.2.8

 
yoggiemonkey User

my island coordinate was 100:xx
and this script doesnt read any data from it
But my another island coordinate was 99:xx and it works well
can u fix it pls? Thanks a alot.

 
LordCémOnur User

Hi, There is a little error in the script.
All island x or y coordinates smaller than 10 will not work correctly.

In another words:
>9:>9 will work
<10:>9 will not work

Can you fix it?

 
Johan Sundström Scriptwright

Okay; I've finally made my own variant of this script's table, Kronos Overview. It isn't as full of options and features as this hack, and it never will be either, but it won't break as often under ikariam layout changes as this one does.

 
LiFeAiR1 User

этот скрипт не обновляет информацию о транспортных кораблях в пути
this script dioon't update information about transport ships

 
Coops Scriptwright

New issues today (July 1st). I have fixed them and uploaded a script here: http://userscripts.org/scripts/show/29431

(Doh - the original script I uploaded still had a bug. Fixed it now. The script at the link above now should work correctly).

 
Delta7272 User

Haha, need the resources too much since the corruption has gone up. Ikariam gets tougher to play every time... :) I guess that's why you need it too so hard!

Thanks for the update, will install it immediately.

 
Choobaka Scriptwright

I re-uploaded the script here:
http://userscripts.org/scripts/show/29270

Maybe you guys can send me some extra *Marble*, Crystal, and Wine =)

 
Delta7272 User

Ok, I lost track. I thought I updated all the code according to what was said below here, but now the entire table is gone... So I must have done something terrible wrong.

Would Kevlar, LiuA or Johan be so kind to post a complete working version?

I only know a little bit of javascript and I'm not able to figure this one out ;)

 
KevlarTheGreat User

Thanks LiuA,
That works perfectly. Should we post this version somewhere so people can get it? Can we somehow replace the one thats downloaded on this page by clicking the "Install this script" button?
Kevlar

 
Choobaka Scriptwright

KevlarTheGreat - Updated my previous comments w/ a check for undefined

 
if (island_id == undefined){
	island_id = "";
}

Should be working now. Once again, new to greasemonkey scripts and this code.

 
KevlarTheGreat User

Thanks LiuA,
With your code I, at least, got it working in City view and tradeship view, but it disappears when I'm in World and Island views. Any ideas? Does it do that to you?

Thanks, Kevlar

 
Choobaka Scriptwright

For the merchant navy transport fix, I had to remove the extra [xx,xx] island information from the city name.

I added:

str = str.substring(str.indexOf(']')+1,str.length);

to Coop's Trim Whitespace Function:

/***********************************************************************
* Trim Whitespace Function ************************************************************************/
function Trim(str){ 
	str = str.substring(str.indexOf(']')+1,str.length);
	while(str.charAt(0) == (" ") ){ 
		str = str.substring(1);
	}
	while(str.charAt(str.length-1) == " " ){ 
		str = str.substring(0,str.length-1);
	}
return str;
}

 
Choobaka Scriptwright

Here's a fix to the change in the city names. The island location was added to the city names.

After this line:
var city_idmainView = getNodeValue("id('breadcrumbs')/*[@class='city']");

I added the 5 lines:

var island_id = getNodeValue("id('breadcrumbs')//a[@title='Back to the island']");
if (island_id == undefined){
	island_id = "";
}
city_idmainView = TrimIsland(island_id)+" "+city_idmainView;	

Make sure you've applied Coop's previous fix w/ the extra white space to the line below (see previous posting from Coops)
city_idmainView = getNode_value("//option[@class='avatarCities' and text()=' "+city_idmainView+"']", 0);

Also added a TrimIsland Function:

/**************************************************************************************************
* TrimIsland Function ******************************************************************/

function TrimIsland(str){
	var a = str.indexOf('[');
	var b = str.indexOf(']');
	str = str.substring(a,b+1);
	return str;
}

I'm new to greasemonkey scripts, but this seems to fix part of the recent problems..

 
KevlarTheGreat User

Johan, you seem to really know what you are doing and we haven't seen an update from the author in a long time.... maybe you could take over or post a clean update somewhere again?

I appreciate your work on this so far and it sounds like you could change it so it doesn't break as often.. I would love to change it myself, I just don't have time to learn javascript right now.

Anyhow, thanks either way,
Kevlar

 
Johan Sundström Scriptwright

Advice to whomever might fix this next time: Instead of the brittle XPath expression to look up the name of the current building, use the value of document.body.id to determine that. The indices of this object are the id:s, value are the building numbers:

var buildingIDs = {
  townHall: 0, port: 3, academy: 4, shipyard: 5, barracks: 6,
  warehouse: 7, wall: 8, tavern: 9, museum: 10, palace: 11, embassy: 12,
  branchOffice: 13, workshop: 15, "workshop-army": 15, "workshop-fleet": 15,
  safehouse: 16, palaceColony: 17
};

This works stably across any page layout changes Gameforge ever does, and is what Kronos Utils does without ever encountering any trouble (track record back to 0.1.8, or thereabouts, when I think I started hacking on Kronos).

 
Pheran User

Yup, the silent update this morning with all the crappy Ikariam Plus advertising has broken the (patched) script again.

 
Guido User

Gah, Gameforge must have tweaked something again, because ship and town updates aren't working anymore. It was working last night (with the tweaks posted here installed) and had been since v0.2.5, but now it's broken again :(

-G

 
Tschaali User

Hello
nice script, but it doesnt work right when I use it
the ressource table only works half and the rest completely doesnt work
can you help me?

 
shaman Scriptwright

Jut eszembe...
@Magyarok!
Nem tud valaki olyan (működő) scriptet ami a Világ Csodába berakott aranyat mutatja a különböző szigeteken?

 
BoST User

try this
http://userscripts.org/scripts/show/28400

 
sharagath User

i have pushed the reset all data bottom, only now the tables will not work at all anymore, it will not show the correct data any more.
i tried uninstall the script and cleared coockies, no effect

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel