您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Sound is made when crops are ready, when a pet is dropped, and when your idle.
// ==UserScript== // @name Melvor Ding // @namespace http://tampermonkey.net/ // @version 0.1.0 // @description Sound is made when crops are ready, when a pet is dropped, and when your idle. // @description Special Thanks to TinyCoyote#1769, Visua#9999 for help with the code. // @author MrSapient // @match https://*.melvoridle.com/* // @exclude https://wiki.melvoridle.com* // @noframes // @grant none // ==/UserScript== // settings window.DingSettings = { // changes ding volume level for farming FARMING_DING: 0.1, // changes ding volume level for pet PET_DING: 0.1, // change ding volume level for idle IDLE_DING: 0.1, // changes the amount of time between dings while idle IDLE_TIME: 7500, // save settings to local storage save: () => { window.localStorage['DingSettings'] = window.JSON.stringify(window.DingSettings); } }; // main script function script() { //////////////////// /// Farming Ding /// /////////////////// let growCropsRef = window.growCrops; window.growCrops = (areaID, patchID) => { if (patchID === 0 && !newFarmingAreas[areaID].patches[patchID].hasGrown) { let ding = new Audio("https://www.myinstants.com/media/sounds/ding_5crN9DD.mp3"); ding.volume = DingSettings.FARMING_DING; ding.play(); } growCropsRef(areaID, patchID); } ///////////////// /// Pet Ding /// //////////////// let petDropRef = window.unlockPet; window.unlockPet = (petID, offline=false) => { if (!petUnlocked[petID] === true) { let ding = new Audio("https://www.myinstants.com/media/sounds/censor-beep-1.mp3"); ding.volume = DingSettings.PET_DING; ding.play(); } petDropRef(petID, offline); } ///////////////// /// Idle Ding /// ///////////////// const idleRef = () => { if (offline.skill === null && !isInCombat) { let ding = new Audio("https://www.myinstants.com/media/sounds/taco-bell-bong-sfx.mp3"); ding.volume = DingSettings.IDLE_DING; ding.play(); } } setInterval(idleRef, DingSettings.IDLE_TIME) } // https://www.myinstants.com/media/sounds/wwe-ring-bell-no-crowd.mp3 // https://www.myinstants.com/media/sounds/ding_2.mp3 // inject the script (function () { function injectScript(main) { const scriptElement = document.createElement('script'); scriptElement.textContent = `try {(${main})();} catch (e) {console.log(e);}`; document.body.appendChild(scriptElement).parentNode.removeChild(scriptElement); } function loadScript() { if ((window.isLoaded && !window.currentlyCatchingUp) || (typeof unsafeWindow !== 'undefined' && unsafeWindow.isLoaded && !unsafeWindow.currentlyCatchingUp)) { // Only load script after game has opened clearInterval(scriptLoader); injectScript(script); // load settings from local storage if (window.localStorage['DingSettings'] !== undefined) { const stored = window.JSON.parse(window.localStorage['DingSettings']); Object.getOwnPropertyNames(stored).forEach(x => { window.DingSettings[x] = stored[x]; }); window.DingSettings.save(); } // regularly save settings to local storage setInterval(window.DingSettings.save, 1000) } } const scriptLoader = setInterval(loadScript, 200); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址