Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fileNames = { "slateControl", "gui", "blank", "reinforced", "imbued", "demonic", "ethereal", "startup2" }
- pastebins = { "VNipiBCm", "e5BTwCf7", "VeUdQcV5", "Bd3k4MET", "xV12cWrp", "XwhmXPwN", "JxS4jjGW", "JxS4jjGW" }
- goAhead = {}
- term.clear()
- term.setCursorPos(1,1)
- print("You are attempting to install LezChap's Slate Crafting Terminal. Please wait while we check your system's available memory...")
- print(" ")
- function checkFile(name)
- if fs.exists(name) then
- sleep(.5)
- print("File '"..name.."' already exists. It must be removed to continue the install, do you wish to delete the original file? (Y or N)")
- local waiting = true
- os.startTimer(1)
- while waiting do
- event, param1, param2 = os.pullEvent()
- if event == "timer" then
- os.startTimer(1)
- end
- if event == "char" then
- if param1 == "y" or param1 == "Y" then
- print(param1)
- fs.delete(name)
- waiting = false
- return true
- end
- if param1 == "n" or param1 == "N" then
- print(param1)
- print("Installation cannot continue...you selected No.")
- os.queueEvent("terminate")
- sleep(1)
- waiting = false
- return false
- end
- end
- end
- else
- return true
- end
- end
- for k,v in ipairs(fileNames) do
- if checkFile(v) then
- goAhead[k] = true
- end
- end
- fail = false
- for k, v in pairs(goAhead) do
- if not v then
- fail = true
- break
- end
- end
- if fail then
- print("Cannot install the Slate Crafting Terminal, you must have selected to not delete a file.")
- print("Please fix the problem and try again.")
- else
- print("Downloading Programs:")
- for k,v in ipairs(fileNames) do
- print(v..":")
- shell.run("pastebin get "..pastebins[k].." "..v)
- end
- print("Installation complete. Please rename 'startup2' to 'startup' to run automatically on boot.")
- print("Make sure to edit the Redstone input/output directions in the variables at the top of 'slateControl' or the program won't function properly.")
- print("Requires a properly configured SFM setup. Please see the following album for an idea on how to accomplish this: http://imgur.com/a/es2gi")
- end
Advertisement
Add Comment
Please, Sign In to add comment