Advertisement
Maffin1231

Untitled

Nov 23rd, 2023 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.74 KB | Gaming | 0 0
  1. function iff (x,y,z)
  2. if a[x][y][z]==1 then
  3. turtle.select(1)
  4. elseif a[x][y][z]==2 then
  5. turtle.select(2)
  6. elseif a[x][y][z]==3 then
  7. turtle.select(3)
  8. elseif a[x][y][z]==4 then
  9. turtle.select(4)
  10. elseif a[x][y][z]==5 then
  11. turtle.select(5)
  12. elseif a[x][y][z]==6 then
  13. turtle.select(6)
  14. elseif a[x][y][z]==7 then
  15. turtle.select(7)
  16. elseif a[x][y][z]==8 then
  17. turtle.select(8)
  18. elseif a[x][y][z]==9 then
  19. turtle.select(9)
  20. elseif a[x][y][z]==10 then
  21. turtle.select(10)
  22. elseif a[x][y][z]==11 then
  23. turtle.select(11)
  24. elseif a[x][y][z]==12 then
  25. turtle.select(12)
  26. elseif a[x][y][z]==13 then
  27. turtle.select(13)
  28. elseif a[x][y][z]==14 then
  29. turtle.select(14)
  30. elseif a[x][y][z]==15 then
  31. turtle.select(15)
  32. elseif a[x][y][z]==0 then
  33. turtle.select(16)
  34. end
  35. end
  36.  
  37.    
  38. a = {{{0,0,0,1,0,1,0,0,0},
  39.       {0,0,0,0,0,0,0,0,0},
  40.       {0,0,0,1,0,1,0,0,0}},
  41.  
  42.      {{0,0,0,2,0,2,0,0,0},
  43.       {0,0,0,2,2,2,0,0,0},
  44.       {0,0,0,2,0,2,0,0,0}},
  45.  
  46.      {{0,0,0,2,2,2,0,0,0},
  47.       {1,2,2,2,2,2,0,0,0},
  48.       {0,0,0,2,2,2,0,0,0}},
  49.  
  50.      {{0,0,2,0,0,0,0,0,0},
  51.       {0,3,2,0,0,2,3,0,0},
  52.       {0,0,2,0,0,0,0,0,0}},
  53.  
  54.  
  55.      {{0,0,3,0,0,0,0,0,0},
  56.       {0,0,0,0,0,0,0,3,3},
  57.       {0,0,3,0,0,0,0,0,0}},
  58.  
  59.  
  60.     {{0,0,0,0,0,0,0,0,0},
  61.      {0,0,0,0,0,0,0,0,3},
  62.      {0,0,0,0,0,0,0,0,0}},
  63.  
  64.     {{0,0,0,0,0,0,0,0,0},
  65.      {0,0,0,0,0,0,0,0,3},
  66.      {0,0,0,0,0,0,0,0,0}}}
  67.  
  68.  
  69.  
  70.  
  71.  
  72. for x=1, #a do
  73.  for y=1, #a[x] do
  74.   for z=1, #a[x][y] do
  75.    iff(x,y,z)
  76.    turtle.placeDown()
  77.    turtle.forward()
  78.  end
  79.  
  80.  
  81. turtle.turnRight()
  82. turtle.forward()
  83. turtle.turnRight()
  84.  
  85. for y = 1,#a[x][y] do
  86. turtle.forward()
  87. end
  88.  
  89.  
  90. turtle.turnRight()
  91. turtle.turnRight()
  92. end
  93.  
  94. turtle.turnLeft()
  95. for y = 1,#a[x] do
  96. turtle.forward()
  97.  
  98. end
  99. turtle.turnRight()
  100. turtle.up()
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement