Help with displaying messages

To any and all,

I want to be able to display a message on my "Modify Ticket" screen 

just like RT does when someone makes an error. I’d like to do it from
within a scrip. Has anyone done this and can you help me with this? Thanks.

Kenn
LBNL