Advertisement
Guest User

redstone energy cell recharge and discharge

a guest
Jan 16th, 2013
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tArgs = {...}
  2. local emptycells = right
  3. local verticle = false
  4. if #tArgs < 1 then print("please put in program max-imput")
  5. end
  6. if #tArgs > 1 then print("please put in program max-imput")
  7. end
  8. local a = tArgs[1]
  9. local discharge = false
  10.  
  11. local A = 30000 / a
  12. if verticle == false then
  13. if emptycells == right then
  14. print(" please put a chest with empty redstone energy cells to the right and an empty chest to the right")
  15. wait(15)
  16. shell.run(clear)
  17. print(" make sure theturtle is facing a bc power source")
  18. wait(15)
  19. shell.run(clear)
  20. while true do
  21. turtle.turnRight()
  22. turtle.suck()
  23. turtle.turnLeft()
  24. turtle.place()
  25. wait(A)
  26. turtle.dig()
  27. turtle.turnLeft()
  28. while turtle.getitemcount(1) == 1 do
  29. turtle.drop()
  30. end
  31. turtle.turnRight()
  32. end
  33. end
  34.  
  35. if emptycells == left then
  36. print(" please put a chest with empty redstone energy cells to the left and an empty chest to the right")
  37. wait(15)
  38. shell.run(clear)
  39. print(" make sure theturtle is facing a bc power source")
  40. wait(15)
  41. shell.run(clear)
  42. while true do
  43. turtle.turnLeft()
  44. turtle.suck()
  45. turtle.turnRight()
  46. turtle.place()
  47. wait(A)
  48. turtle.dig()
  49. turtle.turnRight()
  50. while turtle.getitemcount(1) == 1 do
  51. turtle.drop()
  52. end
  53. turtle.turnLeft()
  54. end
  55. end
  56. end
  57.  
  58. if verticle == true then
  59. print("place a chest above the turtle for empty cells and below for full cells")
  60. print(" make sure theturtle is facing a bc power source")
  61. wait(15)
  62. shell.run(clear)
  63. while true do
  64. turtle.suckUp()
  65. turtle.place()
  66. wait(A)
  67. turtle.dig()
  68. while turtle.getitemcount(1) == 1 do
  69. turtle.dropDown()
  70. end
  71. end
  72. end
  73. end
  74.  
  75. if discarge == true then
  76. if verticle == false then
  77. if emptycells == left then
  78. print(" please put a chest with full redstone energy cells to the right and an empty chest to the left")
  79. wait(15)
  80. shell.run(clear)
  81. print(" make sure theturtle is facing a bc power source")
  82. wait(15)
  83. shell.run(clear)
  84. while true do
  85. turtle.turnRight()
  86. turtle.suck()
  87. turtle.turnLeft()
  88. turtle.place()
  89. wait(A)
  90. turtle.dig()
  91. turtle.turnLeft()
  92. while turtle.getitemcount(1) == 1 do
  93. turtle.drop()
  94. end
  95. turtle.turnRight()
  96. end
  97. end
  98.  
  99. if emptycells == Right then
  100. print(" please put a chest with full redstone energy cells to the left and an empty chest to the right")
  101. wait(15)
  102. shell.run(clear)
  103. print(" make sure theturtle is facing a bc power source")
  104. wait(15)
  105. shell.run(clear)
  106. while true do
  107. turtle.turnLeft()
  108. turtle.suck()
  109. turtle.turnRight()
  110. turtle.place()
  111. wait(A)
  112. turtle.dig()
  113. turtle.turnRight()
  114. while turtle.getitemcount(1) == 1 do
  115. turtle.drop()
  116. end
  117. turtle.turnLeft()
  118. end
  119. end
  120. end
  121.  
  122. if verticle == true then
  123. print("place a chest above the turtle for full cells and below for empty cells")
  124. print(" make sure theturtle is facing a bc power source")
  125. wait(15)
  126. shell.run(clear)
  127. while true do
  128. turtle.suckUp()
  129. turtle.place()
  130. wait(A)
  131. turtle.dig()
  132. while turtle.getitemcount(1) == 1 do
  133. turtle.dropDown()
  134. end
  135. end
  136. end
  137. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement