Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glass = peripheral.wrap("right")
- chatlog = {"a ","b ","c ","d ","e "}
- function addBox()
- glass.addBox(0,0,128,64,0xFFFFFF,0.2)
- end
- function timeDis()
- time = textutils.formatTime(os.time(),false)
- glass.addText(6,2,time,0x000000)
- end
- function getChat()
- checking = os.pullEvent()
- print(checking)
- if checking.match(checking,"say ") then
- chatlog.insert(tab,1,checking.sub(checking,5,-1))
- end
- checking = " "
- end
- function disChat()
- i = 1
- --print(chatlog[1])
- for c = 5,1,-1 do
- glass.addText(4,i+15,chatlog[c],0x000000)
- i = i+9
- end
- end
- function update()
- os.queueEvent("update")
- end
- while true do
- glass.clear()
- addBox()
- timeDis()
- disChat()
- parallel.waitForAny(getChat, update)
- sleep(.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement