Nessiesson

Untitled

May 16th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Created by CyaNox
  2.  
  3. digtime = 60
  4. recovertime = 5
  5.  
  6. while true do
  7.   if redstone.getInput("top") then
  8.     -- dig first
  9.     rs.setOutput("left", true)
  10.     sleep(digtime)
  11.     -- stop digging and recover miners
  12.     rs.setOutput("left", false)
  13.     sleep(recovertime)
  14.     -- Move frame machine
  15.     rs.setOutput("right", true)
  16.     sleep(0.4)
  17.     rs.setOutput("right", false)
  18.     sleep(0.8)
  19.     -- Check if still on and enable digging if so
  20.     if rs.getInput("top") then
  21.       rs.setOutput("left", true)
  22.     end
  23.     -- Inchworm second motor
  24.     rs.setOutput("back", true)
  25.     sleep(0.4)
  26.     rs.setOutput("back", false)
  27.     sleep(0.4)
  28.   end
  29.   sleep(0.4)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment