Advertisement
Guest User

stripmine

a guest
Oct 23rd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.89 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1, 1)
  3. print("------------------------------------")
  4. print("                STRIP-MINE")
  5. print("------------------------------------")
  6. score = 0
  7. print("How long can be the strip tunnel?")
  8. input1 = tonumber(read())
  9. print("How long can the turtle dig in the sites")
  10. input2 = tonumber(read())
  11. print("Calculate fuel ...")
  12. fuel = turtle.getFuelLevel()
  13. cal1 = ( input1*3 + input2 + input2 * 0.5 ) * 2
  14. block = (input1*3) + (input2 + input2 * 2)  * 2
  15. print("Fuel needed :",cal1)
  16. print("Your FUEL: ",fuel)
  17. sleep(1)
  18. term.clear()
  19. term.setCursorPos(1, 1)
  20. print("Mining Blocks: ",block)
  21. print("Mined Blocks: ",score)
  22.  
  23.  
  24. function function1()
  25. for i=1,input1 do
  26. mine2.mine()
  27. mine.bridge()
  28. score = score +1
  29. score = score+1
  30. term.clear()
  31. term.setCursorPos(1, 1)
  32. print("Mining Blocks: ",block)
  33. print("Mined Blocks: ",score)
  34. mine2.mine()
  35. mine.bridge()
  36. score = score +1
  37. score = score+1
  38. term.clear()
  39. term.setCursorPos(1, 1)
  40. print("Mining Blocks: ",block)
  41. print("Mined Blocks: ",score)
  42. mine2.mine()
  43. mine.bridge()
  44. score = score +1
  45. score = score+1
  46. term.clear()
  47. term.setCursorPos(1, 1)
  48. print("Mining Blocks: ",block)
  49. print("Mined Blocks: ",score)
  50. mine.torch()
  51. turtle.turnLeft()
  52. for i=1,input2 do
  53. mine2.mine()
  54. mine.bridge()
  55. score = score +1
  56. score = score+1
  57. term.clear()
  58. term.setCursorPos(1, 1)
  59. print("Mining Blocks: ",block)
  60. print("Mined Blocks: ",score)
  61. end
  62. turtle.turnLeft()
  63. turtle.turnLeft()
  64. for i =1,input2 do
  65. mine2.mine()
  66. end
  67. for i=1,input2 do
  68. mine2.mine()
  69. mine.bridge()
  70. score = score +1
  71. score = score+1
  72. term.clear()
  73. term.setCursorPos(1, 1)
  74. print("Mining Blocks: ",block)
  75. print("Mined Blocks: ",score)
  76. end
  77. turtle.turnLeft()
  78. turtle.turnLeft()
  79. for i =1,input2 do
  80. mine2.mine()
  81. end
  82. turtle.turnRight()
  83. end
  84. turtle.turnLeft()
  85. turtle.turnLeft()
  86. turtle.up()
  87. te = input1*3
  88. for i = 1,te do
  89. mine.gravel()
  90. end
  91. turtle.down()
  92. mine.clear()
  93. end
  94.  
  95. function1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement