ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/NPC_Dialogue.pm
(Generate patch)

Comparing deliantra/maps/perl/NPC_Dialogue.pm (file contents):
Revision 1.11 by root, Fri Sep 8 16:22:14 2006 UTC vs.
Revision 1.12 by root, Mon Sep 18 00:40:30 2006 UTC

51It supports a number of command constructs. They have to follow the 51It supports a number of command constructs. They have to follow the
52C<@match> directive, and there can be multiple commands that will be 52C<@match> directive, and there can be multiple commands that will be
53executed in order. 53executed in order.
54 54
55=over 4 55=over 4
56
57=item @comment text...
58
59A single-line comment. It will be completely ignored.
56 60
57=item @parse regex 61=item @parse regex
58 62
59Parses the message using a perl regular expression (by default 63Parses the message using a perl regular expression (by default
60case-insensitive). Any matches will be available as C<< $match->[$index] 64case-insensitive). Any matches will be available as C<< $match->[$index]
211 215
212 if ($cmd eq "parse" || $cmd eq "match") { # match is future rename 216 if ($cmd eq "parse" || $cmd eq "match") { # match is future rename
213 no re 'eval'; # default, but make sure 217 no re 'eval'; # default, but make sure
214 @match = $msg =~ /$args/i 218 @match = $msg =~ /$args/i
215 or next topic; 219 or next topic;
220
221 } elsif ($cmd eq "comment") {
222 # nop
216 223
217 } elsif ($cmd eq "cond") { 224 } elsif ($cmd eq "cond") {
218 cf::safe_eval $args, %vars 225 cf::safe_eval $args, %vars
219 or next topic; 226 or next topic;
220 227

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines