Wassaa

Wass

Jan 10th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. local tArgs = {...}
  2. local height = tonumber(tArgs[1])
  3. local length = tonumber(tArgs[2])
  4. local up = true
  5. local slot = 1
  6.  
  7. turtle.select(slot)
  8.  
  9. for j = 1, length, 1 do
  10. for i = 1,height,1 do
  11.  
  12. if turtle.getItemCount(slot) == 0 then
  13. slot = slot + 1
  14. turtle.select(slot)
  15. turtle.place()
  16. else
  17. turtle.place()
  18. end
  19.  
  20. if i < height then
  21. if up == true then
  22. turtle.up()
  23. else
  24. turtle.down()
  25. end
  26.  
  27. else
  28.  
  29. if j < length then
  30. turtle.turnRight()
  31. turtle.forward()
  32. turtle.turnLeft()
  33. if up == false then
  34. up = true
  35. else
  36. up = false
  37. end
  38. else
  39. if up == true then
  40. for i = 1, height - 1, 1 do
  41. turtle.down()
  42. end
  43. end
  44. end
  45.  
  46. end
  47.  
  48. end
  49. end
Add Comment
Please, Sign In to add comment