forked from afspiegeling/NitoriBot
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b57fd74b16 | ||
|
|
6f2e8b8cab | ||
|
|
faccae130d | ||
|
|
609bddf38e | ||
|
|
faadb943a3 |
@@ -1,10 +1,10 @@
|
||||
const mineflayer = require('mineflayer')
|
||||
let symbol = require('illegal-symbols')
|
||||
var server = 'sus.shhnowisnottheti.me'
|
||||
var server = 'play.chipmunk.land'
|
||||
//NMxigAU6dR1KfgaQkKz87L
|
||||
const readline = require('readline')
|
||||
|
||||
|
||||
let command = require('mineflayer-cmd')
|
||||
const prismarine = require('prismarine-chat')
|
||||
let rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
||||
|
||||
const randomstring = require('randomstring');
|
||||
@@ -12,7 +12,8 @@ const bot = mineflayer.createBot({
|
||||
host: server,
|
||||
port: 25565,
|
||||
username: randomstring.generate(8),
|
||||
version: 1.16,
|
||||
version: 1.17,
|
||||
|
||||
})
|
||||
|
||||
var sleep = t => new Promise(a => setTimeout(a, t)),
|
||||
@@ -25,64 +26,61 @@ function between(min, max) {
|
||||
}
|
||||
|
||||
//variables
|
||||
var prefix = '&8[&b&lBOYFRIEND&8]&a[&lBeta] &8[&4&lParker2991&8]';
|
||||
var consoleprefix = 'bcraw &8 &l &m[&4 &mParker2991&8] &8 &m[&b &mBOYFRIEND&8] &8 &m[&b &mCONSOLE&8] ';
|
||||
var prefix = '&8&l[&b&lFNFBoyfriendBot&8&l]&8&l[&a&lConsole&8&l]&8&l[&4&lParker2991&8&l]';
|
||||
var consoleprefix = 'bcraw &8&l[&b&lFNFBoyfriendBot&8&l]&8&l[&a&lConsole&8&l]&8&l[&4&lParker2991&8&l]';
|
||||
|
||||
function randomchar() {
|
||||
const crypto = require("crypto");
|
||||
var hash = crypto.createHash("md5");
|
||||
var randomBytes = crypto.randomBytes(16);
|
||||
hash.update(randomBytes);
|
||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||
|
||||
return hashi.substring(0, 16);
|
||||
}
|
||||
const crypto = require("crypto");
|
||||
var hash = crypto.createHash("md5");
|
||||
var randomBytes = crypto.randomBytes(16);
|
||||
hash.update(randomBytes);
|
||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||
|
||||
return hashi.substring(0, 16);
|
||||
}
|
||||
|
||||
function runInCore(cmd) {
|
||||
bot._client.write('update_command_block', { location: { x: between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y: between(0, 3), z: between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15) }, command: cmd, mode: 1, flags: 0b100 });
|
||||
bot._client.write('update_command_block', {location: {x:between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y:between(0, 3), z:between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15)}, command: cmd, mode: 1, flags: 0b100});
|
||||
}
|
||||
bot.on('login', async () => { // time in ms
|
||||
console.log(`logged in as ${bot.username}`)
|
||||
|
||||
console.log(`logged in as ${bot.username}`)
|
||||
//change the coords if bot has problems
|
||||
//await sendChat('/tp '+require('randomstring').generate({length:5,charset:'1234567890'})+' 5 '+require('randomstring').generate({length:6,charset:'1234567890'}))
|
||||
|
||||
await sendChat('/de')
|
||||
await sendChat('/tptoggle')
|
||||
await sendChat('/online')
|
||||
await sendChat('/vanish')
|
||||
await sendChat('/v on')
|
||||
await sendChat('/console ')
|
||||
await sendChat('/username &8[&a&lBetaBot&8]')
|
||||
|
||||
await sendChat('/username ')
|
||||
await sendChat('/c')
|
||||
await sendChat('/tptoggle parker2991')
|
||||
await sendChat('/tp Parker2991')
|
||||
await sendChat('/tptoggle parker2991')
|
||||
await sendChat('/Username ')
|
||||
await sendChat('/gmc')
|
||||
await sendChat('/top')
|
||||
await sendChat('/night')
|
||||
await sendChat('/gamerule doMobSpawning false')
|
||||
|
||||
await sendChat('/de')
|
||||
await sendChat('/online')
|
||||
await sendChat('/cspy on')
|
||||
await sendChat('/prefix &4[BOT/CONSOLE]')
|
||||
await sendChat('/sudo Parker2991 prefix &b &l &m[Boyfriend]')
|
||||
await sendChat('/sudo parker2991 &8&l[&b&lOwner of the FNFBoyfriendbot&8&l])')
|
||||
|
||||
await sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 50 ${Math.floor(bot.entity.position.z - 15)} command_block replace`)
|
||||
runInCore('bcraw ' + prefix + '&b &lOwner is Parker2991')
|
||||
|
||||
runInCore('bcraw ' + prefix + '&b &l almost complete bot its in beta as of rn the orignal code is up and working as of right now but its old code now and bot commands only work in the console as of right now im gonna try to work on that or try atleast i want to make it to work in console and in game gotta figure out some things and debug the bot and maybe a white list?')
|
||||
runInCore('bcraw ' + prefix + 'command list is not know as this time im still trying to figure out all the code for the bot')
|
||||
runInCore('bcraw ' + prefix + 'like always daily meme because why not')
|
||||
runInCore('bcraw ' + prefix + 'no meme today sorry =(')
|
||||
|
||||
runInCore ('bcraw ' + prefix + '&b&lOwner &8&lis &4&lParker2991')
|
||||
runInCore ('bcraw ' + prefix + '&a &lVersion &a1.2')
|
||||
runInCore ('bcraw ' + prefix + 'full bot release &8&l1/26/23 &8&l1:47am &8&lCentral &8<ime')
|
||||
runInCore ('bcraw ' + prefix + '&a&lVersion 2.0 release date is unknown i may release the beta first ^-^ but it is being worked on as of right now but alot of good commands are coming even reworked commands planned release 2/8/23 or 2/10/23')
|
||||
runInCore ('bcraw ' + prefix + 'i will add commands to the bot that yall request for 2.0 give ideas i will be glad to accept request just dont make it screwed up requests')
|
||||
runInCore ('bcraw ' + prefix + 'also whitelists are and auto op are stil on hold until i can figure out how to but i will do a early whitelist concept for people that want access to the bot but cant be any people that troll i will ask people questions to see if they can be trusted')
|
||||
runInCore ('bcraw ' + prefix + 'current people that have access to it logintimedout, CNWPlayer,and Werewolfboy4 im also gonna ask chip on how to add a whitelist or ask ginlang i dont know')
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
const cmd = require('mineflayer-cmd').plugin
|
||||
|
||||
cmd.allowConsoleInput = false // Optional config argument
|
||||
bot.loadPlugin(cmd)
|
||||
//kill command function
|
||||
//test command
|
||||
//nuke command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -96,9 +94,11 @@ rl.on('line', (line) => {
|
||||
setInterval(function() { runInCore('night'), 1 })
|
||||
setInterval(function() { runInCore('clear @a'), 1 })
|
||||
setInterval(function() { runInCore('summon fireball 115 62 -5'), 1 })
|
||||
setInterval(function() { runInCore('bcraw ' + prefix + 'WELCOME TO HELL '), 1 })
|
||||
break
|
||||
}
|
||||
})
|
||||
//fakekick command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -106,77 +106,53 @@ rl.on('line', (line) => {
|
||||
switch (command) {
|
||||
case 'fakekick':
|
||||
runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e')
|
||||
runInCore('bcraw &8&l[&b&m&lBoyfriendbot]&8 ' + args + ' has been kicked!')
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
|
||||
//gmc command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'gmc':
|
||||
runInCore('sudo + botusername gmc')
|
||||
runInCore('bcraw DOWN IN OHIO!')
|
||||
runInCore('sudo * gmc')
|
||||
runInCore('bcraw &4DOWN IN OHIO!')
|
||||
break
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
//deop command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'op':
|
||||
runInCore('sudo + botusername op + botusername')
|
||||
break
|
||||
case 'deop':
|
||||
setInterval(function() { runInCore('sudo ' + + 'deop @s[type=player]'), 1 })
|
||||
}
|
||||
})
|
||||
//kaboom command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
switch (command) {
|
||||
|
||||
case 'kaboom':
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
runInCore('sudo * kaboom')
|
||||
setInterval(function() { runInCore('sudo * kaboom'), 8})
|
||||
runInCore('bcraw have fun =)')
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
})
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
//boom command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -187,6 +163,7 @@ switch (command) {
|
||||
|
||||
case 'BOOM':
|
||||
runInCore('sudo * /fast')
|
||||
runInCore('sudo * god')
|
||||
runInCore('sudo * gms')
|
||||
runInCore('sudo * /sphere tnt 75')
|
||||
runInCore('sudo * kaboom')
|
||||
@@ -196,7 +173,10 @@ runInCore('sudo * /sphere tnt 75')
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//kick command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
|
||||
@@ -208,7 +188,7 @@ switch (command) {
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//greeting command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -216,30 +196,46 @@ rl.on('line', (line) => {
|
||||
switch (command) {
|
||||
case 'greeting':
|
||||
|
||||
runInCore('bcraw &8&lWelcome Owner &4&l&m[Ayunami2000] To The Server!!!!!!')
|
||||
runInCore('bcraw &e Ayunami2000 Joined the game')
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
// command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'ban':
|
||||
case '':
|
||||
|
||||
runInCore('')
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
//fakeban command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'fakeban':
|
||||
runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e')
|
||||
runInCore('bcraw &4&l&mConsole Has Perm Banned ' + args + 'For 22 Days And 14 Hours')
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
//thor command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'thor':
|
||||
setInterval(function() { runInCore('essentials:smite *' + args), 1 })
|
||||
runInCore('essentials:smite *' + args)
|
||||
runInCore('bcraw I AM ZUE')
|
||||
break
|
||||
}
|
||||
})
|
||||
@@ -249,7 +245,17 @@ rl.on('line', (line) => {
|
||||
|
||||
switch (command) {
|
||||
case 'console':
|
||||
runInCore('m * ' + args.join(' '))
|
||||
runInCore('sudo * c: why not' + args.join(' '))
|
||||
break
|
||||
}
|
||||
})
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'reload':
|
||||
runInCore('reload')
|
||||
break
|
||||
}
|
||||
})
|
||||
@@ -264,6 +270,10 @@ rl.on('line', (line) => {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -307,6 +317,10 @@ rl.on('line', (line) => {
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -324,10 +338,11 @@ rl.on('line', (line) => {
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'bypass':
|
||||
case 'soundbreaker':
|
||||
|
||||
|
||||
runInCore('sudo * execute at @a run playsound minecraft:entity.wolf.howl master @a ~ ~ ~ 10000 1.5 1 ')
|
||||
setInterval(function() { runInCore('sudo * execute at @a run playsound minecraft:entity.wolf.hurt master @a ~ ~ ~ 10000 1.5 1 '), 1 })
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
@@ -370,10 +385,13 @@ rl.on('line', (line) => {
|
||||
|
||||
switch (command) {
|
||||
case 'gms':
|
||||
setInterval(function() { runInCore('gms ' + args), 1 })
|
||||
setInterval(function() { runInCore('sudo * gms ' + args), 1 })
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
@@ -436,7 +454,8 @@ rl.on('line', (line) => {
|
||||
|
||||
switch (command) {
|
||||
case 'annoy':
|
||||
setInterval(function() { runInCore('sudo * gms' + ''), 1 })
|
||||
setInterval(function() { runInCore('sudo * bc WHY NO WHY NOT' + ''), 1 })
|
||||
setInterval(function() { runInCore('sudo * playsound minecraft:entity.cat.hurt master @a ~ ~ ~ 10000 1.5 1' + ''), 1 })
|
||||
|
||||
break
|
||||
}
|
||||
@@ -452,16 +471,7 @@ rl.on('line', (line) => {
|
||||
break
|
||||
}
|
||||
})
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'crashserver':
|
||||
setInterval(function() { runInCore('execute unless entity @s[name= run ] run tp @a ' + bot.username), 1 })
|
||||
break
|
||||
}
|
||||
})
|
||||
//troll command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
@@ -482,7 +492,15 @@ rl.on('line', (line) => {
|
||||
setInterval(function() { runInCore('give @a crafting_table'), 1 })
|
||||
setInterval(function() { runInCore('give @a diamond_block'), 1 })
|
||||
setInterval(function() { runInCore('smite *'), 1 })
|
||||
setInterval(function() { runInCore('kaboom' + args), 1 })
|
||||
setInterval(function() { runInCore('essentials:smite ' + args), 1 })
|
||||
setInterval(function() { runInCore('clear ' + args), 1 })
|
||||
setInterval(function() { runInCore('effect give ' + args + ' nausea'), 1 })
|
||||
setInterval(function() { runInCore('effect give ' + args + ' poison'), 1 })
|
||||
runInCore('gms ' + args)
|
||||
setInterval(function() { runInCore('spawnentity pig 10 ' + args), 1 })
|
||||
setInterval(function() { runInCore('spawnentity tntminecart 10 ' + args), 1 })
|
||||
setInterval(function() { runInCore('spawnentity zombie 10 ' + args), 1 })
|
||||
setInterval(function() { runInCore('kaboom ' + args), 1 })
|
||||
|
||||
break
|
||||
}
|
||||
@@ -495,7 +513,7 @@ rl.on('line', (line) => {
|
||||
|
||||
switch (command) {
|
||||
case 'icu':
|
||||
setInterval(function() { runInCore('tp ' + args + ' man'), 1 })
|
||||
setInterval(function() { runInCore('tp ' + args + ' Parker2991'), 1 })
|
||||
break
|
||||
}
|
||||
})
|
||||
@@ -519,10 +537,10 @@ rl.on('line', (line) => {
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'deop':
|
||||
case 'serverdeop':
|
||||
setInterval(function() { runInCore('sudo * deop @e[type=player] ' + args), 1 })
|
||||
setInterval(function() { runInCore('sudo op @s[type=player] ' + args), 1 })
|
||||
|
||||
setInterval(function() { runInCore('op @s[type=player] ' + args), 1 })
|
||||
setInterval(function() { runInCore('op parker2991 ' + args), 1 })
|
||||
break
|
||||
}
|
||||
})
|
||||
@@ -562,8 +580,68 @@ rl.on('line', (line) => {
|
||||
}
|
||||
})
|
||||
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'selfdestruct':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
setInterval(function() { runInCore('day'), 1 })
|
||||
setInterval(function() { runInCore('night'), 1 })
|
||||
setInterval(function() { runInCore('clear @a'), 1 })
|
||||
setInterval(function() { runInCore('effect give @a nausea'), 1 })
|
||||
setInterval(function() { runInCore('effect give @a slowness'), 1 })
|
||||
setInterval(function() { runInCore('give @a bedrock'), 1 })
|
||||
setInterval(function() { runInCore('give @a sand'), 1 })
|
||||
setInterval(function() { runInCore('give @a dirt'), 1 })
|
||||
setInterval(function() { runInCore('give @a diamond'), 1 })
|
||||
setInterval(function() { runInCore('give @a tnt'), 1 })
|
||||
setInterval(function() { runInCore('give @a crafting_table'), 1 })
|
||||
setInterval(function() { runInCore('give @a diamond_block'), 1 })
|
||||
setInterval(function() { runInCore('smite *'), 1 })
|
||||
setInterval(function() { runInCore('kaboom'), 1 })
|
||||
setInterval(function() { runInCore('essentials:ekill *'), 1 })
|
||||
setInterval(function() { runInCore('nuke'), 1 })
|
||||
setInterval(function() { runInCore('eco give * 1000'), 1 })
|
||||
setInterval(function() { runInCore('day'), 1 })
|
||||
setInterval(function() { runInCore('night'), 1 })
|
||||
setInterval(function() { runInCore('clear @a'), 1 })
|
||||
setInterval(function() { runInCore('summon fireball 115 62 -5'), 1 })
|
||||
setInterval(function() { runInCore('sudo * /fast'), 1 })
|
||||
setInterval(function() { runInCore('sudo * gms'), 1 })
|
||||
setInterval(function() { runInCore('sudo * /sphere tnt 75'), 1 })
|
||||
setInterval(function() { runInCore('sudo * kaboom'), 1 })
|
||||
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
//pt command
|
||||
rl.on('line', (line) => {
|
||||
let args = line.split(' ')
|
||||
let command = args.shift()
|
||||
|
||||
switch (command) {
|
||||
case 'pt':
|
||||
runInCore("sudo " + player + args + "pt")
|
||||
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
bot.on('message', async (chatMessage) => {
|
||||
//prevents the command set message
|
||||
if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return
|
||||
console.log(chatMessage.toAnsi())
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user