Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function cutTree()
- local lim=0;
- local moveRight=true;
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp();turtle.dig();turtle.up();
- lim=lim+1
- end
- turtle.turnRight();turtle.dig();turtle.forward();turtle.turnLeft()
- while lim>0 do
- turtle.digDown();turtle.dig();turtle.down();
- lim=lim-1;
- end
- turtle.dig()
- end
- local function plantTree()
- turtle.forward()
- turtle.select(1)
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.back()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.back()
- turtle.turnLeft()
- turtle.down()
- end
- local sel=0;
- --print("1 plant 2 cut")
- --sel= tonumber(read())
- while turtle.getItemCount(1)>4 do
- plantTree()
- turtle.select(1)
- turtle.up()
- while not turtle.detect() do
- --if(turtle.getItemCount(1)<32) then
- --turtle.turnRight();turtle.suck();turtle.turnRight();turtle.suck();
- --turtle.turnRight();turtle.suck();turtle.turnRight();turtle.suck();
- --else
- sleep(5)
- --end
- end
- turtle.down()
- cutTree()
- turtle.back();turtle.turnRight();turtle.back();turtle.turnLeft()
- for i=2,16 do turtle.select(i);turtle.dropDown(); end
- turtle.select(1)
- end
- --cutTree()
Advertisement
Add Comment
Please, Sign In to add comment