Nessiesson

miningWell

May 16th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Created by CyaNox
  2.  
  3. updateInterval = 0.2
  4. update = os.startTimer(updateInterval)
  5.  
  6. while true do
  7.     local e,p1 = os.pullEvent()
  8.     if e == "timer" then
  9.     if p1 == update then
  10.       if redstone.getInput("back") then
  11.         if turtle.detect() then
  12.           for i=1,16 do
  13.             turtle.select(i)
  14.             turtle.dropUp()
  15.           end
  16.         else
  17.           turtle.select(1)
  18.           turtle.place()
  19.         end
  20.       else
  21.         if turtle.detect() then
  22.           for i=1,16 do
  23.             turtle.select(i)
  24.             turtle.dropUp()
  25.           end
  26.           turtle.select(1)
  27.           turtle.dropUp()
  28.           turtle.dig()
  29.         end
  30.       end
  31.       update = os.startTimer(updateInterval)
  32.     end
  33.   end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment