$r(1,4) = $rand(1,4), second using slackers code would not work if your reply vars are more than 1 word long. Third you don't use set for the random reply variable use /var as its local and you don't have to worry about a global variable. Lastly,
on *:text:*:*: {
if ($istok(%text.1 %text.2,$1,32)) { msg $chan $eval($+(%,reply.,$r(1,4)),2) }
}