您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Plays a ding noise when a crop is ready
// ==UserScript== // @name Melvor Farming Notifier // @version 0.8 // @description Plays a ding noise when a crop is ready // @author Asthereon // @match https://*.melvoridle.com/* // @grant none // @namespace http://tampermonkey.net/ // ==/UserScript== let lastDing = -1; function ding() { new Audio("https://www.myinstants.com/media/sounds/ding-sound-effect.mp3").play(); } function notify(msg) { One.helpers('notify', { type: 'dark', from: 'bottom', align: 'center', message: msg }); } function checkForNewGrowth() { for (let i = 0; i < newFarmingAreas.length; i++) { for (let j = 0; j < newFarmingAreas[i].patches.length; j++) { if (newFarmingAreas[i].patches[j].hasGrown) { if ((Date.now() - lastDing) >= 60000) { lastDing = Date.now(); notify("Some of your crops are grown"); ding(); } } } } } function checkForGemGloves() { if (glovesTracker[4].remainingActions < 500) { notify("Gem glove charges are getting low"); ding(); } } setInterval(function() { checkForNewGrowth(); checkForGemGloves(); },10000);