Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem=peripheral.wrap("bottom")
- local wmod=peripheral.wrap("back")
- os.loadAPI("fevAPI")
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function printInfo()
- print()
- print("N&N corp. and computers will make programs for you")
- print("or install computer systems for shops and more")
- print("Press 2 or 3 for more info on what you would like.")
- print()
- end
- function printOrder()
- clear()
- print("Pricing is a f25 fee to be paid right now, ")
- print("and a f10 fee for 50 lines of code.")
- print("Some APIs may be used in writing your program and will add an f50 fee for each")
- write("Please enter a brief description of the program you would like made: ")
- str=read();
- print("Reservation fee: f25. Please enter your username and PIN")
- write("Username: ")
- unm=read()
- write("PIN: ")
- pin=read("*")
- if fevAPI.sendFunds(unm,pin,"THEMAULER431",25,wmod)=="GOOD_PURCHASE" then
- write("Your payment has been accepted, your program will be created.")
- modem.transmit(8833,8833,str);
- else
- print("Fund transfer failed. please try again.")
- end
- sleep(10)
- clear()
- end
- function printTalkMauler()
- print("Please talk to THEMAULER431 for an estimate on your system.")
- end
- while true do
- print("Press 1 for info, 2 for ordering a program, and 3 for ordering a computer network (e.g. shops, web server)")
- e={os.pullEvent("key")}
- if e[2]==keys.one then
- printInfo()
- elseif e[2]==keys.two then
- printOrder()
- elseif e[2]==keys.three then
- printTalkMauler()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement