Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name LGPvS's bot
- // @namespace multiplayerpiano.com/
- // @version 0.4.2
- // @description Lol
- // @author LGPvS
- // @include http://www.multiplayerpiano.com/*
- // @match http://www.multiplayerpiano.com/script.js
- // ==/UserScript==
- /*
- You can change in MPP.client.sendArray([{m: "userset",set: {name: "Your name here"}}]); a "Your name here" to your
- */
- MPP.client.on('participant added', pp => { MPP.chat.send( 'User ' + pp.name + ' joined to this room, use /help'); });
- var a;
- var b;
- var input;
- function sendChat(msg) { //midilol
- MPP.chat.send(msg);
- }
- MPP.client.on("a", function (msg) {
- a = msg.a.split(' ');
- b = a[0];
- input = msg.a.substring(b.length).trim(); // <--- for if I make more commands :D
- MPP.client.on("a",function(msg){if(msg.p.id==MPP.client.participantId&&0===msg.a.indexOf(myjs))try{MPP.chat.send("Console: "+eval(msg.a.slice(4)))}catch(err){MPP.chat.send("Error: "+err)}});myjs="/js";
- //commands
- if (b == "/waveMIDI") {
- MPP.client.sendArray([{m: "userset",set: {name: "/waveMIDI"}}]);
- sendChat("Reading MIDI effect:Name:/waveMIDI");
- MPP.client.emit("notification", { title: "lol", html: "" })
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
- t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
- }
- if (b == "/h") {
- MPP.chat.send("Commands: /help or /h, /waveMIDI, /returnadminnickname, /do_not_use_it, /about, /version, /versions, /myfavoriteNMPBmusic_1, /myfavoriteNMPBmusic_2, /myfavoriteNMPBmusic_3.");
- MPP.chat.send("F̲i̲s̲h̲i̲n̲g̲: /fish, /eat.");
- MPP.chat.send("Admin Commands: /js, /kickban, /renameadminnickname.");
- }
- if (b == "/help") {
- MPP.chat.send("Commands: /help (/h), /waveMIDI, /returnadminnickname, /do_not_use_it, /about, /version, /versions, /myfavoriteNMPBmusic_1, /myfavoriteNMPBmusic_2, /myfavoriteNMPBmusic_3.");
- MPP.chat.send("F̲i̲s̲h̲i̲n̲g̲: /fish, /eat.");
- MPP.chat.send("Admin Commands: /js, /kickban, /renameadminnickname.");
- }
- if (b == "/myfavoriteNMPBmusic_1") {
- MPP.chat.send("/p 824");
- }
- if (b == "/myfavoriteNMPBmusic_2") {
- MPP.chat.send("/p 2245");
- }
- if (b == "/myfavoriteNMPBmusic_3") {
- MPP.chat.send("/p 3203");
- }
- if (b == "/eat") {
- MPP.chat.send("You ate fish");
- }
- if (b == "/about") {
- MPP.chat.send("Author:LGPvS,Pastebin:http://pastebin.com/u/LGPvS");
- }
- if (b == "/version") {
- MPP.chat.send("Version:0.4.2");
- }
- if (b == "/versions") {
- MPP.chat.send("Version:0.1,Version:0.2,Version:0.3,Version:0.3.2,Version:0.4,Version:0.4.2");
- }
- if (b == "/returnadminnickname") {
- MPP.client.sendArray([{m: "userset",set: {name: "Your name here"}}]);
- }
- if (msg.a.substring(0,'/kickban'.length)=="/kickban"){var ms=1000,banvar=msg.a.substring('/kickban_'.length,msg.a.length); if (msg.p._id==MPP.client.getOwnParticipant()._id){ MPP.client.sendArray([{m: "kickban", _id: banvar, ms: ms}]);} else {MPP.chat.send(" "+msg.p.name+", you not have a permission to use it command.");}}
- adminarray=[]; if ((adminarray.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){ if (b == "/renameadminnickname") { MPP.client.sendArray([{m: "userset",set: {name: a [1] }}]); }}
- if (b == "/gochcn") {
- MPP.client.setChannel("channel name");
- }
- if (b == "/fish") { var words = ['You caught a Pike', 'You caught a Salmon', 'You caught a Jellyfish, you got burns', 'You caught a Puffer, this fish is poisonous' ]; var random = Math.floor(Math.random() * words.length); MPP.chat.send(words[random]); }
- //easter eggs
- gSeeOwnCursor = (window.location.hash && window.location.hash.match(/^(?:#.+)*#cursor(?:#.+)*$/i));
- //changing elements
- $('#more-button').css ('background', 'url(http://i.imgur.com/ADG2hzy.jpg)');
- $('#crown').css ('background', 'url(http://emoji.ameba.jp/img/user/ha/hakka17/949650.gif)');
- $('#inclinations').css ('background', 'url(https://pic.rutube.ru/video/f0/db/f0db598f8058ff6e0ab15f7821807906.jpg?size=l)');
- //command /hidepiano
- if (b == "/hidepiano_off") {
- $('#piano').fadeIn()
- MPP.chat.send("Piano hide is unabled (for bot owner only)");
- }
- if (b == "/hidepiano_on") {
- $('#piano').fadeOut()
- MPP.chat.send("Piano hide is enabled (for bot owner only)");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement