Advertisement
SBe11

Untitled

Feb 24th, 2020
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1.     function torch()
  2.        
  3.     end
  4.  
  5.     function digtiz()
  6.         d = 0
  7.         while d < 10 do
  8.             turtle.dig()
  9.             d = d + 10
  10.         end
  11.     end
  12.    
  13.     function diguptiz()
  14.         d = 0
  15.         while d < 10 do
  16.             turtle.digUp()
  17.             d = d + 10
  18.         end
  19.     end
  20.    
  21.    
  22.     function lap()
  23.         digtiz()
  24.         turtle.forward()
  25.         diguptiz()
  26.         turtle.digDown()
  27.         turtle.turnLeft()
  28.         digtiz()
  29.         turtle.forward()
  30.         diguptiz()
  31.         turtle.digDown()
  32.         turtle.down()
  33.         turtle.turnLeft()
  34.         turtle.turnLeft()
  35.         turtle.select(3)
  36.         turtle.placeDown()
  37.         turtle.forward()
  38.         turtle.placeDown()
  39.         digtiz()
  40.         turtle.forward()
  41.         turtle.placeDown()
  42.         diguptiz()     
  43.         turtle.up()
  44.         turtle.turnLeft()
  45.         turtle.turnLeft()
  46.         diguptiz()
  47.         turtle.forward()
  48.         turtle.turnRight()
  49.        
  50.     end
  51.  
  52. function tankolas()
  53.     turtle.select(1)
  54.     turtle.refuel(1)
  55. end
  56.  
  57. print("Menyit banyaszak?")
  58. x = tonumber(read())
  59.  
  60.  
  61.     h = 0
  62.     t = 0
  63.     while h < x do
  64.         if turtle.getFuelLevel() < 100 then
  65.             tankolas()
  66.             turtle.getFuelLevel()
  67.         end
  68.        
  69.         lap()
  70.        
  71.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement