Neopets : Meteors of Kreludor

By w35l3y Last update Oct 23, 2011 — Installed 4,047 times.

There are 2 previous versions of this script.

// ==UserScript==
// @name           Neopets : Meteors of Kreludor
// @namespace      http://gm.wesley.eti.br/neopets
// @description    Selects the correct option to Meteors of Kreludor
// @author         w35l3y
// @email          w35l3y@brasnet.org
// @copyright      2011+, w35l3y (http://gm.wesley.eti.br)
// @license        GNU GPL
// @homepage       http://gm.wesley.eti.br
// @version        2.0.0.0
// @language       en
// @include        http://www.neopets.com/moon/meteor.phtml?getclose=1
// @icon           http://www.gravatar.com/avatar.php?gravatar_id=81269f79d21e612f9f307d16b09ee82b&r=PG&s=92&default=identicon
// @resource       meta http://userscripts.org/scripts/source/28362.meta.js
// @resource       i18n http://pastebin.com/download.php?i=1F0jQb5L
// @require        http://userscripts.org/scripts/source/63808.user.js
// @require        http://userscripts.org/scripts/source/85618.user.js
// @require        http://userscripts.org/scripts/source/87940.user.js
// @require        http://userscripts.org/scripts/source/87942.user.js
// @cfu:version    version
// ==/UserScript==

/**************************************************************************

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

**************************************************************************/

//GM_setValue("interval", "[1000, 1000]");

(function () {	// script scope
	var field = xpath(".//form[@name = 'meteorselect']/select[@name = 'pickstep'][1]")[0],
	rnd = function (fn) {
		var interval = eval(GM_getValue("interval", "[1000, 1000]"));
		setTimeout(fn, Math.ceil(interval[0] + interval[1] * Math.random()));
	};
	
	if (field) {
		field.selectedIndex = 1;
		
		rnd(function () {
			field.form.submit();
		});
	}
}());