How to make it so that my macro
for casting frost bolt
until the mob dies?

Is this possible?