Advertisement
Marlingaming

CC Tweaked CCSPS Iron Apps - HopeLost Start File

Feb 11th, 2022 (edited)
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. local ReqFiles = {"os/System/User/Programs/HopeList.cpf/Base.lua"}
  2. local ProFiles = {{"SE8Pk0Ea","Base.lua"}}
  3. local FilePath = "os/System/User/Programs/HopeLost.cpf"
  4.  
  5. local function Clear()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. end
  9.  
  10. local function CheckFiles()
  11. local Pass = true
  12. for i = 1, #ReqFiles do
  13. if fs.exists(ReqFiles[i]) then
  14.  
  15. else
  16. Pass = false
  17. end
  18. end
  19. return Pass
  20. end
  21.  
  22. local function DownloadFiles()
  23. settings.load(".settings")
  24. for i = 1, #ProFiles do
  25. shell.run(settings.get("osPaster"),"get",ProFiles[i][1],fs.combine(FilePath,ProFiles[i][2]))
  26. end
  27. fs.makeDir(fs.combine(FilePath,"/Maps"))
  28. fs.makeDir(fs.combine(FilePath,"/Images"))
  29. end
  30.  
  31. local function DownloadImages()
  32. shell.run(settings.get("osPaster"),"run","")
  33. end
  34.  
  35. function Start()
  36. Clear()
  37. if CheckFiles() == true then
  38. shell.run(fs.combine(FilePath,"Base.lua"),"start")
  39. else
  40. error("files missing, starting download")
  41. DownloadFiles()
  42. DownloadImages()
  43. Start()
  44. end
  45. end
  46.  
  47. Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement