Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monX, monY = term.getSize()
- local function drawUI(sStepNumber, sText)
- term.clear()
- term.setBackgroundColor(colors.black)
- paintutils.drawLine(1, 1, monX, 1, colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(1, 1)
- term.write("arc13's Restore Utility")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(1, 3)
- term.write("Step "..sStepNumber)
- term.setCursorPos(1, 4)
- for i = 1, monX do
- write(string.char(131))
- end
- term.setCursorPos(1, 5)
- print(sText)
- end
- drawUI("1", "Welcome to the arc13's Restore Utility.\n\nThis wizard will guide you through this utility.\n\nIt is recommended that you eject all disks that may be connected to this computer.\n\nPress any key to continue.")
- os.pullEvent("key")
- drawUI("2", "Please sure that the backuped file \"files.bkp\" is on the directory \"/\".\n\nPress any key to continue.")
- os.pullEvent("key")
- if not fs.exists("/files.bkp") then
- error("File not found : \"/files.bkp\"", 0)
- end
- drawUI("3", "The wizard will now run the restore utility.\n\nPress any key to continue.\n\n")
- os.pullEvent("key")
- shell.run("pastebin run qryd43n6")
- drawUI("4", "The restore is done.\n\nYou should have all your files from your old computer.\n\nPress any key to continue.")
- os.pullEvent("key")
- drawUI("5", "The restore utility wizard is now finished.\n\nThanks for using me!\n\nPress any key to finish.")
- os.pullEvent("key")
- term.clear()
- term.setCursorPos(1, 1)
Add Comment
Please, Sign In to add comment