#progress bar
1 messages · Page 1 of 1 (latest)
How does this work?
👍
custom emoticons via font folder and some scripts
Does it use scoreboards?
no
function progressBar(count, maxCount, len, type) {
const syms = {
"mana": ["\uE0F0","\uE0F1","\uE0F2","\uE0F3","\uE0F4","\uE0F5","\uE0F6","\uE0F7","\uE0F8","\uE0F9","\uE0FA","\uE0FB","\uE0FC","\uE0FD","\uE0FE","\uE0FF"]
}[type]
len *= syms.length
let bar = []
let fill = Math.floor(count * (len/maxCount))
for (let i = 1; i <= len; i += syms.length) {
bar.push(syms[Math.max(fill-i, 0)] || syms[syms.length-1])
}
return bar.join("")
}```
Mana!
Wizards are looking for you
Very cool
And very clean code too
this is just the beginning
small update, it's a pity that there is a small space between the symbols