$rand(0,$nick(#,v,0)) should work if I got it right. The reason I use 0 and not 1 is because it will spread the randoms out a tad more and if it chooses 0, you'll simply get the max number returned which would still be valid. If the code is wrong, somebody will correct me