Advertisement
Te-ki

CCSuiteUpdater

Apr 15th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.48 KB | None | 0 0
  1. -- CCSuiteUpdater by Teki
  2.  
  3. local monitor = term.current()
  4. local sizeX,sizeY = monitor.getSize()
  5.  
  6. monitor.setBackgroundColour(colors.black)
  7. monitor.setTextColor(colors.white)
  8. monitor.clear()
  9.  
  10. function pmsg(msg)
  11.     --monitor.clear()
  12.     monitor.setCursorPos(1,sizeY)
  13.     monitor.clearLine()
  14.     --monitor.write(msg)
  15.     monitor.scroll(1)
  16.  
  17.     textutils.slowPrint(msg, 20)
  18. end
  19.  
  20. function CCupdate()
  21.     pmsg("Downloading...")
  22.    
  23.     fs.delete("pastebin get r6wngjJ1 CCSuite/MethodsLister")
  24.     fs.delete("pastebin get vuGgrHP5 CCSuite/CCAttack")
  25.     fs.delete("pastebin get YhRQzcES CCSuite/CCQuarry")
  26.     fs.delete("pastebin get Ah54eqrt CCSuite/CCRFTDialingDevice")
  27.     fs.delete("pastebin get 3jH5BzuW CCSuite/CCEnderPainter")
  28.     fs.delete("pastebin get 8rEEn773 CCSuite/CCRedstoneAlarm")
  29.     fs.delete("pastebin get zMsFr3ak CCSuite/CCDECClient")
  30.     fs.delete("pastebin get U6ZPitzh CCSuite/CCDECServeur")
  31.     fs.delete("pastebin get J97bpn42 CCSuite/CCClock")
  32.     fs.delete("pastebin get DsZznQvn CCSuite/CCBRClient")
  33.     fs.delete("pastebin get 0KZJ7LHu CCSuite/CCBRServer")
  34.    
  35.     shell.run("pastebin get r6wngjJ1 CCSuite/MethodsLister")
  36.     shell.run("pastebin get vuGgrHP5 CCSuite/CCAttack")
  37.     shell.run("pastebin get YhRQzcES CCSuite/CCQuarry")
  38.     shell.run("pastebin get Ah54eqrt CCSuite/CCRFTDialingDevice")
  39.     shell.run("pastebin get 3jH5BzuW CCSuite/CCEnderPainter")
  40.     shell.run("pastebin get 8rEEn773 CCSuite/CCRedstoneAlarm")
  41.     shell.run("pastebin get zMsFr3ak CCSuite/CCDECClient")
  42.     shell.run("pastebin get U6ZPitzh CCSuite/CCDECServeur")
  43.     shell.run("pastebin get J97bpn42 CCSuite/CCClock")
  44.     shell.run("pastebin get DsZznQvn CCSuite/CCBRClient")
  45.     shell.run("pastebin get 0KZJ7LHu CCSuite/CCBRServer")
  46.    
  47.     pmsg("Done !!!")
  48.     monitor.scroll(1)
  49.     monitor.setCursorPos(1,sizeY)
  50. end
  51.  
  52. function CCSuiteupdate()
  53.     pmsg("Downloading...")
  54.    
  55.     fs.delete("CCSuiteUpdater")
  56.     shell.run("pastebin get NByGus3Z CCSuiteUpdater")
  57.    
  58.     pmsg("Done !!!")
  59.     monitor.scroll(1)
  60.     monitor.setCursorPos(1,sizeY)
  61. end
  62.    
  63. monitor.clear()
  64. monitor.setCursorPos(1,sizeY-3)
  65. write("Press U to update CCSuiteUpdater.")
  66. monitor.setCursorPos(1,sizeY-2)
  67. write("Press I to install/update CCSuite.")
  68. monitor.setCursorPos(1,sizeY-1)
  69. write("Press any other key to quit.")
  70.  
  71. while true do
  72.    
  73.     event, side, xPos, yPos = os.pullEvent()
  74.     if event == "key" then
  75.         if side == keys.u then
  76.             CCSuiteupdate()
  77.             return 0
  78.         elseif side == keys.i then
  79.             CCupdate()
  80.             return 0
  81.         else
  82.             monitor.clear()
  83.             monitor.setCursorPos(1,1)
  84.             return 0
  85.         end
  86.     end
  87.    
  88.     sleep(1)
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement