Bot #2

none

当前为 2022-02-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Bot #2
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description none
  6. // @author COdER
  7. // @include *://multiplayerpiano.com/*
  8. // @include *://mppclone.com/*
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. MPP.client.on('participant added', pp => {
  14. MPP.chat.send('User ' + pp.name + ' (' + pp.id + ') ' + 'joined to the room!');
  15. })
  16. MPP.client.on("a", function(msg) {
  17. let cmd = msg.a;
  18.  
  19. if (cmd == '/help') {
  20. MPP.chat.send('Commands are: /help, /about, /!!!, /who, /random.');
  21. }
  22. if (cmd == '/about') {
  23. MPP.chat.send('Bot made by COdER.');
  24. }
  25. if (cmd == '/!!!') {
  26. MPP.chat.send('!@#$%^&*()');
  27. }
  28. if (cmd == '/who') {
  29. MPP.chat.send('Your name is: ' + msg.p.name + ' | ID: ' + msg.p.id + ' | Color: ' + msg.p.color);
  30. }
  31. if (cmd == '/random') {
  32. var words = ['Wow!', 'Lucky!', 'Bruh.', 'YES!']; var random = Math.floor(Math.random() * words.length);
  33. MPP.chat.send('Random word: ' + words[random]);
  34. }
  35. })