Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tier = 5
- altar = peripheral.wrap("top")
- chest = peripheral.wrap("bottom")
- function getTotalCount(item)
- a=0
- for i,v in pairs(chest.getAllStacks()) do
- if v.display_name == item then
- a = a + v.qty
- end
- end
- return a
- end
- function getSlotWithItem(item)
- for i,v in pairs(chest.getAllStacks()) do
- if (v.display_name == item) then
- if (v.qty >0) then
- return i
- end
- end
- end
- end
- if altar.getStackInSlot(1)==nil then
- while true do
- sleep(6)
- altarcapacity = altar.getInfo().capacity
- if altar.getInfo().amount >= (altarcapacity-1000) then redstone.setOutput("front",true) else redstone.setOutput("front",false) end
- if redstone.getInput("back") == false then
- if altar.getStackInSlot(1)==nil then
- if getTotalCount("Blank Slate") < 48 then
- shell.run("BlankSlate")
- end
- if Tier >= 2 then if getTotalCount("Reinforced Slate") < 32 then
- shell.run("ReinforcedSlate")
- end end
- if Tier >= 3 then if getTotalCount("Imbued Slate") < 8 then
- shell.run("ImbuedSlate")
- end end
- if Tier >= 4 then if getTotalCount("Demonic Slate") < 4 then
- shell.run("DemonicSlate")
- end end
- if Tier >= 5 then if getTotalCount("Ethereal Slate") < 2 then
- shell.run("EtherealSlate")
- end end end
- end
- end
- else
- altar.pushItem("DOWN",1,1,1)
- chest.pullItem("UP",1,1)
- end
Add Comment
Please, Sign In to add comment