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

Comparing deliantra/server/ext/NPC_Dialogue.pm (file contents):
Revision 1.8 by root, Sun Aug 26 04:07:40 2007 UTC vs.
Revision 1.9 by root, Mon Apr 21 06:35:26 2008 UTC

125 125
126=item B<matching for an item name and removing the matched item> 126=item B<matching for an item name and removing the matched item>
127 127
128 @match found earhorn 128 @match found earhorn
129 @cond grep $_->slaying =~ /Gramp's walking stick/, $who->inv 129 @cond grep $_->slaying =~ /Gramp's walking stick/, $who->inv
130 @eval my @g = grep { $_->slaying =~ /Gramp's walking stick/ } $who->inv; $g[0]->decrease_ob_nr (1); 130 @eval my @g = grep { $_->slaying =~ /Gramp's walking stick/ } $who->inv; $g[0]->decrease;
131 Thanks for the earhorn! 131 Thanks for the earhorn!
132 132
133This example is a bit more complex. The C<@eval> statement will search 133This example is a bit more complex. The C<@eval> statement will search
134the players inventory for the same term as the C<@cond> and then 134the players inventory for the same term as the C<@cond> and then
135decreases the number of objects used there. 135decreases the number of objects used there.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines