Advertisement
PSquishyP

Untitled

Jun 22nd, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. while true do
  2.  
  3.     e, side, player, uuid, msg_raw = os.pullEvent("glasses_chat_command")
  4.  
  5.     msg = string.lower(msg_raw)
  6.    
  7.     if msg == "me" then
  8.         while true do
  9.             bridge.clear()
  10.             bridge.addBox(5,-150,200,100,0x000000,50).setScreenAnchor("left", "bottom")
  11.             bridge.addText(10,-60,"ComputeX BaseSense(TM) v 2.0",0xcccccc).setScreenAnchor("left", "bottom")
  12.            
  13.            
  14.             bridge.addText(10,-145,"ME Network:",0xff9966).setScreenAnchor("left", "bottom")
  15.             bridge.addText(13,-125,"Power: " .. ae.getStoredPower(),0xffffff).setScreenAnchor("left", "bottom")
  16.             bridge.addText(13,-115,"Avg Power Usage: " .. ae.getAvgPowerUsage(),0xffffff).setScreenAnchor("left", "bottom")
  17.             bridge.sync()
  18.             sleep(0.5)
  19.            
  20.             e, side, player, uuid, msg_raw = os.pullEvent("glasses_chat_command")
  21.            
  22.             if string.lower(msg_raw) !== "me" then
  23.                 goto exit
  24.             end
  25.         end
  26.     elseif msg == "test2" then
  27.         bridge.clear()
  28.         bridge.addBox(5,-150,200,100,0x000000,50).setScreenAnchor("left", "bottom")
  29.         bridge.addText(10,-60,"ComputeX BaseSense(TM) v 2.0",0xcccccc).setScreenAnchor("left", "bottom")
  30.     else
  31.         bridge.clear()
  32.         bridge.addBox(5,-150,200,100,0x000000,50).setScreenAnchor("left", "bottom")
  33.         bridge.addText(10,-60,"ComputeX BaseSense(TM) v 2.0",0xcccccc).setScreenAnchor("left", "bottom")
  34.     end
  35.     bridge.sync()
  36.     sleep(0.5)
  37.    
  38.     ::exit::
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement