Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Item=require("prismarine-item")("1.8");
- const delay = require('delay')
- const mineflayer = require('mineflayer')
- const mcData=require("minecraft-data")("1.8.8")
- const lava=new Item(327,1,0)
- if (process.argv.length < 4 || process.argv.length > 6) {
- console.log('Usage : node echo.js <host> <port> [<name>] [<password>]')
- process.exit(1)
- }
- const bot = mineflayer.createBot({
- host: process.argv[2],
- port: parseInt(process.argv[3]),
- username: process.argv[4] ? process.argv[4] : 'echo',
- password: process.argv[5],
- verbose: true
- })
- bot.once('login', () => {
- console.log('Wszedlem na serwer')
- delay(1000)
- console.log(bot.username)
- bot.chat('/login muszka123')
- console.log('Proba zalogowania')
- delay(1000)
- bot.setQuickBarSlot(0)
- console.log('Proba zmiany slotu na komapas')
- delay(1000)
- bot.activateItem()
- })
- function checkIfEquipped (err) {
- if (err) {
- console.log(`cannot`)
- } else {
- console.log(`can`)
- }
- }
- bot.on('windowOpen', (window) => {
- console.log('Otworzylem kompas')
- bot.moveSlotItem(1,2, checkIfEquipped)
- console.log('Wybralem lave ?')
- })
- bot.on('windowClose', (window) => {
- console.log('Zamknalem okno')
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement