ishak64
Femtopat
- Katılım
- 22 Ekim 2024
- Mesajlar
- 34
Daha fazla
- Cinsiyet
- Erkek
Ben ai kullanarak bir JavaScript yazdım bir sunucuya girip bir şeyler yapmak için. Normalde sunucuya girip verdiğim şifreyi yazıp sonrasında pusulaya sağ tıklayıp zümrüt bloğa sağ tıklaması lazım. Sonrasında ise bir komut yazması lazım ve 5 saniyede bir zıplaması. Ama aktifleştirdiğimde şifreyi yazarak sunucuya giriş yaptıktan sonra lobide olduğu yerde zıplamaya başlıyor. Script bu
Kod:
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);
Son düzenleyen: Moderatör: