Originally Posted by
Roland_J
I might have a fun question. (It was fun for me, I tried a lot of things to solve it but failed, lol)
How do I get rolltracker.lua's number-within-a-circle to work without including the chat resource? All I want is the circle and so I really don't want to add the overhead of chat-resources if I can just do a simple fix instead similar to the tries listed below.
Here's the code he uses, the code in chat that it references, and my various attempts.
Code:
--his code, this puts the numeric value of rollNum as a digit within a large circle. It's awesome.
chars['circle' .. rollNum]
-- chars['circle' refers to the below
circle = string.char(0x81, 0xF8),
--I've tried
string.char(0x81, 0xF8) .. 5 --results in 5 to the right of the circle
--I also tried
[string.char(0x81, 0xF8), 5 ] --results in an error
--and
(string.char(0x81, 0xF8), 5)
--and I tried numerous slight tweaks to the above attempts, like adding/removing commas and moving parenthesis/brackets
Well, whadda you think? Thanks!
you need these
Code:
-- circled numbers 1-20
circle1 = string.char(0x87, 0x40),
circle2 = string.char(0x87, 0x41),
circle3 = string.char(0x87, 0x42),
circle4 = string.char(0x87, 0x43),
circle5 = string.char(0x87, 0x44),
circle6 = string.char(0x87, 0x45),
circle7 = string.char(0x87, 0x46),
circle8 = string.char(0x87, 0x47),
circle9 = string.char(0x87, 0x48),
circle10 = string.char(0x87, 0x49),
circle11 = string.char(0x87, 0x4A),
circle12 = string.char(0x87, 0x4B),
circle13 = string.char(0x87, 0x4C),
circle14 = string.char(0x87, 0x4D),
circle15 = string.char(0x87, 0x4E),
circle16 = string.char(0x87, 0x4F),
circle17 = string.char(0x87, 0x50),
circle18 = string.char(0x87, 0x51),
circle19 = string.char(0x87, 0x52),
circle20 = string.char(0x87, 0x53),
or
Code:
if rollNum > 0 and rollNum < 21 then
string.char(0x87, (63 + rollNum))
end