Advertisement
Rolcam

[WIP] Computercraft Programming Tutorial Installer

Jun 14th, 2021 (edited)
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.31 KB | None | 0 0
  1. -- Work In Progress - Will get updated as I work on the new programs
  2. term.setBackgroundColor(colors.cyan)
  3. term.clear()
  4. term.setTextColor(colors.white)
  5. term.setCursorPos(1,1)
  6. print("Downloading Tutorial Programs")
  7.  
  8. -- Introduction(Module 1)
  9. if not fs.exists("section1") then
  10.     shell.run("pastebin get QZHpv6gN section1")
  11. else
  12.     print("Module Detected! Updating...")
  13.     fs.delete("section1")
  14.     shell.run("pastebin get QZHpv6gN section1")
  15.     print("Module Updated")
  16. end
  17.  
  18. -- Basic Commands (Module 2)
  19. if not fs.exists("section2") then
  20.     shell.run("pastebin get Cr67UQJR section2")
  21. else
  22.     print("Module Detected! Updating...")
  23.     fs.delete("section2")
  24.     shell.run("pastebin get Cr67UQJR section2")
  25.     print("Module Updated")
  26. end
  27.  
  28. -- Variables (Module 3)
  29. if not fs.exists("section3") then
  30.     shell.run("pastebin get fcGxkhvi section3")
  31. else
  32.     print("Module Detected! Updating...")
  33.     fs.delete("section3")
  34.     shell.run("pastebin get fcGxkhvi section3")
  35.     print("Module Updated")
  36. end
  37.  
  38. -- Text (Module 4)
  39. if not fs.exists("section4") then
  40.     shell.run("pastebin get S5GB1rYA section4")
  41. else
  42.     print("Module Detected! Updating...")
  43.     fs.delete("section4")
  44.     shell.run("pastebin get S5GB1rYA section4")
  45.     print("Module Updated")
  46. end
  47.  
  48. -- Colors (Module 5)
  49. if not fs.exists("section5") then
  50.     shell.run("pastebin get XRykh4Mx section5")
  51. else
  52.     print("Module Detected! Updating...")
  53.     fs.delete("section5")
  54.     shell.run("pastebin get XRykh4Mx section5")
  55.     print("Module Updated")
  56. end
  57.  
  58. -- If/Else Statements (Module 6)
  59. if not fs.exists("section6") then
  60.     shell.run("pastebin get yxifrr53 section6")
  61. else
  62.     print("Module Detected! Updating...")
  63.     fs.delete("section6")
  64.     shell.run("pastebin get yxifrr53 section6")
  65.     print("Module Updated")
  66. end
  67.  
  68. -- Loops (Module 7)
  69. if not fs.exists("section7") then
  70.     shell.run("pastebin get 4Kd70Qb6 section7")
  71. else
  72.     print("Module Detected! Updating...")
  73.     fs.delete("section7")
  74.     shell.run("pastebin get 4Kd70Qb6 section7")
  75.     print("Module Updated")
  76. end
  77.  
  78. -- Loops Continued (Module 7.1)
  79. if not fs.exists("section71") then
  80.     shell.run("pastebin get h3a2UMfk section71")
  81. else
  82.     print("Module Detected! Updating...")
  83.     fs.delete("section71")
  84.     shell.run("pastebin get h3a2UMfk section71")
  85.     print("Module Updated")
  86. end
  87.  
  88. -- Redstone (Module 8)
  89. if not fs.exists("section8") then
  90.     shell.run("pastebin get UcCUqnUm section8")
  91. else
  92.     print("Module Detected! Updating...")
  93.     fs.delete("section8")
  94.     shell.run("pastebin get UcCUqnUm section8")
  95.     print("Module Updated")
  96. end
  97.  
  98. -- Redstone Continued (Module 7.1)
  99. if not fs.exists("section81") then
  100.     shell.run("pastebin get 8qs45yYb section81")
  101. else
  102.     print("Module Detected! Updating...")
  103.     fs.delete("section81")
  104.     shell.run("pastebin get 8qs45yYb section81")
  105.     print("Module Updated")
  106. end
  107.  
  108. -- File System (Module 9.1)
  109. if not fs.exists("section9") then
  110.     shell.run("pastebin get FfmS5WiZ section9")
  111. else
  112.     print("Module Detected! Updating...")
  113.     fs.delete("section9")
  114.     shell.run("pastebin get FfmS5WiZ section9")
  115.     print("Module Updated")
  116. end
  117.  
  118. -- File System Continued (Module 9.1)
  119. if not fs.exists("section91") then
  120.     shell.run("pastebin get 1XbDs4Br section91")
  121. else
  122.     print("Module Detected! Updating...")
  123.     fs.delete("section91")
  124.     shell.run("pastebin get 1XbDs4Br section91")
  125.     print("Module Updated")
  126. end
  127.  
  128. -- Main Tutorial Program
  129. if not fs.exists("tutor") then
  130.     shell.run("pastebin get 65CNkSQs tutor")
  131. else
  132.     print("Program Detected! Updating...")
  133.     fs.delete("tutor")
  134.     shell.run("pastebin get 65CNkSQs tutor")
  135.     print("Program Updated")
  136. end
  137.  
  138.  
  139. -- Module 2 Test
  140. if not fs.exists("section2Test") then
  141.     shell.run("pastebin get FcmRCqaD section2Test")
  142. else
  143.     print("Module Detected! Updating...")
  144.     fs.delete("section2Test")
  145.     shell.run("pastebin get FcmRCqaD section2Test")
  146.     print("Module Updated")
  147. end
  148.  
  149. -- Module 3 Test
  150. if not fs.exists("section2Test") then
  151.     shell.run("pastebin get 1VGFEQUh section3Test")
  152. else
  153.     print("Module Detected! Updating...")
  154.     fs.delete("section3Test")
  155.     shell.run("pastebin get 1VGFEQUh section3Test")
  156.     print("Module Updated")
  157. end
  158.  
  159. term.setBackgroundColor(colors.black)
  160. term.clear()
  161. term.setCursorPos(1,1)
  162. print("Run \"tutor\" to run the tutorial program")
  163.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement