Advertisement
Maffin1231

Untitled

Apr 21st, 2024
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.34 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]==0 then
  25. turtle.select(16)
  26. end
  27. end
  28.  
  29. a = {{{1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1},
  30.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  31.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  32.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  33.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  34.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  35.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  36.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  37.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  38.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  39.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  40.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  41.       {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
  42.       {2,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,1},
  43.       {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0},
  44.       {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0},
  45.       {2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0},
  46.       {1,2,2,3,0,3,2,2,2,2,1,0,0,0,0,0,0,0,0}},
  47.  
  48.      {{1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1},
  49.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  50.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  51.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  52.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  53.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  54.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  55.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  56.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  57.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  58.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  59.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  60.       {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
  61.       {4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,1},
  62.       {4,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0},
  63.       {4,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0},
  64.       {4,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0},
  65.       {1,4,4,3,0,3,4,4,4,4,1,0,0,0,0,0,0,0,0}},
  66.  
  67.      {{1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1},
  68.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  69.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  70.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  71.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  72.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  73.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  74.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  75.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  76.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  77.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  78.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  79.       {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
  80.       {5,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,1},
  81.       {5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0},
  82.       {5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0},
  83.       {5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0},
  84.       {1,5,5,3,3,3,5,5,5,5,1,0,0,0,0,0,0,0,0}},
  85.  
  86.      {{1,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,1},
  87.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  88.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  89.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  90.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  91.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  92.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  93.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  94.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  95.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  96.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  97.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  98.       {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
  99.       {6,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,1},
  100.       {6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0},
  101.       {6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0},
  102.       {6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0},
  103.       {1,6,6,6,6,6,6,6,6,6,1,0,0,0,0,0,0,0,0}},
  104.  
  105.      {{1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,1},
  106.       {11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11},
  107.       {11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,11},
  108.       {11,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,11},
  109.       {11,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,11},
  110.       {11,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,11},
  111.       {11,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,11},
  112.       {11,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,11},
  113.       {11,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,11},
  114.       {11,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,11},
  115.       {11,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,11},
  116.       {11,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,11},
  117.       {11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11},
  118.       {11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,1},
  119.       {11,10,10,10,10,10,10,10,10,10,10,0,0,0,0,0,0,0,0},
  120.       {11,10,10,10,10,10,10,10,10,11,11,0,0,0,0,0,0,0,0},
  121.       {11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0},
  122.       {1,11,11,11,11,11,11,11,11,11,1,0,0,0,0,0,0,0,0}}}
  123.  
  124.  
  125. for x=1, #a do
  126.   for y=1, #a[x] do
  127.     for z=1, #a[x][y] do
  128.       iff(x,y,z)
  129.       turtle.placeDown()
  130.       turtle.forward()
  131.     end
  132.     turtle.turnRight()
  133.     turtle.forward()
  134.     turtle.turnRight()
  135.     for y = 1,#a[x][y] do
  136.      turtle.forward()
  137.     end
  138.     turtle.turnRight()
  139.     turtle. turnRight()
  140.    end
  141.    turtle.turnLeft()
  142.    for y = 1,#a[x] do
  143.     turtle. forward()
  144.    end
  145.    turtle.turnRight()
  146.    turtle.up()
  147.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement