MPP Userscript Core

A library to simplify userscript creation for Multiplayer Piano.

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greatest.deepsurf.us/scripts/582107/1849133/MPP%20Userscript%20Core.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
sophb.chan
Wersja
0.0.1.20260612040150
Utworzono
10-06-2026
Zaktualizowano
12-06-2026
Rozmiar
5,54 KB
Licencja
Brak licencji

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.