Advertisement
Andersfc

Charge/Discharge-Ltrains code

Jan 16th, 2013
123
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-input")
  5. end
  6. if #tArgs > 1 then print("please put in program max-input")
  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. sleep(15)
  16. shell.run("clear")
  17. print("make sure the turtle is facing a bc power source")
  18. sleep(15)
  19. shell.run("clear")
  20. while true do
  21. turtle.turnRight()
  22. turtle.suck()
  23. turtle.turnLeft()
  24. turtle.place()
  25. sleep(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. sleep(15)
  38. shell.run("clear")
  39. print("make sure the turtle is facing a bc power source")
  40. sleep(15)
  41. shell.run("clear")
  42. while true do
  43. turtle.turnLeft()
  44. turtle.suck()
  45. turtle.turnRight()
  46. turtle.place()
  47. sleep(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 the turtle is facing a bc power source")
  61. sleep(15)
  62. shell.run("clear")
  63. while true do
  64. turtle.suckUp()
  65. turtle.place()
  66. sleep(A)
  67. turtle.dig()
  68. while turtle.getItemCount(1) == 1 do
  69. turtle.dropDown()
  70. end
  71. end
  72. end
  73.  
  74. if discarge == true then
  75. if verticle == false then
  76. if emptycells == left then
  77. print("please put a chest with full redstone energy cells to the right and an empty chest to the left")
  78. sleep(15)
  79. shell.run("clear")
  80. print("make sure the turtle is facing a bc power source")
  81. sleep(15)
  82. shell.run("clear")
  83. while true do
  84. turtle.turnRight()
  85. turtle.suck()
  86. turtle.turnLeft()
  87. turtle.place()
  88. sleep(A)
  89. turtle.dig()
  90. turtle.turnLeft()
  91. while turtle.getItemCount(1) == 1 do
  92. turtle.drop()
  93. end
  94. turtle.turnRight()
  95. end
  96. end
  97.  
  98. if emptycells == Right then
  99. print("please put a chest with full redstone energy cells to the left and an empty chest to the right")
  100. sleep(15)
  101. shell.run("clear")
  102. print("make sure the turtle is facing a bc power source")
  103. sleep(15)
  104. shell.run("clear")
  105. while true do
  106. turtle.turnLeft()
  107. turtle.suck()
  108. turtle.turnRight()
  109. turtle.place()
  110. sleep(A)
  111. turtle.dig()
  112. turtle.turnRight()
  113. while turtle.getItemCount(1) == 1 do
  114. turtle.drop()
  115. end
  116. turtle.turnLeft()
  117. end
  118. end
  119. end
  120.  
  121. if verticle == true then
  122. print("place a chest above the turtle for full cells and below for empty cells")
  123. print("make sure the turtle is facing a bc power source")
  124. sleep(15)
  125. shell.run("clear")
  126. while true do
  127. turtle.suckUp()
  128. turtle.place()
  129. sleep(A)
  130. turtle.dig()
  131. while turtle.getItemCount(1) == 1 do
  132. turtle.dropDown()
  133. end
  134. end
  135. end
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement