Advertisement
Guest User

Q

a guest
Nov 21st, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. turtle.refuel()
  2. print("Turtle Refueled.")
  3. FlipFlop = false
  4. function mineLine(int)
  5.     for i=int, 1, -1 do
  6.         turtle.dig()
  7.         turtle.digDown()
  8.         turtle.forward()
  9.     end
  10. end
  11.    
  12. function newLine()
  13.     if (FlipFlop == false) then
  14.         FlipFlop = true
  15.         turtle.turnLeft()
  16.         turtle.forward()
  17.         turtle.turnLeft()
  18.         turtle.digDown()
  19.         else
  20.         FlipFlop = false
  21.         turtle.turnRight()
  22.         turtle.forward()
  23.         turtle.turnRight()
  24.         turtle.digDown()
  25.     end      
  26. end
  27.    
  28. function alternateFlipFlop()
  29.     if (FlipFlop == false) then
  30.         FlipFlop = true
  31.         else
  32.         FlipFlop = false
  33.     end        
  34. end
  35.    
  36. function quary(x, y)
  37.     for i=y, 1, -1 do
  38.         mineLine(x)
  39.         newLine()
  40.     end
  41.     alternateFlipFlop()
  42. end
  43.  
  44. while(true) do
  45.     quary(5, 5)
  46.     turtle.digDown()
  47.     turtle.down()
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement