SHARE
TWEET

Untitled

a guest Mar 24th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- Selects any item in inventory
  2. --- Returns true if an item is selected, false otherwise
  3. function trySelectItemAnyFirst()
  4.     for i = 1, 16 do
  5.         if turtle.select(i) then
  6.             return true;
  7.         end
  8.     end
  9.     return false;
  10. end
  11.  
  12. --- Place any item below
  13. --- Returns true if successfully places and item below
  14. --- False otherwise
  15. function tryPlaceAnyDown()
  16.     local b = trySelectItemAnyFirst()
  17.     if not b then
  18.         return false
  19.     end
  20.     return turtle.placeDown()
  21. end
  22.  
  23. os.loadAPI("move")
  24. move.lineMotionDoWhile(3, tryPlaceAnyDown)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top