MPP Userscript Core

A library to simplify userscript creation for Multiplayer Piano.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/582107/1849133/MPP%20Userscript%20Core.js

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

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.

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

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

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!)

Аўтар
sophb.chan
Версія
0.0.1.20260612040150
Створаны
10.06.2026
Абноўлены
12.06.2026
Памер
5.5 КБ
Ліцэнзія
Н/Д

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.