Template:Helixfossilname: Difference between revisions

From A KoL Wiki
imported>Caseyweederman
No edit summary
imported>Fig bucket
m fix string to array weirdness in phptags that wasn't in foxway
Line 1: Line 1:
<includeonly><phptag>$i = 10;
<includeonly><phptag>$i = 10;
$c = 'abcdefghijklmnopqrstuvwxyz()[];:,.!/?-';
$c = 'abcdefghijklmnopqrstuvwxyz()[];:,.!/?-';
$ca = str_split($c,1);
$s = '';
$s = '';
while ($i > 0) {
while ($i > 0) {
   $n = mt_rand(1,$i);
   $n = mt_rand(1,$i);
   $i = $i - $n;
   $i = $i - $n;
   $sc = $c[mt_rand(0, strlen($c))];
   $sc = $ca[mt_rand(0, strlen($c))];
   if (mt_rand(0,1)==0) {
   if (mt_rand(0,1)==0) {
     $sc = ucfirst($sc);
     $sc = ucfirst($sc);

Revision as of 21:48, 10 March 2015

<phptag>$i = 10;

$c = 'abcdefghijklmnopqrstuvwxyz()[];:,.!/?-'; $ca = str_split($c,1); $s = ''; while ($i > 0) { $n = mt_rand(1,$i); $i = $i - $n; $sc = $ca[mt_rand(0, strlen($c))]; if (mt_rand(0,1)==0) { $sc = ucfirst($sc); } $j=0; while ($j<$n) { $s = $s . $sc; $j++; } }

echo '<span>' . $s . '</span>';</phptag>{{#ifeq:{{#rand:1|2}}|1|<RandomlySelect>|</RandomlySelect>}}

Randomly creates a generic Helix Fossil name.

Examples

  • {{Helixfossilname}}

yyyyyyyjjt