Multi Bot an image

This example will show you how to use multiple bots to bot an image

const { World, PixelPlace, Auth } = require("pixelplacejs")

const CANVAS_ID = 7;

let accounts = [
    new Auth(null, {
        authId: "", //Fill these values
        authKey: "",
        authToken: ""
    }), 
    new Auth(null, {
        authId: "", //Fill these values
        authKey: "",
        authToken: ""
    })
]

let world = new World(CANVAS_ID);
await world.Init();
console.log("World is ready!")

let pp = new PixelPlace(accounts, world, CANVAS_ID);
await pp.Init();
console.log("PP is ready!")

let [x, y] = [1336, 1839];
let imageWidth = 200; //If 0, the original width will be used.
let protect = true;
await pp.render.drawImage({x, y}, "test.png", imageWidth, protect);

Last updated

Was this helpful?