"; $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
3
3
3
2
2
1
1
3
2
D4
4
2
2
4
3
4
1
2
3
3
D6
2
2
4
4
4
4
6
1
2
5
D8
2
5
1
6
2
7
5
1
4
4
D10
3
7
4
9
4
9
8
3
10
4
D12
7
12
6
5
11
10
7
2
3
11
D20
20
8
2
1
6
2
5
19
17
16
D30
15
21
24
4
15
6
23
7
15
13
D100
3
68
10
89
69
8
44
35
59
37