Budman17r

Untitled

Jan 4th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. x = 0
  2. i = 1
  3. turtle.up()
  4. function inventory()
  5. if turtle.getItemCount(i) == 0 then
  6. i = i+1
  7. turtle.select(i)
  8. end
  9.  
  10. function layBrick()
  11. while turtle.detect() == false do
  12. inventory()
  13.  
  14. turtle.placeDown()
  15. turtle.forward()
  16. x = x+1
  17. if turtle.detect() == true then
  18. turtle.turnRight()
  19. turtle.forward()
  20. turtle.turnRight()
  21.  
  22. while x > 0 do
  23. inventory()
  24.  
  25. turtle.placeDown()
  26. turtle.forward()
  27. x = x-1
  28. if x == 0 then
  29. inventory()
  30. turtle.turnLeft()
  31. turtle.forward()
  32. turtle.turnLeft()
  33. end
  34. end
  35. end
  36. end
  37. end
  38. for y=0,2 do
  39. layBrick()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment