I've been trying for days to add a 2 second delay to the "postmessage" alias in this code. Nothing I've tried seems to work. How do you add a 2 second delay to this script ? Like make the first message be sent immediately when triggered but the second one 2 seconds after the first.
The full code is here.
this is the portion of the code I need help with:
alias postmessage {
IF (%notes_for. [ $+ [ $server ] ] [ $+ [ . ] ] [ $+ [ $chan ] ] [ $+ [ . ] ] [ $+ [ $nick ] ]) {
VAR %x_notes 1
WHILE ($gettok(%notes_for. [ $+ [ $server ] ] [ $+ [ . ] ] [ $+ [ $chan ] ] [ $+ [ . ] ] [ $+ [ $nick ] ],%x_notes,32)) {
MSG $chan %note_from_to. [ $+ [ $server ] ] [ $+ [ . ] ] [ $+ [ $chan ] ] [ $+ [ . ] ] [ $+ [ $v1 ] ] [ $+ [ . ] ] [ $+ [ $nick ] ]
UNSET %note_from_to. [ $+ [ $server ] ] [ $+ [ . ] ] [ $+ [ $chan ] ] [ $+ [ . ] ] [ $+ [ $v1 ] ] [ $+ [ . ] ] [ $+ [ $nick ] ]
INC %x_notes
}
UNSET %notes_for. [ $+ [ $server ] ] [ $+ [ . ] ] [ $+ [ $chan ] ] [ $+ [ . ] ] [ $+ [ $nick ] ]
}
}