Advertisement
MagmaLP

Item-Save

Oct 8th, 2021 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. function calc_color(color)
  2. return math.pow(2, color - 1)
  3. end
  4.  
  5. function msg(gap, line, color, groundb, text)
  6. term.setBackgroundColor(calc_color(groundb))
  7. term.setCursorPos(gap,line)
  8. term.setTextColor(calc_color(color))
  9. text = term.write(text)
  10. end
  11.  
  12. function start()
  13. term.setBackgroundColor(512)
  14. term.clear()
  15. msg(01,01,05,10,"Mit diesem Computer könnt ihr Wertvolle Items")
  16. msg(01,02,05,10,"(aktuell nur HVs und Aes) sicher verwaren.")
  17. msg(01,03,05,10,"Falls ihr zu lange inaktiv bleibt und eure")
  18. msg(01,04,05,10,"Grundstücke im Freebuild gelöscht werden sollten,")
  19. msg(01,05,05,10,"könnt ihr euch dann eure verwarten Items")
  20. msg(01,06,05,10,"zurückholen.")
  21. msg(01,07,05,10,"Dass soll einen Neustart erleichtern.")
  22.  
  23. msg(01,09,05,10,"Um später auf deine Items zugreifen zu können,")
  24. msg(01,10,05,10,"musst du erstmal einen Localen-Account erstellen,")
  25. msg(01,11,05,10,"auf dem deine Items gespeichert werden.")
  26.  
  27. msg(01,13,15,10,"Hast du schon einen Account?")
  28. msg(01,14,15,10,"Schreib jetzt __ oder ____")
  29. msg(15,14,02,10,"JA")
  30. msg(23,14,02,10,"Nein")
  31.  
  32. term.setTextColor(colors.red)
  33. term.setCursorPos(01,16)
  34. local a = read()
  35.  
  36. if a == "ja" or a == "Ja" or a == "jA" or a == "JA" then
  37. sleep(1)
  38. login()
  39. elseif a == "nein" or a == "Nein" or a == "NEIN" then
  40. sleep(1)
  41. register()
  42. else
  43. sleep(0.5)
  44. msg(01,16,02,10,"Eingabe nicht erkannt, bitte nochmal versuchen.")
  45. sleep(2)
  46. start()
  47. end
  48. end
  49.  
  50. function login()
  51. term.setBackgroundColor(32768)
  52. term.clear()
  53. msg(01,01,05,10,"login")
  54. end
  55. function register()
  56. term.setBackgroundColor(32768)
  57. term.clear()
  58. msg(01,01,05,10,"register")
  59. end
  60.  
  61.  
  62. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement