lost_RD

Cyclic Cobblestone Compressor

Apr 3rd, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. function tprint(t)
  2.   for k,v in pairs(t) do
  3.     if type(v) == "table" then
  4.       tprint(v)
  5.     else
  6.       print(k," | ",v)
  7.     end
  8.   end
  9. end
  10.  
  11. print "Cyclic Assembler Cobblestone Compressor v1.1"
  12. print "by revereddesecration"
  13.  
  14. --[[
  15. 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
  16. ]]
  17.  
  18. time = 60 -- seconds per cycle
  19.  
  20. ass = peripheral.wrap("bottom")
  21.  
  22. schematics = 0
  23. stacks = ass.getAllStacks()
  24. for k,v in pairs(stacks) do
  25.   tprint(v)
  26.   if v.id == 20262 then
  27.     schematics = schematics + 1
  28.   end
  29. end
  30. print(schematics, " schematics, ", math.ceil(time/schematics), " seconds per")
  31.  
  32. --[[while true do
  33.   for i=4,(2+schematics) do
  34.     sleep(math.ceil(time/schematics))
  35.     ass.swapStacks(1,i)
  36.   end
  37. end]]
Advertisement
Add Comment
Please, Sign In to add comment