Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cutTree()
- print("Cutting tree")
- turtle.dig()
- turtle.forward()
- local succes, Block = turtle.inspectUp()
- while(Block.name == "minecraft:log") do
- turtle.digUp()
- turtle.up()
- succes, Block = turtle.inspectUp()
- end
- while(turtle.detectDown() == false) do
- turtle.down()
- end
- turtle.forward()
- turtle.forward()
- end
- function goOver()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.forward()
- end
- function nextLaneLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- end
- function nextLaneRight()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- function collum()
- for i=1, 3, 1 do
- local oke, log = turtle.inspect()
- if(log.name == "minecraft:log") then
- cutTree()
- else
- goOver()
- end
- end
- end
- function patrol()
- turtle.forward()
- collum()
- nextLaneLeft()
- collum()
- nextLaneRight()
- collum()
- end
- patrol()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement