Advertisement
DanielLaby99

FlashLauncher - FlashCraft

Jul 11th, 2013
1,647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.97 KB | None | 0 0
  1. term.setBackgroundColor(colors.white)
  2. shell.run("clear")
  3. if term.isColor() then
  4. term.setBackgroundColor(colors.white)
  5. term.setTextColor(colors.black)
  6. print("[Client] PC check.")
  7. else
  8. term.setBackgroundColor(colors.black)
  9. shell.run("clear")
  10. term.setCursorPos(1,1)
  11. print("You need an Advanced Computer")
  12. sleep(10)
  13. os.reboot()
  14. end
  15. if not http then
  16. term.setBackgroundColor(colors.black)
  17. shell.run("clear")
  18. term.setCursorPos(1,1)
  19. term.setTextColor(colors.red)
  20. print("Http is not enabled")
  21. print()
  22. print("Edit the config:")
  23. write("[Config] -> ")
  24. term.setTextColor(colors.white)
  25. write("enableAPI_http=")
  26. term.setTextColor(colors.yellow)
  27. write("true")
  28. sleep(5)
  29. os.reboot()
  30. end
  31. if fs.exists(".minecraft/bin/minecraft/menu/screen") then
  32. fs.delete(".minecraft/bin/minecraft/menu/screen") end
  33. if fs.exists(".minecraft/bin/labyos/menu/screen") then
  34. fs.delete(".minecraft/bin/labyos/menu/screen") end
  35. if fs.exists(".minecraft/bin/labyos/setup/a") then
  36. fs.delete(".minecraft/bin/labyos/setup/a") end
  37.  
  38. fs.makeDir(".minecraft")
  39. fs.makeDir(".minecraft/bin/minecraft/menu")
  40. fs.makeDir(".minecraft/bin/minecraft/META-INF")
  41. fs.makeDir(".minecraft/texturenpacks")
  42. fs.makeDir(".minecraft/bin/minecraft")
  43. fs.makeDir(".minecraft/texturenpacks")
  44. fs.makeDir(".minecraft/saves")
  45. fs.makeDir(".minecraft/config")
  46. fs.makeDir(".minecraft/bin/labyos/menu/")
  47. fs.makeDir(".minecraft/bin/labyos/setup/")
  48. term.setTextColor(colors.white)
  49. fs.delete(".minecraft/bin/labyos/setup/step2")
  50. fs.delete(".minecraft/bin/labyos/setup/a")
  51. shell.run("pastebin get zwnGBpGf .minecraft/bin/labyos/setup/b")
  52. shell.run("pastebin get kg4JWkWz .minecraft/bin/labyos/setup/step4")
  53. shell.run("pastebin get MnbC1b3K .minecraft/bin/labyos/setup/step3r")
  54. shell.run("pastebin get gwY3mbW4 .minecraft/bin/labyos/setup/step3")
  55. shell.run("pastebin get JS1BwWCY .minecraft/bin/labyos/setup/step2")
  56. shell.run("pastebin get qQY0rdDf .minecraft/bin/labyos/setup/a")
  57. shell.run("pastebin get HzryNrQ6 .minecraft/bin/minecraft/menu/screen")
  58. shell.run("pastebin get GMrW3JSb .minecraft/texturenpacks/bg.png")
  59. shell.run("pastebin get menC9QwE .minecraft/texturenpacks/button.png")
  60. shell.run("pastebin get RTpm0Azp .minecraft/texturenpacks/logo.png")
  61. shell.run("pastebin get Evvrwchr .minecraft/texturenpacks/logomenu.png")
  62. shell.run("pastebin get c1da047A .minecraft/bin/labyos/menu/screen")
  63. shell.run("pastebin get d3aZT093 .minecraft/bin/labyos/a")
  64. shell.run("pastebin get 2FdiqMS5 .minecraft/bin/labyos/b")
  65. shell.run("pastebin get 3pnxk5bG .minecraft/bin/labyos/c")
  66. shell.run("pastebin get 8LadBNEf .minecraft/bin/labyos/d")
  67. shell.run("pastebin get PSxa8e6B .minecraft/bin/labyos/e")
  68. term.setCursorPos(1,2)
  69. if fs.exists("startup") then
  70. term.setTextColor(colors.black)
  71. term.setCursorPos(1,2)
  72. print("[Client] (Pastebin) Updating..")
  73. sleep(1)
  74. fs.delete("startup") end
  75. term.setTextColor(colors.white)
  76. shell.run("pastebin get FqZwgAeQ startup")
  77. term.setCursorPos(1,3)
  78. print("[Client] Updated.")
  79. sleep(0.1)
  80. if fs.exists(".minecraft/bin/minecraft/menu/screen") then
  81. print("[Client] (Pastebin) Updating..")
  82. sleep(1)
  83. fs.delete(".minecraft/bin/minecraft/menu/screen") end
  84. term.setTextColor(colors.white)
  85. shell.run("pastebin get HzryNrQ6 .minecraft/bin/minecraft/menu/screen")
  86. term.setCursorPos(1,2)
  87. print("[Client] Updated.")
  88. sleep(0.1)
  89. if fs.exists(".minecraft/bin/minecraft/menu/screen") then
  90. print("[Client] (fs) .minecraft/bin/minecraft/menu/screen")
  91. sleep(0.1)
  92. else
  93. term.setTextColor(colors.white)
  94. shell.run("pastebin get HzryNrQ6 .minecraft/bin/minecraft/menu/screen")
  95. shell.run("pastebin get GMrW3JSb .minecraft/texturenpacks/bg.png")
  96. shell.run("pastebin get menC9QwE .minecraft/texturenpacks/button.png")
  97. shell.run("pastebin get RTpm0Azp .minecraft/texturenpacks/logo.png")
  98. shell.run("pastebin get Evvrwchr .minecraft/texturenpacks/logomenu.png")
  99. print("[Client] (fs) .minecraft/bin/minecraft/menu/screen created.")
  100. print("[Client] (fs) .minecraft/texturenpacks/*.png created.")
  101. os.reboot()
  102. end
  103. shell.run("clear")
  104. term.setBackgroundColor(colors.white)
  105. term.setTextColor(colors.black)
  106. print("[Client] (Pastebin) Downloading Files...")
  107. if fs.exists(".minecraft/changelog.txt") then
  108. fs.delete(".minecraft/changelog.txt") end
  109. term.setTextColor(colors.white)
  110. shell.run("pastebin get DBKsrwKq .minecraft/changelog.txt")
  111. term.setTextColor(colors.black)
  112. term.setCursorPos(1,2)
  113. fs.makeDir(".minecraft/bin/minecraft/menu")
  114. fs.makeDir(".minecraft/bin/minecraft/META-INF")
  115. fs.makeDir(".minecraft/texturenpacks")
  116. fs.makeDir(".minecraft/bin/minecraft")
  117. fs.makeDir(".minecraft/texturenpacks")
  118. fs.makeDir(".minecraft/saves")
  119. fs.makeDir(".minecraft/config")
  120. if fs.exists(".minecraft/texturenpacks/launcher.png") then
  121. print("[Client] (fs) .minecraft/texturenpacks/launcher.png")
  122. sleep(0.1)
  123. else
  124. term.setTextColor(colors.white)
  125. shell.run("pastebin get ccNTABJZ .minecraft/texturenpacks/launcher.png")
  126. term.setTextColor(colors.black)
  127. print("[Client] (fs) .minecraft/texturenpacks/launcher.png created.")
  128. sleep(0.1)
  129. end
  130. print("[Client] (fs) Check files.")
  131. sleep(0.1)
  132. if fs.exists(".minecraft") then
  133. print("[Client] (fs) .minecraft exists.")
  134. sleep(0.1)
  135. else
  136. fs.makeDir(".minecraft/bin/minecraft")
  137. print("[Client] (fs) .minecraft/bin/minecraft created.")
  138. end
  139. local function screen()
  140. image = paintutils.loadImage(".minecraft/texturenpacks/launcher.png")
  141. paintutils.drawImage(image, 1, 1)
  142. end
  143. local function text()
  144. term.setBackgroundColor(colors.white)
  145. term.setTextColor(colors.black)
  146. term.setCursorPos(1,3)
  147. shell.run(".minecraft/changelog.txt")
  148. term.setCursorPos(1,19)
  149. write("LabyStudio")
  150. term.setCursorPos(1,1)
  151. term.setBackgroundColor(colors.brown)
  152. term.setTextColor(colors.white)
  153. term.setCursorPos(39,7)
  154. print("Minecraft")
  155. term.setBackgroundColor(colors.lightGray)
  156. term.setTextColor(colors.black)
  157. term.setCursorPos(1,1)
  158. print("FlashCraftLauncher 0.1 Snapshot version")
  159. term.setCursorPos(38,14)
  160. term.setBackgroundColor(colors.white)
  161. print("Username:")
  162. term.setCursorPos(38,16)
  163. print("Password:")
  164. end
  165. local function login()
  166. term.setTextColor(colors.white)
  167. term.setBackgroundColor(colors.gray)
  168. term.setCursorPos(38,15)
  169. write("")
  170. name = read()
  171. term.setCursorPos(38,17)
  172. write("")
  173. password = read("*")
  174. term.setBackgroundColor(colors.white)
  175. term.setTextColor(colors.black)
  176. testfor = http.get("http://login.minecraft.net/?user=" ..name.. "&password=" ..password.. "&version=12")
  177. printresult = testfor.readAll()
  178. if printresult == "Account migrated, use e-mail as username." then
  179. for badloop=0,3 do
  180. term.setCursorPos(38,18)
  181. term.setTextColor(colors.black)
  182. print("Bad login")
  183. sleep(0.1)
  184. term.setCursorPos(38,18)
  185. term.setTextColor(colors.red)
  186. print("Bad login")
  187. sleep(0.1)
  188. end
  189. term.setBackgroundColor(colors.white)
  190. term.setCursorPos(38,15)
  191. print(" ")
  192. term.setCursorPos(38,17)
  193. print(" ")
  194. term.setBackgroundColor(colors.gray)
  195. term.setCursorPos(38,15)
  196. print(" ")
  197. term.setCursorPos(38,17)
  198. print(" ")
  199. text()
  200. login()
  201. end
  202. if printresult == "Bad login" then
  203. for badloop=0,3 do
  204. term.setCursorPos(38,18)
  205. term.setTextColor(colors.black)
  206. print("Bad login")
  207. sleep(0.1)
  208. term.setCursorPos(38,18)
  209. term.setTextColor(colors.red)
  210. print("Bad login")
  211. sleep(0.1)
  212. end
  213. term.setBackgroundColor(colors.white)
  214. term.setCursorPos(38,15)
  215. print(" ")
  216. term.setCursorPos(38,17)
  217. print(" ")
  218. term.setBackgroundColor(colors.gray)
  219. term.setCursorPos(38,15)
  220. print(" ")
  221. term.setCursorPos(38,17)
  222. print(" ")
  223. text()
  224. login()
  225. else
  226. term.setCursorPos(38,13)
  227. term.setBackgroundColor(colors.gray)
  228. print(" Feedback! ")
  229. term.setBackgroundColor(colors.white)
  230. term.setCursorPos(38,15)
  231. print(" ")
  232. term.setCursorPos(38,17)
  233. print(" ")
  234. term.setBackgroundColor(colors.lightGray)
  235. term.setCursorPos(38,14)
  236. print(" ")
  237. term.setCursorPos(38,15)
  238. print(" ")
  239. term.setCursorPos(38,16)
  240. print(" ")
  241. term.setCursorPos(38,17)
  242. print(" ")
  243. term.setCursorPos(38,18)
  244. print(" ")
  245. term.setCursorPos(38,15)
  246. print(" Welcome,")
  247. term.setCursorPos(38,16)
  248. print(" ",name)
  249. term.setBackgroundColor(colors.white)
  250. term.setCursorPos(1,17)
  251. write(" ")
  252. term.setCursorPos(49,16)
  253. term.setBackgroundColor(colors.white)
  254. print(" ")
  255. term.setCursorPos(38,18)
  256. term.setBackgroundColor(colors.gray)
  257. print(" Login ")
  258. term.setCursorPos(29,19)
  259. term.setBackgroundColor(colors.white)
  260. write("Logout")
  261. end
  262. lastlogin = fs.open(".minecraft/lastlogin", "w")
  263. lastlogin.write(name)
  264. lastlogin.close()
  265. local function play()
  266. term.setCursorPos(1,2)
  267. term.setBackgroundColor(colors.white)
  268. print(" ")
  269. print(" ")
  270. print(" ")
  271. print(" ")
  272. print(" ")
  273. print(" ")
  274. print(" ")
  275. print(" ")
  276. print(" ")
  277. print(" ")
  278. print(" ")
  279. print(" ")
  280. print(" ")
  281. print(" ")
  282. term.setCursorPos(1,2)
  283. term.setTextColor(colors.black)
  284. if fs.exists(".minecraft/bin/minecraft/menu/screen") then
  285. print("[Client] Screen loaded.")
  286. sleep(1)
  287. else
  288. term.setTextColor(colors.white)
  289. print("[Client] Download files..")
  290. shell.run("pastebin get ------- .minecraft/bin/minecraft/menu/screen")
  291. if not fs.exists(".minecraft/texturenpacks/logo.png") then
  292. shell.run("pastebin get ------- .minecraft/texturenpacks/logo.png")
  293. end
  294. term.setCursorPos(1,3)
  295. print("[Client] Screen loaded.")
  296. sleep(1)
  297. end
  298. shell.run("clear")
  299. logo = paintutils.loadImage(".minecraft/texturenpacks/logo.png")
  300. paintutils.drawImage(logo, 1, 1)
  301. sleep(3)
  302. shell.run(".minecraft/bin/minecraft/menu/screen")
  303. end
  304.  
  305. local function feedback()
  306. term.setCursorPos(1,2)
  307. term.setBackgroundColor(colors.white)
  308. print(" ")
  309. print(" ")
  310. print(" ")
  311. print(" ")
  312. print(" ")
  313. print(" ")
  314. print(" ")
  315. print(" ")
  316. print(" ")
  317. print(" ")
  318. print(" ")
  319. print(" ")
  320. term.setCursorPos(2,3)
  321. print("Subject:")
  322. term.setBackgroundColor(colors.gray)
  323. term.setCursorPos(2,4)
  324. print(" ")
  325. print("")
  326. term.setBackgroundColor(colors.white)
  327. print(" Name:")
  328. term.setBackgroundColor(colors.gray)
  329. term.setCursorPos(2,7)
  330. print(" ")
  331. term.setCursorPos(2,7)
  332. term.setTextColor(colors.white)
  333. print(name)
  334. term.setTextColor(colors.black)
  335. print("")
  336. term.setBackgroundColor(colors.white)
  337. print(" Message:")
  338. term.setBackgroundColor(colors.gray)
  339. term.setCursorPos(2,10)
  340. print(" ")
  341. term.setCursorPos(2,11)
  342. print(" ")
  343. term.setCursorPos(2,12)
  344. print(" ")
  345. term.setCursorPos(2,13)
  346. print(" ")
  347. term.setCursorPos(2,14)
  348. print(" ")
  349. term.setCursorPos(2,15)
  350. print(" ")
  351. term.setCursorPos(2,4)
  352. term.setTextColor(colors.white)
  353. write("")
  354. inputS = read()
  355. if inputS=="" then
  356. term.setCursorPos(2,4)
  357. term.setTextColor(colors.red)
  358. print("No subject")
  359. inputS = "No Text"
  360. term.setTextColor(colors.white)
  361. end
  362. term.setCursorPos(2,10)
  363. inputM = read()
  364. if inputM=="" then
  365. term.setCursorPos(2,10)
  366. term.setTextColor(colors.red)
  367. print("No text")
  368. sleep(1)
  369. inputM = "No Text"
  370. term.setTextColor(colors.white)
  371. end
  372. term.setTextColor(colors.white)
  373. email = "Betreff: "..inputS.."\n ----------------------------------------- \n Name: "..name.."\n ----------------------------------------- \n Msg:"..inputM
  374. http.post(
  375. "http://labystudio.net84.net/CC.php?message="..textutils.urlEncode(tostring(email))
  376. )
  377. term.setCursorPos(1,2)
  378. term.setBackgroundColor(colors.white)
  379. term.setTextColor(colors.black)
  380. print(" ")
  381. print(" Thank you for your feedback! ")
  382. print(" ")
  383. print(" ")
  384. print(" ")
  385. print(" ")
  386. print(" ")
  387. print(" ")
  388. print(" ")
  389. print(" ")
  390. print(" ")
  391. print(" ")
  392. print(" ")
  393. print(" ")
  394. end
  395.  
  396. while true do
  397. local event, button, X, Y = os.pullEvent("mouse_click")
  398. XY = X..","..Y
  399. if XY == "41,18" and button == 1 then
  400. play()
  401. end
  402. if XY == "42,18" and button == 1 then
  403. play()
  404. end
  405. if XY == "43,18" and button == 1 then
  406. play()
  407. end
  408. if XY == "44,18" and button == 1 then
  409. play()
  410. end
  411. if XY == "45,18" and button == 1 then
  412. play()
  413. end
  414. if XY == "29,19" and button == 1 then
  415. screen()
  416. text()
  417. login()
  418. end
  419. if XY == "30,19" and button == 1 then
  420. screen()
  421. text()
  422. login()
  423. end
  424. if XY == "31,19" and button == 1 then
  425. screen()
  426. text()
  427. login()
  428. end
  429. if XY == "32,19" and button == 1 then
  430. screen()
  431. text()
  432. login()
  433. end
  434. if XY == "33,19" and button == 1 then
  435. screen()
  436. text()
  437. login()
  438. end
  439.  
  440. if XY == "39,13" and button == 1 then
  441. feedback()
  442. end
  443. if XY == "40,13" and button == 1 then
  444. feedback()
  445. end
  446. if XY == "41,13" and button == 1 then
  447. feedback()
  448. end
  449. if XY == "42,13" and button == 1 then
  450. feedback()
  451. end
  452. if XY == "43,13" and button == 1 then
  453. feedback()
  454. end
  455. if XY == "44,13" and button == 1 then
  456. feedback()
  457. end
  458. if XY == "45,13" and button == 1 then
  459. feedback()
  460. end
  461. if XY == "46,13" and button == 1 then
  462. feedback()
  463. end
  464. if XY == "47,13" and button == 1 then
  465. feedback()
  466. end
  467. if XY == "48,13" and button == 1 then
  468. feedback()
  469. end
  470. end
  471. end
  472. local function launcher()
  473. screen()
  474. text()
  475. login()
  476. end
  477. launcher()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement