View difference between Paste ID: tdznLCNz and UPsp6B5f
SHOW: | | - or go back to the newest paste.
1
-- 1 - obsidian
2
-- 2 - quartz
3
4
shrek1={
5
       {1,1,1,1,1,1},
6
       {2,0,0,0,0,1},
7
       {2,0,0,0,0,0},
8
       {2,0,0,0,0,1},
9
       {1,1,1,1,1,1,},
10
       }
11
12
shrek2={
13
       {2,3,3,3,3,1},
14
       {1,0,0,0,0,3},
15
       {1,0,0,0,0,0},
16
       {1,0,0,0,0,3},
17
       {2,3,3,3,3,1},
18
       }
19
20
shrek3={
21
       {1,0,0,0,0,1},
22
       {4,0,0,0,0,1},
23
       {1,3,3,3,3,1},
24
       {5,0,0,0,0,3},
25
       {1,0,0,0,0,3},
26
       {5,0,0,0,0,3},
27
       {1,3,3,3,3,1},
28
       {4,0,0,0,0,1},
29
       {1,0,0,0,0,1},
30
       }
31
       
32
function buildLine (colors)
33
	for i = 1,#colors do
34
		slot = colors[i]
35
        if slot~=0 then
36
 		  turtle.select(slot)
37
   	 	  turtle.placeDown()
38
        end
39
 		turtle.forward()
40
	end
41
	turtle.turnRight()
42
	turtle.forward()
43
	turtle.turnLeft()
44
	for e = 1,#colors do
45
		turtle.back()
46
	end
47
end
48
49
function buildLayer(image)
50
    for i=1,#image do
51
         line=image[i]
52
         buildLine(line)
53
    end
54
  turtle.turnLeft()
55
 for i=1,#image do
56
    turtle.forward()
57
  end
58
  turtle.turnRight()
59
  turtle.up()
60
end
61
62
63
 buildLayer(shrek1)
64
65
 buildLayer(shrek2)
66
67
turtle.turnLeft()
68
for g=1,2 do
69
  turtle.forward()
70
end
71
turtle.turnRight()
72
73-
buildLayer(shrek3}
73+
buildLayer(shrek3)
74