asweigart

stairbuilder

Aug 1st, 2016
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. -- Stair Builder program
  2. -- By Al Sweigart
  3. -- Builds stairs. Use with stair miner.
  4.  
  5. os.loadAPI('hare')
  6.  
  7. while turtle.detect() do
  8. turtle.up()
  9. if not hare.selectItem('stairs') then
  10. print('Need more stairs. Stopping.')
  11. return
  12. end
  13. turtle.placeDown()
  14. if not turtle.forward() then
  15. print('Hit wall. Stopping.')
  16. return
  17. end
  18. end
  19.  
  20. print('Reached end of incline. Stopping.')
Advertisement
Add Comment
Please, Sign In to add comment