Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turnaround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function droppo()
- c = c + 1
- turtle.select(c)
- turtle.drop(64)
- end
- c = 3
- count = 0
- print( "How many trees should the turtle fell before clearing inventory?" )
- a = tonumber(read())
- print( "Felling trees..." )
- for i=1,1000 do
- for i=1,a do
- turtle.select(2)
- while(turtle.compare()==false) do
- turtle.select(3)
- turtle.place()
- turtle.select(2)
- end
- turtle.digUp()
- turtle.up()
- while(turtle.compare()==true) do
- turtle.digUp()
- turtle.dig()
- turtle.up()
- end
- while(turtle.detect()==false) do
- turtle.down()
- end
- turtle.down()
- turtle.select(2)
- turtle.refuel(1)
- turtle.select(1)
- turtle.suckDown()
- turtle.up()
- turtle.dig()
- turtle.place()
- count = count + 1
- turtle.up()
- print( "Felled and replanted tree number "..count.." " )
- end
- turnaround()
- for i=1,4 do
- turtle.forward()
- end
- turtle.select(2)
- turtle.drop(64)
- for i=1,13 do
- droppo()
- end
- c = 3
- turtle.select(2)
- turtle.suck(1)
- turtle.up()
- turtle.select(3)
- turtle.drop(64)
- turtle.suck(64)
- turtle.down()
- turtle.select(1)
- turnaround()
- for i=1,4 do
- turtle.forward()
- end
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement