Advertisement
Guest User

branch

a guest
Nov 23rd, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. function dig()
  2.    while not turtle.forward() do
  3.       turtle.dig()
  4.    end
  5.    turtle.forward()
  6.    turtle.digUp()
  7. end
  8.  
  9. local branches=0
  10. print("How many branches would you like?")
  11. branches=read()
  12. print("Now mining " ..branches.. " branches!")
  13.  
  14. for i=1,branches do
  15.    for i=1,3 do
  16.       dig()
  17.    end
  18.    turtle.turnRight()
  19.    for i=1,8 do
  20.       dig()
  21.    end
  22.    turtle.turnRight()
  23.    turtle.turnRight()
  24.    for i=1,8 do
  25.       turtle.forward()
  26.    end
  27.    for i=1,8 do
  28.       dig()
  29.    end
  30.    turtle.turnRight()
  31.    turtle.turnRight()
  32.    for i=1,8 do
  33.       turtle.forward()
  34.    end
  35.    turtle.turnLeft()
  36. end
  37. print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement