Advertisement
Maffin1231

Untitled

Jul 16th, 2024 (edited)
52
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.71 KB | Gaming | 0 1
  1. function iff (x,y)
  2. if a [x][y]==1 then
  3. turtle.select(1)
  4. elseif a[x][y]==2 then
  5. turtle.select(2)
  6. elseif a[x][y]==3 then
  7. turtle.select(3)
  8. elseif a[x][y]==4 then
  9. turtle.select(4)
  10. elseif a[x][y]==5 then
  11. turtle.select(5)
  12. elseif a[x][y]==6 then
  13. turtle.select(6)
  14. elseif a[x][y]==7 then
  15. turtle.select(7)
  16. elseif a[x][y]==8 then
  17. turtle.select(8)
  18. elseif a[x][y]==9 then
  19. turtle.select(9)
  20. end
  21. end
  22.  
  23. a={{1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1},
  24.    {1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1},
  25.    {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3},
  26.    {3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3},
  27.    {3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3},
  28.    {3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3},
  29.    {3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3},
  30.    {4,4,5,5,5,5,5,5,5,4,4,5,5,5,5,5,5,5,5,5,5,5,4,4},
  31.    {4,4,5,5,5,5,5,5,5,4,4,4,4,5,5,5,5,5,5,5,5,5,4,4},
  32.    {4,4,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,4,4},
  33.    {4,4,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,4,4},
  34.    {4,4,6,6,6,6,6,6,6,4,4,4,4,6,6,6,6,6,6,6,6,6,4,4},
  35.    {4,4,6,6,6,6,6,6,6,4,4,6,6,6,6,6,6,6,6,6,6,6,4,4},
  36.    {4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,4,4},
  37.    {4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4},
  38.    {4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4},
  39.    {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8},
  40.    {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8},
  41.    {7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7},
  42.    {7,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7}}
  43.  
  44. turtle.up()
  45. for x=1,20 do
  46. for y = 1,24 do
  47. iff(x,y)
  48. turtle.placeDown()
  49. turtle.forward()
  50. end
  51. turtle.turnRight()
  52. turtle.forward()
  53. turtle.turnRight()
  54. for y = 1,24 do
  55. turtle.forward()
  56. end
  57. turtle.turnRight()
  58. turtle.turnRight()
  59. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement