Replies: 9 comments
-
|
Try using player_auth_input |
Beta Was this translation helpful? Give feedback.
-
const { createClient } = require('bedrock-protocol') const client = createClient({ let runtimeId = null client.on('spawn', () => { client.queue('request_chunk_radius', { client.queue('tick_sync', { client.on('move_player', (p) => { if (p.runtime_entity_id === runtimeId) { } else { client.on('add_player', (p) => { client.on('move_entity', (p) => { client.on('remove_entity', (p) => { setInterval(() => { for (let id in players) { } if (closest) { } }, 500) setInterval(() => { client.queue('player_auth_input', { }, 70) setInterval(() => { client.queue('tick_sync', { }, 1000) i tried and the bot does not receive any any packets or send |
Beta Was this translation helpful? Give feedback.
-
You're still missing values like play_mode, interaction_mode, and more. |
Beta Was this translation helpful? Give feedback.
-
If I have time tomorrow, I can show you an example. |
Beta Was this translation helpful? Give feedback.
-
Yes please ill be thankfull ❤️ (: |
Beta Was this translation helpful? Give feedback.
-
It's actually for version 1.26.0, but I think it should also work with 1.26.10. Let me know if it worked. |
Beta Was this translation helpful? Give feedback.
-
are u sure its working on servers because i tried it with this code and the client still doesn't move const { createClient } = require('bedrock-protocol'); const client = createClient({ let runtimeId = null; client.on('spawn', () => { setInterval(() => { client.queue('player_auth_input', { |
Beta Was this translation helpful? Give feedback.
-
Is the bot also located at x: 0, y: 0, and z: 0? The bot needs its own position to function. |
Beta Was this translation helpful? Give feedback.
-
oh so i need to get bot position all the time, thank u so much for helping |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i was trying to make a bot and make it walk but it didnt work
const { createClient } = require('bedrock-protocol')
const client = createClient({
host: 'aternos',
port: 'port',
username: 'Bot'
})
let runtimeId = null
let pos = null
client.on('spawn', () => {
console.log("Spawned")
setTimeout(() => {
walkForward(5)
}, 3000)
})
client.on('move_player', (p) => {
if (!runtimeId) runtimeId = p.runtime_entity_id
if (p.runtime_entity_id === runtimeId) {
pos = p.position
}
})
function walkForward(steps) {
if (!pos || !runtimeId) return
let i = 0
const interval = setInterval(() => {
i++
pos.x += 0.5
client.queue('move_player', {
runtime_entity_id: runtimeId,
position: {
x: pos.x,
y: pos.y,
z: pos.z
},
pitch: 0,
yaw: 0,
head_yaw: 0,
mode: 0,
on_ground: true
})
if (i >= steps) clearInterval(interval)
}, 400)
}
does anyone know how to make it move?
the version is 26.10 latest
Beta Was this translation helpful? Give feedback.
All reactions