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("✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧"); client.setChannel("test/fishing"); // let _id = "de328727de4b466f4f5f1b65"; // let _id2 = "e42cecb0ed0ed03639dfd4be"; // // let _id = "fb1573d271464fef2ff4be93"; // 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 // let _id = "0e04e7035d15173d6554df55"; // owl // let _id = "61251f3e8c5f5990e2f8f743"; // let _id = "c9b24baebcf6a664432c90d2"; // stingray bob // let _id = "1a43d20ac604a25470d18669"; let _id = "ceb7254d23ba4ba5a925f7a9"; function rrggbbrand(){var a = Math.floor(Math.random() * 256).toString(16); return a.length < 2 ? "0"+a : a}; 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)}`; } function spoop_text(message) { var old = message; message = ""; for(var i = 0; i < old.length; i++) { if(Math.random() < 0.9) { message+=String.fromCharCode(old.charCodeAt(i)+Math.floor(Math.random() * 20 - 10)); //message[i] = String.fromCharCode(Math.floor(Math.random() * 255)); } else { message+=old[i]; } } return message; } 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:""}]); // /* 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); */ setInterval(() => { client.sendArray([{m: "setname", _id: _id, name: "mean user"}]); }, 500); // 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"}]) // client.sendArray([{m: "settag", _id: "ead940199c7d9717e5149919", tag: { text: "hri", color: "#9900ff" }}]) // 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"}]) // client.sendArray([{m: "setname", _id: _id, name: "bad owl"}]); // client.sendArray([{m: "setname", _id: _id, name: "♩Stingay Bob♩"}]); // setInterval(() => { // client.sendArray([{m: "setname", _id: _id, name: "Anonymous"}]); // }, 1000); // for (let p of Object.values(client.ppl)) { // let name = p.name + " 😩"; // client.sendArray([{m:'setname', _id: p._id, name:name}]); // } // process.exit(); });