Advertisement
Guest User

startup

a guest
Jul 22nd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. rs.setOutput("back",false)
  2. while true do
  3. local mon = peripheral.wrap("top")
  4. local bank = peripheral.wrap("bottom")
  5. local procent = bank.getEnergyStored()/bank.getMaxEnergyStored()*100
  6.   if procent <= 60 then
  7.     rs.setOutput("back",true)
  8.   elseif procent >= 90 then
  9.     rs.setOutput("back",false)
  10.   end
  11.   mon.setTextColor(colors.green)
  12.   mon.setTextScale(5)
  13.   mon.setCursorPos(1,1)
  14.   mon.clear()
  15.   mon.write(procent.."%")
  16.   sleep(0)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement