Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $pick = $array->[rand @$array];
    if (ref($pick) eq 'CODE') {return $pick->();} else {return $pick;}
    }
    
  2. or download this
    #Static#
    $Data{AbNm} = [qw(strength dexterity constitution intelligence wisdom 
    +charisma)];
    ...
    $Data{WpMt} = [qw(bone metal stone wooden)];
    $Data{WpTp} = [qw(bludgeoning piercing slashing missile)];
    $Data{WzSc} = [qw(Abjuration Air Alteration Conjuration/Summoning Divi
    +nation Earth Enchantment/Charm Fire Illusion/Phantasm Invocation/Evoc
    +ation Necromancy Water)];
    
  3. or download this
    #Dynamic#
    sub radius {"in a ".random("Radi")." radius"}
    ...
    sub {random("Emtn")},
    sub {random("Algn")}
    ];
    
  4. or download this
    my %mammal_info = (bovine=>'cattle', canine =>'dog', caprine =>'goat',
    + equine=>'horse', feline =>'cat', leporine=>'rabbit', lupine=>'wolf',
    + ovine  =>'sheep', porcine =>'pig', ursine=>'bear',   vulpine=>'fox')
    +;
    $Data{Mammal} = [map {"<a title=\"$mammal_info{$_}\">$_</a>"} keys %ma
    +mmal_info];
    ...
    sub {random("Animal")." tail"},
    "gills"
    ];
    
  5. or download this
    $Data{Sleep} = [
    'hardly ever wakes up',
    ...
    sub {random("Eat")." and ".random("Drink")},
    sub {random("Sleep").", ".random("Eat").", and ".random("Drink")}
    ];
    
  6. or download this
    $Data{Mutation} = [
    "no unusual effect",
    ...
    sub {random("SED")." after seeing (AAn-AllMonsters.pl) for a ".$Data{T
    +ime}[roll('1d4+2')]}, # See note 5
    sub {"is ".random("Divn")."power - character should be retired"}
    ];
    
  7. or download this
    print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:
    +//www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd">';
    print '<html><head><title>Character Mutations</title><link rel="styles
    +heet" type="text/css" href="../../main.css"/></head><body><h1>Charact
    +er Mutations Generator</h1><p>All effects are cumulative, and one can
    + be cancelled out by another.</p><ol>';
    for(1..roll(random("Dice"))){print "<li>".random("Mutation")."</li>\n"
    +};
    print "</ol></body></html>";
    
  8. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    print Insanity;
    
    if (!caller) { print "This will only show up when run directly" };