您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enhances your Idle Quest experience with custom audio alerts!
当前为
- // ==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)