Advertisement
Guest User

Untitled

a guest
Mar 11th, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function mine()
  2. redstone.setBundledOutput("right",1) --activating the tesseract through MFR rednet cable
  3. sleep(13) --waiting for mining wells to finish
  4. redstone.setBundledOutput("right",0) --deactivating the tesseract
  5. redstone.setOutput("bottom",true) --activating force manipulator which is directly underneath
  6. end
  7. local p = peripheral.wrap("front") --wrapping an ender chest as a peripheral. ender chest is in front of the computer
  8. while true do --loop
  9.   if p.getStackInSlot(1) then --checking if there is anything in slot 1(top right) of the ender chest and running the following code if there is
  10.     print("true")
  11.     mine() --running the mine function which is defined above
  12.   else --in the event that there is no item in the chest(your 'switch' is in off position) it just waits 5 seconds and exits the loop
  13.     print("false")
  14.     sleep(5)
  15.   end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement