Advertisement
Virgilcore

Indust SG address printer

Jul 1st, 2022 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local printer = peripheral.wrap("right")
  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("Spawn: ZFXX-O14-9G")
  15.  
  16.   printer.setCursorPos(1, 2)
  17.   printer.write("Outlands: PE9E-ZWB-O0")
  18.  
  19.   printer.setCursorPos(1, 4)
  20.   printer.write("tCRoC: P0E6-BZP-B4")
  21.  
  22.   printer.setCursorPos(1, 6)
  23.   printer.write("Obama Island: DZED-O6H-MD")
  24.  
  25.   printer.setPageTitle("Stargate Addresses")
  26.   printer.endPage()
  27. else
  28.   error("Page could not be created.")
  29. end
  30. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement