Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local tArgs = {...}
  2.  
  3. local x = tonumber(tArgs[1]) - 1
  4. local y = tonumber(tArgs[2])
  5. local z = tonumber(tArgs[3])
  6.  
  7. local roomSize = x * y * z
  8.  
  9. local direction = true
  10. for i = 1, z do
  11. for j = 1, y do
  12. for k = 1, x do
  13. turtle.dig()
  14. turtle.forward()
  15. end
  16. if j < y then
  17. if direction then
  18. turtle.turnRight()
  19. turtle.dig()
  20. turtle.forward()
  21. turtle.turnRight()
  22. direction = false
  23. else
  24. turtle.turnLeft()
  25. turtle.dig()
  26. turtle.forward()
  27. turtle.turnLeft()
  28. direction = true
  29. end
  30. end
  31. end
  32. if i < z then
  33. turtle.digUp()
  34. turtle.up()
  35. turtle.turnRight()
  36. turtle.turnRight()
  37. end
  38. end
  39.  
  40. if y % 2 == 0 then
  41. turtle.turnRight()
  42. for i = 1, y do
  43. turtle.forward()
  44. end
  45. turtle.turnRight()
  46. else
  47. turtle.turnLeft()
  48. for i = 1, y do
  49. turtle.forward()
  50. end
  51. turtle.turnLeft()
  52. for i = 1, x do
  53. turtle.forward()
  54. end
  55. turtle.turnRight()
  56. turtle.turnRight()
  57. end
  58. for i = 1, z do
  59. turtle.down()
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement