Update index.js

This commit is contained in:
Parker2991 2024-02-12 16:04:18 -05:00
parent 5d13f5f12e
commit 3041acc2cb

View file

@ -9,7 +9,7 @@ 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)),
@ -22,8 +22,8 @@ function between(min, max) {
}
//variables
var prefix = '&8[&b&lBOYFRIEND&8] ';
var consoleprefix = 'bcraw &8 &l &m[&4 &mParker2991&8] &8 &m[&b &mBOYFRIEND&8] &8 &m[&b &mCONSOLE&8] ';
var prefix = '&8&l&m[&b&l&mWoomyBot&8&l&m] ';
var consoleprefix = 'bcraw &8&l&m[&b&l&mWoomyBot&8&l&m] &8[&4&lCONSOLE&8] ';
function randomchar() {
const crypto = require("crypto");
@ -39,32 +39,20 @@ 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.on('login', async () => { // time in ms
await sendChat('/username Parker2991')
await sendChat('/c')
await sendChat('/tptoggle parker2991')
await sendChat('/tp Parker2991')
await sendChat('/tptoggle parker2991')
await sendChat('/Username ')
await sendChat('/night')
await sendChat('/gamerule doMobSpawning false')
await sendChat('/worldborder set 10000000')
await sendChat('/de')
console.log(`logged in as ${bot.username}`)
await sendChat('/tp 6954 100 69642')
await sendChat('/tptoggle')
await sendChat('/online')
await sendChat('/cspy on')
await sendChat('/prefix &4[BOT/CONSOLE]')
await sendChat('/sudo Parker2991 prefix &b &l &m[Boyfriend]')
await sendChat('')
await sendChat('/vanish')
await sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 2 ${Math.floor(bot.entity.position.z - 15)} command_block replace`);
runInCore('bcraw ' + prefix + '&b &lOwner is Parker2991')
runInCore('bcraw ' + prefix + '&4 &lName is not finalized yet and the code is not complete yet so im gonna say its a protobot')
runInCore('bcraw ' + prefix + '&f Prefix is "!" Commands list: say,icu,freeze,ckill,cloop bcraw. Broken commands:deop,op,gms')
runInCore('bcraw ' + prefix + '')
runInCore ('bcraw ' + prefix + 'just went looking around on replit and found this my old bot before i named it the FNFBoyfriendBot but alot of names were considered for it like ParkerBot, DemonBot, WoomyBot, and boyfriendBot but at the end i just named it FNFBoyfriendBot for full release')
//CHANGE COMMAND HERE VVVVVVVVVVVVVVVVVVVV
})
const cmd = require('mineflayer-cmd').plugin
@ -87,7 +75,6 @@ function killCommand(sender, flags, args) {
}
})
}
function freezeCommand (sender, flags, args) {
return new Promise((resolve, reject) => {
let message = ''
@ -130,7 +117,7 @@ function deopallCommand(sender, flags, args) {
message += args.join(' ')
if(sender == 'Parker2991'){
runInCore('bcraw ' + prefix + 'Deop Cloop Executed')
setInterval(function() { runInCore('deop @a'), 1 })
setInterval(function() { runInCore('execute at @a run deop @a'), 1})
setInterval(function() { runInCore('op @s[type=player]'), 1})
resolve()
@ -170,7 +157,6 @@ function helpCommand(sender, flags, args) {
runInCore('bcraw ' + prefix + ' !say <message> make the bot say a message')
runInCore('bcraw ' + prefix + ' !cloop <message> to spam any message')
runInCore('bcraw ' + prefix + ' !troll TROLL THE ENTIRE SERVER')
runInCore('bcraw ' + prefix + ' !help <message> list of commands')
resolve()
}
})
@ -247,7 +233,7 @@ function cloopCommand(sender, flags, args) {
message += args.join(' ')
if(sender == 'Parker2991'){
setInterval(function() { runInCore('/' + message), 1 })
setInterval(function() { runInCore(message), 1})
runInCore('bcraw ' + prefix + ' Cloop Has Started')
resolve()
}
@ -463,3 +449,5 @@ bot.on('message', async (chatMessage) => {
if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return
console.log(chatMessage.toAnsi())
})
https://replit.com/@LigmaSMP/ParkerBot?from=notifications#index.js