Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top") -- Change to the side of your modem
- printer = peripheral.wrap("right") -- Change to the side of your printer
- while true do
- sleep(0.5)
- x,title,z = rednet.receive() -- Receives the title from the client
- print("Title: "..title)
- printer.newPage()
- printer.setPageTitle(title)
- x,lines,z = rednet.receive() -- Receives the amount of lines to print
- print("Lines to write: "..lines)
- for i = 1, lines do -- Does this for the amount of lines you told it
- x,linetext,z = rednet.receive() -- Receives the linetext
- printer.setCursorPos(1,i) -- Sets the cursor position to the correct line
- printer.write(linetext) -- Writes the text to the page
- print("Line"..i..": "..linetext)
- end
- printer.endPage()
- end
Advertisement
Add Comment
Please, Sign In to add comment