Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. local printer = peripheral.wrap("printer_0")
  2.  
  3. if printer.getPaperLevel() == 0 then -- If there is no paper in the printer
  4. error("There is no paper in the printer!")
  5. end
  6.  
  7. if printer.getInkLevel() == 0 then -- If there is no ink in the printer
  8. error("There is no ink in the printer!")
  9. end
  10.  
  11. -- There is paper and ink in the printer, we can now print a page
  12.  
  13. if printer.newPage() then
  14. printer.write("Tasks:")
  15.  
  16. printer.setCursorPos(1, 3)
  17. printer.write("* Check melon farm")
  18.  
  19. printer.setCursorPos(1, 4)
  20. printer.write("* Get more ender pearls")
  21.  
  22. printer.setPageTitle("Tasks")
  23. printer.endPage()
  24. else
  25. error("Page could not be created.")
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement