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(SixDirection.Forward, 2)
    agent.setAssist(AgentAssist.PlaceOnMove, true)
    agent.setAssist(AgentAssist.DestroyObstacles, true)
    agent.setItem(blocks.block(Block.Sandstone), 40, 1)
    for (let i = 0; i < 10; i++) {
        for (let i = 0; i < 4; i++) {
            agent.move(SixDirection.Forward, 4)
            agent.turn(TurnDirection.Left)
        }
        agent.move(SixDirection.Up, 1)
    }
})