Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iBaum = 0
- iOben = 0
- iLinks = 0
- iRechts = 0
- iVorne = 0
- iHinten = 0
- aktiv=true
- function kiste()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- for i=2,16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- end
- function zurueck()
- iBaum = iBaum + 1
- for i=1,iOben do
- turtle.down()
- end
- turtle.back()
- write("Baum: ")
- print(iBaum)
- turtle.suck()
- turtle.down()
- turtle.suckDown()
- turtle.up()
- turtle.select(1)
- turtle.place()
- aktiv=false
- testen()
- aktiv=true
- end
- function check()
- local success, t = turtle.inspectUp()
- if t.name == "minecraft:log" then
- turtle.digUp()
- turtle.up()
- iOben = iOben + 1
- else
- turtle.turnLeft()
- local success, t = turtle.inspect()
- if t.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- iLinks = iLinks + 1
- else
- turtle.turnLeft()
- local success, t = turtle.inspect()
- if t.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- iVorne = iVorne + 1
- else
- turtle.turnLeft()
- local success, t = turtle.inspect()
- if t.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- iRechts = iRechts + 1
- else
- turtle.turnLeft()
- local success, t = turtle.inspect()
- if t.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- iHinten = iHinten + 1
- else
- local success, t = turtle.inspectDown()
- if t.name == "minecraft:log" then
- turtle.digDown()
- turtle.down()
- iOben = iOben - 1
- else
- zurueck()
- end
- end
- end
- end
- end
- end
- end
- function testen()
- if turtle.getFuelLevel() < 20 then
- turtle.select(1)
- turtle.refuel()
- end
- turtle.select(16)
- local iAnzahl = turtle.getItemCount()
- if iAnzahl > 0 then
- kiste()
- turtle.select(1)
- end
- local success, t = turtle.inspect()
- if t.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- else
- sleep(2)
- testen()
- end
- end
- testen()
- while aktiv==true do
- check()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement