Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printer = peripheral.wrap("bottom")
- loop = 1
- while loop == 1 do
- term.clear()
- term.setCursorPos(1,1)
- print("Please select the document number you would like to print:\n ")
- print("1 - Price Quote")
- print("2 - Invoice")
- print("3 - Receipt")
- print("4 - Letter")
- print("5 - Redaction")
- input = tonumber(read())
- if (input == nil) or (input > 5) then
- print("Invalid Option, please try again")
- sleep(2)
- else
- loop = 0
- end
- end
- if input == 1 then
- -- Quote
- print("Please insert purple dye for pre-print")
- print("Press the enter key when done")
- read()
- printer.newPage()
- printer.setPageTitle("Condemned Mall Ad Agency - Quote")
- printer.setCursorPos(1,1)
- printer.write("Condemned Mall Ad Agency")
- printer.setCursorPos(1,3)
- printer.write("Services Price Quote:")
- for i = 4, 13 do
- printer.setCursorPos(1,i)
- printer.write(" | $ ")
- end
- printer.setCursorPos(1,14)
- printer.write("Total: $")
- printer.setCursorPos(1,15)
- printer.write("Quoted for:")
- printer.setCursorPos(1,17)
- printer.write("Quoted by:")
- printer.setCursorPos(1,19)
- printer.write("Quote ID:")
- printer.setCursorPos(1,20)
- printer.write("Quotes don't expire")
- printer.setCursorPos(1,21)
- printer.write("Thanks for choosing us!")
- printer.endPage()
- print("Please reinsert page and black ink")
- print("Press the enter key when done:")
- read()
- term.clear()
- term.setCursorPos(1,1)
- loop2 = 1
- total = 0
- printer.newPage()
- -- Price Quote Items
- for i = 1, 10 do
- print("Please enter line item " .. i .. "/10")
- print("------------------")
- printer.setCursorPos(1, (i + 3))
- printer.write(read())
- print("Please enter price for item " .. i .. "/10")
- print("Do not include the $ or commas!")
- print("----")
- printer.setCursorPos(22, (i + 3))
- input2 = read()
- printer.write(input2)
- if tonumber(input2) == nil then
- input2 = 0
- end
- total = total + tonumber(input2)
- end
- printer.setCursorPos(9,14)
- printer.write(total)
- print("Please enter the customer's username:")
- cName = read()
- printer.setCursorPos(1,16)
- printer.write(cName)
- print("Please enter your username:")
- yName = read()
- printer.setCursorPos(1,18)
- printer.write(yName)
- print("Please create an ID for this Quote")
- ID = read()
- printer.setCursorPos(10,19)
- printer.write(ID)
- printer.endPage()
- print("Quote printed!")
- elseif input == 2 then
- -- Invoice/Bill
- print("Please insert orange dye for pre-print")
- print("Press the enter key when done")
- read()
- printer.newPage()
- printer.setPageTitle("Condemned Mall Ad Agency - Invoice")
- printer.setCursorPos(1,1)
- printer.write("Condemned Mall Ad Agency")
- printer.setCursorPos(1,3)
- printer.write("Service Invoice:")
- for i = 4, 13 do
- printer.setCursorPos(1,i)
- printer.write(" | $ ")
- end
- printer.setCursorPos(1,14)
- printer.write("Total: $")
- printer.setCursorPos(1,15)
- printer.write("Invoice for:")
- printer.setCursorPos(1,17)
- printer.write("Please pay promptly")
- printer.setCursorPos(1,20)
- printer.write("Thanks for choosing the")
- printer.setCursorPos(1,21)
- printer.write("Condemned Mall Ad Agency")
- printer.endPage()
- print("Please reinsert page and black ink")
- print("Press the enter key when done:")
- read()
- term.clear()
- term.setCursorPos(1,1)
- loop2 = 1
- total = 0
- printer.newPage()
- -- Invoiced Items
- for i = 1, 10 do
- print("Please enter line item " .. i .. "/10")
- print("------------------")
- printer.setCursorPos(1, (i + 3))
- printer.write(read())
- print("Please enter price for item " .. i .. "/10")
- print("Do not include the $ or commas!")
- print("----")
- printer.setCursorPos(22, (i + 3))
- input2 = read()
- printer.write(input2)
- if tonumber(input2) == nil then
- input2 = 0
- end
- total = total + tonumber(input2)
- end
- printer.setCursorPos(9,14)
- printer.write(total)
- print("Please enter the customer's username:")
- cName = read()
- printer.setCursorPos(1,16)
- printer.write(cName)
- printer.endPage()
- print("Invoice printed!")
- elseif input == 3 then
- -- Payment Receipts
- print("Please insert green dye for pre-print")
- print("Press the enter key when done")
- read()
- printer.newPage()
- printer.setPageTitle("Condemned Mall Ad Agency - Receipt")
- printer.setCursorPos(1,1)
- printer.write("Condemned Mall Ad Agency")
- printer.setCursorPos(1,3)
- printer.write("Payment Receipt:")
- for i = 4, 13 do
- printer.setCursorPos(1,i)
- printer.write(" | $ ")
- end
- printer.setCursorPos(1,14)
- printer.write("Total: $")
- printer.setCursorPos(1,15)
- printer.write("Receipt for:")
- printer.setCursorPos(1,17)
- printer.write("Paid in full")
- printer.setCursorPos(1,20)
- printer.write("Thanks for choosing the")
- printer.setCursorPos(1,21)
- printer.write("Condemned Mall Ad Agency")
- printer.endPage()
- print("Please reinsert page and black ink")
- print("Press the enter key when done:")
- read()
- term.clear()
- term.setCursorPos(1,1)
- loop2 = 1
- total = 0
- printer.newPage()
- -- Receipt Items
- for i = 1, 10 do
- print("Please enter line item " .. i .. "/10")
- print("------------------")
- printer.setCursorPos(1, (i + 3))
- printer.write(read())
- print("Please enter price for item " .. i .. "/10")
- print("Do not include the $ or commas!")
- print("----")
- printer.setCursorPos(22, (i + 3))
- input2 = read()
- printer.write(input2)
- if tonumber(input2) == nil then
- input2 = 0
- end
- total = total + tonumber(input2)
- end
- printer.setCursorPos(9,14)
- printer.write(total)
- print("Please enter the customer's username:")
- cName = read()
- printer.setCursorPos(1,16)
- printer.write(cName)
- printer.endPage()
- print("Receipt printed!")
- elseif input == 4 then
- -- Custom Leter
- print("Please insert red dye for pre-print")
- print("Press the enter key when done")
- read()
- printer.newPage()
- printer.setPageTitle("Condemned Mall Ad Agency Letter")
- printer.setCursorPos(1,1)
- printer.write(" Letter from the ")
- printer.setCursorPos(1,2)
- printer.write("Condemned Mall Ad Agency")
- printer.endPage()
- print("Please reinsert page and black ink")
- print("Press the enter key when done:")
- read()
- term.clear()
- term.setCursorPos(1,1)
- loop2 = 1
- total = 0
- printer.newPage()
- print("Please write your opening:")
- print("------------------------")
- input = read()
- printer.setCursorPos(1,4)
- printer.write(input)
- -- Price Quote Items
- for i = 6, 18 do
- print("Please write your letter:")
- print("Line " .. (i - 5) .. "/13")
- print("------------------------")
- printer.setCursorPos(1, i)
- printer.write(read())
- end
- print("Please write your closing:")
- print("------------------------")
- printer.setCursorPos(1,20)
- printer.write(read())
- print("Please write your username:")
- print("------------------------")
- printer.setCursorPos(1,21)
- printer.write(read())
- printer.endPage()
- print("Letter printed!")
- elseif input == 5 then
- print("Please enter paper to be readacted and ink of choice")
- print("Press the enter key when done:")
- read()
- printer.newPage()
- for i = 1, 21 do
- printer.setCursorPos(1,i)
- printer.write("------------------------")
- end
- printer.setPageTitle("Redacted")
- printer.endPage()
- print("Document redacted!")
- else
- printer.newPage()
- printer.setCursorPos(1,1)
- printer.write("Warning: Invalid Option")
- printer.endPage()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement