Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Selects any item in inventory
- --- Returns true if an item is selected, false otherwise
- function trySelectItemAnyFirst()
- for i = 1, 16 do
- if turtle.select(i) then
- return true;
- end
- end
- return false;
- end
- --- Place any item below
- --- Returns true if successfully places and item below
- --- False otherwise
- function tryPlaceAnyDown()
- local b = trySelectItemAnyFirst()
- if not b then
- return false
- end
- return turtle.placeDown()
- end
- os.loadAPI("move")
- move.lineMotionDoWhile(3, tryPlaceAnyDown)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement