Advertisement
hiphopcanine

Computercraft Basic StairDown Program

Jan 17th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. print("Building Stairs...")
  2. turtle.forward()
  3. turtle.select(1)
  4. count=1
  5. for inv=1,9 do
  6.   while turtle.getItemCount(inv) > 0 and not (turtle.detectDown()) do
  7.     turtle.placeDown()
  8.     turtle.forward()
  9.     turtle.down()
  10.     count=count+1
  11.   end
  12. end
  13.  
  14. for i=1,(count-1) do
  15.   turtle.up()
  16.   turtle.back()
  17. end
  18.  
  19. turtle.back()
  20. print("Finished")
  21. print("Placed ",count," blocks")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement