Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local standby = 0
- local tree = 0
- local drop = 0
- local wait = 0
- while turtle.detectDown() do
- while redstone.getInput("back", true) do
- standby = 0
- tree = tree + 1
- drop = drop + 1
- wait = 0
- if wait > 0 then
- print( "Waited "..wait " Seconds In Standby Mode" )
- print( "Starting Lumber Sequence" )
- end
- print( "Chopping Tree Number "..tree )
- while turtle.detect() do
- turtle.dig()
- turtle.forward()
- end
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectUp() and not turtle.detectDown() do
- turtle.down()
- end
- redstone.setOutput("left", false)
- turtle.back()
- turtle.select(1)
- turtle.place(1)
- redstone.setOutput("left", true)
- if drop == 5 then
- print( "Depositing Lumber to Obby Pipe" )
- turtle.turnRight()
- turtle.select(2)
- turtle.drop()
- turtle.turnLeft()
- drop = 0
- end
- end
- while not redstone.getInput("back", true) do
- if standby == 0 then
- print( "Standby Mode" )
- standby = standby + 1
- tree = 0
- else
- wait = wait + 1
- sleep(1)
- end
- end
- end
- while not turtle.detectDown() do
- print( "Place a block under the turtle" )
- end
Advertisement
Add Comment
Please, Sign In to add comment