04.02.2016, 10:12
I assume you want something like this, correct me if I'm wrong.
Код:
new firstrand = random(3)+1, secondrand; if(firstrand == 1 || firstrand == 2) // 5, 6, 7, 8, 9 have 2/3 chances to come. ( 66.66% chances ) { secondrand = random(5)+5; // 5, 6, 7, 8, 9 } else if(firstrand == 3) // 1, 2, 3, 4 have only 1/3 chances to come ( 33.33% chances ) { secondrand = random(4)+1; // 1, 2, 3, 4 }