mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
add kaboom to server option + remove ayunboom
This commit is contained in:
parent
b23f46bff8
commit
c8b416e780
5 changed files with 13 additions and 4 deletions
1
bot.js
1
bot.js
|
@ -36,6 +36,7 @@ async function createBot(server, config, getBots, dcclient) {
|
|||
host: /* process.argv[2] */ server.host,
|
||||
port: /* process.argv[3] ? Number(process.argv[3]) : 25565*/ server.port,
|
||||
version: config.version,
|
||||
kaboom: server.kaboom,
|
||||
checkTimeoutInterval: '30000',
|
||||
keepAlive: false,
|
||||
hideErrors: true,
|
||||
|
|
|
@ -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',
|
||||
'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,
|
||||
'useChat': false,
|
||||
'core': {
|
||||
|
@ -57,22 +58,27 @@ module.exports = {
|
|||
{
|
||||
'host': 'play.kaboom.pw',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
},
|
||||
{
|
||||
'host': 'sus.shhnowisnottheti.me',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
},
|
||||
{
|
||||
'host': 'kitsune.icu',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
},
|
||||
{
|
||||
'host': '71.179.136.66',
|
||||
'port': 25565,
|
||||
'kaboom': false,
|
||||
},
|
||||
// {
|
||||
// 'host': 'mc.chomens41793.ga',
|
||||
// 'port': 25565,
|
||||
// 'kaboom': true,
|
||||
// },
|
||||
],
|
||||
};
|
||||
|
|
|
@ -52,7 +52,7 @@ function inject(bot, dcclient, config) {
|
|||
// try catch cuz TypeError: Cannot read properties of undefined (reading 'replace')
|
||||
try {
|
||||
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;
|
||||
if (!bot.getplayerusername[sender]) username = usernameraw;
|
||||
else username = bot.getplayerusername[sender];
|
||||
|
|
|
@ -40,7 +40,7 @@ function inject(bot, dcclient, config) {
|
|||
relativePosition.z = 0;
|
||||
}
|
||||
|
||||
const impulseMode = bot.options.host === '0.tcp.ap.ngrok.io';
|
||||
const kaboom = bot.options.kaboom;
|
||||
|
||||
const location = {
|
||||
x: core.start.x + relativePosition.x,
|
||||
|
@ -48,8 +48,8 @@ function inject(bot, dcclient, config) {
|
|||
z: core.start.z + relativePosition.z,
|
||||
};
|
||||
|
||||
if (impulseMode) 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});
|
||||
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: kaboom ? 2 : 1, flags: 0b100});
|
||||
} catch (e) {
|
||||
bot.console.error(e);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ const mc = require('minecraft-protocol');
|
|||
const {loadPlugins} = require('../util/loadPlugins');
|
||||
|
||||
function inject(bot, dcclient, config) {
|
||||
if (!config.proxy) return;
|
||||
|
||||
let index;
|
||||
config.servers.forEach((server, _index) => {
|
||||
if (bot.options.host !== server.host) return;
|
||||
|
|
Loading…
Reference in a new issue