Agent Tower

Agent builds a tower

The agent will build a tower, row by row.

Try the code:

player.onChat("tower", function () {
    agent.teleportToPlayer()
    agent.move(FORWARD, 5)
    agent.setSlot(1)
    agent.setAssist(PLACE_ON_MOVE, true)
    agent.setAssist(DESTROY_OBSTACLES, true)
    for (let i = 0; i < 10; i++) {
        for (let i = 0; i < 4; i++) {
            agent.setItem(SANDSTONE, 16, 1)
            agent.move(FORWARD, 4)
            agent.turn(LEFT_TURN)
        }
        agent.move(UP, 1)
    }
})