Advertisement
Maffin1231

Untitled

Sep 21st, 2024 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 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(16)
  16. end
  17. end
  18.  
  19.  a = {{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0}},
  20.  
  21.       {{0,1,2,2,2,2,1,2,2,2,1,2,2,2,2,2,1,2,2,2,2,2,1,2,2,2,1,2,2,2,2,1,0,0}},
  22.  
  23.       {{0,1,2,2,2,2,1,2,2,2,1,2,2,2,2,2,1,2,2,2,2,2,1,2,2,2,1,2,2,2,2,1,0,0}},
  24.  
  25.       {{0,0,1,6,6,6,1,6,6,6,1,6,6,6,6,6,1,6,6,6,6,1,6,6,6,6,1,6,6,6,6,1,0,0}},
  26.  
  27.       {{0,0,4,6,6,6,4,6,6,6,4,6,4,4,4,4,4,6,4,4,4,6,4,4,4,4,6,4,4,4,6,6,4,0}},
  28.  
  29.       {{0,0,4,6,6,6,4,6,6,6,4,6,6,6,4,6,6,6,4,6,6,6,4,6,6,6,6,4,4,4,6,6,4,0}},
  30.  
  31.       {{0,0,0,4,7,7,7,4,7,7,4,7,7,7,4,7,7,7,4,7,7,7,4,7,7,7,7,4,4,4,7,7,4,0}},
  32.  
  33.       {{0,0,0,4,7,7,7,4,7,7,7,4,7,4,4,4,7,7,4,7,7,7,7,4,7,7,7,4,4,4,7,7,7,4}},
  34.  
  35.       {{0,0,0,0,4,7,3,4,7,7,3,4,7,7,3,4,7,3,4,7,7,7,3,4,7,7,7,7,7,7,7,7,3,4}},
  36.  
  37.       {{0,0,0,0,5,8,3,5,8,8,3,5,8,8,3,5,8,3,5,8,8,8,3,5,8,8,8,8,8,8,8,8,3,5}},
  38.  
  39.       {{0,0,0,0,5,3,3,5,8,3,3,5,3,3,3,5,3,3,5,8,3,3,3,5,8,8,8,8,8,8,8,3,3,5}},
  40.  
  41.       {{0,0,0,0,0,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0}}}
  42.  
  43. for x=1, #a do
  44. for y=1, #a[x] do
  45. for z=1, #a[x][y] do
  46. iff(x,y,z)
  47. turtle.placeDown()
  48. turtle.forward()
  49. end
  50. turtle.turnRight()
  51. turtle.forward()
  52. turtle.turnRight()
  53. for y = 1,#a[x][y] do
  54. turtle.forward()
  55. end
  56. turtle.turnRight()
  57. turtle.turnRight()
  58. end
  59. turtle.turnLeft()
  60. for y = 1,#a[x] do
  61. turtle.forward()
  62. end
  63. turtle.turnRight()
  64. turtle.up()
  65. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement