您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Randomizes sigil after every message
当前为
// ==UserScript== // @name IdlePixel Sigil Randomizer // @namespace lbtechnology.info // @version 1.0.0 // @description Randomizes sigil after every message // @author Lux-Ferre // @license MIT // @match *://idle-pixel.com/login/play* // @grant none // @require https://greasyfork.org/scripts/441206-idlepixel/code/IdlePixel+.js?anticache=20220905 // ==/UserScript== (function() { 'use strict'; let sigilList = [] let username = "" function randInt(max) { return Math.floor(Math.random() * max); } class SigilPlugin extends IdlePixelPlusPlugin { constructor() { super("sigils", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description } }); this.previous = ""; } onChat(data) { if (data.username === username){ IdlePixelPlus.sendMessage('CHAT_SIGIL=' + sigilList[randInt(sigilList.length)]) } } onMessageReceived(data){ if(data.startsWith("SET_ITEMS=")){ if (username===""){ const split = data.substring("SET_ITEMS=".length).split("~"); username = split[split.indexOf("username")+1] split.forEach(element => { if (element.endsWith("sigil") && element !== "chat_sigil"){ sigilList.push(element) } }) } } } } const plugin = new SigilPlugin(); IdlePixelPlus.registerPlugin(plugin); })();