SHARE
TWEET

print

a guest Aug 25th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. term.write('What is the Loan for? ')
  14. local loan = read()
  15.  
  16. term.write('Who is the Loan for? ')
  17. local player = read()
  18.  
  19. term.write('Length of Loan (include end date)? ')
  20. local time = read()
  21.  
  22. if printer.newPage() then
  23.   printer.write(("Loan for:") .. loan, ("between ") .. player, (" and The Bank of Skynet."))
  24.  
  25.   printer.setCursorPos(1, 3)
  26.   printer.write("* Duration; ".. time )
  27.  
  28.   printer.setCursorPos(1, 5)
  29.   printer.write("* Early repayment is accepted.")
  30.  
  31.   printer.setCursorPos(1, 7)
  32.   printer.write("* Failure to pay within this time frame results in a 5 Invar charge.")
  33.  
  34.   printer.setCursorPos(1, 9)
  35.   printer.write("* By leaving the Bank of Skynet with ".. loan, ", you have automatically accepted the terms.")
  36.  
  37.   printer.setCursorPos(1, 11)
  38.   printer.write("Kind regards,")
  39.  
  40.   printer.setCursorPos(1, 12)
  41.   printer.write("The Bank of Skynet - A hive of brilliance")
  42.  
  43.   printer.setPageTitle("Loan Agreement")
  44.   printer.endPage()
  45. else
  46.   error("Page could not be created.")
  47. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top