FoxWorn3365

riso

Dec 8th, 2025 (edited)
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. -- CAMPATORE
  2. function h()
  3.     if turtle.getItemCount(1) < 1 then
  4.         turtle.transferTo(3, 2)
  5.     end
  6.  
  7.     turtle.digDown()
  8.     turtle.placeDown()
  9. end
  10.  
  11. function r()
  12.     turtle.select(1)
  13.     if turtle.getItemCount(1) < 32 then
  14.         if turtle.suckDown() == false then
  15.             -- Clear the slot
  16.             turtle.transferTo(16)
  17.             turtle.suckDown()
  18.         end
  19.     end
  20. end
  21.  
  22. while true do
  23.     sided = true
  24.     -- Refuel tattico
  25.     turtle.refuel(10)
  26.     -- Usciamo dal parcheggio
  27.     turtle.forward()
  28.     turtle.turnLeft()
  29.     -- Selezioniamo il riso (slot 2)
  30.     turtle.select(2)
  31.     -- Partiamo (8x11)
  32.     -- Loop delle x
  33.     for x=0,7 do
  34.         -- Loop delle z
  35.         for z=0,9 do
  36.             h()
  37.  
  38.             turtle.forward()
  39.         end
  40.  
  41.         h()
  42.  
  43.         if x <= 6 then
  44.             if sided == true then
  45.                 turtle.turnRight()
  46.                 turtle.forward()
  47.                 turtle.turnRight()
  48.                 sided = false
  49.             else
  50.                 turtle.turnLeft()
  51.                 turtle.forward()
  52.                 turtle.turnLeft()
  53.                 sided = true
  54.             end
  55.         end
  56.     end
  57.  
  58.     turtle.forward()
  59.     turtle.turnRight()
  60.    
  61.     for x=0,7 do
  62.         h()
  63.         turtle.forward()
  64.     end
  65.  
  66.     -- SCARICA
  67.     for x=3,16 do
  68.         turtle.select(x)
  69.         turtle.dropDown()
  70.     end
  71.  
  72.     turtle.turnRight()
  73.     turtle.forward()
  74.  
  75.     -- CARICA
  76.     r()
  77.  
  78.     turtle.turnRight()
  79.  
  80.     sleep(500)
  81. end
Advertisement
Add Comment
Please, Sign In to add comment