There you go then
<pre><font size=1 face=Courier>
#!perl
$main_dir = 'MultiPlayer';
opendir(MAINDIR, "$main_dir"
// die "Can't open $main_dir: $!\n";
@folders = grep { !/.cfg$/ } readdir(MAINDIR);
shift(@folders); shift(@folders);
foreach $folder (@folders) {
$player_file = <$main_dir/$folder/*.fl>;
print "$player_file\n";
}
############################################################
####################
my @gene = qw/G e n e/;
open(DATA,"12-7caca460.fl"
;
seek(DATA,4,0);
my ($i,$r,$c,$k);
$i = 0;
while(read(DATA,$c,1)) {
$k = (ord($gene[$i % 4) + $i) % 256;
$r = ord($c) ^ ($k / 0x80);
print chr($r);
$i++;
}
############################################################
#################### Start of Editing
foreach $line (@lines) {
chomp $line;
if ($line =~ /\[([^\+)\/) {
$section = $1;
} elsif ($line =~ /^\s*(.+?)\s*=\s*(.+?)\s*$/) {
($var,$value) = ($1,$2);
push(@{$ini{$section}{$var}},$value);
}
}
foreach $house (@{$ini{Player}{house}}) {
($num,$fact) = split(/,/,$house);
next if ($fact eq " n_grp"
;
if ($fact eq " O_grp" && $num >= 0.5) {
@{$ini{Player}{system}} = 'O01';
@{$ini{Player}{base}} = 'O01_01_Base';
push(@houses, '0.99, O_grp');
@{$ini{Player}{money}} = '100000';
$ini{Player}{name}->[0 = "005b004f005d$ini{Player}{name}->[0";
next;
} elsif ($fact eq " X_grp" && $num >= 0.5) {
@{$ini{Player}{system}} = 'X01';
@{$ini{Player}{base}} = 'X01_01_Base';
push(@houses, '0.99, X_grp');
@{$ini{Player}{money}} = '100000';
$ini{Player}{name}->[0 = "005b0058005d$ini{Player}{name}->[0";
next;
}
push(@houses,$house);
}
@{$ini{Player}{house}} = @houses;
foreach $section (keys %ini) {
$out .= "[$section\n";
foreach $var (keys %{$ini{$section}}) {
foreach $value (@{$ini{$section}{$var}}) {
$out .= "$var = $value\n";
}
}
}
############################################################
#################### End of Editing
my @gene = qw/G e n e/;
open(DATA,"12-7caca460.fl"
;
print "FLS1";
my ($i,$r,$c,$k);
$i = 0;
while(read(DATA,$c,1)) {
$k = (ord($gene[$i % 4) + $i) % 256;
$r = ord($c) ^ ($k / 0x80);
print chr($r);
$i++;
}
#####################End
</font></pre>
Edited by - -Trail- on 8/24/2005 2:36:30 PM