Advertisement
thatparadox

grandInspector

Sep 27th, 2014
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. -- Video of it in action: https://www.youtube.com/watch?v=kTzkTcCTVZg&list=PL9XabkF_A5YhxWelwj2yzjcegL9E0WLw6
  2.  
  3. p1, p2 = turtle.inspectDown()
  4.  
  5. for k, v in pairs(p2) do
  6. print("k: "..k.." v: "..v)
  7. if k == "metadata" then
  8.   if v == 7 then
  9.     turtle.drop()
  10.   end
  11. end
  12. end
  13.  
  14. sleep(6)
  15.  
  16. while true do
  17.   p1, p2 = turtle.inspectDown()
  18.   for k,v in pairs(p2) do
  19.     if k == "metadata" then
  20.       term.clear()
  21.       term.setCursorPos(1,1)
  22.       print(v)
  23.     end
  24.     if v == 0 then
  25.       turtle.suck()
  26.     end
  27.   end
  28.   sleep(1)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement