Missing a pipe.
on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt | .timermsg 1 $rand(1,4) /msg $chan $9 } }
And i dont understand what you want to do with the $rand(), $9 is empty if the line arent long enough.
The($1) lines($2) we($3) looking($4) at($5) just($6) to($7) show.($8) here($9)
So if the message you snatch from the channel are shorter then 9 words $9 will be null.
To show all the messages you use $1-