Advertisement
Guest User

mine.lua

a guest
Apr 1st, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. turtle.up()
  2.  
  3. function light()
  4.     turtle.select(2)
  5.     turtle.placeDown()
  6.     end
  7.  
  8.  
  9. function frame()
  10.   x = 1
  11.  while x <= 50 do
  12.   turtle.dig()
  13.   if x == 5 or x == 10 or x == 15 or x == 20 or x == 25 or x == 30 or x == 35 or x == 40 or x == 45 or x == 50 then
  14.  light()
  15.  turtle.forward()
  16.  turtle.digUp()
  17.  turtle.digDown()
  18.  x = x +1
  19.  else
  20.    turtle.forward()
  21.   turtle.digUp()
  22.   turtle.digDown()
  23.   x = x+1
  24.   end
  25. end
  26. end
  27.  function frameUp()
  28.     frame()
  29.     turtle.turnRight()
  30.     os.sleep(2)
  31.     frame()
  32.     turtle.turnRight()
  33.     frame()
  34.     turtle.turnRight()
  35.     frame()
  36.     turtle.turnRight()
  37.     turtle.down()
  38. end
  39.  
  40.  function tunnelRight()
  41.     turtle.turnRight()
  42.     turtle.forward()
  43.     turtle.forward()
  44.     turtle.forward()
  45.     turtle.turnRight()  
  46.     frame()
  47.     end
  48.  
  49.   function tunnelLeft()
  50.      turtle.turnLeft()
  51.      turtle.forward()
  52.      turtle.forward()
  53.      turtle.forward()
  54.      turtle.turnLeft()
  55.      frame()
  56.  end
  57.  
  58. frameUp()
  59. print("framing done")
  60. print("tunnelling begining")
  61.  
  62. turtle.up()
  63. turtle.turnLeft()
  64. tunnelRight()
  65. tunnelLeft()
  66. tunnelRight()
  67. tunnelLeft()
  68. tunnelRight()
  69. tunnelLeft()
  70. tunnelRight()
  71. tunnelLeft()
  72. tunnelRight()
  73. tunnelLeft()
  74. tunnelRight()
  75. tunnelLeft()
  76. tunnelRight()
  77. tunnelLeft()
  78. tunnelRight()
  79. tunnelLeft()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement