Mercurial > hg > batmud > misc
changeset 173:589cab204b57 misc
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 07 Jan 2011 13:53:29 +0000 |
parents | 5faaacb29f50 |
children | f805996bfb4a |
files | log2npctemplate.pl |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/log2npctemplate.pl Fri Jan 07 13:36:57 2011 +0000 +++ b/log2npctemplate.pl Fri Jan 07 13:53:29 2011 +0000 @@ -10,7 +10,8 @@ # Options my $opt_ansi = 1; # 1 = strip ANSI, 0 = don't (is faster) -my $opt_debug = 1; # 1 = enable debug output +my $opt_debug = 0; # 1 = enable debug output +my $opt_pkills_crop = 60; # Define the regular expression to match any outputs of "say" @@ -94,12 +95,12 @@ # Grab exp worth my $exp = $1; my $tmp = $2; - my $sdesc = substr($tmp, 0, 66); + my $sdesc = substr($tmp, 0, $opt_pkills_crop); if (defined($monsters{$sdesc}) && $line > $monsters{$sdesc}{"line"}) { $monsters{$sdesc}{"exp"} = $exp; } else { $tmp .= " (undead)"; - $sdesc = substr($tmp, 0, 66); + $sdesc = substr($tmp, 0, $opt_pkills_crop); if (defined($monsters{$sdesc}) && $line > $monsters{$sdesc}{"line"}) { $monsters{$sdesc}{"exp"} = $exp; }