Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Super Mario Bros bot
- // @namespace http://www.multiplayerpiano.com/
- // @version 0.1
- // @description Lol
- // @author LGPvS
- // @include http://www.multiplayerpiano.com/*
- // @include http://www.ourworldofpixels.com/piano/
- // @match http://www.multiplayerpiano.com/script.js
- // @match http://www.ourworldofpixels.com/piano/
- // ==/UserScript==
- /*
- You can change in MPP.client.sendArray([{m: "userset",set: {name: "Your name here"}}]); a "Your name here" to your
- */
- var highscoresLVLname = { };
- var bshop = [];
- bshop.bbuying = [0, 1];
- bshop.bbuying.id = {0: "questionbox", 1:"1upmushroom"};
- bshop.bbuying._id = {0: "qubox", 1:"mush2"};
- bshop.bbuying.name = {0: "the question box", 1:"1up mushroom"};
- var adminsusers = [];
- var buyqubox = [];
- var buyedmush2 = [];
- var buyedqubox = [];
- var qublock = 0;
- var coinsqublock = [2, 5, 8, 7, 15, 12];
- var highscoresLVL = { };
- var highscores114 = { };
- var lives113 = { };
- var coins111 = { };
- var a;
- var b;
- var input;
- function info(search) {
- var array = [];
- for (var i in MPP.client.ppl) {
- if (MPP.client.ppl[i].name.indexOf(search) !== -1) {
- array.push(MPP.client.ppl[i]);
- }
- }
- return array;
- }
- //In case of multiple results
- Array.prototype.random = function() {
- return this[Math.random() * this.length | 0];
- };
- person = info("search").random();
- 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
- if (highscores114[msg.p._id] == null) highscores114[msg.p._id] = 0;
- if (coins111[msg.p._id] == null) coins111[msg.p._id] = 0;
- if (lives113[msg.p._id] == null) lives113[msg.p._id] = 5;
- if (highscoresLVL[msg.p._id] == null) highscoresLVL[msg.p._id] = 0;
- if (highscoresLVLname[msg.p._id] == null) highscoresLVLname[msg.p._id] = "Toad";
- var msgArr = msg.a.split(' ');
- if ((adminsusers.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){ if (msgArr[0] == '/js' ) { try { MPP.chat.send("> "+ input);MPP.chat.send('< '+JSON.stringify(eval(msg.a.substr(msgArr[0].length).trim()))); } catch (error) { MPP.chat.send('ⓧ '+error); } } }
- //if ((buyedqubox.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){
- if (b == "/buy") { if (!input) {MPP.chat.send("Use /buy (Any shop item bID) to buy any shop item. Shop items bID: questionbox, 1upmushroom"); } if ((buyedqubox.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){ if (input=="questionbox"){qublock = coinsqublock.random(); coins111[msg.p._id] += qublock; remove=buyedqubox.indexOf(msg.p._id); buyedqubox.splice(remove,1); highscores114[msg.p._id] -= 10; MPP.chat.send(msg.p.name+" buyed a the question box and used it. You get a "+qublock+" coins."); }}if ((buyedmush2.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){if (input=="1upmushroom"){lives113[msg.p._id] +=1; remove=buyedmush2.indexOf(msg.p._id); buyedmush2.splice(remove,1); coins111[msg.p._id] -= 100; MPP.chat.send(msg.p.name+" buyed a 1up mushroom and used it. You get a 1 live.");}}}
- //}
- if (b == "/shop") { MPP.chat.send("Shop: the question box with random coins. Price: 10 highscores, 1up mushroom, that adds for your a 1 live. Price: 100 coins. | Use /buy (Any shop item bID) to buy any shop item. Shop items bID: questionbox, 1upmushroom."); }
- if (b == "/help") { MPP.chat.send("Super Mario Bros Commands: /getcoin, /mycoins, /shop, /buy, /gethighscore, /myhighscores, /mylives, /myLVLstatus."); }
- if (b == "/getcoin") { MPP.chat.send(msg.p.name+" get 1 coin!"); coins111[msg.p._id] += 1; }
- if (b == "/gethighscore") { MPP.chat.send(msg.p.name+" get 1 highscore!"); highscores114[msg.p._id] += 1; }
- if (b == "/mycoins") { MPP.chat.send(msg.p.name+" have a " + coins111[msg.p._id] + " coins"); }
- if (b == "/myhighscores") { MPP.chat.send(msg.p.name+" have a " + highscores114[msg.p._id] + " highscores"); }
- if (b == "/mylives") { MPP.chat.send(msg.p.name+" have a " + lives113[msg.p._id] + " lives"); }
- if (b == "/myLVLstatus") { MPP.chat.send(msg.p.name+": LVL " + highscoresLVL[msg.p._id] +" ("+highscoresLVLname[msg.p._id]+")"); }
- /*if ((buyedqubox.indexOf(msg.p._id) > - 1) || (msg.p._id==MPP.client.getOwnParticipant()._id)){
- if (b == "/getcoinsfromquestionbox") { qublock = coinsqublock.random(); coins111[msg.p._id] += qublock; MPP.chat.send("You get "+qublock+" coins from the question box!");}
- }*/
- if (highscores114[msg.p._id] == 10 || highscores114[msg.p._id] > 10) {buyedqubox.push(msg.p._id); console.log("mmm");}
- if (coins111[msg.p._id] == 100 || coins111[msg.p._id]> 100) {buyedmush2.push(msg.p._id); console.log("mmm");}
- if (highscores114[msg.p._id] == 30 || highscores114[msg.p._id]> 30) { highscoresLVL[msg.p._id] = 1; highscoresLVLname[msg.p._id] = "Yoshi";}
- if (highscores114[msg.p._id] == 100 || highscores114[msg.p._id]> 100) { highscoresLVL[msg.p._id] = 2; highscoresLVLname[msg.p._id] = "Koopa Troopa";}
- if (highscores114[msg.p._id] == 300 || highscores114[msg.p._id]> 300) { highscoresLVL[msg.p._id] = 3; highscoresLVLname[msg.p._id] = "Mario";}
- if (highscores114[msg.p._id] == 1000 || highscores114[msg.p._id]> 1000) { highscoresLVL[msg.p._id] = 4; highscoresLVLname[msg.p._id] = "Super Mario";}
- if (highscores114[msg.p._id] == 1337 || highscores114[msg.p._id]> 1337) { highscoresLVL[msg.p._id] = 5; highscoresLVLname[msg.p._id] = "Крутой Пацан";}
- if (highscores114[msg.p._id] == 6000 || highscores114[msg.p._id]> 6000) { highscoresLVL[msg.p._id] = 6; highscoresLVLname[msg.p._id] = "Bowser";}
- if (highscores114[msg.p._id] == 6900 || highscores114[msg.p._id]> 6900) { highscoresLVL[msg.p._id] = 7; highscoresLVLname[msg.p._id] = "Flower Mario";}
- if (highscores114[msg.p._id] == 10000 || highscores114[msg.p._id]> 10000) { highscoresLVL[msg.p._id] = 8; highscoresLVLname[msg.p._id] = "Very Big Mario";}
- if (highscores114[msg.p._id] == 54545 || highscores114[msg.p._id]> 54545) { highscoresLVL[msg.p._id] = 9; highscoresLVLname[msg.p._id] = "Star Mario";}
- if (highscores114[msg.p._id] == 1000000 || highscores114[msg.p._id]> 1000000) { highscoresLVL[msg.p._id] = 10; highscoresLVLname[msg.p._id] = "Very Big Star Mario";}
- if (highscores114[msg.p._id] == Infinity || highscores114[msg.p._id]> Infinity) { highscoresLVL[msg.p._id] = Infinity; highscoresLVLname[msg.p._id] = "Pro"; }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement