"; $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
2
3
2
2
3
2
1
1
D4
1
1
4
3
2
2
4
2
3
4
D6
2
3
4
4
2
4
5
1
3
2
D8
7
6
8
1
2
3
3
7
2
8
D10
3
4
10
9
6
1
3
3
2
4
D12
3
3
8
9
10
1
10
6
11
4
D20
11
10
2
18
7
16
1
19
17
1
D30
6
1
21
9
25
16
22
1
27
29
D100
43
97
79
17
19
14
27
67
62
95