Nathan1852

Boden

Mar 25th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. local tArgs = { ... }
  2. if #tArgs ~= 1 then
  3. print( "Usage: Boden <rows>" )
  4. return
  5. end
  6.  
  7. local rows = tonumber( tArgs[1] )
  8.  
  9. function items()
  10. local items = turtle.getItemCount()
  11. if items == 0
  12. turtle.select(2)
  13. end
  14. end
  15.  
  16. function wand()
  17. turtle.digDown()
  18. turtle.placeDown()
  19. turtle.forward()
  20. items()
  21. end
  22.  
  23. function turn()
  24. turtle.turnLeft()
  25. turtle.turnLeft()
  26. for i = 1, 16 do
  27. turtle.forward()
  28. end
  29. turtle.turnLeft()
  30. turtle.forward()
  31. turtle.turnLeft()
  32. end
  33.  
  34. function work()
  35. for i = 1, 16 do
  36. wand()
  37. end
  38. turn()
  39. end
  40.  
  41. for i = 1, rows do
  42. work()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment