Simlor_GER

SimSoft 3 - AcManager

Mar 29th, 2016
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.09 KB | None | 0 0
  1. --Alle Rechte an SimSoft 3 sind "SimlorLP" (oder in Minecraft auch nur "Simlor") vorbehalten.
  2.  
  3. --AcManager
  4.  
  5. backD = false
  6. AC = 0
  7.  
  8. while true do
  9.  
  10. Rechte()
  11.  
  12. file = fs.open("SimSoft/Daten/Config","r")
  13. local fileData = {}
  14. local line = file.readLine()
  15. repeat
  16. table.insert(fileData,line)
  17. line = file.readLine()
  18. until line == nil
  19. file.close()
  20.  
  21. PassSOO = fileData[1]
  22. Hintergrund = fileData[2]
  23. Version = fileData[3]
  24. Sprache = fileData[4]
  25. --
  26. file = fs.open("SimSoft/Daten/User/User1","r")
  27. local fileData = {}
  28. local line = file.readLine()
  29. repeat
  30. table.insert(fileData,line)
  31. line = file.readLine()
  32. until line == nil
  33. file.close()
  34.  
  35. u1 = fileData[1]
  36. p1 = fileData[2]
  37. --
  38. file = fs.open("SimSoft/Daten/User/User2","r")
  39. local fileData = {}
  40. local line = file.readLine()
  41. repeat
  42. table.insert(fileData,line)
  43. line = file.readLine()
  44. until line == nil
  45. file.close()
  46.  
  47. u2 = fileData[1]
  48. p2 = fileData[2]
  49. ACTF2 = fileData[3]
  50. --
  51. file = fs.open("SimSoft/Daten/User/User3","r")
  52. local fileData = {}
  53. local line = file.readLine()
  54. repeat
  55. table.insert(fileData,line)
  56. line = file.readLine()
  57. until line == nil
  58. file.close()
  59.  
  60. u3 = fileData[1]
  61. p3 = fileData[2]
  62. ACTF3 = fileData[3]
  63. --
  64.  
  65. BC(128)
  66. Clear()
  67.  
  68. CP(1,1)
  69. BC(32768)
  70. print(" ")
  71. print(" ")
  72. print(" ")
  73.  
  74. CP(16,2)
  75. TC(1)
  76. print("SimSoft 3 - AcManager")
  77.  
  78. BC(128)
  79. CP(45,5)
  80. TC(32)
  81. if Recht == "Gast" then
  82. recht = " User"
  83. elseif Recht == "Admin" then
  84. recht = "Admin"
  85. end
  86. print(recht)
  87.  
  88. if AC == 0 then
  89. BC(128)
  90. CP(1,6)
  91. print(" ")
  92. print(" ")
  93. print(" ")
  94. print(" ")
  95. print(" ")
  96. print(" ")
  97. print(" ")
  98. print(" ")
  99. print(" ")
  100. print(" ")
  101.  
  102. BC(256)
  103. TC(1)
  104. CP(3,6)
  105. print(" Choose an account ")
  106.  
  107. BC(128)
  108. TC(1)
  109. CP(3,18)
  110. print("Desktop")
  111.  
  112. while true do
  113. event,side,x,y = os.pullEvent()
  114. if event == "mouse_click" then
  115.  
  116. if x >= 3 and x <= 9 and y == 18 then
  117. backD = true
  118. break
  119. end
  120.  
  121. if x >= 3 and x <= 21 and y == 6 then
  122. TC(1)
  123. CP(3,6)
  124. BC(256)
  125. print(" Choose an account ")
  126. TC(256)
  127. BC(1)
  128. CP(3,7)
  129. print(" ")
  130. TC(1)
  131. BC(256)
  132. CP(3,8)
  133. print(" Account 1 - Adm. ")
  134. TC(256)
  135. BC(1)
  136. CP(3,9)
  137. print(" Account 2 ")
  138. TC(1)
  139. BC(256)
  140. CP(3,10)
  141. print(" Account 3 ")
  142.  
  143. while true do
  144. event,side,x,y = os.pullEvent()
  145. if event == "mouse_click" then
  146.  
  147. if x >= 3 and x <= 21 and y == 8 then
  148. AC = 1
  149. break
  150. elseif x >= 3 and x <= 21 and y == 9 then
  151. AC = 2
  152. break
  153. elseif x >= 3 and x <= 21 and y == 10 then
  154. AC = 3
  155. break
  156. elseif x >= 3 and x <= 21 and y >= 11 and y <= 19 or x >= 1 and x <= 51 and y >= 1 and y <= 5 or x >= 1 and x <= 2 and y >= 1 and y <= 19 or x >= 22 and x <= 51 and y >= 1 and y <= 19 then
  157. AC = 0
  158. break
  159. end
  160. end
  161. end
  162. end
  163. break
  164. end
  165. end
  166.  
  167. elseif AC == 1 then
  168. BC(128)
  169. CP(1,6)
  170. print(" ")
  171. print(" ")
  172. print(" ")
  173. print(" ")
  174. print(" ")
  175. print(" ")
  176. print(" ")
  177. print(" ")
  178. print(" ")
  179. print(" ")
  180.  
  181. BC(256)
  182. TC(1)
  183. CP(3,6)
  184. print(" Account 1 - Admin ")
  185.  
  186. BC(128)
  187. TC(1)
  188. CP(3,18)
  189. print("Desktop")
  190.  
  191. BC(128)
  192. TC(1)
  193. CP(4,9)
  194. write("Edit name")
  195. TC(256)
  196. print(" - "..u1)
  197.  
  198. BC(128)
  199. TC(1)
  200. CP(4,11)
  201. write("Edit password")
  202. TC(256)
  203. print(" - ******")
  204.  
  205. CP(4, 13)
  206. BC(128)
  207. TC(256)
  208. print("Login on/off")
  209.  
  210. if PassSOO == "t" then
  211. CP(18,13)
  212. if Recht == "Admin" then
  213. BC(2048)
  214. write(" ")
  215. BC(32768)
  216. print(" ")
  217. else
  218. BC(16384)
  219. write(" ")
  220. BC(32768)
  221. print(" ")
  222. end
  223. else
  224. CP(18,13)
  225. if Recht == "Admin" then
  226. BC(32768)
  227. write(" ")
  228. BC(256)
  229. print(" ")
  230. else
  231. BC(32768)
  232. write(" ")
  233. BC(16384)
  234. print(" ")
  235. end
  236. end
  237.  
  238. while true do
  239. event,side,x,y = os.pullEvent()
  240. if event == "mouse_click" then
  241.  
  242. if x >= 18 and x <= 20 and y == 13 then
  243. if Recht == "Admin" then
  244. if PassSOO == "t" then
  245. PassSOO = "f"
  246. else
  247. PassSOO = "t"
  248. end
  249.  
  250. local file = fs.open("SimSoft/Daten/Config","w")
  251. file.close()
  252. local file = fs.open("SimSoft/Daten/Config","w")
  253. file.writeLine(PassSOO)
  254. file.writeLine(Hintergrund)
  255. file.writeLine(Version)
  256. file.writeLine(Sprache)
  257. file.close()
  258. end
  259. end
  260.  
  261. if x >= 3 and x <= 9 and y == 18 then
  262. backD = true
  263. break
  264. end
  265.  
  266. if x >= 4 and x <= 12 and y == 9 then
  267.  
  268. if Recht == "Admin" then
  269. BC(128)
  270. CP(16,9)
  271. TC(256)
  272. print(" ")
  273. CP(16,9)
  274. nname = read()
  275.  
  276. local file = fs.open("SimSoft/Daten/User/User1","w")
  277. file.close()
  278. local file = fs.open("SimSoft/Daten/User/User1","w")
  279. file.writeLine(nname)
  280. file.writeLine(p1)
  281. file.close()
  282. CP(16,9)
  283. TC(32)
  284. print("Saved!")
  285. sleep(0.2)
  286. break
  287. else
  288. CP(16,9)
  289. BC(128)
  290. TC(16384)
  291. print("You are not a admin ")
  292. sleep(1)
  293. break
  294. end
  295. end
  296.  
  297. if x >= 4 and x <= 16 and y == 11 then
  298.  
  299. if Recht == "Admin" then
  300. BC(128)
  301. CP(20,11)
  302. TC(256)
  303. print(" ")
  304. CP(20,11)
  305. npass = read("*")
  306.  
  307. local file = fs.open("SimSoft/Daten/User/User1","w")
  308. file.close()
  309. local file = fs.open("SimSoft/Daten/User/User1","w")
  310. file.writeLine(u1)
  311. file.writeLine(npass)
  312. file.close()
  313. CP(20,11)
  314. TC(32)
  315. print("Saved! ")
  316. sleep(0.2)
  317. break
  318. else
  319. CP(20,11)
  320. BC(128)
  321. TC(16384)
  322. print("You are not a admin ")
  323. sleep(1)
  324. break
  325. end
  326. end
  327.  
  328.  
  329. if x >= 3 and x <= 21 and y == 6 then
  330. TC(1)
  331. CP(3,6)
  332. BC(256)
  333. write(" Choose an account ")
  334. BC(128)
  335. print(" ")
  336. TC(256)
  337. BC(1)
  338. CP(3,7)
  339. print(" ")
  340. TC(1)
  341. BC(256)
  342. CP(3,8)
  343. print(" Account 1 - Adm. ")
  344. TC(256)
  345. BC(1)
  346. CP(3,9)
  347. print(" Account 2 ")
  348. TC(1)
  349. BC(256)
  350. CP(3,10)
  351. print(" Account 3 ")
  352.  
  353. while true do
  354. event,side,x,y = os.pullEvent()
  355. if event == "mouse_click" then
  356.  
  357. if x >= 3 and x <= 21 and y == 8 then
  358. AC = 1
  359. break
  360. elseif x >= 3 and x <= 21 and y == 9 then
  361. AC = 2
  362. break
  363. elseif x >= 3 and x <= 21 and y == 10 then
  364. AC = 3
  365. break
  366. elseif x >= 3 and x <= 21 and y >= 11 and y <= 19 or x >= 1 and x <= 51 and y >= 1 and y <= 5 or x >= 1 and x <= 2 and y >= 1 and y <= 19 or x >= 22 and x <= 51 and y >= 1 and y <= 19 then
  367. AC = 1
  368. break
  369. end
  370. end
  371. end
  372. end
  373. break
  374. end
  375. end
  376.  
  377. elseif AC == 2 then
  378. BC(128)
  379. CP(1,6)
  380. print(" ")
  381. print(" ")
  382. print(" ")
  383. print(" ")
  384. print(" ")
  385. print(" ")
  386. print(" ")
  387. print(" ")
  388. print(" ")
  389. print(" ")
  390.  
  391. BC(256)
  392. TC(1)
  393. CP(3,6)
  394. print(" Account 2 ")
  395.  
  396. BC(128)
  397. TC(1)
  398. CP(3,18)
  399. print("Desktop")
  400.  
  401. BC(128)
  402. TC(1)
  403. CP(4,9)
  404. write("Edit name")
  405. TC(256)
  406. print(" - "..u2)
  407.  
  408. BC(128)
  409. TC(1)
  410. CP(4,11)
  411. write("Edit password")
  412. TC(256)
  413. print(" - ******")
  414.  
  415. if ACTF2 == "true" then
  416. CP(15,6)
  417. if Recht == "Admin" then
  418. BC(2048)
  419. write(" ")
  420. BC(32768)
  421. print(" ")
  422. else
  423. BC(16384)
  424. write(" ")
  425. BC(32768)
  426. print(" ")
  427. end
  428. else
  429. CP(15,6)
  430. if Recht == "Admin" then
  431. BC(32768)
  432. write(" ")
  433. BC(256)
  434. print(" ")
  435. else
  436. BC(32768)
  437. write(" ")
  438. BC(16384)
  439. print(" ")
  440. end
  441. end
  442.  
  443. while true do
  444. event,side,x,y = os.pullEvent()
  445. if event == "mouse_click" then
  446.  
  447. if x >= 15 and x <= 17 and y == 6 then
  448. if Recht == "Admin" then
  449. if ACTF2 == "true" then
  450. ACTF2 = "false"
  451. else
  452. ACTF2 = "true"
  453. end
  454.  
  455. local file = fs.open("SimSoft/Daten/User/User2","w")
  456. file.close()
  457. local file = fs.open("SimSoft/Daten/User/User2","w")
  458. file.writeLine(u2)
  459. file.writeLine(p2)
  460. file.writeLine(ACTF2)
  461. file.close()
  462. end
  463. end
  464.  
  465. if x >= 3 and x <= 9 and y == 18 then
  466. backD = true
  467. break
  468. end
  469.  
  470. if x >= 4 and x <= 12 and y == 9 then
  471.  
  472. if Recht == "Admin" or RechtH == 2 then
  473. BC(128)
  474. CP(16,9)
  475. TC(256)
  476. print(" ")
  477. CP(16,9)
  478. nname = read()
  479.  
  480. local file = fs.open("SimSoft/Daten/User/User2","w")
  481. file.close()
  482. local file = fs.open("SimSoft/Daten/User/User2","w")
  483. file.writeLine(nname)
  484. file.writeLine(p2)
  485. file.writeLine(ACTF2)
  486. file.close()
  487. CP(16,9)
  488. TC(32)
  489. print("Saved! ")
  490. sleep(0.2)
  491. break
  492. else
  493. CP(16,9)
  494. BC(128)
  495. TC(16384)
  496. print("You are not a user 2 ")
  497. sleep(1)
  498. break
  499. end
  500. end
  501.  
  502. if x >= 4 and x <= 16 and y == 11 then
  503.  
  504. if Recht == "Admin" or RechtH == 2 then
  505. BC(128)
  506. CP(20,11)
  507. TC(256)
  508. print(" ")
  509. CP(20,11)
  510. npass = read("*")
  511.  
  512. local file = fs.open("SimSoft/Daten/User/User2","w")
  513. file.close()
  514. local file = fs.open("SimSoft/Daten/User/User2","w")
  515. file.writeLine(u2)
  516. file.writeLine(npass)
  517. file.writeLine(ACTF2)
  518. file.close()
  519. CP(20,11)
  520. TC(32)
  521. print("Saved! ")
  522. sleep(0.2)
  523. break
  524. else
  525. CP(20,11)
  526. BC(128)
  527. TC(16384)
  528. print("You are not a user 2 ")
  529. sleep(1)
  530. break
  531. end
  532. end
  533.  
  534.  
  535. if x >= 3 and x <= 13 and y == 6 then
  536. TC(1)
  537. CP(3,6)
  538. BC(256)
  539. print(" Choose an account ")
  540. TC(256)
  541. BC(1)
  542. CP(3,7)
  543. print(" ")
  544. TC(1)
  545. BC(256)
  546. CP(3,8)
  547. print(" Account 1 - Adm. ")
  548. TC(256)
  549. BC(1)
  550. CP(3,9)
  551. print(" Account 2 ")
  552. TC(1)
  553. BC(256)
  554. CP(3,10)
  555. print(" Account 3 ")
  556.  
  557. while true do
  558. event,side,x,y = os.pullEvent()
  559. if event == "mouse_click" then
  560.  
  561. if x >= 3 and x <= 21 and y == 8 then
  562. AC = 1
  563. break
  564. elseif x >= 3 and x <= 21 and y == 9 then
  565. AC = 2
  566. break
  567. elseif x >= 3 and x <= 21 and y == 10 then
  568. AC = 3
  569. break
  570. elseif x >= 3 and x <= 21 and y >= 11 and y <= 19 or x >= 1 and x <= 51 and y >= 1 and y <= 5 or x >= 1 and x <= 2 and y >= 1 and y <= 19 or x >= 22 and x <= 51 and y >= 1 and y <= 19 then
  571. AC = 2
  572. break
  573. end
  574. end
  575. end
  576. end
  577. break
  578. end
  579. end
  580.  
  581. elseif AC == 3 then
  582. BC(128)
  583. CP(1,6)
  584. print(" ")
  585. print(" ")
  586. print(" ")
  587. print(" ")
  588. print(" ")
  589. print(" ")
  590. print(" ")
  591. print(" ")
  592. print(" ")
  593. print(" ")
  594. print(" ")
  595. print(" ")
  596.  
  597. BC(256)
  598. TC(1)
  599. CP(3,6)
  600. print(" Account 3 ")
  601.  
  602. BC(128)
  603. TC(1)
  604. CP(3,18)
  605. print("Desktop")
  606.  
  607. BC(128)
  608. TC(1)
  609. CP(4,9)
  610. write("Edit name")
  611. TC(256)
  612. print(" - "..u3)
  613.  
  614. BC(128)
  615. TC(1)
  616. CP(4,11)
  617. write("Edit password")
  618. TC(256)
  619. print(" - ******")
  620.  
  621. if ACTF3 == "true" then
  622. CP(15,6)
  623. if Recht == "Admin" then
  624. BC(2048)
  625. write(" ")
  626. BC(32768)
  627. print(" ")
  628. else
  629. BC(16384)
  630. write(" ")
  631. BC(32768)
  632. print(" ")
  633. end
  634. else
  635. CP(15,6)
  636. if Recht == "Admin" then
  637. BC(32768)
  638. write(" ")
  639. BC(256)
  640. print(" ")
  641. else
  642. BC(32768)
  643. write(" ")
  644. BC(16384)
  645. print(" ")
  646. end
  647. end
  648.  
  649. while true do
  650. event,side,x,y = os.pullEvent()
  651. if event == "mouse_click" then
  652.  
  653. if x >= 15 and x <= 17 and y == 6 then
  654. if Recht == "Admin" then
  655. if ACTF3 == "true" then
  656. ACTF3 = "false"
  657. else
  658. ACTF3 = "true"
  659. end
  660.  
  661. local file = fs.open("SimSoft/Daten/User/User3","w")
  662. file.close()
  663. local file = fs.open("SimSoft/Daten/User/User3","w")
  664. file.writeLine(u3)
  665. file.writeLine(p3)
  666. file.writeLine(ACTF3)
  667. file.close()
  668. end
  669. end
  670.  
  671. if x >= 3 and x <= 9 and y == 18 then
  672. backD = true
  673. break
  674. end
  675.  
  676. if x >= 4 and x <= 12 and y == 9 then
  677.  
  678. if Recht == "Admin" or RechtH == 3 then
  679. BC(128)
  680. CP(16,9)
  681. TC(256)
  682. print(" ")
  683. CP(16,9)
  684. nname = read()
  685.  
  686. local file = fs.open("SimSoft/Daten/User/User3","w")
  687. file.close()
  688. local file = fs.open("SimSoft/Daten/User/User3","w")
  689. file.writeLine(nname)
  690. file.writeLine(p3)
  691. file.writeLine(ACTF3)
  692. file.close()
  693. CP(16,9)
  694. TC(32)
  695. print("Saved! ")
  696. sleep(0.2)
  697. break
  698. else
  699. CP(16,9)
  700. BC(128)
  701. TC(16384)
  702. print("You are not a user 3 ")
  703. sleep(1)
  704. break
  705. end
  706. end
  707.  
  708. if x >= 4 and x <= 16 and y == 11 then
  709.  
  710. if Recht == "Admin" or RechtH == 3 then
  711. BC(128)
  712. CP(20,11)
  713. TC(256)
  714. print(" ")
  715. CP(20,11)
  716. npass = read("*")
  717.  
  718. local file = fs.open("SimSoft/Daten/User/User3","w")
  719. file.close()
  720. local file = fs.open("SimSoft/Daten/User/User3","w")
  721. file.writeLine(u3)
  722. file.writeLine(npass)
  723. file.writeLine(ACTF3)
  724. file.close()
  725. CP(20,11)
  726. TC(32)
  727. print("Saved! ")
  728. sleep(0.2)
  729. break
  730. else
  731. CP(20,11)
  732. BC(128)
  733. TC(16384)
  734. print("You are not a user 3 ")
  735. sleep(1)
  736. break
  737. end
  738. end
  739.  
  740.  
  741. if x >= 3 and x <= 13 and y == 6 then
  742. TC(1)
  743. CP(3,6)
  744. BC(256)
  745. print(" Choose an account ")
  746. TC(256)
  747. BC(1)
  748. CP(3,7)
  749. print(" ")
  750. TC(1)
  751. BC(256)
  752. CP(3,8)
  753. print(" Account 1 - Adm. ")
  754. TC(256)
  755. BC(1)
  756. CP(3,9)
  757. print(" Account 2 ")
  758. TC(1)
  759. BC(256)
  760. CP(3,10)
  761. print(" Account 3 ")
  762.  
  763. while true do
  764. event,side,x,y = os.pullEvent()
  765. if event == "mouse_click" then
  766.  
  767. if x >= 3 and x <= 21 and y == 8 then
  768. AC = 1
  769. break
  770. elseif x >= 3 and x <= 21 and y == 9 then
  771. AC = 2
  772. break
  773. elseif x >= 3 and x <= 21 and y == 10 then
  774. AC = 3
  775. break
  776. elseif x >= 3 and x <= 21 and y >= 11 and y <= 19 or x >= 1 and x <= 51 and y >= 1 and y <= 5 or x >= 1 and x <= 2 and y >= 1 and y <= 19 or x >= 22 and x <= 51 and y >= 1 and y <= 19 then
  777. AC = 3
  778. break
  779. end
  780. end
  781. end
  782. end
  783. break
  784. end
  785. end
  786. end
  787. if backD == true then
  788. break
  789. end
  790. end
Add Comment
Please, Sign In to add comment