Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local computer = require("computer")
- local term = require("term")
- local component = require("component")
- local event = require("event")
- local m = component.modem
- op = require("component").openprinter
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- print("booting")
- os.sleep(1)
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- print("booting.")
- os.sleep(1)
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- print("booting..")
- os.sleep(1)
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- print("booting...")
- os.sleep(1)
- os.execute("cls")
- print("===============")
- print(" ButOS")
- print("===============")
- print("booting....")
- os.sleep(1)
- ::passstart::
- os.execute("cls")
- ::homep::
- os.execute("cls")
- print("===============")
- print(" ButOS V0.2")
- print("===============")
- print("please select option")
- print("1) Settings")
- print("2) Order Red Dragon")
- print("3) Print a Document")
- print("4) Order Food For Pickup - K-Roger")
- print("5) Shutdown")
- option = io.read("*l")
- if option == "1" then
- goto settings
- elseif option == "2" then
- goto pizza
- elseif option == "3" then
- goto prints
- elseif option == "5" then
- os.execute("shutdown")
- elseif option == "4" then
- goto Kro
- elseif option == "N-A-9175-B" then
- goto endit
- else
- os.execute("cls")
- print("error incorect syntax [" .. option .. "] please try again")
- os.sleep(3)
- goto homep
- end
- ::settings::
- os.execute("cls")
- print("===============")
- print(" ButOS V0.2")
- print("===============")
- print("1) Back")
- print("2) Update")
- option = io.read("*l")
- if option == "1" then
- goto homep
- elseif option == "2" then
- goto update
- elseif option == "9175" then
- goto updateE
- else
- os.execute("cls")
- print("error incorect syntax [" .. option .. "] please try again")
- os.sleep(3)
- goto settings
- end
- ::Kro::
- os.execute("cls")
- print("Connecting")
- m.open(85)
- m.broadcast(80, "ping")
- message=event.pull(5,"modem_message")
- if message == "modem_message" then
- goto krobeg
- else
- goto kroe
- end
- ::krobeg::
- os.execute("cls")
- print("name for order")
- kroname = io.read("*l")
- os.execute("cls")
- print("please list all items")
- kroit = io.read("*l")
- os.execute("cls")
- print("is this order correct?")
- print(kroname .. " ordered " .. kroit)
- print("y/n")
- kroect = io.read("*l")
- if kroect == "y" then
- print("order sent")
- elseif kroect == "n" then
- goto krobeg
- end
- m.broadcast(421, kroname .. " ordered " .. kroit)
- goto Kroend
- ::kroe::
- os.execute("cls")
- print("error could not connect")
- os.sleep(2)
- ::Kroend::
- goto homep
- ::pizza::
- os.execute("cls")
- print("Connecting")
- m.open(75)
- m.broadcast(420, "ping")
- message=event.pull(15,"modem_message")
- if message == "modem_message" then
- goto name
- else
- goto pizend
- end
- ::name::
- os.execute("cls")
- print("name for order")
- name = io.read("*l")
- ::wdyw::
- os.execute("cls")
- print("What would you like")
- wdyws = io.read("*l")
- ::DOP::
- os.execute("cls")
- print("do you want pickup or delivery?")
- print("p - pickup d - delivery")
- dops = io.read("*l")
- if dops == "p" then
- adop = "pickup"
- address = "in store"
- elseif dops == "d" then
- adop = "delivery"
- os.execute("cls")
- print("what is the delivery address?")
- address = io.read("*l")
- else
- goto DOP
- end
- ::cor::
- os.execute("cls")
- print("is this order correct?")
- print(name .. " would like " .. wdyws .. " for " .. adop .. " at " .. address)
- print("y/n")
- correct = io.read("*l")
- if correct == "y" then
- print("order sent")
- elseif correct == "n" then
- goto wdyw
- else
- goto cor
- end
- m.broadcast(420, name .. " would like " .. wdyws .. " for " .. adop .. " at " .. address)
- goto pizzend
- ::pizend::
- os.execute("cls")
- print("error could not connect")
- os.sleep(2)
- ::pizzend::
- goto homep
- ::prints::
- ::beg::
- printsamou = 0
- pagepr = 0
- runth = 0
- os.execute("cls")
- print("set the title")
- title = io.read("*l")
- os.execute("cls")
- print("type contents (or [done] if finished)")
- print("dont type pass this line l")
- ::contents::
- content = ""
- printsamou = printsamou + 1
- content = io.read("*l")
- if content == "done" then goto aftercont end
- if printsamou == 20 then
- pagepr = pagepr + 1
- op.setTitle(title .. " - " .. pagepr)
- op.writeln(content)
- op.print()
- printsamou = 0
- goto contents
- else
- op.writeln(content)
- goto contents
- end
- ::aftercont::
- if pagepr > 0 then
- pagepr = pagepr + 1
- op.setTitle(title .. " - " .. pagepr)
- else
- op.setTitle(title)
- end
- op.print()
- os.execute("cls")
- print("printing")
- os.sleep(1)
- os.execute("cls")
- print("printing.")
- os.sleep(1)
- os.execute("cls")
- print("printing..")
- os.sleep(1)
- os.execute("cls")
- print("printing...")
- os.sleep(1)
- os.execute("cls")
- print("printing....")
- os.sleep(1)
- os.execute("cls")
- goto homep
- ::update::
- os.execute("pastebin get -f 2UEPNuC1 butos")
- print("type [butos] to start the system")
- ::updateE::
- os.execute("pastebin get -f QnTXxSHP butose")
- os.execute("del .shrc")
- file = io.open(".shrc", "w")
- file:write("/home/butose")
- print("type [butose] to start the system")
- ::endit::
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement