Advertisement
Maffin1231

Untitled

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