you can stack this for better results. (((rnd(6) mod 5) mod 4) mod 3) yields 4 times as many zeroes as 1s or 2s. if you want the emphasis on 1 or 2 instead, just raise values to 1,2,3 or 2,3,4 and then use if A>2 then A=A-3