/usr/lib/crossfire/add_throw.perl is in crossfire-server 1.60.0-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/usr/bin/perl
# Adds the throwing skill to to the old player files. This script
# is likely no longer needed, since skills have been around for quite a while.
#
$end = 0;
if (!-e $ARGV[0]) {
die("Can not find file $ARGV[0]\n");
}
if (-e $ARGV[0].".old") {
die("$ARGV[0].new already exists.\n");
}
rename($ARGV[0], $ARGV[0].".old");
open(PLAYER,"<".$ARGV[0].".old") || die("can not open $ARGV[0].old");
open(PL_NEW,">".$ARGV[0]) || die("can not open $ARGV[0]");
while (<PLAYER>) {
if (/^end$/) {
if ($end) {
print PL_NEW "arch skill_throwing\nend\nend\n";
}
else {print PL_NEW $_;}
$end=1;
}
else {
print PL_NEW $_;
$end=0;
}
}
close(PLAYER);
close(PL_NEW);
|