View difference between Paste ID: yJdKdCNK and qYuVf1MK
SHOW: | | - or go back to the newest paste.
1
local uranium = 30047
2
local tinyura = 30048
3
4
local enrich = {id = 30243,dmg = 0, qty = 1}
5
local rod = {id = 30045, dmg = 0, qty = 1}
6
local pressList = {3, 4, 13}
7
local compressID = 2506
8
local compresDmgList = { 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14 }
9
10-
  
10+
11
12
function craftUranium()
13-
       
13+
14
       network.countOfItemType(tinyura,0) >= 3 ) then
15-
       network.requestCrafting(enrich)
15+
16-
      
16+
       network.requestCrafting(enrich)      
17
  end
18
end
19
20
function compressStacks()
21
   for i,id in ipairs(pressList) do
22
      if ( network.countOfItemType(id,0) >= 100 ) then
23
	local itemStack = { id = id, dmg = 0, qty = 9 }
24
	network.extractItem(itemStack,"bottom")
25
        os.sleep(1)
26
      end
27
   end
28
   for i,dmg in ipairs(compresDmgList) do
29
      if ( network.countOfItemType(compressID,dmg) >= 9 ) then
30
         local itemStack = { id = compressID, dmg = dmg, qty = 9 }
31
   	 network.extractItem(itemStack,"bottom")
32
         os.sleep(1)
33
      end
34
   end
35
end
36
37
while true do
38
  craftUranium()
39
  compressStacks()
40
  os.sleep(60)
41
end