--------Ingredients Section local alchemy = {} function AlchemicalCrafting (item,name,ing) local tab = {} tab.item = item tab.name = name tab.ingredients = ing return tab end function Item (name,damage) local tab = {} tab.id = name tab.dmg = damage return tab end alchemy[1] = AlchemicalCrafting(Item("AWWayofTime:simpleCatalyst",0),"Simple Catalyst", { alchemical = { Item("minecraft:gunpowder",0), }, other = { Item("minecraft:sugar",0), Item("minecraft:redstone",0), Item("minecraft:redstone",0), Item("minecraft:glowstone_dust",0), } }) alchemy[2] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",3),"Strengthened Catalyst", { alchemical = { Item("AWWayofTime:simpleCatalyst",0), Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:nether_wart",0), Item("minecraft:dye",15) } }) alchemy[3] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",4),"Concentrated Catalyst", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), Item("AWWayofTime:bloodMagicBaseAlchemyItems",5) }, other = { Item("minecraft:gold_nugget") } }) alchemy[4] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",5),"Fractured Bone", { alchemical = { Item("minecraft:gunpowder",0), }, other = { Item("minecraft:bone",0), Item("minecraft:bone",0), Item("minecraft:bone",0), Item("minecraft:bone",0), } }) alchemy[5] = AlchemicalCrafting(Item("AWWayofTime:incendium",0),"Incendium", { alchemical = { Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:lava_bucket",0), Item("minecraft:blaze_powder",0), Item("minecraft:blaze_powder",0), Item("minecraft:netherrack",0) } }) alchemy[6] = AlchemicalCrafting(Item("AWWayofTime:aether",0),"Aether", { alchemical = { Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:ghast_tear",0), Item("minecraft:feather",0), Item("minecraft:feather",0), Item("minecraft:glowstone_dust",0) } }) alchemy[7] = AlchemicalCrafting(Item("AWWayofTime:sanctus",0),"Sanctus", { alchemical = { Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:gold_nugget",0), Item("minecraft:glass",0), Item("minecraft:glowstone_dust",0), Item("minecraft:glowstone_dust",0) } }) alchemy[8] = AlchemicalCrafting(Item("AWWayofTime:crepitous",0),"Crepitous", { alchemical = { Item("AWWayofTime:simpleCatalyst",0), Item("minecraft:gunpowder",0), Item("minecraft:gunpowder",0), }, other = { Item("minecraft:cobblestone",0), Item("minecraft:cobblestone",0) } }) alchemy[9] = AlchemicalCrafting(Item("AWWayofTime:crystallos",0),"Crystallos", { alchemical = { Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:ice",0), Item("minecraft:ice",0), Item("minecraft:snow",0), Item("minecraft:snow",0) } }) alchemy[10] = AlchemicalCrafting(Item("AWWayofTime:terrae",0),"Terrae", { alchemical = { Item("AWWayofTime:simpleCatalyst",0) }, other = { Item("minecraft:sand",0), Item("minecraft:dirt",0), Item("minecraft:obsidian",0), Item("minecraft:obsidian",0) } }) alchemy[11] = AlchemicalCrafting(Item("AWWayofTime:aquasalus",0),"Aquasalus", { alchemical = { Item("AWWayofTime:simpleCatalyst",0), }, other = { Item("minecraft:dye",0), Item("minecraft:potion",0), Item("minecraft:potion",0), Item("minecraft:potion",0), } }) alchemy[12] = AlchemicalCrafting(Item("AWWayofTime:tennebrae",0),"Tenebrae", { alchemical = { Item("AWWayofTime:simpleCatalyst",0), Item("minecraft:coal",0), Item("minecraft:coal",0), }, other = { Item("minecraft:dye",0), Item("minecraft:clay_ball",0), } }) alchemy[13] = AlchemicalCrafting(Item("AWWayofTime:magicales",0),"Magicales", { alchemical = { Item("AWWayofTime:simpleCatalyst",0), Item("minecraft:gunpowder",0), }, other = { Item("minecraft:glowstone_dust",0), Item("minecraft:glowstone_dust",0), Item("minecraft:redstone",0), } }) alchemy[14] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",0),"Offensa", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), Item("AWWayofTime:incendium",0), }, other = { Item("minecraft:arrow",0), Item("minecraft:arrow",0), Item("minecraft:flint",0) } }) alchemy[15] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",1),"Praesidium", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), Item("AWWayofTime:tennebrae",0), Item("minecraft:web",0), }, other = { Item("minecraft:iron_ingot",0), Item("minecraft:redstone",0) } }) alchemy[16] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",2),"Orbis Terrae", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), Item("AWWayofTime:terrae",0), Item("minecraft:gunpowder",0), }, other = { Item("minecraft:sand",0), Item("minecraft:netherrack",0) } }) alchemy[17] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",6),"Virtus", { alchemical = { Item("minecraft:coal",0), Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), }, other = { Item("minecraft:gunpowder",0), Item("minecraft:redstone",0), Item("minecraft:redstone",0) } }) alchemy[18] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",7),"Reductus", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), }, other = { Item("minecraft:carrot",0), Item("minecraft:gold_ingot",0), Item("minecraft:soul_sand",0), Item("minecraft:redstone",0) } }) alchemy[19] = AlchemicalCrafting(Item("AWWayofTime:bloodMagicBaseAlchemyItems",8),"Potentia", { alchemical = { Item("AWWayofTime:bloodMagicBaseAlchemyItems",3), }, other = { Item("minecraft:glowstone_dust",0), Item("minecraft:quartz",0), Item("minecraft:dye",4), Item("minecraft:dye",4) } }) alchemy[20] = AlchemicalCrafting(Item("minecraft:web",0),"Cobweb", { alchemical = { }, other = { Item("minecraft:string",0), Item("minecraft:string",0), Item("minecraft:string",0), Item("minecraft:string",0), Item("minecraft:string",0) } }) alchemy[21] = AlchemicalCrafting(Item("minecraft:gunpowder",0),"Gunpowder", { alchemical = { Item("minecraft:coal",0), }, other = { Item("minecraft:gunpowder",0), Item("minecraft:sand",0), } }) alchemy[22] = AlchemicalCrafting(Item("minecraft:coal",0),"Coal", { alchemical = { }, other = { Item("minecraft:charcoal",0), Item("minecraft:charcoal",0), Item("minecraft:charcoal",0), Item("minecraft:charcoal",0), Item("minecraft:charcoal",0) } }) ----------End of ingredients section -----"Limits" section local quantities = {} function PrepareConfig () for i=1,#alchemy do quantities[i]={} quantities[i].name = alchemy[i].name quantities[i].lowPriNum = 50 quantities[i].highPriNum = 25 end cfg=fs.open("config.cfg","w") cfg.write(textutils.serialize(quantities)) cfg.flush() cfg.close() end function LoadConfig() local cfg = fs.open("config.cfg", "r") quantities = textutils.unserialize( cfg.readAll() ) cfg.close() end -----End of "Limits" Section ----Peripheral section local aeInterface local chest local altar function Peripherals () local per_found=0 per_list = peripheral.getNames() for i = 1, #per_list do if peripheral.getType(per_list[i]) == "tileinterface" then aeInterface = peripheral.wrap(per_list[i]) per_found=per_found+1 print (" Found AE Interface") elseif peripheral.getType(per_list[i]) == "tealtar" then altar = peripheral.wrap(per_list[i]) per_found=per_found+1 print (" Found Altar") else methods = peripheral.getMethods(per_list[i]) for j = 1, #methods do if methods[j] == "getStackInSlot" then chest = peripheral.wrap(per_list[i]) per_found=per_found+1 print (" Found altar 'storage'") end end end end if per_found ~= 3 then error("missing Peripherals") end end ----End of Peripheral section ----List Section local lowPriorityList = {} local highPriorityList = {} function PrepareListConnectionIDs() for i=1, #quantities do for j=1 ,#alchemy do if quantities[i].name == alchemy[j].name then quantities[i].alchemyID = j alchemy[j].quantitiesID = i break end end end end function RefreshLists () lowPriorityList = {} highPriorityList = {} for i=1, #quantities do detail = aeInterface.getItemDetail(alchemy[quantities[i].alchemyID].item) if detail ~= nil then qty = detail.basic().qty if qty