"; $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
3
1
1
3
1
2
2
1
1
1
D4
4
3
3
3
2
1
2
4
3
1
D6
3
4
6
2
3
3
3
4
2
4
D8
3
5
8
2
4
1
2
5
1
6
D10
6
8
3
5
2
8
10
3
6
8
D12
11
2
8
3
4
4
4
10
4
8
D20
6
6
7
16
4
12
3
13
18
7
D30
1
27
30
30
2
14
20
6
20
11
D100
21
98
84
2
76
59
85
87
28
56