我是找了对应的字符... __, ▂, ▅, 用新宋体, 就是那样了. 也可以根据自己喜好在这些里挑选 __▁▂▃▄▅▆▇
我是用LordStar, 其他客户端也都可以用一样的办法.
另附生成血条字符串的lua代码:
function hpBar(pos1, pos2)
local str2 = ''
local color
local i
if (pos1 > 100) then pos1 = 100 end
if (pos2 > 100) then pos2 = 100 end
i = 0
while i < pos1 do
--str2 = str2 .. '█'
str2 = str2 .. '▅'
i = i + 10
end
while (i < pos2) do
str2 = str2 .. '▂' -- __▁▂▃▄▅▆▇█ ▅
i = i + 10
end
while (i < 100) do
str2 = str2 .. '__'
i = i + 10
end
if (pos1 > 75) then
color = '$HIG$'
elseif (pos1 > 25) then
color = '$HIY$'
else
color = '$HIR$'
end
return color .. str2;
end |