Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Custom Notifications
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author Hri7566
// @match https://multiplayerpiano.com/*
// @match https://mppclone.com/*
// @match https://www.multiplayerpiano.org/*
// @icon https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://mppclone.com&size=128

How to correctly make a bot

This doc is opinionated. If you have proven better ways to do some of this stuff, you can contact me. I will most likely get butthurt, so there's not much of a reason to make an argument.

Usually, when I make static classes, people complain about global variables. You are wrong. They are declared module-level, not global. I mainly use them to group functions with the data they modify, or, more importantly, with data that can't be saved with functions attached (loaded Json or from databases).

General Structure

The bots I usually make are split into the following classes, with some slight variation depending on use cases:

@Hri7566
Hri7566 / ATLAS.user.js
Created April 10, 2022 18:45
really old ATLAS
// ==UserScript==
// @name ATLAS
// @namespace http://www.multiplayerpiano.com/
// @notice This was originally made by electrashave. And furthermore edited by LoganNZL
// @Version 6.14.1
// @description Modded Script For Multiplayerpiano.com
// @include http://www.multiplayerpiano.com/*
// @match http://www.multiplayerpiano.com/script.js
// @copyright 2013+
// ==/UserScript==
@Hri7566
Hri7566 / BOTS_INTERMEDIATE.md
Created May 2, 2022 22:27
MPP Bot Tutorial (for intermediate programmers) WIP

MPP Bot Tutorial (for intermediate programmers)

MPP is Multiplayer Piano, blah blah, bots have been around since 2013, blah blah, websockets, yadda yadda.

This one's gonna be a bit faster paced than the last one.

Prerequisites

  • Tampermonkey or node
  • Proficient knowledge in some programming language (preferrably javascript)

Creating a Tampermonkey Script

// ==UserScript==
// @name Download Chat
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Chat download button for mppclone
// @author Hri7566
// @match https://mppclone.com/*
// @match https://multiplayerpiano.com/*
// @match https://www.multiplayerpiano.org/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mppclone.com
// ==UserScript==
// @name Starfield
// @namespace http://tampermonkey.net/
// @version 1.1
// @description MPP starfield script
// @author Hri7566
// @match https://mppclone.com/*
// @match https://www.multiplayerpiano.org/*
// @match https://piano.ourworldofpixels.com/*
// @match https://mppkinda.com/*
// ==UserScript==
// @name Wii Cursor
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Wii cursor for MPP
// @author Hri7566
// @match https://mppclone.com/*
// @match https://multiplayerpiano.com/*
// @match https://multiplayerpiano.net/*
// @match https://www.multiplayerpiano.org/*
// ==UserScript==
// @name EarthBound Sprites
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author Hri7566
// @match http*://*multiplayerpiano.com/*
// @match http*://mppclone.com/*
// @match http*://mpp.hri7566.info/*
// @match http*://www.multiplayerpiano.org/*
var fs = require('fs');
fs.readFile("./ops", function(err, data) {
if(err) {
console.log(err);
data = "[]"
}
var ops = JSON.parse(data);
fs.readFile("./bans", function(err, data) {
if(err) {
console.log(err);
// ==UserScript==
// @name Electrashave's Bot
// @namespace http://www.multiplayerpiano.com/
// @notice This was originally made by electrashave. And furthermore edited by LoganNZL
// @Version 3.0
// @description Modded Script For Multiplayerpiano.com
// @include http://www.multiplayerpiano.com/*
// @match http://www.multiplayerpiano.com/script.js
// @copyright 2013+
// ==/UserScript==