SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function iff (x,y) |
| 1 | + | function iff (x,y,z) |
| 2 | - | if a[x][y]==1 then |
| 2 | + | if a[x][y][z]==1 then |
| 3 | - | turtle.select(1) |
| 3 | + | turtle.select(1) |
| 4 | - | elseif a[x][y][z]==2 then |
| 4 | + | elseif a[x][y][z]==2 then |
| 5 | - | turtle.select(2) |
| 5 | + | turtle.select(2) |
| 6 | - | elseif a[x][y][z]==3 then |
| 6 | + | elseif a[x][y][z]==3 then |
| 7 | - | turtle.select(3) |
| 7 | + | turtle.select(3) |
| 8 | - | elseif a[x][y][z]==4 then |
| 8 | + | elseif a[x][y][z]==4 then |
| 9 | - | turtle.select(4) |
| 9 | + | turtle.select(4) |
| 10 | - | elseif a[x][y][z]==5 then |
| 10 | + | elseif a[x][y][z]==5 then |
| 11 | - | turtle.select(5) |
| 11 | + | turtle.select(5) |
| 12 | - | elseif a[x][y][z]==6 then |
| 12 | + | elseif a[x][y][z]==6 then |
| 13 | - | turtle.select(6) |
| 13 | + | turtle.select(6) |
| 14 | - | elseif a[x][y][z]==0 then |
| 14 | + | elseif a[x][y][z]==0 then |
| 15 | - | turtle.select(16) |
| 15 | + | turtle.select(16) |
| 16 | end | |
| 17 | end | |
| 18 | ||
| 19 | a = {
| |
| 20 | {
| |
| 21 | {1, 2, 2, 1},
| |
| 22 | {2, 0, 0, 2},
| |
| 23 | {2, 0, 0, 2},
| |
| 24 | {1, 2, 2, 1}
| |
| 25 | }, | |
| 26 | {
| |
| 27 | {2, 0, 0, 2},
| |
| 28 | {0, 0, 0, 0},
| |
| 29 | {0, 0, 0, 0},
| |
| 30 | {2, 0, 0, 2}
| |
| 31 | }, | |
| 32 | {
| |
| 33 | {2, 0, 0, 2},
| |
| 34 | {0, 0, 0, 0},
| |
| 35 | {0, 0, 0, 0},
| |
| 36 | {2, 0, 0, 2}
| |
| 37 | }, | |
| 38 | {
| |
| 39 | {1, 2, 2, 1},
| |
| 40 | {2, 0, 0, 2},
| |
| 41 | {2, 0, 0, 2},
| |
| 42 | {1, 2, 2, 1}
| |
| 43 | }, | |
| 44 | } | |
| 45 | ||
| 46 | ||
| 47 | ||
| 48 | ||
| 49 | for x=1,#a do | |
| 50 | turtle.up() | |
| 51 | - | turtle.up() |
| 51 | + | |
| 52 | for z = 1,#a[x][y] do | |
| 53 | iff(x,y,z) | |
| 54 | turtle.placeDown() | |
| 55 | - | iff(x,y) |
| 55 | + | |
| 56 | end | |
| 57 | for z = 1,#a[x][y] do | |
| 58 | turtle.back() | |
| 59 | - | turtle.turnRight() |
| 59 | + | |
| 60 | - | turtle.forward() |
| 60 | + | turtle.turnRight() |
| 61 | - | turtle.turnRight() |
| 61 | + | turtle.forward() |
| 62 | - | for y = 1,11 do |
| 62 | + | turtle.turnLeft() |
| 63 | end | |
| 64 | turtle.turnLeft() | |
| 65 | - | turtle.turnRight() |
| 65 | + | for y = 1,#a[x] do |
| 66 | - | turtle.turnRight() |
| 66 | + | turtle.forward() |
| 67 | end | |
| 68 | turtle.turnRight() | |
| 69 | end |