It's impossible to do what you want in mIRC.

A possible way to approach it: make a separate alias for each piece of code in between 2 waits, and put at the end of each alias .timer 1 10 nextalias arguments. Change the alias name and the arguments ofcourse. Note that all /var settings, and $1- and such are gone unless you pass those again as vaiables or use public variables (which can make things worse if you run the script again before it's completely ended). Ofcourse it's also impossinbe to spread a while loop out over 2 or more aliases, so you can't use those either. You can use if-elseif-else but they all need to be in the same alias ofcourse.

To get you started:
Code:
on *:chat:*:{ .timer 1 10 chat1 $1- }
alias chat1 {
  if ([txt] isin $1-) && ($1 !isupper) {
    write txtfiles.txt $1
    .timer 1 10 chat2 $nick $1-
  }
  else {
    chat2 $nick $1-
  }
}
alias chat2 {
  if ($2- isupper) {
    write FOLDERS.txt $2-
    .timer 1 10 chat3 $1-
  }
  elseif (somethingelse) {
    msg $1 hey you said $2-
    .timer 1 10 chat4 $1-
  }
}
...


Yes it's bad, I don't like it either, but the other alternative is even worse:
Code:
alias wait { var %t = $ctime + $iif($1 isnum 1-,$1,5) | while (%t > $ctime) ! }

This will wait for about the given number of seconds, or 5 seconds if no parameter. It will also hang your mIRC during that waiting time. Simply put, if you wait 20 seconds mIRC will look like it's crashed for 20 seconds, no screen updates, no new messages, no typing possible, 100% CPU usage. If you wait for a few minutes you will disconnect from the irc server. Don't know about dcc sends or chats, but my guess is they will timeout too.