Melvor Idle Unlimited Offline

Removes the 24hr offline time cap

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Melvor Idle Unlimited Offline
// @namespace    https://greasyfork.org/en/users/1148791-vuccala
// @icon        http://melvoridle.com/assets/media/main/logo_no_text.png
// @match       https://melvoridle.com/index_game.php*
// @grant       none
// @version     1.0
// @author      Vuccala
// @description Removes the 24hr offline time cap
// @license     MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to set up the game context
    function setup(gameContext) {
        gameContext.MAX_OFFLINE_TIME = Infinity;
        loadedLangJson.MENU_TEXT_MAX_OFFLINE_TIME = ' ';
    }

    // Wait for the game context to be available
    const interval = setInterval(() => {
        if (typeof game !== 'undefined' && typeof loadedLangJson !== 'undefined') {
            setup(game);
            clearInterval(interval);
        }
    }, 1000); // Check every second
})();