You need to have the window open in order to print to it. Simple version:
Code:
on ^*:notice:*:?: {
window @window
echo @window $1-
haltdef
}

More complex version (I like it more, allows for timestamps, wrapping, the nick, and window placement at the end of all servers
Code:
on ^*:notice:*:?: {
window -zk[0] @window
echo -itg @window - $+ $nick $+ - $1-
haltdef
}

If you want to know what each of the paramaters do, look up echo and window in the manual :P