echo -a $weapon($rand(1,4))

alias weapon {
if ($1 == 1) return knife
elseif ($1 == 2) return rope
elseif ($1 == 3) return candlestick
else return gun
}

This is another way and you can see how riamuses would be less lines.