18
oh, it still doesn't work btw
Code:
--declare all variables
--configuration
local configInscriber = "tileinscriber_0"
local configTopChest = "container_chest_0"
local configBottomChest = "container_chest_1"
local sleepTime = 5
--get all the peripherals
chests={}
--local chests['top'] = peripheral.wrap(configTopChest)
--local chests['Bottom'] = peripheral.wrap(configBottomChest)
local inscriber = peripheral.wrap(configInscriber)
--tables
--crafting recipes
local crafting={}
crafting['printedSilicon']={'Inscriber Silicon Press',"Silicon"}
--list with all the items
local items={}
--functions
function craft(ingredients)
local items={}
local amount=0
local errorMessage=nil
inscriber.pushItem("DOWN", 4, 64)
for key,value in pairs(items) do
amount=itemToInscriber(key,value)
if amount~=1 then
clean()
errorMessage="Not enough "..value.." stopping the crafting process"
--break()
end
end
end
function itemToInscriber(item,slot)
local where="DOWN"
for chestKey, chest in pairs (chests) do
local items =chest.getAllStacks(true)
for key,value in pairs(items) do
if value['name']==item then
if chestKey=="bottom" then
where="UP"
end
return chest.pushItemIntoSLot(where,key,1,slot)
end
end
end
return false
end
--other variables
craft(crafting['printedSilicon'])
oh, it still doesn't work btw