Function: AddSpellTimer(time, function, caster, target)
Description:
Schedules a named callback for the current spell after a delay. Requires an available current spell, caster and zone. Valid optional actor overrides remember their original allocation through weak observations; scheduling does not keep those actors alive for the delay. An override that can no longer be borrowed becomes nil, and never falls back to a replacement actor or another default target. Omitted overrides retain the normal spell argument selection.
Parameters:
time(unsigned integer) - Delay in milliseconds; zero is rejected.function(string) - Nonempty Lua callback name.caster(Spawn, optional) - Override for the callback's first actor argument; omission uses the spell caster.target(Spawn, optional) - Override for the callback's second actor argument; omission uses the normal spell target selection.
Returns: None.
Spell caster lifetime: When this function reads a spell's caster, it retains that allocation for the native operation. Retirement or callback reentry cannot replace its caster with a different allocation at the same address or runtime ID. A known expired or cleared caster is not rediscovered through a replacement connection. An actor already owned by the active callback remains usable through that callback. See Lua actor lifetime.