Hello
I realizes a program to convert decimal in hexa.
local function hexa(dec)
local B,K,OUT,I,D = 16,"0123456789ABCDEF","",0
if dec == 0 then
OUT = "00"
elseif dec > 0 and dec < 16 then
D = dec + 1
OUT = "0"..string.sub(K,D,D)
elseif dec > 16 and dec < 256 then
V1 = math.modf(dec/B)+1
V2 = (dec-V1*16)
OUT = string.sub(K,V1,V1)..string.sub(K,V2,V2)
end
return OUT
end
this program convert a lower number in 256, and i use this in a formule
local function rod(x,y,n)
lvl = br.getControlRodLevel(n)
rouge = math.floor((100-lvl)*255/100)
v