Advertisement
rhills

Untitled

Sep 2nd, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local args={ ... }
  2. local row = 0
  3. local col = 0
  4. local rows = tonumber(args[1])
  5. local columns = tonumber(args[2])
  6. local selected = 14
  7. local start = "start"
  8. local direction = "right"
  9. while row < rows do
  10. if start == "start" then
  11. turtle.forward()
  12. start = "homer"
  13. end
  14. while turtle.getItemCount(selected) == 0 do
  15. selected=selected-1
  16. turtle.select(selected)
  17. if(selected == 1) then
  18. print("no floor blocks dude")
  19. break
  20. end
  21. end
  22. turtle.placeDown()
  23. col=col+1
  24. if col == columns then
  25. col=0
  26. row=row+1
  27. if direction == "right" then
  28. turtle.turnRight()
  29. turtle.forward()
  30. turtle.turnRight()
  31. direction = "left"
  32. elseif direction == "left" then
  33. turtle.turnLeft()
  34. turtle.forward()
  35. turtle.turnLeft()
  36. direction = "right"
  37. end
  38. end
  39. if col == 0 then
  40. col=0
  41. else
  42. turtle.forward()
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement