View difference between Paste ID: W4rAXDyV and bmW5UFWB
SHOW: | | - or go back to the newest paste.
1-
local tArgs = {...}
1+
local x = 8
2-
if #tArgs ~= 3 then
2+
local y = 9
3-
  print("Requires length, width, height")
3+
local z = 4
4-
  return
4+
5
local fuel = turtle.getFuelLevel()
6
local roomSize = x * y * z
7-
local x = tonumber(tArgs[1]) - 1
7+
8-
local y = tonumber(tArgs[2])
8+
9-
local z = tonumber(tArgs[3])
9+
10
    return
11-
if x == nil or y == nil or z == nil then
11+
12-
  print("Invalid dimensions")
12+
13-
  return
13+
14
local direction = true
15
for i = 1, z do
16-
if x < 0 or y < 0 or z < 0 then
16+
17-
  print("Invalid (negative) dimensions")
17+
18-
  return
18+
19
      while not turtle.forward() do turtle.dig() end
20
    end
21
    if j < y then
22
      if direction then
23
        turtle.turnRight()
24
        turtle.dig()
25
        while not turtle.forward() do turtle.dig() end
26
        turtle.turnRight()
27
        direction = false
28
      else
29
        turtle.turnLeft()
30
        turtle.dig()
31
        while not turtle.forward() do turtle.dig() end
32
        turtle.turnLeft()
33
        direction = true
34
      end
35-
      turtle.forward()
35+
36
  end
37
  if i < z then
38
    turtle.digUp()
39
    while not turtle.up() do turtle.digUp() end
40
    turtle.turnRight()
41-
        turtle.forward()
41+
42
  end
43
end