Advertisement
demon012

SeedOilTankMonitor

Aug 20th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. function getTankAmount()--{{{
  2.     local tank = peripheral.wrap("back")
  3.     return tank.getTanks("unknown")[1].amount
  4. end--}}}
  5. while true do
  6.     os.startTimer(60)
  7.     event, param1, param2, param3 = os.pullEvent("timer")
  8.     amount = getTankAmount()
  9.     if amount > 800000 then
  10.         rs.setOutput("left", true)
  11.     else
  12.         rs.setOutput("left", false)
  13.     end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement