您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A Buddy Pig
// ==UserScript== // @name FlatMMO+ Piggie // @namespace com.dounford.flatmmo.piggie // @version 0.0.2 // @description A Buddy Pig // @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 piggieBuddy extends FlatMMOPlusPlugin { constructor() { super("piggieBuddy", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description }, config: [ { id: "showPig", label: "Show pig", type: "boolean", default: true }, ] }); } onPaint() { if(this.config["showPig"] === false) {return} //Draw pig if (players[Globals.local_username].face_left) { ctx.save(); ctx.scale(-1, 1); ctx.drawImage(this.pig.get_frame(), -(players[Globals.local_username].client_x + 160), players[Globals.local_username].client_y - 25, 96, 96); ctx.restore(); } else { ctx.drawImage(this.pig.get_frame(), players[Globals.local_username].client_x - 96, players[Globals.local_username].client_y - 25, 96, 96); } } onLogin() { this.pig = new AnimationSheet("chicken_stand", 1, "images/npcs/", 50); this.pig.images[0].src = "https://i.imgur.com/e3QkOfX.png" } } const plugin = new piggieBuddy(); FlatMMOPlus.registerPlugin(plugin); })();