Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = fs.open("chatlog","a")
- m = peripheral.wrap("top")
- c = peripheral.wrap("right")
- m.clear()
- m.setCursorPos(1,1)
- i=1
- function try()
- _, player, msg = os.pullEvent("chat")
- end
- while true do
- if pcall(try) then
- str = player .. ": " .. msg
- print(str)
- f.write(str.."\n")
- m.setCursorPos(1,i)
- m.write(str)
- i=i+1
- end
- if i==16 then
- i=1
- m.clear()
- m.setCursorPos(1,i)
- f.close()
- f = fs.open("chatlog", "a")
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement