Tom Dailey <tomd@WAYMARK.NET> writes: > Hello all, > > We have ascii pfiles (proprietary, not sammy's) and I what I'd like > to do is change everyone's default AC from 100 to 1000. Would > anyone know of an easy way of doing this w/ vi or emacs or perhaps > even better, a way to do it from within the game via code that would > allow direct manipulation of pfiles's different fields.... > > I realize that you all have no code to look at to tell me what to exactly > do, but > if you have any ideas, I would appreciate it. > Try this. find -name '*.pfile' | xargs perl -i.back -n -e \ 'if (/^AC:[ ]+/) {print "AC: 1000"} else {print;}' Basically this will run the small perl script on each line of each file matching *.pfile. You'll need to change that to the appropriate wildcard. Also, change /^AC:[ ]+/ to whatever matches the armor class line. All other lines will be unchanged. Chip -- James Turner turnerjh@pattern.net UIN: 1102038 http://www.vuse.vanderbilt.edu/~turnerjh/ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST