Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = { ... }
- local surface
- local side
- if args[1] and args[2] then
- surface = args[1]
- side = args[2]
- if math.mod(side,2) == 0 then
- side = side + 1
- end
- else
- print("You must pass two args the surface y level and the dimension of the mined area")
- return nil
- end
- for i=1,surface - 3,1 do
- for x=1,side,1 do
- for y=1,side,1 do
- turtle.digDown()
- turtle.dig()
- if y<tonumber(side) then
- turtle.forward()
- end
- end
- if x<tonumber(side) then
- if math.mod(x,2) == 0 then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- else
- turtle.down()
- turtle.turnRight()
- for j=1,side-1,1 do
- turtle.forward()
- end
- turtle.turnRight()
- for j=1,side-1,1 do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
- for i=1,surface-3,1 do
- turtle.up()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement