Neopherus

WallE

Apr 26th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. tArgs = {...}
  2. length = tonumber(tArgs[1])
  3. height = tonumber(tArgs[2])
  4.  
  5. function checkInv()
  6. if turtle.getItemCount(1) <1 then
  7. turtle.select(16)
  8. turtle.placeUp()
  9. turtle.select(1)
  10. turtle.suckUp()
  11. turtle.select(16)
  12. turtle.digUp()
  13. turtle.select(1)
  14. end
  15. end
  16.  
  17. function turnaround() -- this function makes it so you can't use this program in enclosed spaces. Works though --
  18. turtle.turnRight()
  19. turtle.turnRight()
  20. turtle.up()
  21. turtle.forward()
  22. end
  23.  
  24. for i=1,height do
  25. checkInv()
  26. for d=1,length do
  27. checkInv()
  28. if turtle.placeDown() then end
  29. if turtle.forward() then end
  30. end
  31. turnaround()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment