"; $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
2
3
2
3
3
3
3
2
2
1
D4
4
1
3
2
4
2
4
1
3
2
D6
5
4
6
5
1
5
5
2
2
3
D8
1
2
1
4
2
4
6
4
5
2
D10
10
5
9
10
2
3
2
9
10
2
D12
4
4
1
8
5
4
6
7
11
4
D20
2
2
20
2
1
16
2
13
18
13
D30
7
2
10
12
23
25
5
15
2
2
D100
75
58
66
47
80
43
3
34
66
100