Guest User

startup

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