SHARE
TWEET

Untitled

a guest Nov 27th, 2014 286 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. isFluix = false
  2. isCertus = false
  3. isQuartz = false
  4. isPureFluix = false
  5. i = 1
  6. workToDo = 0
  7.  
  8. function CheckForWork()
  9. -- If anything in slot 1-13 we have work to do
  10.    
  11.     for i=1,13 do
  12.         local ItemFound = turtle.getItemCount(i)
  13.                 if (ItemFound ~= 0)
  14.                 then
  15.                         workToDo = 1
  16.                 end
  17.     end
  18. end
  19.  
  20. function CheckWorkStatus()
  21. -- Check the status of the work in progress
  22. -- Anything unfinished will be found by the
  23. -- next CheckForWork cycle
  24.  
  25.         turtle.suckDown()
  26.         for i=1,13 do
  27.                
  28.                 turtle.select(i)
  29.    
  30.                 isFluix = turtle.compareTo(13)
  31.                 isCertus = turtle.compareTo(14)
  32.                 isQuartz = turtle.compareTo(15)
  33.                 isPureFluix = turtle.compareTo(16)
  34.    
  35.                 if isFluix == true then
  36.                   turtle.dropUp()
  37.                 elseif isCertus == true then
  38.                   turtle.dropUp()
  39.                 elseif isQuartz == true then
  40.                   turtle.dropUp()
  41.                 elseif isPureFluix == true then
  42.                   turtle.dropUp()
  43.                 end
  44.     end
  45.   end
  46.  
  47.  --Main
  48.  while true do
  49.         -- Start off with the toggle bus off
  50.         -- only turn on when there's work to do
  51.        
  52.         redstone.setOutput("back", false)
  53.         CheckForWork()
  54.         if workToDo == 1 then
  55.                 -- Now we can turn on the accelerators
  56.                 -- and run a cycle
  57.                 redstone.setOutput("back", true)
  58.                
  59.                 for i=1,13 do
  60.                 -- Since we have work, drop the items
  61.                         turtle.select(i)
  62.                         turtle.dropDown()
  63.                 end
  64.                 -- now wait a bit for it to process
  65.                 os.sleep (60)
  66.         end
  67.         CheckWorkStatus()
  68.  end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top