Advertisement
Maffin1231

Untitled

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