Using an alias with parameters instead of direct code in a /timer makes things simpler and safer. It usually works, but in this case, if unknown parameters are passed to that alias, it gets tricky and could even be dangerous. As I explained in my previous post you should NOT pass $$2- as a parameter to an alias called by /timer. The reason is that $2- is to be evaluated twice. During that second evaluation, unexpected things can happen.
I'll give an example to make it clear. We make a simple alias that does the job and we use that in the /timer, passing it $2- as parameters:
alias fc .timer $1 0 fc2 $$2-
alias fc2 say $+($chr(3),$base($rand(1,15),10,10,2),$1-)
Everything looks fine, right? If the user typed
/fc Hey guys, use this to delete a file: //echo -a About to delete file.txt | remove file.txt
he can be sure that there's no problem with what he typed because he used a single slash, so mirc code won't be evaluated and he can /say to his friends whatever he wants. No! Each time fc2 is executed by the timer, the parameters passed to it ($2-) will be evaluated once more, which would end up in /remove deleting file.txt. That's why I used the global variable: so we don't have to pass unknown content to an alias called by a /timer.
I still think that having a single alias in a /timer is usually the "best" solution, as long as we're cautious with the parameters. An example that would be safe is this:
alias fc set [color:green]%fc[/color] $$2- | .timer $1 0 fc2
alias fc2 say $+($chr(3),$base($rand(1,15),10,10,2),[color:green]%fc[/color])