Saereth

SmelteryController

Apr 10th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while true do
  2. local s
  3. local sInfo
  4. local tank
  5. local amount
  6. tank = 0
  7.     s = peripheral.wrap("back")
  8.     sInfo = s.getTankInfo("WEST")
  9.     if sInfo[1]["contents"]["name"] == "draconium" then
  10.         tank = 1
  11.     else if sInfo[2] not nil and sInfo[2]["contents"]["name"] == "draconium" then
  12.         tank = 2
  13.     else if sInfo[3] not nil and sInfo[3]["contents"]["name"] == "draconium" then
  14.         tank = 3
  15.     end
  16.  
  17.     if tank ~= 0
  18.     amount = sInfo[tank]["contents"]["amount"]
  19.  
  20.     if amount < 1152 then
  21.     redstone.setOutput("left",true)
  22.     else
  23.     redstone.setOutput("left",false)
  24.     end
  25.  
  26. sleep(2)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment