Advertisement
Guest User

cell

a guest
Jun 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local cell =
  2. local mnt = peripheral.wrap("top")
  3. local eNow, eMAx
  4. local kRf = " kRF"
  5. local string
  6. local x,y
  7.  
  8. local function overview (x,y,string)
  9.     eNow = cell.getEnergyStored() / 1000
  10.     eMax = cell.getMaxEnergyStored() / 1000
  11.     mnt.setCursorPos(x,y)
  12.     mnt.setTextColor(colors.lightBlue)
  13.     mnt.write(string)
  14.     mnt.setCursorPos(x,y+2)
  15.     mnt.setTextColor(colors.red)
  16.     mnt.write(eNow)
  17.     mnt.setTextColor(colors.lightBlue)
  18.     mnt.write(" / ")
  19.     mnt.setTextColor(colors.green)
  20.     mnt.write(eMax) mnt.write(kRf)
  21. end
  22. while true do
  23.  overview(2,2,"enderman")
  24.  overview(2,6,"lukasraum")
  25.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement