SHOW:
|
|
- or go back to the newest paste.
1 | function iff (z) | |
2 | - | if a[z]==1 then |
2 | + | if a[z]==1 then |
3 | - | turtle.select(1) |
3 | + | turtle.select(1) |
4 | - | elseif a[z]==2 then |
4 | + | elseif a[z]==2 then |
5 | - | turtle.select(2) |
5 | + | turtle.select(2) |
6 | - | elseif a[z]==3 then |
6 | + | elseif a[z]==3 then |
7 | - | turtle.select(3) |
7 | + | turtle.select(3) |
8 | - | elseif a[z]==4 then |
8 | + | elseif a[z]==4 then |
9 | - | turtle.select(4) |
9 | + | turtle.select(4) |
10 | - | elseif a[z]==5 then |
10 | + | elseif a[z]==5 then |
11 | - | turtle.select(5) |
11 | + | turtle.select(5) |
12 | - | elseif a[z]==6 then |
12 | + | elseif a[z]==6 then |
13 | - | turtle.select(6) |
13 | + | turtle.select(6) |
14 | end | |
15 | end | |
16 | ||
17 | a={1,1,1,1,1,2,1,1,1,1,1 , | |
18 | 1,1,1,1,2,2,2,1,1,1,1 , | |
19 | 1,1,1,3,3,3,3,3,1,1,1 , | |
20 | 1,1,4,4,4,4,4,4,4,1,1} | |
21 | ||
22 | ||
23 | z=0 | |
24 | ||
25 | - | for y = 1,11 do |
25 | + | |
26 | - | z=z+1 |
26 | + | |
27 | - | iff(z) |
27 | + | |
28 | - | turtle.placeDown() |
28 | + | for y = 1,11 do |
29 | - | turtle.forward() |
29 | + | z=z+1 |
30 | iff(z) | |
31 | - | turtle.turnRight() |
31 | + | turtle.placeDown() |
32 | - | turtle.forward() |
32 | + | turtle.forward() |
33 | - | turtle.turnRight() |
33 | + | end |
34 | - | turtle.forward() |
34 | + | turtle.turnRight() |
35 | - | for y = 1,11 do |
35 | + | turtle.forward() |
36 | - | z=z+1 |
36 | + | turtle.turnRight() |
37 | - | iff(z) |
37 | + | turtle.forward() |
38 | - | turtle.placeDown() |
38 | + | for y = 1,11 do |
39 | - | turtle.forward() |
39 | + | z=z+1 |
40 | iff(z) | |
41 | - | turtle.turnLeft() |
41 | + | turtle.placeDown() |
42 | - | turtle.forward() |
42 | + | turtle.forward() |
43 | - | turtle.turnLeft() |
43 | + | end |
44 | - | turtle.forward() |
44 | + | turtle.turnLeft() |
45 | turtle.forward() | |
46 | turtle.turnLeft() | |
47 | turtle.forward() | |
48 | end |