Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local y = 0
- local x = 0
- local z = 0
- local i = 0
- local a = 0
- local groesseX = 10
- local groesseY = 10
- local groesseZ = 30
- local richtung = false
- function fGRABEN()
- if turtle.detect()==true then
- turtle.dig()
- end
- turtle.forward()
- end
- function fSEITE()
- if richtung==true then
- turtle.turnRight()
- fGRABEN()
- turtle.turnRight()
- richtung = false
- else
- turtle.turnLeft()
- fGRABEN()
- turtle.turnLeft()
- richtung = true
- end
- y = y + 1
- end
- fKOHLE()
- if turtle.getFuelLevel()<=y + x + z then
- fBACK()
- else
- if fSTOCK() == true then
- fBACK()
- end
- end
- end
- function fSTOCK()
- for i=1,16 do
- if turtle.getItemCount(i)==0 then
- a = a + 1
- end
- end
- if a <= 11 then
- return true
- end
- end
- function fBACK()
- turtle.turnLeft()
- for b=1,y-1 do
- turtle.forward()
- end
- turtle.turnLeft()
- for b=1, 16 do
- turtle.select(b)
- turtle.drop()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(1)
- turtle.suck(64)
- turtle.turnRight()
- turtle.turnRight()
- for f=1,y do
- turtle.forward()
- end
- end
- function fMAIN()
- for j=1, groesseX do
- for i=1,groesseY do
- fGRABEN()
- end
- fSEITE()
- if y == 2 then
- y = 0
- fKOHLE()
- end
- x = x + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement