SHOW:
|
|
- or go back to the newest paste.
| 1 | -- 0 - air | |
| 2 | -- 1 - black | |
| 3 | -- 2 - red | |
| 4 | ||
| 5 | -- | |
| 6 | ||
| 7 | ||
| 8 | function buildLine(line) | |
| 9 | for element = 1,#line do | |
| 10 | slot = line[element] | |
| 11 | if slot ~= 0 then | |
| 12 | turtle.select(slot) | |
| 13 | turtle.placeDown() | |
| 14 | end | |
| 15 | turtle.forward() | |
| 16 | end | |
| 17 | ||
| 18 | for w = 1,#line do | |
| 19 | turtle.back() | |
| 20 | end | |
| 21 | end | |
| 22 | ||
| 23 | function buildImage(image) | |
| 24 | for stroka = 1,#image do | |
| 25 | buildLine(image[stroka]) | |
| 26 | turtle.turnRight() | |
| 27 | turtle.forward() | |
| 28 | turtle.turnLeft() | |
| 29 | end | |
| 30 | turtle.turnLeft() | |
| 31 | for stroka = 1,#image do | |
| 32 | turtle.forward() | |
| 33 | end | |
| 34 | turtle.turnRight() | |
| 35 | turtle.up() | |
| 36 | end | |
| 37 | art = {
| |
| 38 | {1,2,2,1},
| |
| 39 | {2,0,0,2},
| |
| 40 | {2,0,0,2},
| |
| 41 | {1,2,2,1},
| |
| 42 | } | |
| 43 | ||
| 44 | buildImage(art) | |
| 45 | art2 = {
| |
| 46 | {2,0,0,2},
| |
| 47 | {0,0,0,0},
| |
| 48 | {0,0,0,0},
| |
| 49 | {2,0,0,2},
| |
| 50 | } | |
| 51 | buildImage(art2) | |
| 52 | art2 = {
| |
| 53 | {2,0,0,2},
| |
| 54 | {0,0,0,0},
| |
| 55 | {0,0,0,0},
| |
| 56 | {2,0,0,2},
| |
| 57 | } | |
| 58 | buildImage(art2) | |
| 59 | art = {
| |
| 60 | {1,2,2,1},
| |
| 61 | {2,0,0,2},
| |
| 62 | {2,0,0,2},
| |
| 63 | {1,2,2,1},
| |
| 64 | } | |
| 65 | buildImage(art) | |
| 66 | ||
| 67 | buildImage(art) | |
| 68 | buildImage(art2) | |
| 69 | buildImage(art2) | |
| 70 | buildImage(art) | |
| 71 | ||
| 72 | buildImage(art) | |
| 73 | buildImage(art2) | |
| 74 | buildImage(art2) | |
| 75 | buildImage(art) | |
| 76 | ||
| 77 | - | for i = 1, 2 do |
| 77 | + | |
| 78 | - | turtle.forward() |
| 78 | + | turtle.turnRight() |
| 79 | ||
| 80 | for i = 1, 10 do | |
| 81 | turtle.forward() | |
| 82 | - | for q = 1 |
| 82 | + | |
| 83 | turtle.turnLeft() | |
| 84 | for q = 1, 12 do | |
| 85 | turtle.Down() | |
| 86 | end | |
| 87 | ||
| 88 | buildImage(art) | |
| 89 | buildImage(art2) | |
| 90 | buildImage(art2) | |
| 91 | buildImage(art) | |
| 92 | ||
| 93 | buildImage(art) | |
| 94 | buildImage(art2) | |
| 95 | buildImage(art2) | |
| 96 | buildImage(art) | |
| 97 | ||
| 98 | buildImage(art) | |
| 99 | buildImage(art2) | |
| 100 | buildImage(art2) | |
| 101 | buildImage(art) | |
| 102 | ||
| 103 | for i = 1, 10 do | |
| 104 | turtle.forward() | |
| 105 | end | |
| 106 | turtle.turnLeft() | |
| 107 | for q = 1, 12 do | |
| 108 | turtle.Down() | |
| 109 | end | |
| 110 | ||
| 111 | buildImage(art) | |
| 112 | buildImage(art2) | |
| 113 | buildImage(art2) | |
| 114 | buildImage(art) | |
| 115 | ||
| 116 | buildImage(art) | |
| 117 | buildImage(art2) | |
| 118 | buildImage(art2) | |
| 119 | buildImage(art) | |
| 120 | ||
| 121 | buildImage(art) | |
| 122 | buildImage(art2) | |
| 123 | buildImage(art2) | |
| 124 | buildImage(art) | |
| 125 | ||
| 126 | for i = 1, 10 do | |
| 127 | turtle.forward() | |
| 128 | end | |
| 129 | turtle.turnLeft() | |
| 130 | for q = 1, 12 do | |
| 131 | turtle.Down() | |
| 132 | end | |
| 133 | ||
| 134 | buildImage(art) | |
| 135 | buildImage(art2) | |
| 136 | buildImage(art2) | |
| 137 | buildImage(art) | |
| 138 | ||
| 139 | buildImage(art) | |
| 140 | buildImage(art2) | |
| 141 | buildImage(art2) | |
| 142 | buildImage(art) | |
| 143 | ||
| 144 | buildImage(art) | |
| 145 | buildImage(art2) | |
| 146 | buildImage(art2) | |
| 147 | buildImage(art) | |
| 148 | ||
| 149 | for i = 1, 10 do | |
| 150 | turtle.forward() | |
| 151 | end | |
| 152 | turtle.turnLeft() | |
| 153 | ||
| 154 |