Advertisement
Guest User

Q

a guest
Nov 21st, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 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.forward()
  7.         turtle.dig()
  8.         turtle.digDown()
  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.         else
  19.         FlipFlop = false
  20.         turtle.turnRight()
  21.         turtle.forward()
  22.         turtle.turnRight()
  23.     end      
  24. end
  25.    
  26. function alternateFlipFlop()
  27.     if (FlipFlop == false) then
  28.         FlipFlop = true
  29.         else
  30.         FlipFlop = false
  31.     end        
  32. end
  33.    
  34. function quary(x, y)
  35.     for i=y, 1, -1 do
  36.         mineLine(x)
  37.         newLine()
  38.     end
  39.     alternateFlipFlop()
  40. end
  41.  
  42. while(true) do
  43.     quary(5, 5)
  44.     turtle.digDown()
  45.     turtle.down()
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement