Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function start()
- if turtle.getItemCount(2) < 1 then
- print("Bitte mindestens einen Baumstamm in Slot 2 legen und [Enter] druecken.")
- io.read()
- end
- turtle.select(1)
- if turtle.getItemCount(1) < 5 then
- print("Es werden mindestens 5 Saplings in Slot eins benötigt, bitte nachfüllen und [Enter] druecken.")
- end
- for i = 1, 4 do
- turtle.place()
- turtle.turnRight()
- end
- end
- local function wait()
- turtle.select(2)
- while not turtle.compare() do
- turtle.turnRight()
- turtle.select(1)
- turtle.suck()
- turtle.select(2)
- sleep(1)
- end
- end
- local function fell()
- turtle.select(2)
- local height = 0
- while turtle.compare() do
- turtle.dig()
- turtle.digUp()
- if turtle.up() then
- height = height+1
- end
- end
- for i = height, 0, -1 do
- turtle.digDown()
- turtle.down()
- end
- end
- local function drop()
- turtle.down()
- turtle.down()
- turtle.select(2)
- turtle.dropDown(turtle.getItemCount(2)-1)
- for i = 3, 16, 1 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.up()
- turtle.select(1)
- turtle.suckDown()
- turtle.up()
- if turtle.getItemCount(1) <2 then
- print("Zu wenige Saplings in Slot 1, bitte auf mindestens 2 auffuellen und [Enter] druecken.")
- io.read()
- end
- turtle.place()
- end
- ---------------------------
- start()
- while true do
- wait()
- fell()
- drop()
- end
Advertisement
Add Comment
Please, Sign In to add comment