--- deliantra/server/ext/chat.ext 2007/03/01 13:01:37 1.9 +++ deliantra/server/ext/chat.ext 2007/03/02 00:29:08 1.12 @@ -74,6 +74,24 @@ } }; +cf::register_command orcknuckle => sub { + my ($pl, $msg) = @_; + my @orcknuckle = ("none", "beholder", "ghost", "knight", "princess", "dragon", "orc"); + + my $name = $pl->name; + + my ($i, $j, $k, $l) = ((int rand 5) + 1, (int rand 5) + 1, (int rand 5) + 1, (int rand 6) + 1); + my $result = "$orcknuckle[$i], $orcknuckle[$j], $orcknuckle[$k], $orcknuckle[$l]"; + + for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { + next + if $other->ob == $pl; + $other->ob->message ("$name rolls $result!", cf::NDI_GREY | cf::NDI_UNIQUE); + } + + $pl->message ("You roll $result!", cf::NDI_GREY | cf::NDI_UNIQUE); +}; + my $emotes = { growl => { noparams => { @@ -211,7 +229,8 @@ self => "Have you got something in your eye?", }, params => { - target => " winks at .", + target => " winks at you.", + other => " winks at .", self => "You wink suggestively at .", }, self => { @@ -311,7 +330,8 @@ self => "You bleed all over your nice new armour.", }, params => { - target => " slashes his wrist and bleeds all over .", + target => " slashes his wrist and bleeds all over you.", + other => " slashes his wrist and bleeds all over .", self => "You slash your wrist and bleed all over ", }, self => { @@ -862,6 +882,7 @@ } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { $pl->message ("$target ignores what you say. Give up on it.", cf::NDI_UNIQUE); } else { + return if $other->invoke (cf::EVENT_PLAYER_TOLD, $pl->contr, $msg); utf8::encode $msg; # ->message not yet utf8-ified cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg;