[128 Bitvector] [Please don't ignore] Mob files

From: Tony Robbins (tonyr@NWPACLINK.COM)
Date: 01/29/98


Ok, I've narrowed down the problem.  Let's compare stock Puff to my
parsed-Puff.

Puff's bitvector stuff starts out as:
anopqr dkp 1000 E
such that each is, in turn:
<action bitvector> <affection bitvector> <alignment> <type flag>

but with this parser script

--- start cspo code snippet ---

#!/usr/bin/perl -i.bak
#usage:  mobfilt #.mob

$D = 0;

while (<>) {
    chop;

    if (/^\#\d+\s*/) {
        $D = 1;
    }

    if (/^(\w+) (\w+) (-?\d+) (\w)\s*/) {
        if ($D == 1) {
            print $1, " 0 0 0 ", $2, " 0 0 0 ", $3, "\n";
            $D = 0;
        } else {
            print "$_\n";
        }
    } else {
        print "$_\n";
    }
}

--- end cspo code snippet

it gives me this:
anopqr 0 0 0 0 0 0 0 0
<action bitvector array 1, 2, 3, 4> <affection bitvector 1, 2, 3, 4>
<alignment> <type>
anopqr is the action bitvector, which _seems_ to be correct.  However, if
you follow on down the line, the affection bitvector is totally
obliterated, along with alignment, and the script simply eats the mob type.
 That's not good.

Could someone help me out with this -- I have 100% no clue when it comes to
Perl, but I'm sure that others would like to see a working version of the
script.

Thank you.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST