SHOW:
|
|
- or go back to the newest paste.
| 1 | - | -- GRIEF PROGRAM |
| 1 | + | tSides = {"left","right","bottom","top","front","back"}
|
| 2 | - | -- by Taking1n1 |
| 2 | + | |
| 3 | while true do | |
| 4 | - | -- // Slot definitions \\ |
| 4 | + | if rs.getInput("front") == true then
|
| 5 | - | -- 1: TNT blocks |
| 5 | + | |
| 6 | - | -- 2: Redstone |
| 6 | + | redstone.setOutput("top", true)
|
| 7 | - | -- 3: Any block, only used if there are holes |
| 7 | + | redstone.setOutput("bottom", true)
|
| 8 | redstone.setOutput("left", true)
| |
| 9 | - | -- Goes forward and finds the building |
| 9 | + | redstone.setOutput("right", true)
|
| 10 | - | steps = 0 |
| 10 | + | redstone.setOutput("back", true)
|
| 11 | - | goDown = 0 |
| 11 | + | |
| 12 | local side = peripheral.find("monitor")
| |
| 13 | - | |
| 13 | + | |
| 14 | - | turtle.forward() |
| 14 | + | for i = 1, #tSides do |
| 15 | - | steps = steps + 1 |
| 15 | + | monitor = peripheral.wrap(tSides[i]) |
| 16 | - | |
| 16 | + | if monitor then |
| 17 | - | if not turtle.detectDown() then -- If there are no blocks below |
| 17 | + | shell.run("monitor", tSides[i], "movie-code")
|
| 18 | - | turtle.select(3) |
| 18 | + | end |
| 19 | - | turtle.placeDown() |
| 19 | + | |
| 20 | - | turtle.select(1) |
| 20 | + | else |
| 21 | - | end |
| 21 | + | redstone.setOutput("top", false)
|
| 22 | - | |
| 22 | + | redstone.setOutput("bottom", false)
|
| 23 | - | if turtle.detect() then |
| 23 | + | redstone.setOutput("left", false)
|
| 24 | - | break |
| 24 | + | redstone.setOutput("right", false)
|
| 25 | - | end |
| 25 | + | redstone.setOutput("back", false)
|
| 26 | - | |
| 26 | + | |
| 27 | sleep(0.25) | |
| 28 | end |