Well, you had some problems with how you set it up.
Code:
on *:text:*:#mychan: {
  if (!latest == $1) { 
    if (.add == $2) { 
      if ($nick isop #mychan) { 
        .write latest.txt $3- $ctime
      }
    }
    else {
      .play -a playlatest $nick latest.txt 1500
    }
  }
} 
alias -l playlatest {
  inc %latest.cnt
  notice $1 %latest.cnt $+ $chr(41) $gettok($2-,1- $calc($gettok($2-,0,32) - 1),32) $duration($calc($ctime - $gettok($2-,0,32)))
  if (%latest.cnt >= $lines(latest.txt)) { unset %latest.cnt }
}


That will work. You can change it back to msg if you want to. You *have* to leave it at $1 in the alias.