Advertisement
pepeknamornik

Instalator 1100-1540

Apr 16th, 2015
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. local function prc(text, y)
  2.   local w = term.getSize()
  3.   local _, cy = term.getCursorPos()
  4.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  5.   write(text)
  6. end
  7.  
  8. function operator ()
  9. fs.delete ("/system/desktop")
  10. fs.move ("/system/update1/desktop", "/system/desktop")
  11. fs.delete ("/system/programs/setting")
  12. fs.move ("/system/update1/setting", "/system/programs/setting")
  13. fs.delete ("/system/programs/subPrograms")
  14. fs.move ("/system/update1/subPrograms", "/system/programs/subPrograms")
  15. fs.delete ("/system/programs/FileX")
  16. fs.move ("/system/update1/FileX", "/system/programs/FileX")
  17. fs.delete ("/system/update1")
  18. fs.delete ("/system/aktualizace")
  19. fs.delete ("/system/instalator")
  20. fs.delete ("/system/api/fm")
  21. print "complete"
  22. sleep (1)
  23. restart ()
  24. end
  25.  
  26. function restart ()
  27. fs.delete ("system/RAM")
  28. term.setBackgroundColor(colors.white)
  29. term.setTextColor(colors.black)
  30. term.clear()
  31.  
  32. term.setBackgroundColor(colors.white)
  33. term.setTextColor(colors.blue)
  34. term.setCursorPos(20,18)
  35. print"  Pepek"
  36. term.setCursorPos(28,18)
  37. print"Soft  "
  38. term.setCursorPos(27,18)
  39. term.setTextColor(colors.lime)
  40. print"@"
  41. term.setTextColor(colors.black)
  42. term.setCursorPos(23, 7)
  43. prc "Restarting..."
  44. sleep (1)
  45. term.setCursorPos(23, 7)
  46. prc "Configuring Pepdroll updates"
  47. sleep (5)
  48. term.setCursorPos(23, 7)
  49. prc "                            "
  50. term.setCursorPos(23, 7)
  51. prc "Restarting..."
  52. sleep (1)
  53. fs.delete("/system/instalator")
  54. os.reboot ()
  55. end
  56.  
  57. operator ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement