Advertisement
Heracles421

CCiri_installer

Jan 11th, 2013
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.01 KB | None | 0 0
  1. function menu(id, text)
  2.   if sid == id then
  3.     print("["..text.."]")
  4.   else
  5.     print(" "..text)
  6.   end
  7. end
  8.  
  9. function installer()
  10. sid = 0
  11. while true do
  12.   path = shell.dir()
  13.   term.clear()
  14.   term.setCursorPos(1,1)
  15.   print("CCiri Installer")
  16.   menu(0, "Install")
  17.   menu(1, "Install BETA")
  18.   menu(2, "Abort")
  19.   local sEvent, param = os.pullEvent("key")
  20.   if(sEvent == "key") then
  21.     if(param == 200) then
  22.       if sid > 0 then
  23.         sid = sid - 1
  24.       elseif sid == 0 then
  25.         sid = 2
  26.       end
  27.     elseif (param == 208) then
  28.       if sid < 2 then
  29.         sid = sid + 1
  30.       elseif sid == 2 then
  31.         sid = 0
  32.       end
  33.     elseif (param == 28) then
  34.       if sid == 0 then
  35.         print("Installing...")
  36.         shell.run("pastebin get PRUuJxf6 cciri")
  37.         sleep(.5)
  38.         shell.run("pastebin get zeG34tu6 load")
  39.         sleep(.5)
  40.         shell.run("pastebin get L9LH9pVH microphone")
  41.         fs.makeDir(path.."/CCiri_Files")
  42.         shell.run("move","load","CCiri_Files")
  43.         shell.run("move","microphone","CCiri_Files")
  44.         sleep(.5)
  45.         print("Done! Enjoy CCiri. Rebooting.")
  46.         sleep(4)
  47.         shell.run("delete","installCCiri")
  48.         os.reboot()
  49.       elseif sid == 1 then
  50.         print("Installing BETA...")
  51.         shell.run("pastebin get vi275s3k cciri")
  52.         sleep(.5)
  53.         shell.run("pastebin get zeG34tu6 load")
  54.         sleep(.5)
  55.         shell.run("pastebin get L9LH9pVH microphone")
  56.         fs.makeDir(path.."/CCiri_Files")
  57.         shell.run("move","load","CCiri_Files")
  58.         shell.run("move","microphone","CCiri_Files")
  59.         sleep(.5)
  60.         print("Done! Enjoy CCiri. Rebooting.")
  61.         sleep(4)
  62.         shell.run("delete","installCCiri")
  63.         os.reboot()
  64.       elseif sid == 2 then
  65.         print("Aborting...")
  66.         sleep(4)
  67.         shell.run("delete","installCCiri")
  68.         os.reboot()
  69.       end
  70.     end
  71.   end
  72. end
  73. end
  74.  
  75. term.clear()
  76. term.setCursorPos(1,1)
  77. print("Proceeding to install CCiri.")
  78. sleep(2)
  79. installer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement