Idle Quest Notifier

Enhances your Idle Quest experience with custom audio alerts!

  1. // ==UserScript==
  2. // @name Idle Quest Notifier
  3. // @namespace https://www.iqrpg.com/game.html
  4. // @version 1.0
  5. // @description Enhances your Idle Quest experience with custom audio alerts!
  6. // @author Grogu2484
  7. // @match http://iqrpg.com/game.html
  8. // @match https://https://test.iqrpg.com/game.html
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. // Set your preferred volume level (0-min, 1-max)
  13. var masterAudioLevel = 0.8;
  14.  
  15. // Auto alerts configuration
  16. var autoAudioAlert = true;
  17. var autoAlertSoundURL = 'https://your-audio-host.com/auto-alert.mp3';
  18. var autoAlertRepeatInSeconds = 2;
  19. var autoAlertNumber = 25;
  20. var autoMaxNumberOfAudioAlerts = 0;
  21. var autoDesktopAlert = true;
  22.  
  23. // Dungeon alerts configuration
  24. var dungeonAudioAlert = true;
  25. var dungeonDesktopAlert = true;
  26.  
  27. // Boss alerts configuration
  28. var bossAudioAlert = true;
  29. var bossAlertSoundURL = 'https://your-audio-host.com/boss-alert.mp3';
  30. var bossDefeatedSoundURL = 'https://your-audio-host.com/boss-defeated.mp3';
  31. var bossDesktopAlert = true;
  32.  
  33. // Event alerts configuration
  34. var eventDesktopAlert = true;
  35. var eventAlert_Woodcutting = true;
  36. var eventAlert_Quarrying = true;
  37. var eventAlert_Mining = true;
  38. var eventAudioAlert = true;
  39. var eventAudioAlertFinished = false;
  40. var eventAlertSoundURL = 'https://your-audio-host.com/event-alert.mp3';
  41.  
  42. // ... (Continue with other configurations)
  43.  
  44. // Function to play audio
  45. function playAudio(soundURL) {
  46. var audio = new Audio(soundURL);
  47. audio.volume = masterAudioLevel;
  48. audio.play();
  49. }
  50.  
  51. // ... (Continue with other functions)
  52.  
  53. // Main function to handle events
  54. function handleEvents(event) {
  55. // Customized event handling based on your preferences
  56. // ...
  57.  
  58. // Example: Woodcutting event
  59. if (event.data.type === "woodcutting" && eventAlert_Woodcutting) {
  60. if (eventAudioAlert) {
  61. playAudio(eventAlertSoundURL);
  62. }
  63. if (eventDesktopAlert) {
  64. notifyUser('Idle Quest Event!', 'Woodcutting event has started!');
  65. }
  66. // ... (Continue with other event handling)
  67. }
  68. }
  69.  
  70. // Function to notify the user
  71. function notifyUser(title, message) {
  72. if (Notification.permission !== "denied") {
  73. Notification.requestPermission().then(function (permission) {
  74. if (permission === "granted") {
  75. var notification = new Notification(title, { body: message });
  76. }
  77. });
  78. }
  79. }
  80.  
  81. // ... (Continue with other functions and event listeners)