Advertisement
hiphopcanine

Computercraft Basic Bridge Program

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