MPP Userscript Core

A library to simplify userscript creation for Multiplayer Piano.

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greatest.deepsurf.us/scripts/582107/1849133/MPP%20Userscript%20Core.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
sophb.chan
Version
0.0.1.20260612040150
Erstellt am
10.06.2026
Letzte Aktualisierung
12.06.2026
Größe
5,54 KB
Lizenz
n/a

API Documentation

  • registerCommand(commandName, commandFunction, {...additionalOptions}): Self-explanatory. Note that the options aliases and rank may be used by the library, so you should be carfeful to not use those options for anything else.

  • send(message): Self-explanatory.

  • receive(message, userInfo, date): Receives a message in chat, but it can only be seen by the user.

  • storeItem(itemName, itemData): Stores an item to localStorage. Will automatically stringify the item data before storing.

  • readItem(itemName, fallbackValue): Reads an item from localStorage. Will automatically convert the item data to its true type (e.g. to an array) before storing.

  • findUsers(searchQuery): Finds all users that have a usename or ID that matches with the search query. Both the search query and the ID & username being searched are normalized in the same way.

  • findUser(searchQuery): Returns the first result of doing findUsers(searchQuery), and returns null when no user was found.

  • clearUserRank(targetUserID): Removes all ranks attached to the user ID given.

  • getUserRank(userID): Self-explanatory.

  • setUserRank(userID, rankIDorName): Self-explanatory. As the pseudo-argument says, the function can take in the ID (e.g. -12) and name (e.g. 'admin') of a rank.

  • setPrivate(privacy): Self-explanatory.

  • setPrefix(newPrefix): Self-explanatory.