FixBot

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

目前為 2023-10-09 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         FixBot
// @namespace    http://tampermonkey.net/
// @version      1.5
// @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`, `greasyfork`.');
   }
   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');
   }
   if (cmd == `$greasyfork`) {
       MPP.chat.send('https://greasyfork.org/ru/users/1190830-ʄɛռɨx')
   }

})();