"; $i++; } while ($i < $nblettre); $nom= ucfirst($nom); if ($NbSuffixe !=0) $nom=$nom.$suffixe[$NbSuffixe]; // echo "#$y: $nom
"; return $nom; } Function GenereNomSyl($NbSylla) { $consonne = array("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z"); $voyelle = array("a","e","i","o","u","y"); $nbrepet=0; $nom =""; do { $nombal= rand (0,19); $ConsAl = $consonne[$nombal]; $nombal = rand (0,5); $VoyeAl = $voyelle[$nombal]; $StrucSyl = rand (1,4); Switch ($StrucSyl) { case 1: // CVC $nom = $nom . $ConsAl . $VoyeAl . $ConsAl; break; case 2: // VC $nom = $nom . $VoyeAl . $ConsAl; break; case 3: // CV $nom = $nom . $ConsAl . $VoyeAl; break; case 4: // V $nom = $nom . $VoyeAl; break; } $nbrepet++; // echo "$nbrepet
"; } while ($nbrepet < $NbSylla); $nom= ucfirst($nom); return $nom; } ?> GENALEA - Générateur Aléatoire de Jeux de rôles Québec
Options
Nombre de dé à générer:


D3
1
2
2
2
3
3
1
3
3
3
D4
4
4
2
3
2
3
3
2
4
3
D6
4
4
2
5
6
4
4
1
3
1
D8
6
5
4
6
8
6
6
7
3
5
D10
10
2
1
8
6
6
7
5
9
2
D12
10
10
8
5
5
8
7
6
8
5
D20
12
12
6
20
11
6
10
6
11
12
D30
24
17
10
25
16
15
10
17
23
3
D100
20
66
38
65
85
49
68
55
33
5