First, mIRC only supports { brackets on the same line as the comparison.

Wrong:
Code:

if (%var == 1)
{
...



Right:
Code:

if (%var == 1) {



Second, I can't tell by your post where your script is running... but in case you didn't know, you can't trigger your own onTEXT events from within your mIRC. If your code is in your own Remotes, you won't be able to trigger it. If that code is in your bot's mIRC, it will be ok.


Third, you can use the /timer command to delay the execution of your code. Just keep in mind that identifiers like $nick, $chan, etc that are set within an onTEXT event, are destroyed as soon as that event ends. If you want to use those identifiers in an /alias that your timer calls, you will need to save them in a variable, or pass them as arguments to the /alias.

Example:

Code:

on *:TEXT:!check:#:{
  .timer 1 4 myalias $nick $chan
}
alias myalias {
  echo -at Nick: $nick , Chan: $chan , 1: $1 , 2: $2
}



-genius_at_work