add kaboom to server option + remove ayunboom

This commit is contained in:
ChomeNS 2022-11-17 13:10:16 +07:00
parent b23f46bff8
commit c8b416e780
5 changed files with 13 additions and 4 deletions

1
bot.js
View file

@ -36,6 +36,7 @@ async function createBot(server, config, getBots, dcclient) {
host: /* process.argv[2] */ server.host, host: /* process.argv[2] */ server.host,
port: /* process.argv[3] ? Number(process.argv[3]) : 25565*/ server.port, port: /* process.argv[3] ? Number(process.argv[3]) : 25565*/ server.port,
version: config.version, version: config.version,
kaboom: server.kaboom,
checkTimeoutInterval: '30000', checkTimeoutInterval: '30000',
keepAlive: false, keepAlive: false,
hideErrors: true, hideErrors: true,

View file

@ -11,6 +11,7 @@ module.exports = {
'normalKey': '<27>iB_D<5F><44><EFBFBD>k<EFBFBD><6B>j8H<38>{?[/ڭ<>f<EFBFBD><>^-=<3D>Ț<EFBFBD><C89A>v]<5D><>g><3E><>=c', 'normalKey': '<27>iB_D<5F><44><EFBFBD>k<EFBFBD><6B>j8H<38>{?[/ڭ<>f<EFBFBD><>^-=<3D>Ț<EFBFBD><C89A>v]<5D><>g><3E><>=c',
'ownerHashKey': 'b)R<><52>nF<6E>CW<43><57><EFBFBD>#<23>\\[<5B>S*8"t^eia<69>Z<EFBFBD><5A>k<EFBFBD><6B><EFBFBD><EFBFBD>K1<4B>8zȢ<7A>', 'ownerHashKey': 'b)R<><52>nF<6E>CW<43><57><EFBFBD>#<23>\\[<5B>S*8"t^eia<69>Z<EFBFBD><5A>k<EFBFBD><6B><EFBFBD><EFBFBD>K1<4B>8zȢ<7A>',
}, },
'proxy': true,
'console': true, 'console': true,
'useChat': false, 'useChat': false,
'core': { 'core': {
@ -57,22 +58,27 @@ module.exports = {
{ {
'host': 'play.kaboom.pw', 'host': 'play.kaboom.pw',
'port': 25565, 'port': 25565,
'kaboom': false,
}, },
{ {
'host': 'sus.shhnowisnottheti.me', 'host': 'sus.shhnowisnottheti.me',
'port': 25565, 'port': 25565,
'kaboom': false,
}, },
{ {
'host': 'kitsune.icu', 'host': 'kitsune.icu',
'port': 25565, 'port': 25565,
'kaboom': false,
}, },
{ {
'host': '71.179.136.66', 'host': '71.179.136.66',
'port': 25565, 'port': 25565,
'kaboom': false,
}, },
// { // {
// 'host': 'mc.chomens41793.ga', // 'host': 'mc.chomens41793.ga',
// 'port': 25565, // 'port': 25565,
// 'kaboom': true,
// }, // },
], ],
}; };

View file

@ -52,7 +52,7 @@ function inject(bot, dcclient, config) {
// try catch cuz TypeError: Cannot read properties of undefined (reading 'replace') // try catch cuz TypeError: Cannot read properties of undefined (reading 'replace')
try { try {
const usernameraw = _username.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, ''); const usernameraw = _username.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, '');
const sender = bot.options.host === 'sus.shhnowisnottheti.me' && _sender !== '00000000-0000-0000-0000-000000000000' ? _sender : bot.playersAddedPlayers[usernameraw]; const sender = _sender !== '00000000-0000-0000-0000-000000000000' ? _sender : bot.playersAddedPlayers[usernameraw];
let username; let username;
if (!bot.getplayerusername[sender]) username = usernameraw; if (!bot.getplayerusername[sender]) username = usernameraw;
else username = bot.getplayerusername[sender]; else username = bot.getplayerusername[sender];

View file

@ -40,7 +40,7 @@ function inject(bot, dcclient, config) {
relativePosition.z = 0; relativePosition.z = 0;
} }
const impulseMode = bot.options.host === '0.tcp.ap.ngrok.io'; const kaboom = bot.options.kaboom;
const location = { const location = {
x: core.start.x + relativePosition.x, x: core.start.x + relativePosition.x,
@ -48,8 +48,8 @@ function inject(bot, dcclient, config) {
z: core.start.z + relativePosition.z, z: core.start.z + relativePosition.z,
}; };
if (impulseMode) bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: 0, flags: 0}); if (kaboom) bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: 0, flags: 0});
bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: impulseMode ? 2 : 1, flags: 0b100}); bot.write('update_command_block', {location, command: command.substring(0, 32767), mode: kaboom ? 2 : 1, flags: 0b100});
} catch (e) { } catch (e) {
bot.console.error(e); bot.console.error(e);
} }

View file

@ -3,6 +3,8 @@ const mc = require('minecraft-protocol');
const {loadPlugins} = require('../util/loadPlugins'); const {loadPlugins} = require('../util/loadPlugins');
function inject(bot, dcclient, config) { function inject(bot, dcclient, config) {
if (!config.proxy) return;
let index; let index;
config.servers.forEach((server, _index) => { config.servers.forEach((server, _index) => {
if (bot.options.host !== server.host) return; if (bot.options.host !== server.host) return;