2022-06-04 19:27:14 +02:00
|
|
|
require("dotenv").config();
|
|
|
|
|
|
|
|
let Client = require("./src/mppt-client.js");
|
|
|
|
let client = new Client("wss://mppclone.com:8443", process.env.MPPCLONE_TOKEN);
|
|
|
|
client.start();
|
|
|
|
// client.setChannel("test/fishing");
|
|
|
|
// client.setChannel("✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧");
|
2022-06-04 19:37:41 +02:00
|
|
|
client.setChannel("test/fishing");
|
2022-06-04 19:27:14 +02:00
|
|
|
// let _id = "de328727de4b466f4f5f1b65";
|
|
|
|
// let _id2 = "e42cecb0ed0ed03639dfd4be";
|
|
|
|
//
|
2022-06-04 19:37:41 +02:00
|
|
|
// let _id = "fb1573d271464fef2ff4be93";
|
|
|
|
|
2022-07-08 02:24:49 +02:00
|
|
|
// let _id = "8107156a27514cebcb65195d";
|
|
|
|
|
|
|
|
// let _id = "ead940199c7d9717e5149919";
|
|
|
|
// let _id = "2cbb36e9a48bcc5658b5723b";
|
|
|
|
// let _id = "50b0903e19cda807c526d95b";
|
|
|
|
// let _id = "ead940199c7d9717e5149919";
|
|
|
|
// let _id = "8aa91b66206af59b6cf3b3a7";
|
|
|
|
// let _id = "732e436aba2d6d82d08fddc6";
|
|
|
|
// let _id = "6bae31ea468c8e63534e5783";
|
|
|
|
|
|
|
|
// let _id = "78a11a25c966d62d0231a135" // nmpb bot
|
|
|
|
// let _id = "123123ae93b89e4270cf6ee9" // camel
|
|
|
|
// let _id = "b40df99cc2ca6f503fba77cb"; // bouncer
|
|
|
|
// let _id = "4d354eaddf02eedc6211034c"; // theta
|
|
|
|
// let _id = "50b0903e19cda807c526d95b"; // sola
|
|
|
|
let _id = "69bb36e9a48bcc5658b5723b"; // wolfy corn bot
|
2022-06-04 19:27:14 +02:00
|
|
|
|
|
|
|
function rrggbbrand(){var a = Math.floor(Math.random() * 256).toString(16); return a.length < 2 ? "0"+a : a};
|
2022-07-08 02:24:49 +02:00
|
|
|
function hslToHex(h, s, l) {
|
|
|
|
l /= 100;
|
|
|
|
const a = s * Math.min(l, 1 - l) / 100;
|
|
|
|
const f = n => {
|
|
|
|
const k = (n + h / 30) % 12;
|
|
|
|
const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
|
|
return Math.round(255 * color).toString(16).padStart(2, '0'); // convert to Hex and prefix "0" if needed
|
|
|
|
};
|
|
|
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
|
|
}
|
2022-06-04 19:27:14 +02:00
|
|
|
|
|
|
|
client.on("ch", () => {
|
|
|
|
// let color = `#${rrggbbrand()}${rrggbbrand()}${rrggbbrand()}`;
|
|
|
|
// console.log(color);
|
|
|
|
// client.sendArray([{m:'setcolor', _id:_id, color:color}]);
|
|
|
|
// client.sendArray([{m:'setcolor', _id:_id, color:""}]);
|
2022-07-08 02:24:49 +02:00
|
|
|
//
|
|
|
|
/*
|
|
|
|
let h = 0;
|
|
|
|
let s = 100;
|
|
|
|
let l = 50;
|
|
|
|
|
|
|
|
let hex = "#000000";
|
|
|
|
|
|
|
|
setInterval(() => {
|
|
|
|
h += 0.5;
|
|
|
|
if (h > 360) h = 0;
|
|
|
|
}, 1000 / 60);
|
|
|
|
|
|
|
|
setInterval(() => {
|
|
|
|
hex = hslToHex(h, s, l);
|
|
|
|
client.sendArray([{m: 'setcolor', _id: _id, color: hex}]);
|
|
|
|
|
|
|
|
// client.sendArray([{m:'setname', _id:_id, name:"Not Lapis"}]);
|
|
|
|
// client.sendArray([{m:'setname', _id:_id2, name: "Not Lapis"}])
|
|
|
|
// process.exit();
|
|
|
|
|
|
|
|
}, 1000 / 2);
|
|
|
|
*/
|
2022-06-04 19:27:14 +02:00
|
|
|
|
2022-07-08 02:24:49 +02:00
|
|
|
// client.sendArray([{m:"setname", _id:_id, name:"낚시 앱 [/help]"}]);
|
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "kake fartz owo"}])
|
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "๖ۣۜH͜r̬i͡7566's NMPB"}])
|
|
|
|
// client.sendArray([{m: 'setname', _id: _id, name: "hi 123123"}])
|
2022-06-04 19:27:14 +02:00
|
|
|
// client.sendArray([{m: "settag", _id: "ead940199c7d9717e5149919", tag: { text: "hri", color: "#9900ff" }}])
|
2022-07-08 02:24:49 +02:00
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "Bouncer [//help]"}]);
|
|
|
|
// client.sendArray([{m: "setcolor", _id: _id, color: "#8d3f50"}]);
|
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "🎅 a bot [=help] ❄️"}]);
|
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "sola"}]);
|
|
|
|
client.sendArray([{m: "setcolor", _id: "_id", color: "#f8f560"}])
|
|
|
|
|
|
|
|
// setInterval(() => {
|
|
|
|
// client.sendArray([{m: "setname", _id: _id, name: "Anonymous"}]);
|
|
|
|
// }, 1000);
|
2022-06-04 19:27:14 +02:00
|
|
|
|
|
|
|
// for (let p of Object.values(client.ppl)) {
|
|
|
|
// let name = p.name + " 😩";
|
|
|
|
// client.sendArray([{m:'setname', _id: p._id, name:name}]);
|
|
|
|
// }
|
|
|
|
|
2022-07-08 02:24:49 +02:00
|
|
|
// process.exit();
|
2022-06-04 19:27:14 +02:00
|
|
|
});
|
|
|
|
|