Simlor_GER

SappS - Sketch by Oversimplifier

Mar 1st, 2016
1,016
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --SappS Installer - by SimlorLP
  2.  
  3. --Bitte nichts aendern!
  4.  
  5. --Functionen
  6.  
  7. --SappSInstaller
  8.  
  9. function SappSInstaller(name,farbe,ver,loesch)
  10.  
  11. term.setBackgroundColor(128)
  12. term.setTextColor(1)
  13. shell.run("clear")
  14.  
  15. print("Installer wird gestartet.")
  16.  
  17. --Absicherung
  18.  
  19. file = fs.open("SimSoft/Daten/SappS/A","r")
  20. local fileData = {}
  21. local line = file.readLine()
  22. repeat
  23. table.insert(fileData,line)
  24. line = file.readLine()
  25. until line == nil
  26. file.close()
  27. anz = fileData[1]
  28.  
  29. anz = (anz+1)
  30. anz = (anz-1)
  31.  
  32. if anz >= 15 then
  33. print("Zu viele SappS")
  34. sleep(1)
  35. shell.run("SimSoft/System/Desktop")
  36.  
  37. else
  38.  
  39. anz = (anz+1)
  40. local file = fs.open("SimSoft/Daten/SappS/A","w")
  41. file.writeLine(anz)
  42. file.close()
  43.  
  44. local file = fs.open("SimSoft/Daten/SappS/"..anz,"w")
  45. file.close()
  46.  
  47. local file = fs.open("SimSoft/Daten/SappS/"..anz,"a")
  48. file.writeLine(name)
  49. file.writeLine(anz)
  50. file.writeLine(farbe)
  51. file.writeLine("")
  52. file.writeLine(ver)
  53. file.writeLine(loesch)
  54. file.close()
  55. end
  56. end
  57.  
  58. --ABSCHNITT 1
  59.  
  60. shell.run("pastebin get Mm5hd97E SimSoft/SappS/SketchOrdner/Sketch")
  61.  
  62.  
  63.  
  64.  
  65. --ABSCHNITT 2
  66.  
  67. SappSInstaller("Sketch",7.0,"SketchOrdner/Sketch","SketchOrdner")
  68.  
  69.  
  70.  
  71.  
  72. --Ende
RAW Paste Data