Advertisement
Einer

cover

Dec 23rd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local args = {...}
  2. local x = args[1]
  3. local y = args[2]
  4. local slot = 1
  5.  
  6. function line()
  7. for i=1, y do
  8. turtle.placeDown()
  9. turtle.forward()
  10. checkblocks()
  11. end
  12. end
  13.  
  14.  
  15. function checkblocks()
  16. if turtle.getItemCount(slot) < 1 then
  17. slot = slot+1
  18. turtle.select(slot)
  19. end
  20. end
  21.  
  22. function cover()
  23. for j=1,math.floor(x/2) do
  24. line()
  25. turtle.turnRight()
  26. turtle.forward()
  27. turtle.turnRight()
  28. turtle.forward()
  29. line()
  30. turtle.turnLeft()
  31. turtle.forward()
  32. turtle.turnLeft()
  33. turtle.forward()
  34. end
  35. end
  36.  
  37. x = args[1]
  38. y = args[2]
  39. slot = 1
  40. cover()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement