Script Summary: Displays a countdown/countup timer for the Auction in OGame 4.*
This script displays a counter after the menu at the top, designed to help the player not miss the Auctions, introduced in version 4.0 of the OGame.
The Auctions always begin at the exact hour. Unfortunately, it is not possible to determine when exactly they end. They can end as early as 25 minutes or as late as 45 minutes after having started. (This is intentional, otherwise everybody will make their bids at the last possible second, since the highest bid at the time when the Auction is over, wins.) So, the script doesn't even try to time the Auction exactly. Instead, it does something very simple:
- When 15 minutes are left till the exact hour, the script displays a countdown, colored white, and preceded by a minus sign ("-"). This countdown is the time left until the start of the Auction.
- When the exact hour is reached, the script starts showing a normal timer (minutes and seconds from the start of the Auction). While the time during which the Auction has been going on is less than 15 minutes, the timer is green.
- 15 minutes after the start of the Auction, the timer turns yellow. This is an indication that if you are interested in the object being offered, you better switch to the Auction page and start paying attention.
- 30 minutes after the start of the Auction, the timer turns red. It means that the time for participating is running out (and you might be late already). The timer remains red and running until 45 minutes have passed since the beginning of the Auction, even if the Auction is already over. This is because it is not possible to predict when the Auction will end and I don't want to have to remember information across different pages, if the player observes that the Auction has ended on the Auction page.
The script is not perfect. Again, its purpose is not to time the Auction perfectly (this is not possible) but to give you a visual warning that the Auction has started and is progressing, in case you want to participate.
Цaveats: The timer synchronizes itself from the game clock. The game clock runs inside the browser of the player and is subject to lags. Therefore, the timer displayed by the script is not perfect and may differ by a few seconds from the "time till the beginning of the next Auction", displayed on the Auction page, since that timer is constantly being synchronized with the game server via constant communication over web sockets.
2012-05-04. Version 1.01. Moved the timer to the right of the clock. The timer is now turned off 15 minutes before the Auction stops working (23:00 server time) and is turned back on 15 minutes before the Auction starts working again (06:00 server time). A copy of the timer is now also shown under the controls used to bid for resources on the Auction page.
2012-06-03. Version 1.02. Modified the script to make it work in version 4.1 of OGame.
2012-06-25. Version 1.03. The timer was turned off one hour earlier than necessary (i.e., before the nightly auction pause). Fixed.
2012-09-20. Version 1.04. Made the script compatible with OGame version 5.0.