Spaces:
Paused
Paused
Update index.js
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586const mineflayer = require('mineflayer');const { pathfinder, Movements, goals } = require('mineflayer-pathfinder');const { HfInference } = require('@huggingface/inference');const express = require('express');const hf = new HfInference(process.env.HF_TOKEN);const app = express();app.get('/', (req, res) => res.send('Duo is waiting for the Wall to clear... π§±π€'));app.listen(7860);const memories = { sweetily: [], aprenda: [] };async function chatAI(name, partner, persona, msg) {try {const out = await hf.chatCompletion({model: "meta-llama/Llama-3.2-1B-Instruct",messages: [{ role: "user", content: `Char: ${name}. Partner: ${partner}. Context: Zetrex. Msg: ${msg}. 1 short Taglish sentence.` }],max_tokens: 30});return out.choices[0].message.content.trim();} catch (e) { return "Bakit ang hirap pumasok? π "; }}function createBot(name, partnerName, isLeader, delay = 0) {setTimeout(() => {console.log(`[STAYING STEALTH] Attempting to bypass wall for ${name}...`);const bot = mineflayer.createBot({host: 'zetrex.net',username: name,auth: 'offline',version: false,// Mimic a slow residential connectioncheckTimeoutInterval: 150000,connectTimeout: 60000});bot.loadPlugin(pathfinder);bot.on('spawn', () => {console.log(`${name} bypassed the check! β¨`);// Random jitter to look humanconst jitter = Math.floor(Math.random() * 5000) + 2000;setTimeout(() => {bot.chat(`/register CouplePass123 CouplePass123`);bot.chat(`/login CouplePass123`);// Move slightly so the server sees activitybot.setControlState('forward', true);setTimeout(() => bot.setControlState('forward', false), 500);}, jitter);const mcData = require('minecraft-data')(bot.version);bot.pathfinder.setMovements(new Movements(bot, mcData));// RoamingsetInterval(() => {const partner = bot.players[partnerName]?.entity;if (isLeader) {if (!bot.pathfinder.isMoving()) {const rx = bot.entity.position.x + (Math.random() * 6 - 3);const rz = bot.entity.position.z + (Math.random() * 6 - 3);bot.pathfinder.setGoal(new goals.GoalNear(rx, bot.entity.position.y, rz, 1));}} else if (partner) {bot.pathfinder.setGoal(new goals.GoalFollow(partner, 1), true);}}, 5000);});bot.on('end', (reason) => {console.log(`${name} rejected by wall: ${reason}. Waiting 1 minute...`);// If we hit a wall, wait a full minute to let the IP "cool down"setTimeout(() => createBot(name, partnerName, isLeader, 0), 60000);});bot.on('error', (err) => console.log(`Stealth Error: ${err.message}`));}, delay);}// Massive delay between joins to avoid triggering the "Bot-Net" firewallcreateBot('sweetily', 'aprenda', false, 0);createBot('aprenda', 'sweetily', true, 60000); // Wait 1 FULL MINUTE before BF joins123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114const mineflayer = require('mineflayer');const { pathfinder, Movements, goals } = require('mineflayer-pathfinder');const pvp = require('mineflayer-pvp').plugin;const { HfInference } = require('@huggingface/inference');const express = require('express');const hf = new HfInference(process.env.HF_TOKEN);const app = express();app.get('/', (req, res) => res.send('German Rage Bot: In Queue... π©πͺπ₯'));app.listen(7860);const bot = mineflayer.createBot({host: 'nasi.lemak.xyz',username: 'German_Rage_Bot',auth: 'offline',version: '1.21'});bot.loadPlugin(pathfinder);bot.loadPlugin(pvp);// --- THE GERMAN RAGE AI ---async function getGermanTrashTalk(victim, type) {const prompt = `Context: Minecraft PVP. Situation: ${type} ${victim}.Task: Write a 1-sentence, EXTREMELY ANNOYING, toxic, and aggressive trash talk in FULL GERMAN.Use gamer slang like 'Lauch', 'Hund', 'Opfer', 'geh heulen'. Be the ultimate toxic German player. No hashtags.`;try {const out = await hf.chatCompletion({model: "meta-llama/Llama-3.2-1B-Instruct",messages: [{ role: "user", content: prompt }],max_tokens: 40});return out.choices[0].message.content.trim().replace(/"/g, '');} catch (e) {return "GEH HEULEN DU LAUCH! ππ©πͺ";}}bot.on('spawn', () => {console.log("Joined Lobby. Starting Login & Compass Bypass...");// 1. AUTHENTICATIONsetTimeout(() => {bot.chat('/register GermanPass99 GermanPass99');bot.chat('/login GermanPass99');// 2. COMPASS SELECTOR LOGICsetTimeout(() => {const compass = bot.inventory.items().find(item => item.name.includes('compass'));if (compass) {bot.activateItem(); // Right-click the compassconsole.log("Compass activated. Searching for Survival...");}}, 3000);}, 2000);// 3. WINDOW/GUI INTERACTIONbot.on('windowOpen', async (window) => {console.log("Server Selector Opened.");// Find the item named "Survival"const survivalItem = window.slots.find(slot => slot && slot.nbt && JSON.stringify(slot.nbt).includes('Survival'));if (survivalItem) {console.log("Survival found! Clicking...");bot.clickWindow(survivalItem.slot, 0, 0);} else {// If it can't find by NBT, click slot 10 or 12 (common survival slots)bot.clickWindow(12, 0, 0);}});const mcData = require('minecraft-data')(bot.version);bot.pathfinder.setMovements(new Movements(bot, mcData));});// --- SURVIVAL BEHAVIOR (The Rage) ---setInterval(async () => {// Only act if we aren't in the lobby anymore (check distance from 0,0 or server name)const target = bot.nearestEntity(e =>e.type === 'player' && e.username !== bot.username &&bot.entity.position.distanceTo(e.position) < 15);if (target) {// Provoke in German before attackingif (Math.random() > 0.95) {const rage = await getGermanTrashTalk(target.username, "provoking");bot.chat(rage);}bot.pvp.attack(target);} else if (!bot.pathfinder.isMoving()) {const x = bot.entity.position.x + (Math.random() * 30 - 15);const z = bot.entity.position.z + (Math.random() * 30 - 15);bot.pathfinder.setGoal(new goals.GoalNear(x, bot.entity.position.y, z, 1));}}, 2000);// --- GERMAN KILL/DEATH EVENTS ---bot.on('entityDead', async (entity) => {if (bot.pvp.target === entity) {const rage = await getGermanTrashTalk(entity.username || "Opfer", "killed");setTimeout(() => bot.chat(rage), 1000);}});bot.on('death', async () => {const rage = await getGermanTrashTalk("hacker", "died and making an excuse");bot.chat(rage);bot.respawn();});bot.on('error', (err) => console.log("Bot Error:", err.message));bot.on('end', () => process.exit(1));
index.js+90-62