Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------
- -- >> MINCERAFT << --
- ---------------------
- -- Versione: Alpha 0.1.2
- -- Sviluppatore: FoxWorn3365
- -- Agenzia di Distribuzione: FoxInvest Holding
- -- OS: CraftOS 1.5a
- ---------------------
- version = "Alpha 1.0.2"
- developer = "FoxWorn3365"
- holding = "FoxInvest Holding"
- os = "CraftOS 1.5a"
- -- Definisco le variabili basiche
- start = 0 -- [0] Main Menu, [1] World Select, [2] Game, [3] Info
- ch = 500
- -- Ora imlemento le funzioni che mi servono
- maxw, maxh = term.getSize()
- local function drawPixelInternal(xPos, yPos)
- term.setCursorPos(xPos, yPos)
- term.write(" ")
- end
- local tColourLookup = {}
- for n = 1, 16 do
- tColourLookup[string.byte("0123456789abcdef", n, n)] = 2 ^ (n - 1)
- end
- function drawFilledBox(startX, startY, endX, endY, nColour)
- if type(startX) ~= "number" or type(startX) ~= "number" or type(endX) ~=
- "number" or type(endY) ~= "number" or
- (nColour ~= nil and type(nColour) ~= "number") then
- error("Expected startX, startY, endX, endY, colour", 2)
- end
- startX = math.floor(startX)
- startY = math.floor(startY)
- endX = math.floor(endX)
- endY = math.floor(endY)
- if nColour then term.setBackgroundColor(nColour) end
- if startX == endX and startY == endY then
- drawPixelInternal(startX, startY)
- return
- end
- local minX = math.min(startX, endX)
- if minX == startX then
- minY = startY
- maxX = endX
- maxY = endY
- else
- minY = endY
- maxX = startX
- maxY = startY
- end
- for x = minX, maxX do for y = minY, maxY do drawPixelInternal(x, y) end end
- end
- function clear()
- sfondo(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- end
- function clearRed()
- sfondo(colors.red)
- term.clear()
- term.setCursorPos(1, 1)
- end
- function titolo(testo)
- drawFilledBox(1, 1, maxw, 1, colors.blue)
- term.setCursorPos((maxw - #testo) / 2, 1)
- term.setTextColor(colors.white)
- term.write(testo)
- end
- function bottone(color, text, x, y)
- term.setBackgroundColor(colors[color])
- term.setTextColor(colors.white)
- term.setCursorPos(x, y)
- print(text)
- end
- function no()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- end
- function rMessage()
- local number = math.random(1, 15)
- if number == 1 then
- print("Viva la FoxInvest Holding")
- elseif number == 2 then
- print("EPCO o EPPECO :thonk:")
- elseif number == 3 then
- print(version)
- elseif number == 4 then
- print("RGBCraft nel cuore")
- elseif number == 5 then
- print("Ma la Microsol esiste?")
- elseif number == 6 then
- print("/lego11")
- elseif number == 7 then
- print("Discord dimmerda")
- elseif number == 8 then
- print("Adesso dobbiamo fare un discorsetto")
- elseif number == 9 then
- print("Questo e' perche' non usi l'ME")
- elseif number == 10 then
- print("Il gas puo' tutto")
- else
- print("ERROR")
- end
- end
- -- Ora inizio con il programma
- while true do
- if start == 0 then
- -- HOMEPAGE [0]
- titolo("Minceraft.ccp")
- print("\n\nBenvenuto sul launcher ufficiale di Minceraft!")
- print("")
- rMessage()
- local event, button, x, y = os.pullEvent("mouse_click")
- end
- sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement