SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local tArgs = { ... }
|
| 1 | + | local tArgs = {}
|
| 2 | - | if #tArgs ~= 1 then |
| 2 | + | tArgs[1] = os.getComputerLabel() |
| 3 | tArgs[1] = "kitty" | |
| 4 | if tArgs[1] == "kitty" then | |
| 5 | print("Usage: mine <master/slave>")
| |
| 6 | return | |
| 7 | end | |
| 8 | turtle.select(16) | |
| 9 | redstone.setOutput("top", true)
| |
| 10 | redstone.setOutput("right", true)
| |
| 11 | if (tArgs[1] == "master") then | |
| 12 | read() | |
| 13 | - | os.sleep(0.7) |
| 13 | + | |
| 14 | for i=1 , 10 do | |
| 15 | turtle.refuel() | |
| 16 | - | os.sleep(0.1) |
| 16 | + | os.sleep(2) |
| 17 | redstone.setOutput("bottom", true)
| |
| 18 | redstone.setOutput("left", true)
| |
| 19 | os.sleep(0.2) | |
| 20 | redstone.setOutput("bottom", false)
| |
| 21 | - | turtle.placeUp() |
| 21 | + | |
| 22 | turtle.dig() | |
| 23 | hey = turtle.forward() | |
| 24 | end | |
| 25 | os.sleep(2) | |
| 26 | end | |
| 27 | else | |
| 28 | while true do | |
| 29 | - | os.sleep(0.1) |
| 29 | + | |
| 30 | if redstone.getInput("top") then
| |
| 31 | redstone.setOutput("bottom", true)
| |
| 32 | redstone.setOutput("left", true)
| |
| 33 | os.sleep(0.2) | |
| 34 | - | turtle.placeUp() |
| 34 | + | |
| 35 | redstone.setOutput("left", false)
| |
| 36 | turtle.dig() | |
| 37 | turtle.forward() | |
| 38 | end | |
| 39 | - | os.sleep(0.1) |
| 39 | + | |
| 40 | redstone.setOutput("bottom", true)
| |
| 41 | redstone.setOutput("left", true)
| |
| 42 | os.sleep(0.2) | |
| 43 | redstone.setOutput("bottom", false)
| |
| 44 | - | turtle.placeUp() |
| 44 | + | |
| 45 | turtle.dig() | |
| 46 | turtle.forward() | |
| 47 | end | |
| 48 | os.queueEvent("randomEvent")
| |
| 49 | os.pullEvent() | |
| 50 | end | |
| 51 | end |