grand_mind1

Untitled

Feb 3rd, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. local tArgs = {...}
  2. width = tonumber(tArgs[1])
  3. height = tonumber(tArgs[2])
  4. depth = tonumber(tArgs[3])
  5.  
  6. local function layer(iWidth, iHeight)
  7. side = "left"
  8. curHeight = 1
  9. turtle.turnRight()
  10. while curHeight <= iHeight do
  11. for i = 1,width-1 do
  12. if curHeight ~= iHeight then
  13. turtle.digUp()
  14. end
  15. turtle.dig()
  16. turtle.forward()
  17. end
  18. if side == "left" then
  19. side = "right"
  20. else
  21. side = "left"
  22. end
  23. if curHeight == iHeight then
  24. if side == "right" then
  25. turtle.turnRight()
  26. turtle.turnRight()
  27. for j = 1,width-1 do
  28. turtle.forward()
  29. end
  30. end
  31. turtle.turnRight()
  32. for i = 1,iHeight-1 do
  33. turtle.down()
  34. end
  35. break
  36. else
  37. turtle.digUp()
  38. turtle.up()
  39. curHeight = curHeight + 1
  40. if curHeight ~= height then
  41. turtle.digUp()
  42. turtle.up()
  43. curHeight = curHeight + 1
  44. end
  45. turtle.turnRight()
  46. turtle.turnRight()
  47. end
  48. end
  49. end
  50. layer(width, height)
Advertisement
Add Comment
Please, Sign In to add comment