Advertisement
DJJezibaba

test1

Jan 9th, 2023 (edited)
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.36 KB | None | 0 0
  1. function poloz()
  2.     r = 2
  3.    for h = 1, 4 do
  4.         for c = 1, 4 do
  5.              for i = 1, 20 do
  6.              turtle.forward()
  7.                     kocka()
  8.             end
  9.             turtle.turnRight()      
  10.         end
  11.         turtle.up()
  12.    end    
  13. end
  14. function kocka()
  15.                         if turtle.detectDown()==false then
  16.                             turtle.select(r)
  17.                                     if turtle.getItemCount( turtle.getSelectedSlot() ) >1 then
  18.                                         turtle.placeDown()
  19.                                         else
  20.                
  21.                                         turtle.select(r)
  22.                                         r = r + 1  
  23.                                         turtle.placeDown()
  24.                                                                    
  25.                                     end
  26.                        end 
  27. end
  28.  
  29. function strecha()
  30.     for a = 1, 20 do
  31.        
  32.              for i = 1, 20 do
  33.                      kocka()
  34.                  turtle.forward()
  35.               end
  36.      
  37.           if ((a % 2) == 1) then
  38.             turtle.turnRight()
  39.             kocka()
  40.             turtle.forward()
  41.            
  42.             turtle.turnRight()
  43.                 else
  44.             turtle.turnLeft()
  45.             kocka()
  46.             turtle.forward()
  47.            
  48.             turtle.turnLeft()
  49.             end
  50.            
  51.            
  52.       end      
  53.        
  54.  
  55. end
  56.        
  57. function start()              
  58.     turtle.refuel(64)
  59.     turtle.forward()
  60.     poloz()
  61.     strecha()
  62. end
  63.  
  64. start()
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement