subzero22

turtle os

Sep 2nd, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. function clear()
  2. term.clear()
  3. term.setCursorPos(1, 1)
  4. end
  5.  
  6. function clearlist()
  7. clear()
  8.  
  9. print("Welcome to Frozen OS Beta v1.3")
  10. print("0. Help")
  11. print("1. Make Directory")
  12. print("2. Write/Open a File")
  13. print("3. List Documents")
  14. print("4. Write/Edit Notes")
  15. print("5. Read Notes")
  16. print("6. Floor/Wall")
  17. print("7. Stripmine")
  18. print("8. Wall")
  19. print("9. Exit")
  20. print("C. Calculator")
  21. print("R. Run a program")
  22. print("T. Turn")
  23. print("M. Move")
  24. end
  25.  
  26. function recall()
  27. print()
  28. print("press Enter to continue.")
  29. os.pullEvent("key")
  30. clearlist()
  31. end
  32.  
  33. os.pullEvent = os.pullEventRaw
  34. clearlist()
  35.  
  36. while true do
  37. event, key = os.pullEvent("char")
  38.  
  39. if key == "0" then
  40. clear()
  41. shell.run("readme")
  42. recall()
  43.  
  44. elseif key == "1" then
  45. clear()
  46. shell.run("OS/createfile")
  47. recall()
  48.  
  49. elseif key == "2" then
  50. clear()
  51. shell.run("OS/editor")
  52. recall()
  53.  
  54. elseif key == "3" then
  55. shell.run("OS/.search")
  56. recall()
  57.  
  58. elseif key == "4" then
  59. shell.run("OS/notepad")
  60. recall()
  61.  
  62. elseif key == "5" then
  63. shell.run("OS/noteread")
  64. recall()
  65.  
  66. elseif key == "6" then
  67. shell.run("programs/floor")
  68. recall()
  69.  
  70. elseif key == "7" then
  71. shell.run("programs/stripmine")
  72. recall()
  73.  
  74. elseif key == "8" then
  75. shell.run("programs/wall")
  76. recall()
  77.  
  78. elseif key == "-" then
  79. shell.run("rom/programs/secret/alongtimeago")
  80. recall()
  81.  
  82. elseif key == "r" then
  83. shell.run("OS/run")
  84. recall()
  85.  
  86. elseif key == "c" then
  87. shell.run("programs/calculator")
  88. recall()
  89.  
  90. elseif key == "t" then
  91. shell.run("OS/turn")
  92. recall()
  93.  
  94. elseif key =="m" then
  95. shell.run("OS/move")
  96. recall()
  97.  
  98. elseif key == "9" then
  99. clear()
  100.  
  101. if fs.exists("OS/.lock") then
  102. shell.run("OS/.lock")
  103. else
  104. return
  105. end
  106. end
  107. end
Advertisement
Add Comment
Please, Sign In to add comment