Advertisement
MinoCraft72

Dirt Breaker

Sep 15th, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Config:
  2.  
  3.  -- Redstone:
  4. barrelUp = "back" -- Barrel with MFR Dirt
  5. barrelDown = "left" -- Barrel with Vanilla Dirt
  6.  -- Slot Turtle:
  7. importSlot = 1
  8. exportSlot = 16
  9.  
  10. -- Prog:
  11.  
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. print("Dirt Breaker")
  15.  
  16.    while true do
  17.     sleep(1)
  18.      
  19.      if rs.getInput(barrelUp) and not rs.getInput(barrelDown) then    
  20.       changeID = true
  21.      elseif not rs.getInput(barrelUp) then
  22.       changeID = false
  23.      elseif rs.getInput(barrelDown) then
  24.       changeID = false
  25.      end
  26.        
  27.        while changeID do
  28.         term.setCursorPos(1,3)
  29.         term.clearLine()
  30.         print("Work: ON")
  31.         turtle.select(importSlot)
  32.         turtle.suckUp(1)
  33.      if turtle.getItemCount(importSlot) == 0 then -- Security
  34.           changeID = false
  35.          end
  36.         turtle.place()
  37.         turtle.select(exportSlot)
  38.         turtle.dig()
  39.         turtle.dropDown()
  40.        end
  41.      term.setCursorPos(1,3)
  42.      term.clearLine()
  43.      print("Work: OFF")
  44.    end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement