您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Block potion usage if it will waste it
// ==UserScript== // @name FlatMMO Stop Wasting Potions // @namespace com.dounford.flatmmo.swp // @version 0.0.1 // @description Block potion usage if it will waste it // @author Dounford // @license MIT // @match *://flatmmo.com/play.php* // @grant none // @require https://update.greasyfork.org/scripts/544062/FlatMMOPlus.js // ==/UserScript== (function() { 'use strict'; class stopWastePotionsPlugin extends FlatMMOPlusPlugin { constructor() { super("Stop Waste Potions", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description }, config: [] }); } onLogin() { const originalClick = window.clicks_inventory_item; window.clicks_inventory_item = function(ele, item, current_amount, index) { if(item.includes("potion") && potions_active[item]) {return} originalClick(ele, item, current_amount, index) } } } const plugin = new stopWastePotionsPlugin(); FlatMMOPlus.registerPlugin(plugin); })();