… | |
… | |
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 | |
133 | This example is a bit more complex. The C<@eval> statement will search |
133 | This example is a bit more complex. The C<@eval> statement will search |
134 | the players inventory for the same term as the C<@cond> and then |
134 | the players inventory for the same term as the C<@cond> and then |
135 | decreases the number of objects used there. |
135 | decreases the number of objects used there. |