const mineflayer = require('mineflayer');
const bot = mineflayer.createBot({
host: 'eu.saloon.network',
username: 'xHydra_',
password: '*********',
version: '1.8.9'
});
bot.once('spawn', () => {
bot.chat('/login *********');
});
bot.on('spawn', () => {
setTimeout(() => {
const compass = bot.inventory.items().find(item => item.name === 'compass');
if (compass) {
bot.equip(compass, 'hand', () => {
bot.activateItem(); // Right-click to open the chest
bot.once('windowOpen', (window) => {
setTimeout(() => {
for (let slot = 0; slot < window.slots.length; slot++) {
if (window.slots[slot] && window.slots[slot].name.includes('emerald_block')) {
bot.clickWindow(slot, 0, 0); // Right-click the emerald block
break;
}
}
}, 500);
});
});
}
}, 8000);
setTimeout(() => {
bot.chat('/is warp xHydra');
// Start jumping after the command is issued
setInterval(() => {
bot.setControlState('jump', true);
setTimeout(() => bot.setControlState('jump', false), 200);
}, 5000);
}, 15000); // Delay for the warp command
});
bot.on('kicked', console.log);
bot.on('error', console.log);