Advertisement
Guest User

farm

a guest
Aug 28th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. function inspect()
  2.  
  3.   local success, data = turtle.inspect()
  4.  
  5.   local out = false
  6.   if success then
  7.  
  8.     print(data.metadata)
  9.    
  10.     if data.metadata == 7 then out  = true end  
  11.  
  12.  
  13.   end
  14.  
  15.   return out
  16.  
  17. end
  18.  
  19.  
  20.  
  21. while true do
  22.  
  23.  
  24.   if inspect() then
  25.  
  26.  
  27.     print("ready")  
  28.     rs.setOutput("back",true)
  29.     sleep(0.4)
  30.     rs.setOutput("back",false)
  31.     --turtle.place()
  32.  
  33.   end
  34.  
  35.   turtle.place()
  36.  
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement