lost_RD

Cyclic Assembler Schematic Cycler

Mar 20th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print "Cyclic Assembler Schematic Cycler v1.1"
  2. print "by revereddesecration"
  3.  
  4. --[[
  5. To use: place a schematic in the schematic slot and all remaining schematics in the inventory starting from the first inventory slot and continuing to the right. Set the time variable below to choose how long the cycle should be
  6. ]]
  7.  
  8. time = 60 -- seconds per cycle
  9.  
  10. ass = peripheral.wrap("bottom")
  11.  
  12. schematics = 0
  13. stacks = ass.getAllStacks()
  14. for k,v in pairs(stacks) do
  15.   if v.id == 20262 then
  16.     schematics = schematics + 1
  17.   end
  18. end
  19. print(schematics, " schematics, ", math.ceil(time/schematics), " seconds per")
  20.  
  21. while true do
  22.   for i=4,(2+schematics) do
  23.     sleep(math.ceil(time/schematics))
  24.     ass.swapStacks(1,i)
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment