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

Comparing deliantra/server/ext/chat.ext (file contents):
Revision 1.9 by pippijn, Thu Mar 1 13:01:37 2007 UTC vs.
Revision 1.12 by pippijn, Fri Mar 2 00:29:08 2007 UTC

72 72
73 $pl->message ("You flip a coin.... Tails!", cf::NDI_GREY | cf::NDI_UNIQUE); 73 $pl->message ("You flip a coin.... Tails!", cf::NDI_GREY | cf::NDI_UNIQUE);
74 } 74 }
75}; 75};
76 76
77cf::register_command orcknuckle => sub {
78 my ($pl, $msg) = @_;
79 my @orcknuckle = ("none", "beholder", "ghost", "knight", "princess", "dragon", "orc");
80
81 my $name = $pl->name;
82
83 my ($i, $j, $k, $l) = ((int rand 5) + 1, (int rand 5) + 1, (int rand 5) + 1, (int rand 6) + 1);
84 my $result = "$orcknuckle[$i], $orcknuckle[$j], $orcknuckle[$k], $orcknuckle[$l]";
85
86 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) {
87 next
88 if $other->ob == $pl;
89 $other->ob->message ("$name rolls $result!", cf::NDI_GREY | cf::NDI_UNIQUE);
90 }
91
92 $pl->message ("You roll $result!", cf::NDI_GREY | cf::NDI_UNIQUE);
93};
94
77my $emotes = { 95my $emotes = {
78 growl => { 96 growl => {
79 noparams => { 97 noparams => {
80 other => "<self> growls.", 98 other => "<self> growls.",
81 self => "Grrrrrrrrr....", 99 self => "Grrrrrrrrr....",
209 noparams => { 227 noparams => {
210 other => "<self> winks suggestively.", 228 other => "<self> winks suggestively.",
211 self => "Have you got something in your eye?", 229 self => "Have you got something in your eye?",
212 }, 230 },
213 params => { 231 params => {
232 target => "<self> winks at you.",
214 target => "<self> winks at <other>.", 233 other => "<self> winks at <other>.",
215 self => "You wink suggestively at <other>.", 234 self => "You wink suggestively at <other>.",
216 }, 235 },
217 self => { 236 self => {
218 other => "<self> winks at himself - something strange is going on...", 237 other => "<self> winks at himself - something strange is going on...",
219 self => "You wink at yourself?? What are you up to?", 238 self => "You wink at yourself?? What are you up to?",
309 noparams => { 328 noparams => {
310 other => "<self> is bleeding all over the carpet - got a spare tourniquet?", 329 other => "<self> is bleeding all over the carpet - got a spare tourniquet?",
311 self => "You bleed all over your nice new armour.", 330 self => "You bleed all over your nice new armour.",
312 }, 331 },
313 params => { 332 params => {
333 target => "<self> slashes his wrist and bleeds all over you.",
314 target => "<self> slashes his wrist and bleeds all over <other>.", 334 other => "<self> slashes his wrist and bleeds all over <other>.",
315 self => "You slash your wrist and bleed all over <other>", 335 self => "You slash your wrist and bleed all over <other>",
316 }, 336 },
317 self => { 337 self => {
318 other => "<self> performs some satanic ritual while wiping his blood on himself.", 338 other => "<self> performs some satanic ritual while wiping his blood on himself.",
319 self => "Very impressive! You wipe your blood all over yourself.", 339 self => "Very impressive! You wipe your blood all over yourself.",
860 if ($target eq $name) { 880 if ($target eq $name) {
861 $pl->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE); 881 $pl->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE);
862 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { 882 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) {
863 $pl->message ("$target ignores what you say. Give up on it.", cf::NDI_UNIQUE); 883 $pl->message ("$target ignores what you say. Give up on it.", cf::NDI_UNIQUE);
864 } else { 884 } else {
885 return if $other->invoke (cf::EVENT_PLAYER_TOLD, $pl->contr, $msg);
865 utf8::encode $msg; # ->message not yet utf8-ified 886 utf8::encode $msg; # ->message not yet utf8-ified
866 cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg; 887 cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg;
867 888
868 $pl->message ("You tell $target: $msg"); 889 $pl->message ("You tell $target: $msg");
869 $other->ob->message ("$name tells you: $msg"); 890 $other->ob->message ("$name tells you: $msg");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines