Originally Posted by Fizzlemizz
Personally I've found it quite handy to use Discord Art to do this sort of thing but I'm already using it for other things as well.
Anyway Akatosh if you decide to proceed with KgPanels here's the code for a clock.
Code:
local minutes, hour, minute
local t = date("*t", time())
hour = t.hour
minute = t.min
minutes = (hour*60) + minute
if (minutes > 1440) then
minutes = minutes - 1440
end
minutes = abs(minutes)
hour = floor(minutes/60)
minute = format("%02d", mod(minutes, 60))
local text
if minutes > 719 then
if minutes > 779 then
hour = floor(minutes/60) - 12
end
text = hour .. ":" .. minute .. " pm"
else
if (hour == 0) then
hour = 12
end
text = hour .. ":" .. minute .. " am"
end
-- do whatever KgPanels uses to update the display with text.
About the only thing that would be difficult would be the memory usage.
|
Thanks for trusting me! but... I put the code onUpdate section and nothing appear.