Advertisement
DubSlime

EOS - Base

Sep 29th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.91 KB | None | 0 0
  1. -- VARIABLES --
  2. shell.run("name/varnom")
  3. shell.run("name/paint.name")
  4.  
  5. --FUNCTIONS --
  6. function paintedit()
  7. term.setBackgroundColor(colours.blue)
  8. term.setTextColor(colours.white)
  9. term.setCursorPos(16,7)
  10. print(" Outil de dessin X")
  11. term.setBackgroundColor(colours.lightGrey)
  12. term.setTextColor(colours.black)
  13. term.setCursorPos(16,8)
  14. print(" [...] ")
  15. event, button, xpos, ypos = os.pullEvent("mouse_click")
  16. if xpos==36 and ypos==7 then
  17. screen()
  18. elseif xpos>=24 and xpos<=28 and ypos==8 then
  19. term.setCursorPos(24,8)
  20. print(" ")
  21. term.setCursorPos(20,8)
  22. ptedit = read()
  23. shell.run("paint "..ptedit)
  24. shell.run("base")
  25. end
  26. end
  27.  
  28. -- ECRAN --
  29. function screen()
  30. shell.run("name/paint.name")
  31. shell.run("name/varnom")
  32. shell.run("config/bgimg.cfg")
  33. term.setBackgroundColour(colours.cyan)
  34. term.clear()
  35. paintutils.drawImage(paintutils.loadImage(bgimg),1,1)
  36. term.setCursorPos(1,1)
  37. term.setBackgroundColour(colours.lightGrey)
  38. term.clearLine()
  39. term.setBackgroundColour(colours.blue)
  40. term.setTextColour(colours.white)
  41. print(" MENU ")
  42. -- ICONE FILE BROWSER --
  43. paintutils.drawImage(paintutils.loadImage("Icons/fs.ico"),3,4)
  44. term.setBackgroundColour(colours.cyan)
  45. term.setCursorPos(2,9)
  46. print(FichiersName)
  47. term.setTextColour(colours.red)
  48. term.setCursorPos(8,4)
  49. term.write("+")
  50. -- ICONE ESSENTIAL CHAT --
  51. paintutils.drawImage(paintutils.loadImage("Icons/EC.ico"),3,11)
  52. term.setCursorPos(1,17)
  53. term.setTextColour(colours.white)
  54. term.setBackgroundColour(colours.cyan)
  55. print(" E-Chat")
  56. term.setTextColour(colours.red)
  57. term.setCursorPos(8,11)
  58. term.write("+")
  59. -- ICONE CLOUDSTORAGE --
  60. term.setBackgroundColor(colours.grey)
  61. term.setCursorPos(14,11)
  62. print(" ")
  63. term.setCursorPos(13,12)
  64. print(" ")
  65. term.setCursorPos(12,13)
  66. print(" ")
  67. term.setCursorPos(13,14)
  68. print(" ")
  69. term.setCursorPos(14,15)
  70. print(" ")
  71. term.setCursorPos(12,17)
  72. term.setTextColour(colours.white)
  73. term.setBackgroundColor(colours.cyan)
  74. print(" Cloud")
  75. term.setTextColour(colours.red)
  76. term.setCursorPos(19,11)
  77. term.write("+")
  78. -- ICONE PAINT --
  79. term.setCursorPos(13,4)
  80. term.setBackgroundColor(colours.black)
  81. paintutils.drawImage(paintutils.loadImage("Icons/paint.ico"),13,4)
  82. term.setTextColor(colours.white)
  83. term.setCursorPos(13,9)
  84. term.setBackgroundColor(colours.cyan)
  85. print(PaintName)
  86. term.setTextColour(colours.red)
  87. term.setCursorPos(19,4)
  88. term.write("+")
  89. -- CREDITS BARRE --
  90. term.setCursorPos(1,19)
  91. term.setBackgroundColour(colours.blue)
  92. term.clearLine()
  93. term.setCursorPos(3,19)
  94. write("[Bugs ?]")
  95. -- while true do
  96. event, button, xpos, ypos = os.pullEvent("mouse_click")
  97. if xpos >=3 and xpos <=7 and ypos >=4 and ypos <=7 then
  98. shell.run("Browser")
  99. elseif xpos >=3 and xpos <=7 and ypos >=12 and ypos <=15 then
  100. shell.run("EssentialChat")
  101. elseif xpos >=3 and xpos<=10 and ypos ==19 then
  102. shell.run("bugcheck")
  103. elseif xpos>=12 and xpos<=21 and ypos>=11 and ypos<=15 then
  104. shell.run("CloudStorage/cloudpage")
  105. elseif xpos>=13 and xpos<=18 and ypos>=4 and ypos<=10 then
  106. paintedit()
  107. elseif xpos ==8 and ypos ==4 then -- OPTIONS BROWSER
  108. term.setCursorPos(9,5)
  109. term.setBackgroundColour(colours.blue)
  110. term.setTextColour(colours.white)
  111. print(" OPTIONS ")
  112. term.setTextColour(colours.red)
  113. term.setCursorPos(23,5)
  114. write("X")
  115. term.setBackgroundColour(colours.white)
  116. term.setCursorPos(9,6)
  117. term.setTextColour(colours.blue)
  118. print(" Renommer ")
  119. term.setCursorPos(9,7)
  120. print(" Editer icone ")
  121. while true do
  122. event, button, xpos, ypos = os.pullEvent("mouse_click")
  123. if xpos==23 and ypos==5 then
  124. screen()
  125.  
  126. elseif xpos >=9 and xpos <= 23 and ypos ==6 then
  127. term.setCursorPos(2,9)
  128. term.setTextColour(colours.blue)
  129. -- term.setBackgroundColour(colours.lightGrey)
  130. write("Nom : ")
  131. NewName = read()
  132. varnom = fs.open("name/varnom","w")
  133. varnom.writeLine("FichiersName = '"..NewName.."'")
  134. varnom.close()
  135. shell.run("varnom")
  136. screen()
  137. elseif xpos>=9 and xpos<=23 and ypos==7 then
  138. shell.run("paint Icons/fs.ico")
  139. shell.run("base")
  140. end
  141. end
  142. elseif xpos ==8 and ypos ==11 then -- OPTIONS ESSENTIAL CHAT
  143. term.setCursorPos(9,12)
  144. term.setBackgroundColour(colours.blue)
  145. term.setTextColour(colours.white)
  146. print(" OPTIONS ")
  147. term.setTextColour(colours.red)
  148. term.setCursorPos(23,12)
  149. write("X")
  150. term.setBackgroundColour(colours.white)
  151. term.setCursorPos(9,13)
  152. term.setTextColour(colours.blue)
  153. print(" Renommer ")
  154. term.setCursorPos(9,14)
  155. print(" Editer icone ")
  156. while true do
  157. event, button, xpos, ypos = os.pullEvent("mouse_click")
  158. if xpos==23 and ypos==12 then
  159. shell.run("base")
  160.  
  161. elseif xpos >=9 and xpos <= 23 and ypos ==13 then -- A BOSSER --
  162. term.setCursorPos(2,17)
  163. term.setTextColour(colours.blue)
  164. -- term.setBackgroundColour(colours.lightGrey)
  165. write("Nom : ")
  166. NewECName = read()
  167. EName = fs.open("name/EC.name","w")
  168. EName.writeLine("ECName = '"..NewECName.."'")
  169. EName.close()
  170. shell.run("EC.name")
  171. shell.run("base")
  172. elseif xpos>=9 and xpos<=23 and ypos==14 then
  173. shell.run("paint Icons/EC.ico")
  174. shell.run("base")
  175. end
  176. end
  177. elseif xpos ==19 and ypos ==4 then -- OPTIONS PAINT
  178. term.setCursorPos(20,5)
  179. term.setBackgroundColour(colours.blue)
  180. term.setTextColour(colours.white)
  181. print(" OPTIONS ")
  182. term.setTextColour(colours.red)
  183. term.setCursorPos(34,5)
  184. write("X")
  185. term.setBackgroundColour(colours.white)
  186. term.setCursorPos(20,6)
  187. term.setTextColour(colours.blue)
  188. print(" Renommer ")
  189. term.setCursorPos(20,7)
  190. print(" Editer icone ")
  191. while true do
  192. event, button, xpos, ypos = os.pullEvent("mouse_click")
  193. if xpos==34 and ypos==5 then
  194. shell.run("base")
  195.  
  196. elseif xpos >=9 and xpos <= 23 and ypos ==6 then
  197. term.setCursorPos(13,9)
  198. term.setTextColour(colours.blue)
  199. -- term.setBackgroundColour(colours.lightGrey)
  200. write("Nom : ")
  201. NewPName = read()
  202. PName = fs.open("name/paint.name","w")
  203. PName.writeLine("PaintName = '"..PName.."'")
  204. PName.close()
  205. shell.run("paint.name")
  206. shell.run("base")
  207. elseif xpos>=9 and xpos<=23 and ypos==7 then
  208. shell.run("paint Icons/paint.ico")
  209. shell.run("base")
  210. end
  211. end
  212. elseif xpos >= 1 and xpos <=6 and ypos ==1 then
  213. term.setCursorPos(2,2)
  214. term.setBackgroundColour(colours.black)
  215. term.setTextColour(colours.white)
  216. print(" MENU ")
  217. term.setCursorPos(2,3)
  218. term.setBackgroundColour(colours.blue)
  219. term.setTextColour(colours.white)
  220. print(" Eteindre ")
  221. term.setCursorPos(2,4)
  222. print(" Edition ")
  223. term.setCursorPos(2,5)
  224. print(" Fichiers >")
  225. term.setCursorPos(2,6)
  226. print(" Reboot ")
  227. term.setCursorPos(2,7)
  228. print(" Gestion ")
  229. event, button, xpos, ypos = os.pullEvent("mouse_click")
  230. if xpos >=2 and xpos <=11 and ypos ==3 then
  231. os.shutdown()
  232. elseif xpos >=2 and xpos <=11 and ypos ==4 then
  233. shell.run("edit")
  234. elseif xpos ==12 and ypos ==5 then
  235. term.setCursorPos(13,5)
  236. print(" ClickTest ")
  237. term.setCursorPos(13,6)
  238. print(" Explorer ")
  239. event, button, xpos, ypos = os.pullEvent("mouse_click")
  240. if xpos >=13 and xpos <=23 and ypos ==5 then
  241. shell.run("clicktest")
  242. elseif xpos >=13 and xpos <=23 and ypos ==6 then
  243. shell.run("Browser")
  244. else
  245. shell.run("base")
  246. end
  247.  
  248. elseif xpos >=2 and xpos <=11 and ypos ==6 then
  249. shell.run("rbsystem")
  250. else
  251. screen()
  252. end
  253. else
  254. shell.run("base")
  255. end
  256. end
  257.  
  258. screen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement