Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local comp = require("component")
- local http = require("internet")
- local holo = comp.hologram
- local mx = 48
- local my = 32
- local mz = 48
- local word_size = 4
- local start_x, start_y, start_z
- local current_x, current_y, current_z
- local spawnx, spawny, spawnz
- local holo_side
- local row
- local a =
- "#00#"..
- "0##0"..
- "0000"..
- "0##0"..
- "0##0"
- local b =
- "000#"..
- "0##0"..
- "000#"..
- "0##0"..
- "000#"
- local c =
- "#000"..
- "0###"..
- "0###"..
- "0###"..
- "#000"
- local d =
- "000#"..
- "0##0"..
- "0##0"..
- "0##0"..
- "000#"
- local e =
- "0000"..
- "0###"..
- "000#"..
- "0###"..
- "0000"
- local f =
- "0000"..
- "0###"..
- "000#"..
- "0###"..
- "0###"
- local g =
- "#000"..
- "0###"..
- "0#00"..
- "0##0"..
- "#000"
- local h =
- "0##0"..
- "0##0"..
- "0000"..
- "0##0"..
- "0##0"
- local j =
- "###0"..
- "###0"..
- "###0"..
- "0##0"..
- "#00#"
- local i =
- "#0#"..
- "#0#"..
- "#0#"..
- "#0#"..
- "#0#"
- local k =
- "0##0"..
- "0#0#"..
- "00##"..
- "0#0#"..
- "0##0"
- local l =
- "0###"..
- "0###"..
- "0###"..
- "0###"..
- "0000"
- local m =
- "0###0"..
- "00#00"..
- "0#0#0"..
- "0###0"..
- "0###0"
- local n =
- "0##0"..
- "00#0"..
- "0#00"..
- "0##0"..
- "0##0"
- local o =
- "#00#"..
- "0##0"..
- "0##0"..
- "0##0"..
- "#00#"
- local p =
- "000#"..
- "0##0"..
- "000#"..
- "0###"..
- "0###"
- local q =
- "#00#"..
- "0##0"..
- "0##0"..
- "0#00"..
- "#000"
- local r =
- "000#"..
- "0##0"..
- "000#"..
- "0#0#"..
- "0##0"
- local s =
- "#000"..
- "0###"..
- "#00#"..
- "###0"..
- "000#"
- local t =
- "000"..
- "#0#"..
- "#0#"..
- "#0#"..
- "#0#"
- local u =
- "0##0"..
- "0##0"..
- "0##0"..
- "0##0"..
- "#00#"
- local v =
- "0#0"..
- "0#0"..
- "0#0"..
- "0#0"..
- "#0#"
- local w =
- "0###0"..
- "0###0"..
- "0###0"..
- "0#0#0"..
- "#0#0#"
- local x =
- "0#0"..
- "0#0"..
- "#0#"..
- "0#0"..
- "0#0"
- local y =
- "0#0"..
- "0#0"..
- "000"..
- "#0#"..
- "#0#"
- local z =
- "0000"..
- "###0"..
- "##0#"..
- "#0##"..
- "0000"
- local one =
- "#0#"..
- "00#"..
- "#0#"..
- "#0#"..
- "000"
- local two =
- "#00#"..
- "0##0"..
- "##0#"..
- "#0##"..
- "0000"
- local three =
- "000#"..
- "###0"..
- "#00#"..
- "###0"..
- "000#"
- local four =
- "0##0"..
- "0##0"..
- "0##0"..
- "#000"..
- "###0"
- local five =
- "0000"..
- "0###"..
- "000#"..
- "###0"..
- "000#"
- local six =
- "#00#"..
- "0###"..
- "000#"..
- "0##0"..
- "#00#"
- local seven =
- "0000"..
- "###0"..
- "##0#"..
- "#0##"..
- "#0##"
- local eight =
- "#00#"..
- "0##0"..
- "#00#"..
- "0##0"..
- "#00#"
- local nine =
- "#00#"..
- "0##0"..
- "#000"..
- "###0"..
- "###0"
- local zero =
- "#00#"..
- "0##0"..
- "0##0"..
- "0##0"..
- "#00#"
- local dot =
- "###"..
- "###"..
- "###"..
- "###"..
- "#0#"
- local d_dot =
- "#"..
- "0"..
- "#"..
- "0"..
- "#"
- local q_m =
- "#00#"..
- "###0"..
- "#00#"..
- "####"..
- "#0##"
- local ex_m =
- "#0#"..
- "#0#"..
- "#0#"..
- "###"..
- "#0#"
- local empty =
- "####"..
- "####"..
- "####"..
- "####"..
- "####"
- holo.setScale(3)
- function Split(text, chunkSize)
- local s = {}
- for i=1, #text, chunkSize do
- s[#s+1] = text:sub(i,i+chunkSize - 1)
- end
- return s
- end
- function clear_holo()
- holo.clear()
- end
- function set_spawn(x, y, z, side)
- side = side or "north"
- holo_side = side
- if (x > mx or x < 1) then
- print("x must be between 1-"..mx)
- os.exit()
- end
- if (y > my or y < 1) then
- print("y must be between 1-"..my)
- os.exit()
- end
- if (z > mz or z < 1) then
- print("z must be between 1-"..mz)
- os.exit()
- end
- start_x = x
- current_x = x
- start_y = y
- current_y = y
- start_z = z
- current_z = z
- end
- function print_alp(word)
- if (current_x + 4) >= mx then
- current_x = start_x
- current_y = current_y - 6
- print("Pisi na dalsi radek")
- end
- if (current_z + 4) >= mz then
- current_z = start_z
- current_y = current_y - 5
- end
- if (current_y - 5) <= 0 then
- print("Dojel jsi na konec")
- return false
- end
- if word == "a" or word == "A" then
- row = Split(a, word_size)
- elseif word == "b" or word == "B" then
- row = Split(b, word_size)
- elseif word == "c" or word == "C" then
- row = Split(c, word_size)
- elseif word == "d" or word == "D" then
- row = Split(d, word_size)
- elseif word == "e" or word == "E" then
- row = Split(e, word_size)
- elseif word == "f" or word == "F" then
- row = Split(f, word_size)
- elseif word == "g" or word == "G" then
- row = Split(g, word_size)
- elseif word == "h" or word == "H" then
- row = Split(h, word_size)
- elseif word == "i" or word == "I" then
- word_size = 3
- row = Split(i, word_size)
- elseif word == "j" or word == "J" then
- row = Split(j, word_size)
- elseif word == "k" or word == "K" then
- row = Split(k, word_size)
- elseif word == "l" or word == "L" then
- row = Split(l, word_size)
- elseif word == "m" or word == "M" then
- word_size = 5
- row = Split(m, word_size)
- elseif word == "n" or word == "N" then
- row = Split(n, word_size)
- elseif word == "o" or word == "O" then
- row = Split(o, word_size)
- elseif word == "p" or word == "P" then
- row = Split(p, word_size)
- elseif word == "q" or word == "Q" then
- row = Split(q, word_size)
- elseif word == "r" or word == "R" then
- row = Split(r, word_size)
- elseif word == "s" or word == "S" then
- row = Split(s, word_size)
- elseif word == "t" or word == "T" then
- word_size = 3
- row = Split(t, word_size)
- elseif word == "u" or word == "U" then
- row = Split(u, word_size)
- elseif word == "v" or word == "V" then
- word_size = 3
- row = Split(v, word_size)
- elseif word == "w" or word == "W" then
- word_size = 5
- row = Split(w, word_size)
- elseif word == "x" or word == "X" then
- word_size = 3
- row = Split(x, word_size)
- elseif word == "y" or word == "Y" then
- word_size = 3
- row = Split(y, word_size)
- elseif word == "z" or word == "Z" then
- row = Split(z, word_size)
- elseif word == "1" then
- word_size = 3
- row = Split(one, word_size)
- elseif word == "2" then
- row = Split(two, word_size)
- elseif word == "3" then
- row = Split(three, word_size)
- elseif word == "4" then
- row = Split(four, word_size)
- elseif word == "5" then
- row = Split(five, word_size)
- elseif word == "6" then
- row = Split(six, word_size)
- elseif word == "7" then
- row = Split(seven, word_size)
- elseif word == "8" then
- row = Split(eight, word_size)
- elseif word == "9" then
- row = Split(nine, word_size)
- elseif word == "0" then
- row = Split(zero, word_size)
- elseif word == "." then
- word_size = 3
- row = Split(dot, word_size)
- elseif word == ":" then
- word_size = 1
- row = Split(d_dot, word_size)
- elseif word == "?" then
- row = Split(q_m, word_size)
- elseif word == "!" then
- word_size = 3
- row = Split(ex_m, word_size)
- elseif word == " " then
- word_size = 2
- current_x = current_x + word_size + 1
- word_size = 4
- return true
- elseif word == "*" then
- row = Split(empty, word_size)
- else
- return true
- end
- for k,v in pairs(row) do
- local word = Split(v, 1)
- for kk,vv in pairs(word) do
- if vv == "0" then
- if holo_side == "east" then
- holo.set((current_x), (current_y - k), (current_z + kk), true)
- elseif holo_side == "south" then
- holo.set((current_x - kk), (current_y - k), (current_z), true)
- elseif holo_side == "west" then
- holo.set((current_x), (current_y - k), (current_z - kk), true)
- else
- holo.set((current_x + kk), (current_y - k), current_z, true)
- end
- else
- if holo_side == "east" then
- holo.set((current_x), (current_y - k), (current_z + kk), false)
- elseif holo_side == "south" then
- holo.set((current_x - kk), (current_y - k), (current_z), false)
- elseif holo_side == "west" then
- holo.set((current_x), (current_y - k), (current_z - kk), false)
- else
- holo.set((current_x + kk), (current_y - k), current_z, false)
- end
- end
- end
- end
- if holo_side == "east" then
- current_z = current_z + word_size + 1
- for i=1,5 do
- holo.set(current_x, current_y - i, current_z, false)
- end
- elseif holo_side == "south" then
- current_x = current_x - word_size - 1
- for i=1,5 do
- holo.set(current_x, current_y - i, current_z, false)
- end
- elseif holo_side == "west" then
- current_z = current_z - word_size - 1
- for i=1,5 do
- holo.set(current_x, current_y - i, current_z, false)
- end
- else
- current_x = current_x + word_size + 1
- for i=1,5 do
- holo.set(current_x, current_y - i, current_z, false)
- end
- end
- word_size = 4
- end
- function print_word(word)
- for k,v in pairs(Split(word, 1)) do
- if print_alp(v) == false then
- break
- end
- end
- end
- clear_holo()
- set_spawn(1, 32, 1)
- print_word("Ahoj jak se mas?")
- set_spawn(20, 32, 20, "east")
- print_word("LOL")
- set_spawn(20, 20, 20, "south")
- print_word("LOL")
- set_spawn(20, 10, 20, "west")
- print_word("LOL")
- --while true do
- -- set_spawn(1,32,20)
- -- local data = http.request("https://vote.patrick115.eu/ocapi.php?n=patrick115")
- -- local string = ""
- -- for chunk in data do
- -- string = string..chunk
- -- end
- -- print_word(string)
- -- os.sleep(1)
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement