Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local printer = peripheral.wrap("printer_0")
- if printer.getPaperLevel() == 0 then -- If there is no paper in the printer
- error("There is no paper in the printer!")
- end
- if printer.getInkLevel() == 0 then -- If there is no ink in the printer
- error("There is no ink in the printer!")
- end
- -- There is paper and ink in the printer, we can now print a page
- term.write('What is the Loan for? ')
- local loan = read()
- term.write('Who is the Loan for? ')
- local player = read()
- term.write('Length of Loan (include end date)? ')
- local time = read()
- if printer.newPage() then
- printer.write(("Loan for:") .. loan, ("between ") .. player, (" and The Bank of Skynet."))
- printer.setCursorPos(1, 3)
- printer.write("* Duration; ".. time )
- printer.setCursorPos(1, 5)
- printer.write("* Early repayment is accepted.")
- printer.setCursorPos(1, 7)
- printer.write("* Failure to pay within this time frame results in a 5 Invar charge.")
- printer.setCursorPos(1, 9)
- printer.write("* By leaving the Bank of Skynet with ".. loan, ", you have automatically accepted the terms.")
- printer.setCursorPos(1, 11)
- printer.write("Kind regards,")
- printer.setCursorPos(1, 12)
- printer.write("The Bank of Skynet - A hive of brilliance")
- printer.setPageTitle("Loan Agreement")
- printer.endPage()
- else
- error("Page could not be created.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement