<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Discussion on Ogame Resource Ticker | Userscripts.org</title>
    <link>http://userscripts.org/scripts/show/45588</link>
    <description>Recent comments on userscript: Ogame Resource Ticker</description>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>another bug, replied by benjammin</title>
      <description>&lt;p&gt;Just tested the new version, the bug I noted yesterday seems to be fixed!&lt;/p&gt;</description>
      <pubDate>Thu, 21 May 2009 14:09:33 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:124194</guid>
      <author>benjammin</author>
      <link>http://userscripts.org/posts/124194</link>
    </item>
    <item>
      <title>another bug, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Ah hehe thanks =) Not having a moon makes this darn hard to test. Anyway, I threw in a moon-check before overwriting the planet's cookie so that issue should be fixed now.&lt;/p&gt;

&lt;p&gt;I'll consider whether or not to just not do anything at all if it's a moon... but I'd need to think about that a little before just doing it and i'm too tired right now&lt;/p&gt;</description>
      <pubDate>Thu, 21 May 2009 04:52:43 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:124071</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/124071</link>
    </item>
    <item>
      <title>another bug, replied by benjammin</title>
      <description>&lt;p&gt;OK Oliver just tested the new script - it works sorta now. Here's what happens - &lt;/p&gt;

&lt;p&gt;If I view the resources page of each planet, the resources will tick correctly on the planet and then not tick on the moon. The problem is if I view the resources page on the moon, then go back to the planet. If I do this, the resources stop ticking on the planet.&lt;/p&gt;</description>
      <pubDate>Thu, 21 May 2009 01:19:44 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:124007</guid>
      <author>benjammin</author>
      <link>http://userscripts.org/posts/124007</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Please see this link for a version that updates the values every second:
&lt;br /&gt;&lt;a href=&quot;http://userscripts.org/scripts/show/49727&quot;&gt;http://userscripts.org/scripts/show/49727&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if this solves your problems. Thanks!&lt;/p&gt;</description>
      <pubDate>Thu, 21 May 2009 00:57:49 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:123999</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/123999</link>
    </item>
    <item>
      <title>another bug, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Thanks. This should be solved now.&lt;/p&gt;</description>
      <pubDate>Thu, 21 May 2009 00:21:17 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:123984</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/123984</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Sure, I'll get that together in a day or two and link you to it. Hopefully we'll get this thing stamped out.&lt;/p&gt;

&lt;p&gt;Thank again for helping me make my scripts useable! I really appreciate it =)&lt;/p&gt;</description>
      <pubDate>Wed, 20 May 2009 00:04:40 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:123464</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/123464</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;Does anyone from your alliance have mines high enough to produce more than 1 unit of resource per second? Perhaps this is why the clock gets distorted on my side... Could you please try to produce a version that updates all the three resources every second, instead of only one resource whenever this resource increments by one? I'll test it here and see if the problem goes away.&lt;/p&gt;</description>
      <pubDate>Tue, 12 May 2009 07:00:00 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:120415</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/120415</link>
    </item>
    <item>
      <title>another bug, replied by Vess</title>
      <description>&lt;p&gt;If you take the coordinates of the current planet from the planet selector, and if the problem is that you can't figure out whether you're looking at the planet or at the moon around it, the easiest solution is to inspect the name if the planet. If it has a &quot;(&quot; in it, it's a moon.&lt;/p&gt;

&lt;p&gt;For instance, when on a moon, the planet selector would show the current planet as something like &quot;FooBar (Moon) [X:XXX:XX]&quot;, where &quot;FooBar&quot; is the name of the moon and &quot;[X:XXX:XX]&quot; are the coordinates of the planet it orbits. You can't have a &quot;(&quot; in the name of the planet and looking just for it is a language-independent way to recognize moons, because the text &quot;Moon&quot; is translated in the various languages.&lt;/p&gt;</description>
      <pubDate>Tue, 12 May 2009 06:29:49 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:120406</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/120406</link>
    </item>
    <item>
      <title>another bug, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Thanks anyway for pointing out the bug =)&lt;/p&gt;

&lt;p&gt;Anyone with a moon care to help me out? Otherwise you guys are gonna have to wait for a while...&lt;/p&gt;</description>
      <pubDate>Sun, 19 Apr 2009 14:21:50 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:112459</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/112459</link>
    </item>
    <item>
      <title>another bug, replied by benjammin</title>
      <description>&lt;p&gt;I will not be able to do that, sorry.&lt;/p&gt;</description>
      <pubDate>Thu, 16 Apr 2009 23:19:34 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:111588</guid>
      <author>benjammin</author>
      <link>http://userscripts.org/posts/111588</link>
    </item>
    <item>
      <title>another bug, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Thanks for your input! I do actually store the cookie based on the coordinates - if you check your cookies you'll see you have a cookie called rates[x:y:z] for each of your planets, but I guess since your moons are in the same [x:y:z] slot they probably get the same cookie attributed. The script gets the coordinates from the currently selected value in the dropdown box at the top of the screen. I've never had a moon so I don't really know how to check for them.&lt;/p&gt;

&lt;p&gt;This sounds like an easy bug to fix, but I'd need to see what a moon-page looks like. If you wouldn't mind, could you save the HTML source of various pages when on your moon? (i.e. buildings, resources, etc) That way I could find a common element that's different from planet pages and I could just make the tickers not count when looking at a moon.&lt;/p&gt;

&lt;p&gt;So, if you zip up a couple of those pages, upload it to drop.io or something and post the link, I'll have this fixed in no time. You'll probably also want to replace any of your coordinates with 'x's, so that people don't get 'em.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</description>
      <pubDate>Thu, 16 Apr 2009 12:17:25 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:111438</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/111438</link>
    </item>
    <item>
      <title>another bug, replied by benjammin</title>
      <description>&lt;p&gt;Hey Oliver - great script that you've made, but I found a bug. Here's what happens:&lt;/p&gt;

&lt;p&gt;I have a moon outside my main planet. If I go to the resources tab on the planet to update the script with my production values, it works fine on the planet. However if I switch to my moon outside the planet, the moon resources increase the same as the planet production. Of course, this isn't possible. Same happens if I click the resources page on the moon - works fine while I'm on the moon but if I go back to the planet, the resources don't tick - so they reflect the cookie grabbed from my moon resources page. &lt;/p&gt;

&lt;p&gt;Perhaps you just store the cookie based on the coordinates?&lt;/p&gt;</description>
      <pubDate>Thu, 16 Apr 2009 02:16:52 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24939:111344</guid>
      <author>benjammin</author>
      <link>http://userscripts.org/posts/111344</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;I can't replicate your timing issue, and neither can anyone in my alliance, so I'm thinking perhaps it's a problem on your end... and since I really don't have much to go on, unless other people start complaining about this one I'm going to have to leave it unresolved.&lt;/p&gt;</description>
      <pubDate>Sat, 11 Apr 2009 22:06:50 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:110234</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/110234</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;That's funny - I looked at StOgame too and IMO it definitely updates all the resources every second, instead of whenever a resource increases by one. :)&lt;/p&gt;

&lt;p&gt;And, yes, I'm 100% sure that it was your script that distorted the local timers - although I am not sure that it was the updating method that was the reason. When I disabled it, everything started working just fine again.&lt;/p&gt;</description>
      <pubDate>Thu, 09 Apr 2009 09:33:39 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:109478</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/109478</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;I've had a look at StOgame and I'm pretty sure they're doing it the way I'm doing it - resources tick up by 1 whenever they're supposed to. Also I don't think this would cause any timing issues as when I had the Time Until Available timers in this script as well they were unaffected.&lt;/p&gt;

&lt;p&gt;Are you certain that the issue you're talking about is caused by this script?&lt;/p&gt;</description>
      <pubDate>Mon, 06 Apr 2009 15:39:27 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:108767</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/108767</link>
    </item>
    <item>
      <title>Timers for building or research, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Me too, but I initially stuck them together because each one needs to set/read the same cookie, and if both are installed it'll do that twice... I'll try to think of a clever way to get around this&lt;/p&gt;

&lt;p&gt;update: new countdown timer thing is &lt;a href=&quot;http://userscripts.org/scripts/show/45998&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 06 Apr 2009 14:06:37 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24393:108744</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/108744</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;Regarding the screwing up with the flight timers - it could be caused by the fact that your script updates each resource when it is supposed to have increased by 1. These are a lot of asynchronous updates. A better approach might be to update the resources every second by the amount they are supposed to have increased during this second. But I am not sure that this will fix the problem and it might lead to discrepancies with the reality, since the resources update by tiny fractions of a unit every second, especially when the mines are of lower level. This should be experimented with. One possibility is to see how StdOgame does the resource ticker. Unfortunately, I don't use it, so I'm not familiar with it.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Apr 2009 10:19:24 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:108718</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/108718</link>
    </item>
    <item>
      <title>Timers for building or research, replied by Vess</title>
      <description>&lt;p&gt;Personally, I prefer the &quot;one script - one function&quot; approach. Makes it much easier to pick and choose what the user needs. Also, I play on at least two language servers (ogame.org and bg.ogame.org), so language independence is important to me. Finally, you might want to check with GameForge. I vaguely remember that &quot;time to be available&quot; was a Commander feature and, as such, is forbidden in the free add-ons. But I might be wrong about that one.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Apr 2009 09:58:33 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24393:108716</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/108716</link>
    </item>
    <item>
      <title>Timers for building or research, replied by Oliver Jensen</title>
      <description>&lt;p&gt;So one of the newer features of this script is that it adds a line to building/ship/research descriptions telling you how long you'll have to wait before you'll have mined enough resources to build or research each item. Do you guys actually like that feature? I think it's neat but it doesn't take long before most of your resources come in from raiding etc. which makes these values rather useless. Also, it makes &quot;internationalizing&quot; this script a lot harder.&lt;/p&gt;

&lt;p&gt;Any thoughts?&lt;/p&gt;</description>
      <pubDate>Mon, 06 Apr 2009 00:16:41 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24393:108615</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/108615</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Regarding the language issues, these are going to be a problem:
&lt;br /&gt;I've fixed the &quot;Total:&quot; to match for the first ':' it finds like you suggested, and broadened the include URLs etc. However, fixing searches for 'Metal:', 'Crystal:' and 'Deuterium:' is trickier, as it does this to figure out how much time is still needed before you'll be able to build or research something, and since those values are in a single line of text, without specific words I would have no way of differentiating 100 metal and 100 crystal from 100 metal and 100 deut. Any ideas?&lt;/p&gt;

&lt;p&gt;Regarding the multiple planets thing, that should be &lt;b&gt;fixed&lt;/b&gt; now :) I still only have one so I can't really test it like I should but it appears to be working - it stores a cookie per planet named rates[coords]&lt;/p&gt;

&lt;p&gt;Thanks again for all your help!&lt;/p&gt;</description>
      <pubDate>Sun, 05 Apr 2009 16:08:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:108531</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/108531</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;Turns out, there's nothing special about the moons - issue 4) was related to issue 1). Simply, a moon has no Solar Panels, no Fusion Reactors, no mines, no Solar Sats - so the resource production was in a place the script didn't expect and the resources were ticking with the speed of the last visited planet resource page.&lt;/p&gt;

&lt;p&gt;Looking at your fixed source, a few more remarks.&lt;/p&gt;

&lt;p&gt;1) Now you're looking for &quot;Total:&quot;. I know that's safer - but also makes the script language-dependent. If you look just for &quot;:&quot;, it will work everywhere. The new version also looks for &quot;Metal:&quot;, &quot;Crystal:&quot; and &quot;Deuterium:&quot; which is also language-dependent. I am thinking of something along the lines&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if (location.search.split ('?') [1].split ('&amp;amp;') [0] == 'page=resources')
&lt;br /&gt;{
&lt;br /&gt;	var fields;
&lt;br /&gt;	var element = document.getElementById ('ressourcen').getElementsByTagName ('tr');
&lt;br /&gt;	for (var i = 0; i &amp;lt; element.length; i++)
&lt;br /&gt;	{
&lt;br /&gt;		if (element [i].innerHTML.match (':'))
&lt;br /&gt;		{
&lt;br /&gt;			fields = element [i].getElementsByTagName ('font');
&lt;br /&gt;			break;
&lt;br /&gt;		}
&lt;br /&gt;	}
&lt;br /&gt;	mrate = fields [0].innerHTML;
&lt;br /&gt;	crate = fields [1].innerHTML;
&lt;br /&gt;	drate = fields [2].innerHTML;
&lt;br /&gt;	document.cookie = 'rates=' + mrate + ':' + crate + ':' + drate;
&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2) The @include should be a bit more generic (&lt;a href=&quot;http://uni*.ogame.*/game/index.php&quot;&gt;http://uni*.ogame.*/game/index.php&lt;/a&gt;*), in order for the script to work on other language servers. However, you should also put a couple of @exclude lines (for &lt;a href=&quot;http://uni42.ogame.org/&quot;&gt;http://uni42.ogame.org/&lt;/a&gt;* and &lt;a href=&quot;http://uni6.ogame.de/&quot;&gt;http://uni6.ogame.de/&lt;/a&gt;*) because these two sites use the new OGame interface which has a completely different format and a built-in resource ticker.&lt;/p&gt;

&lt;p&gt;3) Another problem which I don't know how to fix. The ticking of the resources tends to screw up the countback clocks of the flights in progress. That is, these clocks reach 0 on the screen faster than they should and when you think that the fleet has arrived and refresh the page, you see that it still has some time left to go.&lt;/p&gt;</description>
      <pubDate>Fri, 03 Apr 2009 08:56:36 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:107859</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/107859</link>
    </item>
    <item>
      <title>Buggy, replied by Oliver Jensen</title>
      <description>&lt;p&gt;Vess, thank you very much for your input. I joined Ogame about 5 days ago so I didn't realize a lot of this stuff changes location.&lt;/p&gt;

&lt;p&gt;1) Whoops, I guess It-Works-For-Me testing doesn't quite cut it, huh. &lt;b&gt;Fixed&lt;/b&gt;.
&lt;br /&gt;2) Oh, I thought that replace would replace all '.'s - This is pretty much the first time I'm using javascript and I assumed it'd act like php's str_replace. And yeah, I've never had more than a million resources ;) &lt;b&gt;Fixed&lt;/b&gt;.
&lt;br /&gt;3) Heh my bad, thanks for catching it. &lt;b&gt;Fixed&lt;/b&gt;.
&lt;br /&gt;4) I'll fix the planet issue as soon as I get a second one so that I can test it. As for moons, could you please tell me what's different about the page when you're looking at one so I can just disable it on moons? Thanks!&lt;/p&gt;</description>
      <pubDate>Thu, 02 Apr 2009 12:15:31 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:107657</guid>
      <author>Oliver Jensen</author>
      <link>http://userscripts.org/posts/107657</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;Correction about 1). The level of production is neither the 10th, nor the 11th &quot;tr&quot; element. In fact, it is not at a constant place. That table can have a different number of rows, depending on how many kinds of mines are built. It can have as few as 9 rows (no mines, no Solar Panels, no Solar Sats) or as many as 15 (the 3 types of mines, Solar Panel, Fusion Reactor, Solar Sats).&lt;/p&gt;

&lt;p&gt;You should look for a row, the first cell of which contains the text &quot;:&quot; (e.g., &quot;Total:&quot; in English) - that's the hourly production row from which you should take the various rates.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Apr 2009 09:56:55 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:107644</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/107644</link>
    </item>
    <item>
      <title>Buggy, replied by Vess</title>
      <description>&lt;p&gt;Great idea but the script is horrendously buggy and doesn't work.&lt;/p&gt;

&lt;p&gt;1) It does not get correctly the hourly production rates from the Resources page. As far as I can see, the problem is that it looks for the 10th tr element - while the necessary information is in the 11th element. Easily fixable.&lt;/p&gt;

&lt;p&gt;2) It presumes that numbers can have only one dot. I guess you've never had more than a million resources on any of your planets? ;) Easily fixable by making the replace() functions use a regular expression (/\./g) instead of a literal string ('.').&lt;/p&gt;

&lt;p&gt;3) The variables m, c and d are unused. Easily fixable.&lt;/p&gt;

&lt;p&gt;4) The last one I couldn't fix. The script does not detect planet switching and keeps incrementing with the resource production rate of the last planet, the Resources page of which has been examined. Worse, it keeps &quot;ticking&quot; the resources on a moon - even though nothing is produced there, and visiting the moon's Resources page doesn't solve the problem. :-( You really have to keep in the cookies the production rate for each planet, detect the current planet and account for non-producing &quot;planets&quot; like moons.&lt;/p&gt;

&lt;p&gt;Until the last problem is fixed, the script is, sadly, unusable and misleading to me, so I won't be able to use it.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Apr 2009 09:25:36 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:24223:107637</guid>
      <author>Vess</author>
      <link>http://userscripts.org/posts/107637</link>
    </item>
  </channel>
</rss>
