v2.0-revision
This commit is contained in:
parent
3d626e3578
commit
d873e16aea
1 changed files with 155 additions and 138 deletions
151
index.js
151
index.js
|
@ -1,12 +1,10 @@
|
||||||
const mineflayer = require('mineflayer')
|
const mineflayer = require('mineflayer')
|
||||||
let symbol = require('illegal-symbols')
|
let symbol = require('illegal-symbols')
|
||||||
var server = 'sus.shhnowisnottheti.me'
|
var server = 'play.chipmunk.land'
|
||||||
//NMxigAU6dR1KfgaQkKz87L
|
//NMxigAU6dR1KfgaQkKz87L
|
||||||
const readline = require('readline')
|
const readline = require('readline')
|
||||||
let chunk = ('prismarine-chunk')
|
var gameMode = require('mineflayer-cmd')
|
||||||
const protocol = ('minecraft-protocol')
|
|
||||||
let auth = ('mineflayer-auto-auth')
|
|
||||||
let bcraw = ('prismarine=chat')
|
|
||||||
|
|
||||||
|
|
||||||
let rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
let rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
||||||
|
@ -17,10 +15,13 @@ const bot = mineflayer.createBot({
|
||||||
host: server,
|
host: server,
|
||||||
port: 25565,
|
port: 25565,
|
||||||
username: randomstring.generate(8),
|
username: randomstring.generate(8),
|
||||||
version: 1.17,
|
version: 1.17
|
||||||
auth: 'mineflayer-auto-auth'
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var sleep = t => new Promise(a => setTimeout(a, t)),
|
var sleep = t => new Promise(a => setTimeout(a, t)),
|
||||||
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
|
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
|
||||||
|
|
||||||
|
@ -31,8 +32,8 @@ function between(min, max) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//variables
|
//variables
|
||||||
var prefix = '&8&l[&b&lFNFBoyfriendBot&8&l]&8&l[&a&lConsole&8&l]&8&l[&4&lParker2991&8&l]';
|
var prefix = '&8&l[&b&lFNFBoyfriendBot&8&l]&8&l[&4&lVersion&a&l2.0&8&l]&8&l[&4&lParker2991&8&l]&8&l[&5&lSpim&5&lThe&5&lO&5&lc&5<&5&lo&5&ll&5&li&5&ln&5&lg&8&l]';
|
||||||
var consoleprefix = 'bcraw &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[&4&lVersion&a&l2.0&8&l]&8&l[&4&lParker2991&8&l]&8&l[&5&lSpim&5&lThe&5&lO&5&lc&5<&5&lo&5&ll&5&li&5&ln&5&lg&8&l]';
|
||||||
|
|
||||||
function randomchar() {
|
function randomchar() {
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
|
@ -42,48 +43,62 @@ function randomchar() {
|
||||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||||
|
|
||||||
return hashi.substring(0, 16);
|
return hashi.substring(0, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function runInCore(cmd) {
|
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
|
bot.on('login', async () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(`logged in as ${bot.username}`)
|
console.log(`logged in as ${bot.username}`)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//change the coords if bot has problems
|
//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('/tp '+require('randomstring').generate({length:5,charset:'1234567890'})+' 5 '+require('randomstring').generate({length:6,charset:'1234567890'}))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await sendChat('/world 3')
|
await sendChat('/world 3')
|
||||||
await sendChat('/tptoggle parker2991')
|
await sendChat('/tptoggle parker2991')
|
||||||
await sendChat('/tp parker2991')
|
await sendChat('/tp parker2991')
|
||||||
await sendChat('/tptoggle parker2991')
|
await sendChat('/tptoggle parker2991')
|
||||||
await sendChat('/tptoggle')
|
await sendChat('/tptoggle')
|
||||||
await sendChat('/online')
|
|
||||||
await sendChat('/v on')
|
await sendChat('/v on')
|
||||||
await sendChat('/console ')
|
await sendChat('/console ')
|
||||||
await sendChat('/username')
|
await sendChat('/username')
|
||||||
await sendChat('/c')
|
await sendChat('/c')
|
||||||
|
|
||||||
await sendChat('/gmc')
|
|
||||||
await sendChat('/minecraft:reload')
|
|
||||||
await sendChat('/night')
|
await sendChat('/night')
|
||||||
await sendChat('/gamerule doMobSpawning false')
|
await sendChat('/gamerule doMobSpawning false')
|
||||||
await sendChat('/de')
|
await sendChat('/de')
|
||||||
await sendChat('/online')
|
await sendChat('/online')
|
||||||
await sendChat('/cspy on')
|
await sendChat('/cspy on')
|
||||||
await sendChat('/prefix &4[BOT/CONSOLE]')
|
await sendChat('/prefix &4[BOT/CONSOLE]')
|
||||||
await sendChat('/sudo parker2991 prefix &8&l[&4&lOwner of the &b&lFNFBoyfriend&4&lbot&8&l]')
|
await sendChat('/sudo parker2991 prefix &8&l[&4&lOwner &a&lof &a<he &b&lFNFBoyfriend&4&lbot&8&l]&8&l[&9&lDiscord&8&l]')
|
||||||
await sendChat('/sudo spimtheoctoling prefix &8&l[&&lOwner of the VeemoBot&8&l]')
|
await sendChat('/sudo spimtheoctoling prefix &8&l[&5&lOwner of the VeemoBot&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`)
|
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 &4&lis &4&lParker2991')
|
|
||||||
runInCore ('bcraw ' + prefix + '
|
|
||||||
|
|
||||||
runInCore ('bcraw ' + prefix + '&a&l Version &a&l2.0 RELEASE')
|
runInCore('bcraw ' + prefix + '&b&lOwner &4&lis &4&lParker2991')
|
||||||
|
runInCore('bcraw ' + prefix + ' &b&lCo-Owner &5&lSpimTheOctoling')
|
||||||
|
|
||||||
runInCore ('bcraw ' + prefix + 'full bot release &8&l1/26/23 &8&l1:47am &8&lCentral &8<ime')
|
runInCore('bcraw ' + prefix + ' Release date 2/7/23 8:01pm for &4&l2.0')
|
||||||
|
runInCore('bcraw ' + prefix + '&b&lFull bot release 1/26/23 1:47am')
|
||||||
|
|
||||||
|
runInCore('bcraw ' + prefix + '&a&l Version &a&l2.0 &a&l RELEASE')
|
||||||
|
runInCore('bcraw ' + prefix + 'Users of the bot Parker2991 and SpimTheOctoling')
|
||||||
|
|
||||||
runInCore ('bcraw ' + prefix + 'Boffy:im jesus i dont fucking know')
|
runInCore('bcraw ' + prefix + 'full bot release &8&l1/26/23 &8&l1:47am &8&lCentral &8<ime')
|
||||||
|
|
||||||
|
runInCore('bcraw ' + prefix + 'i got a discord now if anyone wants a bot go to here https://discord.gg/PaxKxXTs')
|
||||||
|
|
||||||
})
|
})
|
||||||
const cmd = require('mineflayer-cmd').plugin
|
const cmd = require('mineflayer-cmd').plugin
|
||||||
|
@ -116,27 +131,27 @@ rl.on('line', (line) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'fakekick':
|
case 'fakekick':
|
||||||
runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e')
|
runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e')
|
||||||
runInCore('bcraw &8&l[&b&m&lFNFBoyfriendbot&8&l] ' + args + ' has been kicked!')
|
runInCore('bcraw &8&l[&b&m&lFNFBoyfriendbot&8&l]&8&l[&5&lVeemoBot&8&l] ' + args + ' has been kicked!')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
//gmc command
|
//gmc command
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
let command = args.shift()
|
let command = args.shift()
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'gmc':
|
case 'gmc':
|
||||||
runInCore('sudo + botusername gmc')
|
sendChat('/minecraft:gamemode creative')
|
||||||
runInCore('bcraw &4DOWN IN OHIO!')
|
runInCore('bcraw &4DOWN IN OHIO!')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
//deop command
|
//deop command
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
let command = args.shift()
|
let command = args.shift()
|
||||||
|
|
||||||
|
@ -152,7 +167,7 @@ rl.on('line', (line) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
|
|
||||||
case 'kaboom':
|
case 'kaboom':
|
||||||
setInterval(function() { runInCore('sudo * kaboom'), 8})
|
setInterval(function() { runInCore('sudo * kaboom'), 8 })
|
||||||
runInCore('bcraw have fun =)')
|
runInCore('bcraw have fun =)')
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -166,13 +181,13 @@ rl.on('line', (line) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
|
|
||||||
case 'BOOM':
|
case 'BOOM':
|
||||||
runInCore('sudo * /fast')
|
runInCore('sudo * /fast')
|
||||||
runInCore('sudo * god')
|
runInCore('sudo * god')
|
||||||
runInCore('sudo * gms')
|
runInCore('sudo * gms')
|
||||||
runInCore('sudo * /sphere tnt 75')
|
runInCore('sudo * /sphere tnt 75')
|
||||||
runInCore('sudo * kaboom')
|
runInCore('sudo * kaboom')
|
||||||
runInCore('BOOM GOES THE DINOMITE')
|
runInCore('BOOM GOES THE DINOMITE')
|
||||||
|
|
||||||
|
@ -181,15 +196,15 @@ runInCore('sudo * /sphere tnt 75')
|
||||||
|
|
||||||
})
|
})
|
||||||
//kick command
|
//kick command
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
let command = args.shift()
|
let command = args.shift()
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
|
|
||||||
case 'kick':
|
case 'kick':
|
||||||
runInCore ('/console @e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e')
|
runInCore('/console @e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e')
|
||||||
runInCore('bcraw &8&l[&b&m&lBoyfriendbot]&8 ' + args + ' has been kicked!')
|
runInCore('bcraw &8&l[&b&m&lBoyfriendbot&8&l]&8&l[&5&lVeemoBot&8&l] ' + args + ' has been kicked!')
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -233,6 +248,17 @@ rl.on('line', (line) => {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
rl.on('line', (line) => {
|
||||||
|
let args = line.split(' ')
|
||||||
|
let command = args.shift()
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case 'vanish':
|
||||||
|
sendChat('/vanish on ' + bot.username + '')
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
//OHHAIL console
|
//OHHAIL console
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
|
@ -322,6 +348,8 @@ rl.on('line', (line) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'MyHead':
|
case 'MyHead':
|
||||||
runInCore('give @a minecraft:player_head{SkullOwner:Parker2991}')
|
runInCore('give @a minecraft:player_head{SkullOwner:Parker2991}')
|
||||||
|
runInCore('give @a minecraft:player_head{SkullOwner:SpimTheOctoling}')
|
||||||
|
runInCore('bcraw ' + prefix + 'My Head')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -332,7 +360,7 @@ rl.on('line', (line) => {
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'MYLEG':
|
case 'MYLEG':
|
||||||
runInCore('bcraw ' + prefix + '&a&lMY LEG!!!')
|
runInCore('bcraw ' + prefix + '&4&lM&4&lY &4&lLEG!!!')
|
||||||
runInCore('give @a bone 64')
|
runInCore('give @a bone 64')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -382,32 +410,11 @@ rl.on('line', (line) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'DREAMSTANALERT':
|
case 'DREAMSTANALERT':
|
||||||
runInCore('bcraw ' + prefix + 'OH HELL NO DREAM STAN ALERT')
|
runInCore('bcraw ' + prefix + 'OH HELL NO DREAM STAN ALERT')
|
||||||
runInCore('kick @e[type=player] @e @e @e')
|
runInCore('execute unless entity @s[name= run ] run stop')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// command
|
|
||||||
rl.on('line', (line) => {
|
|
||||||
let args = line.split(' ')
|
|
||||||
let command = args.shift()
|
|
||||||
|
|
||||||
switch (command) {
|
|
||||||
case '':
|
|
||||||
runInCore('')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// command
|
|
||||||
rl.on('line', (line) => {
|
|
||||||
let args = line.split(' ')
|
|
||||||
let command = args.shift()
|
|
||||||
|
|
||||||
switch (command) {
|
|
||||||
case '':
|
|
||||||
runInCore('')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
})
|
|
||||||
//test command
|
//test command
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
|
@ -417,7 +424,7 @@ rl.on('line', (line) => {
|
||||||
case 'test':
|
case 'test':
|
||||||
|
|
||||||
|
|
||||||
setInterval(function() { runInCore('minecraft:execute unless entity @s[name= run ] at ' + args + ' run summon minecraft:iron_golem'), 1 })
|
setInterval(function() { runInCore('sudo * ' + args + ' summon minecraft:iron_golem'), 1 })
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -550,7 +557,7 @@ rl.on('line', (line) => {
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'annoy':
|
case 'annoy':
|
||||||
setInterval(function() { runInCore('sudo * WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' + ''), 1 })
|
setInterval(function() { runInCore('sudo * c:WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' + ''), 1 })
|
||||||
setInterval(function() { runInCore('sudo * playsound minecraft:entity.cat.hurt master @a ~ ~ ~ 10000 1.5 1' + ''), 1 })
|
setInterval(function() { runInCore('sudo * playsound minecraft:entity.cat.hurt master @a ~ ~ ~ 10000 1.5 1' + ''), 1 })
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -633,10 +640,9 @@ rl.on('line', (line) => {
|
||||||
let command = args.shift()
|
let command = args.shift()
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'serverdeop':
|
case 'op':
|
||||||
setInterval(function() { runInCore('sudo * deop @e[type=player] ' + args), 1 })
|
sendChat('/op ' + bot.username + '')
|
||||||
setInterval(function() { runInCore('op @s[type=player] ' + args), 1 })
|
|
||||||
setInterval(function() { runInCore('op parker2991 ' + args), 1 })
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -664,6 +670,16 @@ rl.on('line', (line) => {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
rl.on('line', (line) => {
|
||||||
|
let args = line.split(' ')
|
||||||
|
let command = args.shift()
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case 'refillcore':
|
||||||
|
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`)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
//sudoall command
|
//sudoall command
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
|
@ -673,7 +689,7 @@ rl.on('line', (line) => {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'sudoall':
|
case 'sudoall':
|
||||||
runInCore('essentials:sudo * ' + args.join(' '))
|
runInCore('essentials:sudo * ' + args.join(' '))
|
||||||
console.log("succesfully execute sudo command " + args)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -682,7 +698,7 @@ rl.on('line', (line) => {
|
||||||
let args = line.split(' ')
|
let args = line.split(' ')
|
||||||
let command = args.shift()
|
let command = args.shift()
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'selfdestruct':
|
case 'selfdestruct':
|
||||||
|
|
||||||
setInterval(function() { runInCore('day'), 1 })
|
setInterval(function() { runInCore('day'), 1 })
|
||||||
|
@ -729,3 +745,4 @@ bot.on('message', async (chatMessage) => {
|
||||||
console.log(chatMessage.toAnsi())
|
console.log(chatMessage.toAnsi())
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue