lego11

ZIRCONIO

Aug 22nd, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.92 KB | None | 0 0
  1. --ZIRCONIO (C) LEGO11 2018
  2.  
  3. function clr()
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. end
  7.  
  8. clr()
  9.  
  10. if term.isColor() == false then
  11. error("Scheda grafica a colori EGA richiesta.")
  12. end
  13.  
  14.  
  15. function colore(sfumatura)
  16. term.setTextColour(sfumatura)
  17. end
  18. function sfondo(sfumaturaSfondo)
  19. term.setBackgroundColour(sfumaturaSfondo)
  20. end
  21.  
  22. colore(colours.lime)
  23. print("\n")
  24. --[[textutils.slowWrite("        88888888888888888888888\n")
  25. textutils.slowWrite("        88                    888\n")
  26. textutils.slowWrite("        88                      888\n")
  27. textutils.slowWrite("        88                        888\n")
  28. textutils.slowWrite("        88                         88\n")
  29. textutils.slowWrite("        88888888888888888888888888888\n")
  30. ]]--
  31. print("")        
  32. print("          ___  ___ _____ _____  ___  ")
  33. print("          |  \\/  ||  ___/  ___|/ _ \\ ")
  34. print("          | .  . || |__ \\  --./ /_\\ \\ ")
  35. print("          | |\\/| ||  __| \\--. \\  _  |")
  36. print("          | |  | || |___/\\__/ / | | |")
  37. print("          \\_|  |_/\\____/\\____/\\_| |_/")
  38. print("")
  39. print("")
  40. colore(colours.white)                          
  41. textutils.slowWrite("                P R E S E N T A :\n")
  42. sleep(3)
  43.  
  44. clr()
  45.  
  46. colore(colours.yellow)
  47. print("  ______                     _          ________")
  48. print(" |__  (_)_ __ ___ ___  _ __ (_) ___    | 40     |")
  49. print("   / /| | '__/ __/ _ \\| '_ \\| |/ _ \\   | Zr     |")
  50. print("  / /_| | | | (_| (_) | | | | | (_) |  | 91.224 |")
  51. print(" /____|_|_|  \\___\\___/|_| |_|_|\\___/   |________|")
  52. print("Versione 1.0")
  53. print("\n")
  54. sfondo(colours.white)
  55. colore(colours.black)
  56. print("Nuova partita")
  57. print("")
  58. print("Carica partita")
  59. print("")
  60. print("Esci")
  61. print("")
  62. term.setCursorPos(1,19)
  63. colore(colours.white)
  64. sfondo(colours.black)
  65. term.write("Copyright (C) 2018 MESA Development/lego11")
  66.  
  67. loop = true
  68. while loop == true do
  69. event, key, x, y = os.pullEvent()
  70. if event == "mouse_click" and y == 9 then
  71. loop = false
  72. nuovoGioco = true
  73. esci = false
  74. elseif event == "mouse_click" and y == 11 then
  75. loop = false
  76. nuovoGioco = false
  77. esci = false
  78. elseif event == "mouse_click" and y == 13 then
  79. clr()
  80. esci = true
  81. end
  82. end
  83.  
  84. if nuovoGioco == true and esci == false then
  85. clr()
  86. if fs.exists("/disk/SAVEGAME") = true then
  87. print("File di salvataggio già esistente!")
  88. print("Sovrascriverlo oppure caricare la partita?\n")
  89. sfondo(colours.white)
  90. colore(colours.black)
  91. term.write("Sovrascrivi")
  92. term.setCursorPos(10,4)
  93. term.write("Carica salvataggio")
  94. loop = true
  95. while loop == true do
  96. event, key, x, y = os.pullEvent()
  97. if event == "mouse_click" and X < 9 and y == 4 then
  98. loop = false
  99. sovrascrivi = true
  100. elseif event == "mouse_click" and X > 10 and y == 4 then
  101. loop = false
  102. sovrascrivi = false
  103. end
  104.  
  105. if sovrascrivi == true then
  106. fs.delete("/disk/SAVEGAME")
  107.  
  108.  
  109.  
  110. end
  111.  
  112. end
  113. if nuovoGioco == false and esci == false then
  114. clr()
  115. print("Vecchio gioco")
  116. sleep(3)
  117. end
  118. clr()
  119. print("arrivederci")
Advertisement
Add Comment
Please, Sign In to add comment