-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant use navigate in login script #68
Comments
Full log
…On Wed, Dec 25, 2019, 08:47 sadan23 ***@***.***> wrote:
Can anybody help me?
This is what my rbot.js looks like. it joins a server. the last message i
got is Position 1 erreicht but he never walk anywere he joins the /portal
but then do nothing.
`#!/usr/bin/env node
if(process.argv.length<5 || process.argv.length>7)
{
console.log("Usage : rbot [] []");
process.exit(1);
}
var mineflayer = require('mineflayer');
var blockFinderPlugin = require('mineflayer-blockfinder')(mineflayer);
var navigatePlugin = require('mineflayer-navigate')(mineflayer);
var navigate2Plugin = require('./avoidBedrock.js')(mineflayer);
var async=require('async');
var vec3 = require('vec3');
var bot = mineflayer.createBot({
username: process.argv[4],
verbose: true,
version: "1.8.9",
port:parseInt(process.argv[3]),
host:process.argv[2],
password:process.argv[5]
});
navigatePlugin(bot);
navigate2Plugin(bot);
blockFinderPlugin(bot);
var task=require('./task');
var achieve=require('./achieve');
task.init(bot,vec3,achieve.achieve,achieve.achieveList,achieve.processMessage,mineflayer,async);
achieve.init(task.all_task.tasks,task.all_task.giveUser,task.all_task.parameterized_alias,task.all_task.alias,task.all_task.stringTo,bot,vec3,process.argv[6]);
bot.on('login', function() {
console.log("I logged in.");
console.log(bot.entity.position)
console.log("settings", bot.settings);
console.log("game", bot.game);
console.log("Bot is eingeloggt");
console.log("Bot befindet sich im /hub")
bot.chat('/portal');
console.log(bot.entity.position)
console.log("Erfolgreich zum Portal verbunden!");
setTimeout(() => {
const portalPos = vec3(310, 117, 260);
const pos1 = vec3(315, 117, 264);
const pos2 = vec3(308, 117, 260);
const navigateToPos1 = () => {
bot.navigate.on('arrived', () => {
setTimeout(() => {
}, 500);
});
console.log(bot.entity.position)
bot.navigate.to(pos1);
console.log("Position 1 erreicht")
console.log(bot.entity.position)
}
const navigateToPos2 = () => {
bot.navigate.on('arrived', () => {
setTimeout(() => {
enterPortal();
}, 500);
});
bot.navigate.to(pos2);
console.log(bot.entity.position)
console.log("Position 2 erreicht")
}
const enterPortal = () => {
bot.lookAt(portalPos, true);
console.log("LookAt Portal")
bot.once('spawn', () => {
bot.clearControlStates();
console.log("Bot geht zu seinem Home");
setTimeout(() => {
console.log("....");
bot.chat('/p h');
}, 1500);
});
bot.setControlState('sprint', true);
bot.setControlState('forward', true);
bot.setControlState('jump', true);
console.log("Enter Portal")
}
navigateToPos1();
}, 12000);
});
bot.on('death', function() {
bot.chat("I died x.x");
});
bot.on('chat',function(username,message){achieve.processMessage(message,username,function(err){if(!err)
bot.chat("I "+(!err ? "achieved" : "failed")+" task "+message);});});
bot.navigate.on('pathFound', function (path) {
console.log("found path. I can get there in " + path.length + " moves.");
});
bot.navigate.on('cannotFind', function () {
console.log("unable to find path");
});
bot.on('health', function() {
console.log("I have " + bot.health + " health and " + bot.food + " food");
});
bot.on('kicked', function(reason) {
console.log("I got kicked for", reason, "lol");
});
bot.on('nonSpokenChat', function(message) {
console.log("non spoken chat", message);
});
`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#68?email_source=notifications&email_token=AAR437T62E4UNVI2W4J4X5LQ2MFYLA5CNFSM4J7DF5YKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICSS4UQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437TAKIVRTED5PGS2Y3LQ2MFYLANCNFSM4J7DF5YA>
.
|
have update it a little bit. the full log it on the end navigatePlugin(bot); task.init(bot,vec3,achieve.achieve,achieve.achieveList,achieve.processMessage,mineflayer,async); bot.on('login', function() {
}); bot.on('death', function() { bot.on('chat',function(username,message){achieve.processMessage(message,username,function(err){if(!err) bot.chat("I "+(!err ? "achieved" : "failed")+" task "+message);});}); bot.navigate.on('pathPartFound', (path) => { bot.on('health', function() { bot.on('nonSpokenChat', function(message) { with debug all looks crazy:
i thing always the same. but can mail the rest |
ohh. and where i can donate? real cool projekt i think :) |
Can anybody help me?
This is what my rbot.js looks like. it joins a server. the last message i got is Position 1 erreicht but he never walk anywere he joins the /portal but then do nothing.
`#!/usr/bin/env node
if(process.argv.length<5 || process.argv.length>7)
{
console.log("Usage : rbot [] []");
process.exit(1);
}
var mineflayer = require('mineflayer');
var blockFinderPlugin = require('mineflayer-blockfinder')(mineflayer);
var navigatePlugin = require('mineflayer-navigate')(mineflayer);
var navigate2Plugin = require('./avoidBedrock.js')(mineflayer);
var async=require('async');
var vec3 = require('vec3');
var bot = mineflayer.createBot({
username: process.argv[4],
verbose: true,
version: "1.8.9",
port:parseInt(process.argv[3]),
host:process.argv[2],
password:process.argv[5]
});
navigatePlugin(bot);
navigate2Plugin(bot);
blockFinderPlugin(bot);
var task=require('./task');
var achieve=require('./achieve');
task.init(bot,vec3,achieve.achieve,achieve.achieveList,achieve.processMessage,mineflayer,async);
achieve.init(task.all_task.tasks,task.all_task.giveUser,task.all_task.parameterized_alias,task.all_task.alias,task.all_task.stringTo,bot,vec3,process.argv[6]);
bot.on('login', function() {
console.log("I logged in.");
console.log(bot.entity.position)
console.log("settings", bot.settings);
console.log("game", bot.game);
console.log("Bot is eingeloggt");
console.log("Bot befindet sich im /hub")
bot.chat('/portal');
console.log(bot.entity.position)
console.log("Erfolgreich zum Portal verbunden!");
setTimeout(() => {
const portalPos = vec3(310, 117, 260);
const pos1 = vec3(315, 117, 264);
const pos2 = vec3(308, 117, 260);
const navigateToPos1 = () => {
bot.navigate.on('arrived', () => {
setTimeout(() => {
}, 500);
});
console.log(bot.entity.position)
bot.navigate.to(pos1);
console.log("Position 1 erreicht")
console.log(bot.entity.position)
}
const navigateToPos2 = () => {
bot.navigate.on('arrived', () => {
setTimeout(() => {
enterPortal();
}, 500);
});
bot.navigate.to(pos2);
console.log(bot.entity.position)
console.log("Position 2 erreicht")
}
const enterPortal = () => {
bot.lookAt(portalPos, true);
console.log("LookAt Portal")
bot.once('spawn', () => {
bot.clearControlStates();
console.log("Bot geht zu seinem Home");
setTimeout(() => {
console.log("....");
bot.chat('/p h');
}, 1500);
});
bot.setControlState('sprint', true);
bot.setControlState('forward', true);
bot.setControlState('jump', true);
console.log("Enter Portal")
}
});
bot.on('death', function() {
bot.chat("I died x.x");
});
bot.on('chat',function(username,message){achieve.processMessage(message,username,function(err){if(!err) bot.chat("I "+(!err ? "achieved" : "failed")+" task "+message);});});
bot.navigate.on('pathFound', function (path) {
console.log("found path. I can get there in " + path.length + " moves.");
});
bot.navigate.on('cannotFind', function () {
console.log("unable to find path");
});
bot.on('health', function() {
console.log("I have " + bot.health + " health and " + bot.food + " food");
});
bot.on('kicked', function(reason) {
console.log("I got kicked for", reason, "lol");
});
bot.on('nonSpokenChat', function(message) {
console.log("non spoken chat", message);
});
`
The text was updated successfully, but these errors were encountered: