Advertisement
Maffin1231

Untitled

Dec 25th, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | Gaming | 0 0
  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]==0 then
  15. turtle.select(16)
  16. end
  17. end
  18.  
  19. a = {{0,0,4,4,4,4,4,0,0,0,4,4,4,4,4,0,0},
  20.        {0,4,4,1,1,1,4,4,4,4,4,1,1,1,4,4,0},
  21.        {0,4,1,6,6,6,1,1,1,1,1,6,6,6,1,4,0},
  22.        {4,4,1,6,3,4,6,6,6,6,6,3,3,3,3,6,1,4,4},
  23.        {4,1,6,6,3,3,6,6,6,6,6,6,3,3,6,6,1,4},
  24.        {4,1,6,6,6,6,6,6,6,6,6,6,6,6,6,6,1,4},
  25.        {4,1,6,6,6,6,6,1,1,1,6,6,6,6,6,1,4},
  26.       {4,1,6,6,6,6,6,6,6,6,6,6,6,6,6,1,4},
  27.       {4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,4},
  28.       {4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,4},
  29.       {4,4,1,2,2,2,2,2,2,2,2,2,2,2,1,4,4},
  30.       {0,4,4,1,1,1,1,1,1,1,1,1,1,1,4,4,0},
  31.       {0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0}}
  32.  
  33. turtle.up()
  34. for x=1,14 do
  35. for y=1,17 do
  36. iff(x,y)
  37. turtle.placeDown()
  38. turtle.forward()
  39. end
  40. turtle.turnRight()
  41. turtle.forward()
  42. turtle.turnRight()
  43. for y = 1,17 do
  44. turtle.forward()
  45. end
  46. turtle.turnRight()
  47. turtle.turnRight()
  48. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement