Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = {...}
- length = arg[1]
- width = arg[2]
- slots = 16
- if (length == nil or width == nil) then
- print ("Muss so: Boden <LåA5A4nge> <Breite>")
- return
- end
- function empty()
- if (turtle.getItemCount(slots) == 0) then
- print(string.format("Ich bin leer fåA5BClle neues Material in Slot %d.", slots))
- while (turtle.getItemCount(slots) == 0) do
- sleep(1)
- end
- end
- end
- for i=0,(width - 1),1 do
- for j=1,(length - 1),1 do
- empty()
- turtle.dig()
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- end
- if (i % 2 == 0) then
- if (i ~= width - 1) then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- empty()
- turtle.digDown
- turtle.placeDown()
- end
- else
- if (i ~= width - 1) then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- empty()
- turtle.digDown()
- turtle.placeDown()
- end
- end
- if (j ~= length - 1) then
- empty()
- turtle.digDown()
- turtle.placeDown()
- end
- end
- print("\nFertig.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement