Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local x = tonumber(tArgs[1]) - 1
- local y = tonumber(tArgs[2])
- local z = tonumber(tArgs[3])
- local roomSize = x * y * z
- local direction = true
- for i = 1, z do
- for j = 1, y do
- for k = 1, x do
- turtle.dig()
- turtle.forward()
- end
- if j < y then
- if direction then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- direction = false
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- direction = true
- end
- end
- end
- if i < z then
- turtle.digUp()
- turtle.up()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- if y % 2 == 0 then
- turtle.turnRight()
- for i = 1, y do
- turtle.forward()
- end
- turtle.turnRight()
- else
- turtle.turnLeft()
- for i = 1, y do
- turtle.forward()
- end
- turtle.turnLeft()
- for i = 1, x do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- for i = 1, z do
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement