Idle Quest Notifier

Enhances your Idle Quest experience with custom audio alerts!

当前为 2023-12-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name Idle Quest Notifier
// @namespace https://www.iqrpg.com/game.html
// @version 1.0
// @description Enhances your Idle Quest experience with custom audio alerts!
// @author Grogu2484
// @match http://iqrpg.com/game.html
// @match https://https://test.iqrpg.com/game.html
// @grant none
// ==/UserScript==

// Set your preferred volume level (0-min, 1-max)
var masterAudioLevel = 0.8;

// Auto alerts configuration
var autoAudioAlert = true;
var autoAlertSoundURL = 'https://your-audio-host.com/auto-alert.mp3';
var autoAlertRepeatInSeconds = 2;
var autoAlertNumber = 25;
var autoMaxNumberOfAudioAlerts = 0;
var autoDesktopAlert = true;

// Dungeon alerts configuration
var dungeonAudioAlert = true;
var dungeonDesktopAlert = true;

// Boss alerts configuration
var bossAudioAlert = true;
var bossAlertSoundURL = 'https://your-audio-host.com/boss-alert.mp3';
var bossDefeatedSoundURL = 'https://your-audio-host.com/boss-defeated.mp3';
var bossDesktopAlert = true;

// Event alerts configuration
var eventDesktopAlert = true;
var eventAlert_Woodcutting = true;
var eventAlert_Quarrying = true;
var eventAlert_Mining = true;
var eventAudioAlert = true;
var eventAudioAlertFinished = false;
var eventAlertSoundURL = 'https://your-audio-host.com/event-alert.mp3';

// ... (Continue with other configurations)

// Function to play audio
function playAudio(soundURL) {
    var audio = new Audio(soundURL);
    audio.volume = masterAudioLevel;
    audio.play();
}

// ... (Continue with other functions)

// Main function to handle events
function handleEvents(event) {
    // Customized event handling based on your preferences
    // ...

    // Example: Woodcutting event
    if (event.data.type === "woodcutting" && eventAlert_Woodcutting) {
        if (eventAudioAlert) {
            playAudio(eventAlertSoundURL);
        }
        if (eventDesktopAlert) {
            notifyUser('Idle Quest Event!', 'Woodcutting event has started!');
        }
        // ... (Continue with other event handling)
    }
}

// Function to notify the user
function notifyUser(title, message) {
    if (Notification.permission !== "denied") {
        Notification.requestPermission().then(function (permission) {
            if (permission === "granted") {
                var notification = new Notification(title, { body: message });
            }
        });
    }
}

// ... (Continue with other functions and event listeners)