Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getSideOfPeripheral()
- for k,v in pairs(rs.getSides()) do
- --print(v)
- if (peripheral.getType(v)) == "openperipheral_glassesbridge" then
- gl = peripheral.wrap(v)
- Main()
- end
- end
- end
- function updateHUD()
- gl.clear()
- gl.addBox(0,0,2000,10,0x006400,0.70)
- gl.addText(1,1,text)
- end
- function Main()
- while true do
- evt, text = os.pullEvent()
- if evt == "chat_command" then
- if text == "/clear" then
- gl.clear()
- elseif text == "/changelog" then
- text = "Changed the peripheral required to.."
- updateHUD()
- text = "The OpenPeriphreals Glasses :)"
- sleep(1)
- updateHUD()
- text = "Also, you now need to type in chat.."
- sleep(1)
- updateHUD()
- text = "with this in front: '$$' no need for"
- sleep(1)
- updateHUD()
- text = "a space."
- sleep(1)
- updateHUD()
- elseif text == "/help" then
- text = "Don't forget to right click the.."
- print("Don't forget to right click the Terminal Glasses Bridge with the glasses!")
- updateHUD()
- sleep(1)
- text = "Terminal Glasses Bridge with the glasses!"
- updateHUD()
- sleep(1)
- text = "Use /clear to clear the screen"
- updateHUD()
- sleep(1)
- text = "and /changelog to see this version's changelog"
- updateHUD()
- sleep(1)
- text = "/help shows you this message."
- updateHUD()
- else
- updateHUD()
- end
- end
- end
- end
- getSideOfPeripheral()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement