Advertisement
k_goos

BranchMining

Jun 13th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. os.loadAPI("MineAPI")
  2.  
  3. local isDown = true
  4. local mainWidth = 3
  5. local mainHeight = 3
  6. local mainDept = 20
  7. local branchDept = 5
  8. local branchHeight = 2
  9. local mainWidth = 2
  10.  
  11. function tunnel()
  12. for i = 0, mainDept - 1 do
  13. MineAPI.forward()
  14. if i%2==0 then
  15. turtle.turnRight()
  16. else
  17. turtle.turnLeft()
  18. end
  19. for y = 0, mainWidth - 1 do
  20. if mainHeight == 2 then
  21. MineAPI.digDown()
  22. elseif mainHeight == 3 then
  23. MineAPI.digDown()
  24. MineAPI.digUp()
  25. else
  26. if y%2==0 then
  27. MineAPI.digDown()
  28. else
  29. MineAPI.digUp()
  30. end
  31.  
  32. for z = 0, mainHeight - 4 do
  33. if y%2==0 then
  34. MineAPI.moveUp()
  35. else
  36. MineAPI.moveDown()
  37. end
  38. end
  39.  
  40. if y%2==1 then
  41. MineAPI.digDown()
  42. else
  43. MineAPI.digUp()
  44. end
  45. end
  46.  
  47. if y ~= mainWidth - 1 then
  48. MineAPI.forward()
  49. end
  50. end
  51. if i%2==1 then
  52. turtle.turnRight()
  53. else
  54. turtle.turnLeft()
  55. end
  56. end
  57. end
  58.  
  59. MineAPI.moveUp()
  60. tunnel()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement