Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local s
- local sInfo
- local tank
- local amount
- tank = 0
- s = peripheral.wrap("back")
- sInfo = s.getTankInfo("WEST")
- if sInfo[1]["contents"]["name"] == "draconium" then
- tank = 1
- else if sInfo[2] not nil and sInfo[2]["contents"]["name"] == "draconium" then
- tank = 2
- else if sInfo[3] not nil and sInfo[3]["contents"]["name"] == "draconium" then
- tank = 3
- end
- if tank ~= 0
- amount = sInfo[tank]["contents"]["amount"]
- if amount < 1152 then
- redstone.setOutput("left",true)
- else
- redstone.setOutput("left",false)
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment