Guest User

startup

a guest
Apr 7th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. while true do
  2.   event = os.pullEvent()
  3.   if(event == "redstone") then
  4.     on = redstone.getInput("back")
  5.   else
  6.     on = false
  7.   end
  8.  
  9.   if(on==true) then
  10.     turtle.select(16)
  11.     turtle.dropDown()
  12.     turtle.dig()
  13.   else
  14.     placed = turtle.detect()
  15.     if (placed==false) then
  16.       turtle.select(16)
  17.       turtle.place()
  18.     end
  19.     for i=1,15 do
  20.       turtle.select(i)
  21.       turtle.dropDown()
  22.     end
  23.     sleep(5)
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment