Maffin1231

Untitled

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