Hello.
It will cast utevo lux every X seconds, random time between 30 and 60 seconds, if you have more than 20 mana.
So if a GM starts a MANA test on you, your character will cast utevo lux if it's not the time to cast.
local MANA_CAST = 20 -- Min mana to cast spell.
local SPELL = 'utevo lux' -- Spell to cast.
local TIME_CAST = { Min = 30, Max = 60 } -- IN SECONDS. Time range to cast spell.
NEXT_CAST = NEXT_CAST or 1
if mp() >= MANA_CAST and runningtime() >= NEXT_CAST then
cast(SPELL)
NEXT_CAST = runningtime() + random(TIME_CAST.Min, TIME_CAST.Max)
end