Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReqFiles = {"os/System/User/Programs/HopeList.cpf/Base.lua"}
- local ProFiles = {{"SE8Pk0Ea","Base.lua"}}
- local FilePath = "os/System/User/Programs/HopeLost.cpf"
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- local function CheckFiles()
- local Pass = true
- for i = 1, #ReqFiles do
- if fs.exists(ReqFiles[i]) then
- else
- Pass = false
- end
- end
- return Pass
- end
- local function DownloadFiles()
- settings.load(".settings")
- for i = 1, #ProFiles do
- shell.run(settings.get("osPaster"),"get",ProFiles[i][1],fs.combine(FilePath,ProFiles[i][2]))
- end
- fs.makeDir(fs.combine(FilePath,"/Maps"))
- fs.makeDir(fs.combine(FilePath,"/Images"))
- end
- local function DownloadImages()
- shell.run(settings.get("osPaster"),"run","")
- end
- function Start()
- Clear()
- if CheckFiles() == true then
- shell.run(fs.combine(FilePath,"Base.lua"),"start")
- else
- error("files missing, starting download")
- DownloadFiles()
- DownloadImages()
- Start()
- end
- end
- Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement