needing just a bit more help! blush

So I got the script to work, now I'd like to do a randomization on what the general response will be. I know it's this:
Code:
var %hi = $rand(1,3)
if (%hi == 1) { msg # Hello $nick }
elseif (%hi == 2) { msg # what's up $nick }
elseif (%hi == 3) { msg # Welcome $nick }


But where do I put it? Under the coffee command, I have other commands. Do I put it directly on the next line after the coffee command, or can I put it on the bottom line under all the commands I've made thus far?

I'll explain better if this doesnt make sense. lol Basically what Im asking is where does it go?