Advertisement
Derek1017

Test 2

Apr 10th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. p = peripheral.wrap("left")
  2. p.clear()
  3. function Main()
  4.  while true do
  5.   t = os.time()
  6.   d = (textutils.formatTime(t,false))
  7.   p.clear()
  8.   box = p.addBox(4,30,100.00345,5,0xCD0000,0.5)
  9.   text = p.addText(5,5,d,0xFFFFFF)
  10.   text = p.addText(5,15,"Eu Storage.",0xFFFFFF)
  11.   network = peripheral.wrap("bottom")
  12.   E = network.callRemote("batbox_0","getStored")
  13.   E = E / 10000000*100
  14.   box = p.addBox(4,30,E,5,0x76EE00,1)
  15.   meSystem()
  16.   sleep(1)
  17.  end
  18. end
  19.  
  20. function meSystem()
  21.  if meWait == 5 then
  22.  meWait = 0
  23.  totalSpace = network.callRemote("me_crafting_terminal_2","getTotalBytes")
  24.  f = network.callRemote("me_crafting_terminal_2","getFreeBytes")
  25.  f = f / totalSpace*100
  26.  print(freeSpace)
  27.  text = p.addText(5,45,"Me System,",0xFFFFFF)
  28.  box = p.addBox(4,60,100.00345,5,0xCD0000,0.5)
  29.  box = p.addBox(4,60,f,5,0x76EE00,1)
  30.  else
  31.   meWait = meWait + 1
  32.   text = p.addText(5,45,"Me System.",0xFFFFFF)
  33.   box = p.addBox(4,60,100.00345,5,0xCD0000,0.5)
  34.   box = p.addBox(4,60,f,5,0x76EE00,1)
  35.  end
  36. end
  37.  
  38. function HUDreload()
  39.  p.clear()
  40.  os.reboot()
  41. end
  42.  
  43. while true do
  44.  f = 0
  45.  meWait = 0
  46.  Main()
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement