Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- line = 2
- function messageLogWindow()
- w,h = term.getSize()
- msgWindow = window.create(term.native(),(w-9),(h-10),10,11)
- msgWindow.setBackgroundColor(colors.gray)
- msgWindow.clear()
- end
- function msgReciever()
- while true do
- id,msg,prot = rednet.receive("dms")
- msgWindow.setCursorPos(2,line)
- color = 2^id
- msgWindow.setTextColor(color)
- if(id==4)then
- msgWindow.write("Jack: ")
- elseif(id==5)then
- msgWindow.write("Fr0gs: ")
- elseif(id==6)then
- msgWindow.write("Kas: ")
- else
- msgWindow.write("Unknown: ")
- end
- msgWindow.setTextColor(1)
- msgWindow.write(msg)
- line = line + 1
- end
- end
- messageLogWindow()
- msgReciever()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement