Advertisement
LGPvS

LudwigOS MPP bot. Version:0.4.2

Jan 16th, 2017
1,736
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. // ==UserScript==
  2. // @name LGPvS's bot
  3. // @namespace multiplayerpiano.com/
  4. // @version 0.4.2
  5. // @description Lol
  6. // @author LGPvS
  7. // @include http://www.multiplayerpiano.com/*
  8. // @match http://www.multiplayerpiano.com/script.js
  9. // ==/UserScript==
  10.  
  11. /*
  12. You can change in MPP.client.sendArray([{m: "userset",set: {name: "Your name here"}}]); a "Your name here" to your
  13. */
  14.  
  15. MPP.client.on('participant added', pp => { MPP.chat.send( 'User ' + pp.name + ' joined to this room, use /help'); });
  16.  
  17.  
  18. var a;
  19. var b;
  20. var input;
  21.  
  22. function sendChat(msg) { //midilol
  23. MPP.chat.send(msg);
  24. }
  25. MPP.client.on("a", function (msg) {
  26. a = msg.a.split(' ');
  27. b = a[0];
  28. input = msg.a.substring(b.length).trim(); // <--- for if I make more commands :D
  29.  
  30. 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";
  31.  
  32. //commands
  33.  
  34. if (b == "/waveMIDI") {
  35. MPP.client.sendArray([{m: "userset",set: {name: "/waveMIDI"}}]);
  36. sendChat("Reading MIDI effect:Name:/waveMIDI");
  37. MPP.client.emit("notification", { title: "lol", html: "" })
  38. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
  39. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
  40. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
  41. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
  42. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
  43. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
  44. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
  45. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
  46. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
  47. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
  48. }
  49.  
  50. if (b == "/h") {
  51. MPP.chat.send("Commands: /help or /h, /waveMIDI, /returnadminnickname, /do_not_use_it, /about, /version, /versions, /myfavoriteNMPBmusic_1, /myfavoriteNMPBmusic_2, /myfavoriteNMPBmusic_3.");
  52. MPP.chat.send("F̲i̲s̲h̲i̲n̲g̲: /fish, /eat.");
  53. MPP.chat.send("Admin Commands: /js, /kickban, /renameadminnickname.");
  54. }
  55.  
  56.  
  57. if (b == "/help") {
  58. MPP.chat.send("Commands: /help (/h), /waveMIDI, /returnadminnickname, /do_not_use_it, /about, /version, /versions, /myfavoriteNMPBmusic_1, /myfavoriteNMPBmusic_2, /myfavoriteNMPBmusic_3.");
  59. MPP.chat.send("F̲i̲s̲h̲i̲n̲g̲: /fish, /eat.");
  60. MPP.chat.send("Admin Commands: /js, /kickban, /renameadminnickname.");
  61. }
  62.  
  63.  
  64.  
  65. if (b == "/myfavoriteNMPBmusic_1") {
  66. MPP.chat.send("/p 824");
  67. }
  68.  
  69. if (b == "/myfavoriteNMPBmusic_2") {
  70. MPP.chat.send("/p 2245");
  71. }
  72.  
  73. if (b == "/myfavoriteNMPBmusic_3") {
  74. MPP.chat.send("/p 3203");
  75. }
  76.  
  77.  
  78.  
  79. if (b == "/eat") {
  80. MPP.chat.send("You ate fish");
  81. }
  82.  
  83. if (b == "/about") {
  84. MPP.chat.send("Author:LGPvS,Pastebin:http://pastebin.com/u/LGPvS");
  85. }
  86.  
  87. if (b == "/version") {
  88. MPP.chat.send("Version:0.4.2");
  89. }
  90.  
  91. if (b == "/versions") {
  92. MPP.chat.send("Version:0.1,Version:0.2,Version:0.3,Version:0.3.2,Version:0.4,Version:0.4.2");
  93. }
  94.  
  95.  
  96.  
  97.  
  98.  
  99. if (b == "/returnadminnickname") {
  100. MPP.client.sendArray([{m: "userset",set: {name: "Your name here"}}]);
  101. }
  102.  
  103.  
  104.  
  105. 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.");}}
  106.  
  107.  
  108. 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] }}]); }}
  109.  
  110.  
  111.  
  112. if (b == "/gochcn") {
  113. MPP.client.setChannel("channel name");
  114. }
  115.  
  116.  
  117.  
  118. 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]); }
  119.  
  120. //easter eggs
  121.  
  122. gSeeOwnCursor = (window.location.hash && window.location.hash.match(/^(?:#.+)*#cursor(?:#.+)*$/i));
  123.  
  124. //changing elements
  125.  
  126. $('#more-button').css ('background', 'url(http://i.imgur.com/ADG2hzy.jpg)');
  127.  
  128. $('#crown').css ('background', 'url(http://emoji.ameba.jp/img/user/ha/hakka17/949650.gif)');
  129.  
  130. $('#inclinations').css ('background', 'url(https://pic.rutube.ru/video/f0/db/f0db598f8058ff6e0ab15f7821807906.jpg?size=l)');
  131.  
  132. //command /hidepiano
  133.  
  134. if (b == "/hidepiano_off") {
  135. $('#piano').fadeIn()
  136. MPP.chat.send("Piano hide is unabled (for bot owner only)");
  137. }
  138.  
  139. if (b == "/hidepiano_on") {
  140. $('#piano').fadeOut()
  141. MPP.chat.send("Piano hide is enabled (for bot owner only)");
  142. }
  143.  
  144. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement