SHOW:
|
|
- or go back to the newest paste.
| 1 | - | -- Welcome to the TurtleBridge program. |
| 1 | + | print( "*******************************" ) |
| 2 | print( "***********WELCOME!************" ) | |
| 3 | print( "*******************************" ) | |
| 4 | print( "********turtle.bridge()********" ) | |
| 5 | print( "**************is***************" ) | |
| 6 | print( "************ACTIVE*************" ) | |
| 7 | print( "***Please read & follow all****" ) | |
| 8 | print( "****instructions closely.******" ) | |
| 9 | print( "*******************************" ) | |
| 10 | print( "Press any key to continue..." ) | |
| 11 | os.pullEvent("char")
| |
| 12 | ||
| 13 | print( "*******************************" ) | |
| 14 | print( "********turtle.bridge**********" ) | |
| 15 | print( "*****is brought to you by******" ) | |
| 16 | print( "******theCountChuckula*********" ) | |
| 17 | print( "*******************************" ) | |
| 18 | print( "Press any key to continue..." ) | |
| 19 | os.pullEvent("char")
| |
| 20 | ||
| 21 | print( "Place 2+ Block-Auto-Re-Filled" ) | |
| 22 | print( "Ender Chests into Slot 1." ) | |
| 23 | print( "Place 2+ Fuel-Auto-Re-Filled" ) | |
| 24 | print( "Ender Chests into Slot 2." ) | |
| 25 | print( "Place 2+ Auto-Sorting" ) | |
| 26 | print( "Ender Chests into Slot 3." ) | |
| 27 | print( "Press any key to continue..." ) | |
| 28 | os.pullEvent("char")
| |
| 29 | ||
| 30 | print( "I mean it. At least 2 of each chest!" ) | |
| 31 | print( "When the turtle places one, it uses the" ) | |
| 32 | print( "extras as a placeholder to prevent errors." ) | |
| 33 | print( "Press any key to continue..." ) | |
| 34 | os.pullEvent("char")
| |
| 35 | ||
| 36 | ||
| 37 | ||
| 38 | local function ascend() | |
| 39 | turtle.digUp() | |
| 40 | turtle.up() | |
| 41 | turtle.select(16) | |
| 42 | turtle.placeDown() | |
| 43 | end | |
| 44 | local function descend() | |
| 45 | turtle.digDown() | |
| 46 | turtle.down() | |
| 47 | end | |
| 48 | local function refuel() | |
| 49 | turtle.select(5) | |
| 50 | turtle.digUp() | |
| 51 | turtle.select(2) | |
| 52 | turtle.placeUp() | |
| 53 | turtle.select(15) | |
| 54 | turtle.suckUp() | |
| 55 | shell.run("refuel all")
| |
| 56 | turtle.select(2) | |
| 57 | turtle.digUp() | |
| 58 | end | |
| 59 | local function restock() | |
| 60 | turtle.select(5) | |
| 61 | turtle.digUp() | |
| 62 | turtle.select(1) | |
| 63 | turtle.placeUp() | |
| 64 | turtle.select(16) | |
| 65 | turtle.suckUp() | |
| 66 | turtle.select(1) | |
| 67 | turtle.digUp() | |
| 68 | end | |
| 69 | ||
| 70 | local function unload() | |
| 71 | turtle.select(5) | |
| 72 | turtle.digUp() | |
| 73 | turtle.select(3) | |
| 74 | turtle.placeUp() | |
| 75 | for s = 4, 14 do | |
| 76 | turtle.select(s) | |
| 77 | turtle.dropUp() | |
| 78 | end | |
| 79 | turtle.select(3) | |
| 80 | turtle.digUp() | |
| 81 | end | |
| 82 | ||
| 83 | local function checks() | |
| 84 | ||
| 85 | if turtle.getFuelLevel() < 140 then | |
| 86 | refuel() | |
| 87 | end | |
| 88 | ||
| 89 | if turtle.getItemCount(16) < 64 then | |
| 90 | restock() | |
| 91 | end | |
| 92 | ||
| 93 | end | |
| 94 | ||
| 95 | local function surface() | |
| 96 | if turtle.getItemCount(16) < 4 then | |
| 97 | checks() | |
| 98 | unload() | |
| 99 | end | |
| 100 | if turtle.getFuelLevel() < 4 then | |
| 101 | checks() | |
| 102 | unload() | |
| 103 | end | |
| 104 | turtle.turnLeft() | |
| 105 | turtle.select(16) | |
| 106 | turtle.dig() | |
| 107 | turtle.place() | |
| 108 | turtle.turnRight() | |
| 109 | turtle.turnRight() | |
| 110 | turtle.select(16) | |
| 111 | turtle.dig() | |
| 112 | turtle.place() | |
| 113 | turtle.turnLeft() | |
| 114 | ascend() | |
| 115 | turtle.digUp() | |
| 116 | turtle.dig() | |
| 117 | turtle.forward() | |
| 118 | end | |
| 119 | ||
| 120 | local function pillar() | |
| 121 | checks() | |
| 122 | unload() | |
| 123 | ||
| 124 | for i = 1, 63 do | |
| 125 | descend() | |
| 126 | end | |
| 127 | ||
| 128 | for i = 1, 62 do | |
| 129 | ascend() | |
| 130 | end | |
| 131 | surface() | |
| 132 | end | |
| 133 | ||
| 134 | local function beginArch() | |
| 135 | ||
| 136 | checks() | |
| 137 | unload() | |
| 138 | ||
| 139 | for i = 1, 10 do | |
| 140 | descend() | |
| 141 | end | |
| 142 | ||
| 143 | for i = 1, 9 do | |
| 144 | ascend() | |
| 145 | end | |
| 146 | surface() | |
| 147 | for i = 1, 8 do | |
| 148 | descend() | |
| 149 | end | |
| 150 | ||
| 151 | for i = 1, 7 do | |
| 152 | ascend() | |
| 153 | end | |
| 154 | surface() | |
| 155 | for i = 1, 5 do | |
| 156 | descend() | |
| 157 | end | |
| 158 | ||
| 159 | for i = 1, 4 do | |
| 160 | ascend() | |
| 161 | end | |
| 162 | surface() | |
| 163 | for i = 1, 3 do | |
| 164 | descend() | |
| 165 | end | |
| 166 | ||
| 167 | for i = 1, 2 do | |
| 168 | ascend() | |
| 169 | end | |
| 170 | surface() | |
| 171 | for i = 1, 2 do | |
| 172 | descend() | |
| 173 | end | |
| 174 | ||
| 175 | for i = 1, 1 do | |
| 176 | ascend() | |
| 177 | end | |
| 178 | surface() | |
| 179 | for i = 1, 2 do | |
| 180 | descend() | |
| 181 | end | |
| 182 | ||
| 183 | for i = 1, 1 do | |
| 184 | ascend() | |
| 185 | end | |
| 186 | surface() | |
| 187 | for i = 1, 1 do | |
| 188 | descend() | |
| 189 | end | |
| 190 | surface() | |
| 191 | for i = 1, 1 do | |
| 192 | descend() | |
| 193 | end | |
| 194 | surface() | |
| 195 | for i = 1, 1 do | |
| 196 | descend() | |
| 197 | end | |
| 198 | surface() | |
| 199 | ||
| 200 | end | |
| 201 | ||
| 202 | local function endArch() | |
| 203 | ||
| 204 | checks() | |
| 205 | unload() | |
| 206 | ||
| 207 | for i = 1, 1 do | |
| 208 | descend() | |
| 209 | end | |
| 210 | surface() | |
| 211 | for i = 1, 1 do | |
| 212 | descend() | |
| 213 | end | |
| 214 | surface() | |
| 215 | for i = 1, 1 do | |
| 216 | descend() | |
| 217 | end | |
| 218 | surface() | |
| 219 | for i = 1, 2 do | |
| 220 | descend() | |
| 221 | end | |
| 222 | ||
| 223 | for i = 1, 1 do | |
| 224 | ascend() | |
| 225 | end | |
| 226 | surface() | |
| 227 | for i = 1, 2 do | |
| 228 | descend() | |
| 229 | end | |
| 230 | ||
| 231 | for i = 1, 1 do | |
| 232 | ascend() | |
| 233 | end | |
| 234 | surface() | |
| 235 | for i = 1, 3 do | |
| 236 | descend() | |
| 237 | end | |
| 238 | ||
| 239 | for i = 1, 2 do | |
| 240 | ascend() | |
| 241 | end | |
| 242 | surface() | |
| 243 | - | -- while true do |
| 243 | + | |
| 244 | - | -- pillar() |
| 244 | + | |
| 245 | - | -- pillar() |
| 245 | + | |
| 246 | - | -- pillar() |
| 246 | + | |
| 247 | - | -- beginArch() |
| 247 | + | |
| 248 | ascend() | |
| 249 | end | |
| 250 | surface() | |
| 251 | - | -- end |
| 251 | + | |
| 252 | descend() | |
| 253 | end | |
| 254 | ||
| 255 | for i = 1, 7 do | |
| 256 | ascend() | |
| 257 | end | |
| 258 | surface() | |
| 259 | for i = 1, 10 do | |
| 260 | descend() | |
| 261 | end | |
| 262 | ||
| 263 | for i = 1, 9 do | |
| 264 | ascend() | |
| 265 | end | |
| 266 | surface() | |
| 267 | ||
| 268 | end | |
| 269 | ||
| 270 | local function path() | |
| 271 | descend() | |
| 272 | for i = 1, 10 do | |
| 273 | surface() | |
| 274 | descend() | |
| 275 | end | |
| 276 | ascend() | |
| 277 | end | |
| 278 | ||
| 279 | while true do | |
| 280 | pillar() | |
| 281 | pillar() | |
| 282 | pillar() | |
| 283 | beginArch() | |
| 284 | path() | |
| 285 | endArch() | |
| 286 | ||
| 287 | end |