Advertisement
LGPvS

LudwigOS MPP bot. Version:0.3

Dec 31st, 2016
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. // ==UserScript==
  2. // @name LudwigOS's bot
  3. // @namespace multiplayerpiano.com/
  4. // @version 0.3
  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.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. ░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄
  19. ░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄
  20. ░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█
  21. ░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░█
  22. ░▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░█
  23. █▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒█
  24. █▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█
  25. ░█▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█
  26. ░░█░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█
  27. ░░░█░░██░░▀█▄▄▄█▄▄█▄████░█
  28. ░░░░█░░░▀▀▄░█░░░█░███████░█
  29. ░░░░░▀▄░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█
  30. ░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░█
  31. ░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░█
  32. ░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░█
  33.  
  34.  
  35. ░░░░░░░░▄▄▀▀█▀▀▀▀▀▄▄░░░░░░░░
  36. ░░░░░░▄▀▓░░▒░░▒▒▒▒▒▒█▄░░░░░░
  37. ░░░░▄█▓▓▓░░░░▒▒▒▒▒▒▒▒█▀▄░░░░
  38. ░░▄▀█▌▓▓▓░░░░▒▒▒▒▒▒▒▒▐▌▓▀▄░░
  39. ░█▓▓█▌▓▄▄▓░░░▒▒▒▒▄▄▒▒▒█▓▓▀▄░
  40. ▄▀▓▓█▌▓▀█▓░░░▒▒▒▒█▓▀▒▄▌▓▓▓▓█
  41. █▓▓▓▄▀▓▓▓▓░░░▒▒▒▒▒▒▒▒░░▌▓▓▓█
  42. ▀▄▓▓█░▀▓▓░░░░░░░▒▒▒▒▒░▄▌▓▓█░
  43. ░█▓▓▓█░▓░░░░░░░░░▒▒▒░░█▓▓▓█░
  44. ░▀▄▓▓█░▐░░▄▄███▄░░░▐░░░▀▄▀░░
  45. ░░▀▄▄▀░▐░░█████▀░░▄▀░░░░░░░░
  46. ░░░░░░░░▀░░▀██▀░▄▀░░░░░░░░░░
  47.  
  48. TROLOLOL
  49. */
  50.  
  51. var a;
  52. var b;
  53. var input;
  54.  
  55. function sendChat(msg) { //midilol
  56. MPP.chat.send(msg);
  57. }
  58. MPP.client.on('participant added', pp => { MPP.chat.send('Hello to room named "' + MPP.client.channel._id + '", user "' + pp.name + '"!' ); });
  59.  
  60. MPP.client.on("a", function (msg) {
  61. a = msg.a.split(' ');
  62. b = a[0];
  63. input = msg.a.substring(b.length).trim(); // <--- for if I make more commands :D
  64.  
  65. if (b == "/waveMIDI") {
  66. sendChat("Reading MIDI effect:Name:/waveMIDI");
  67. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
  68. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
  69. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
  70. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
  71. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
  72. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 70)});
  73. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 65)});
  74. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 60)});
  75. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 55)});
  76. t=0; Object.keys(MPP.piano.keys).forEach(function(key) {setTimeout(function () {MPP.press(key,1)}, t++ * 50)});
  77. }
  78.  
  79. if (b == "/h") {
  80. MPP.chat.send("Commands: /help or /h, /waveMIDI, /renameadminnickname. Fishing Commands: /fish, /eat. About: /about, /version, /versions.");
  81. }
  82.  
  83. if (b == "/help") {
  84. MPP.chat.send("Commands: /help or /h, /waveMIDI, /renameadminnickname. Fishing Commands: /fish, /eat. About: /about, /version, /versions.");
  85. }
  86.  
  87. if (b == "/fish") {
  88. MPP.chat.send("fishing...");
  89. MPP.chat.send("you fished fish!!");
  90. }
  91.  
  92. if (b == "/eat") {
  93. MPP.chat.send("You eat a fish.");
  94. }
  95.  
  96. if (b == "/about") {
  97. MPP.chat.send("Author:LGPvS,Pastebin:http://pastebin.com/u/LGPvS");
  98. }
  99.  
  100. if (b == "/version") {
  101. MPP.chat.send("Version:0.3");
  102. }
  103.  
  104. if (b == "/versions") {
  105. MPP.chat.send("Version:0.1,Version:0.2,Version:0.3");
  106. }
  107.  
  108. if (b == "/renameadminnickname") { MPP.client.sendArray([{m: "userset",set: {name: a [1] }}]); }
  109.  
  110.  
  111.  
  112. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement