--- cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/02/08 05:22:41 1.2 +++ cf.schmorp.de/maps/perl/schmorp-neko.ext 2006/02/08 06:51:16 1.5 @@ -22,10 +22,8 @@ my ($data) = @_; if (my $pl = $data->{who}->nearest_player) { - if ($pl->level >= 10) { - my (undef, undef, undef, $dir, undef) = $data->{who}->direction ($pl); - $data->{who}->move ($data->{who}, $dir); - } + my (undef, undef, undef, $dir, undef) = $data->{who}->direction ($pl); + $data->{who}->move ($data->{who}, $dir); } 1 @@ -34,14 +32,20 @@ sub on_attack { my ($data) = @_; - cf::LOG cf::llevDebug, sprintf "QBERT Neko-san was attacked by %s!", $data->{activator}->name; + $data->{activator}{neko_attack}++ + or cf::LOG cf::llevDebug, sprintf "QBERT Neko-san was attacked by %s!", $data->{activator}->name; - $data->{activator}->message ("Neko-san is suddenly gone!"); - teleport $data->{activator}, "/scorn/misc/scorn_illusions", 15, 7; - $data->{activator}->message ("You hear strange noises all around you..."); - $data->{activator}->message ("You feel dumb."); + $data->{activator}->message ("Meoow! (You are hurting me)") + if !($data->{activator}{neko_attack} & 15); - 0 + if ($data->{activator}{neko_attack} > 256) { + $data->{activator}->message ("Neko-san is suddenly gone!"); + teleport $data->{activator}, "/scorn/misc/scorn_illusions", 15, 7; + $data->{activator}->message ("You hear strange noises all around you..."); + $data->{activator}->message ("You feel dumb."); + } + + 1 } sub on_say {