Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cutTree()
- height=0
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- height = height+1
- end
- for i=1, height do
- turtle.down()
- end
- end
- function shiftLeft()
- turtle.forward()
- turtle.turnLeft()
- for i=1, 6 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- function shiftRight()
- turtle.forward()
- turtle.turnRight()
- for i=1, 6 do
- turtle.forward()
- end
- turtle.turnRight()
- end
- function returnHome()
- for i=1, 5 do
- turtle.forward()
- end
- turtle.turnLeft()
- for i=1, 18 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- function dropGoods()
- turtle.turnRight()
- turtle.turnRight()
- for i=1, 14 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- --Main
- for i=1, 4 do --Staring position
- turtle.forward()
- end
- for i=1, 4 do --row 1
- cutTree()
- for j=1, 5 do
- turtle.forward()
- end
- end
- cutTree()
- shiftLeft()
- for i=1, 4 do --row 2
- cutTree()
- for j=1, 5 do
- turtle.forward()
- end
- end
- cutTree()
- shiftRight()
- for i=1, 4 do --row 3
- cutTree()
- for j=1, 5 do
- turtle.forward()
- end
- end
- cutTree()
- shiftLeft()
- for i=1, 4 do --row 4
- cutTree()
- for j=1, 5 do
- turtle.forward()
- end
- end
- cutTree()
- returnHome() --Return to Starting Position
- dropGoods() --Place items in Chest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement