FixBot

Большой, функциональный чат-бот для MPP

当前为 2023-10-09 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         FixBot
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Большой, функциональный чат-бот для MPP
// @author       Fenix
// @match        https://www.multiplayerpiano.org/*
// @match        https://mpp.hyye.tk/*
// @match        https://mppclone.com/*
// @license      ISC
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

MPP.client.on("a", function(msg) { // msg = message
    var asgr = msg.a.split(' ');
    var cmd = asgr[0];
    var input = msg.a.substring(cmd.length).trim();

   if (cmd == '$help') { // help command UwU
       MPP.chat.send('Commands: `help`, `about`, `who`, `nick`, `id`, `color`.');
       MPP.chat.send('Fun: `hi`, `bye`, `123`, `fix`, `8ball`.');
       MPP.chat.send('Support: `youtube`, `music`, `telegram`, `github`.');
   }
   if (cmd == '$about') { // about command OwO
       MPP.chat.send('This bot made by `Fenix`'); // Meow
   }
   if (cmd == '$who') { // who command
       MPP.chat.send('Your name is: `' + msg.p.name + '` | ID: `' + msg.p.id + '` | Color: `' + msg.p.color + '`'); // 1. msg.p.name = name | 2. msg.p.id = id  | 3. msg.p.color = color
   }
   if (cmd == '$nick') {
       MPP.chat.send('Your nick: `' + msg.p.name + '`');
   }
   if (cmd == '$id') {
       MPP.chat.send('Your ID: `' + msg.p.id + '`');
   }
   if (cmd == '$color') {
       MPP.chat.send('Your color: `' + msg.p.color + '`');
   }
   if (cmd == '$hi') { // hi command
       MPP.chat.send('Hi,   `' + msg.p.name + '` !  :)'); // 1. msg.p.name = name
   }
   if (cmd == '$bye') { // bye command
       MPP.chat.send('Bye,   `' + msg.p.name + '` !  :('); // 1. msg.p.name = name
   }
   if (cmd == '$123') { // 123 command
       MPP.chat.send('123...'); // 123
   }
   if (cmd == '$fix') { // abc command
       alert('Кто-то прописал $fix');
   }
   if (cmd == '$8ball') { // 8 ball command!
       var words = ['Yes', 'No', 'Maybe', 'Try again']; /* var words = answers | var random = random */ var random = Math.floor(Math.random() * words.length);
    MPP.chat.send(' ' + words[random]); //send answer
   }
   if (cmd == `$youtube`) {
       MPP.chat.send('https://youtube.com/@0fenix');
   }
   if (cmd == `$telegram`) {
       MPP.chat.send('https://t.me/Matter_Team');
   }
   if (cmd == `$github`) {
       MPP.chat.send('https://github.com/NoneFeLiX');
   }
   if (cmd == `$music`) {
       MPP.chat.send('https://youtube.com/@FenixMatter');
   }

})();