Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Perl Program Help

Advertise for Modelers, Programmers, Webmasters, INI Editors, Script Experts, Adventurers, Servers, or anything that has to do with a project

Post Tue Aug 09, 2005 4:19 am

Perl Program Help

right,
I have a program which was made by two of my freinds, they have done about 90% of it but now i cant connect to the IRC room where they were to find out how to finish it,

Basically what im looking for is someone with good knowlage of Perl to help me finish the program, apparently its simple this last bit but i eint got a clue,

Because this program is being made for a mod that i and the people at my website are making i dont want the suorce code publicly avaliable, so if you know any perl and can help me out could you please reply here with a means that i can privatly talk to you (E-Mail / IM)

Its programmed in perl, i have the source code, it all looks good only it just dosent quite work lol,

Thanks allot anyone who can help

ps- your name will go on the credits to the mod and you will be given privelages over on my website and on the server when its publicly open

Post Sun Aug 14, 2005 12:06 pm

*sob*

nobody wants to help meh!

Post Sun Aug 14, 2005 1:48 pm

WEll, one slight problem is that its very difficult to help you with your source code if you don't show us your source code. Not that i can help, mind you.

Post Mon Aug 15, 2005 3:47 am

im askin if anyne knows perl, im reluctant to show the source in case someone steals it!
hmm.........


Edited by - -Trail- on 8/15/2005 4:49:08 AM

Post Mon Aug 15, 2005 12:18 pm

meh, if someone DOES steal it you have proof that you made it first righ there. TLR will then take the other person down. So you should be safe.

Post Tue Aug 16, 2005 5:46 am

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

Post Tue Aug 16, 2005 12:47 pm

I'll have a look at it. I know a perl a bit. What exactly are you looking to do with the script?

Either PM me or Email

Halloween Jack

Post Tue Aug 16, 2005 1:18 pm

Thank you,

E-mail sent with the code - the Smileys lol

Post Wed Aug 24, 2005 1:37 pm

*bump* (2)

Return to Help Wanted/Available Section