Crossfire Server, Trunk  R22047
c_chat.c
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 1999-2014 Mark Wedel and the Crossfire Development Team
5  * Copyright (c) 1992 Frank Tore Johansen
6  *
7  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
8  * welcome to redistribute it under certain conditions. For details, please
9  * see COPYING and LICENSE.
10  *
11  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
12  */
13 
19 #include "global.h"
20 
21 #include <stdlib.h>
22 #include <string.h>
23 
24 #include "loader.h"
25 #include "sproto.h"
26 
34 void command_say(object *op, const char *params) {
35  if (*params == '\0')
36  return;
37  monster_communicate(op, params);
38 }
39 
47 void command_me(object *op, const char *params) {
48  char buf[MAX_BUF];
49 
50  if (*params == '\0')
51  return;
52  snprintf(buf, sizeof(buf), "%s %s", op->name, params);
54  buf);
55 }
56 
64 void command_cointoss(object *op, const char *params) {
65  char buf[MAX_BUF];
66  const char *result;
67 
68  result = rndm(1, 2) == 1 ? "Heads" : "Tails";
69 
71  "You flip a coin.... %s!",
72  result);
73 
74  snprintf(buf, sizeof(buf), "%s flips a coin.... %s!", op->name, result);
76  buf);
77 }
78 
80 static const char *const orcknuckle[7] = {
81  "none",
82  "beholder",
83  "ghost",
84  "knight",
85  "princess",
86  "dragon",
87  "orc"
88 };
89 
90 #define DICE 4
107 void command_orcknuckle(object *op, const char *params) {
108  char buf[MAX_BUF];
109  char buf2[MAX_BUF];
110  object *dice[DICE];
111  int i, j, k, l, dice_count, number_dice;
112  const char *name;
113 
114  /* We only use dice if the archetype is present ingame. */
115  name = find_string("dice");
116  if (name) {
117  for (dice_count = 0; dice_count < DICE; dice_count++)
118  dice[dice_count] = NULL;
119  dice_count = 0;
120  number_dice = 0;
121 
122  FOR_INV_PREPARE(op, ob) {
123  if (dice_count >= DICE || number_dice >= DICE)
124  break;
125  if (ob->name == name) {
126  number_dice += ob->nrof;
127  dice[dice_count++] = ob;
128  }
129  } FOR_INV_FINISH();
130 
131  if (number_dice < DICE) {
133  "You need at least %d dice to play orcknuckle!", DICE);
134  return;
135  }
136  } else {
137  dice_count = 0;
138  }
139 
140  i = rndm(1, 5);
141  j = rndm(1, 5);
142  k = rndm(1, 5);
143  l = rndm(1, 6);
144 
145  snprintf(buf2, sizeof(buf2), "%s rolls %s, %s, %s, %s!", op->name, orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
146  snprintf(buf, sizeof(buf), "You roll %s, %s, %s, %s!", orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
147 
149  buf);
151  buf2);
152 
153  if (name) {
154  /* Randomly lose dice */
155  if (die_roll(1, 100, op, 1) < 5) {
156  /* Lose one randomly. */
157  object_decrease_nrof_by_one(dice[rndm(1, dice_count)-1]);
159  "Oops, you lost a die!");
160  }
161  }
162 #undef DICE
163 }
164 
181 static void command_tell_all(object *op, const char *params, int pri, int color, int subtype, const char *desc) {
182  if (op->contr->no_shout == 1) {
184  "You are no longer allowed to shout or chat.");
185  return;
186  }
187 
188  if (*params == '\0') {
190  "Shout/Chat what?");
191  return;
192  }
193 
195  "%s %s: %s",
196  op->name, desc, params);
197 
198  events_execute_global_event(EVENT_SHOUT, op, params, pri);
199 }
200 
208 void command_shout(object *op, const char *params) {
209  command_tell_all(op, params, 1, NDI_RED, MSG_TYPE_COMMUNICATION_SHOUT, "shouts");
210 }
211 
219 void command_chat(object *op, const char *params) {
220  command_tell_all(op, params, 9, NDI_BLUE, MSG_TYPE_COMMUNICATION_CHAT, "chats");
221 }
222 
233 static void do_tell(object *op, const char *params, int adjust_listen) {
234  char buf[MAX_BUF], name[MAX_BUF];
235  char *msg = NULL;
236  player *pl;
237  uint8_t original_listen;
238 
239  strlcpy(name, params, sizeof(name));
240 
241  msg = strchr(name, ' ');
242  if (msg) {
243  (*msg) = '\0';
244  msg++;
245  if ((*msg) == '\0')
246  msg = NULL;
247  }
248 
249  if (strlen(name) == 0) {
251  "Tell whom what?");
252  return;
253  }
254 
255  if (msg == NULL) {
257  "Tell %s what?",
258  name);
259  return;
260  }
261 
262  snprintf(buf, sizeof(buf), "%s tells you: %s", op->name, msg);
263 
264  pl = find_player_partial_name(name);
265  if (pl) {
266  if (adjust_listen) {
267  original_listen = pl->listening;
268  pl->listening = 10;
269  } else {
270  original_listen = 0;
271  }
272 
274 
276  buf);
277 
278  if (adjust_listen)
279  pl->listening = original_listen;
280 
281  /* Update last_tell value [mids 01/14/2002] */
282  strlcpy(pl->last_tell, op->name, sizeof(pl->last_tell));
283 
284  /* Hidden DMs get the message, but player should think DM isn't online. */
285  if (!pl->hidden || QUERY_FLAG(op, FLAG_WIZ)) {
287  "You tell %s: %s",
288  pl->ob->name, msg);
289 
290  return;
291  }
292  }
293 
295  "No such player or ambiguous name.");
296 }
297 
306 void command_tell(object *op, const char *params) {
307  do_tell(op, params, 0);
308 }
309 
318 void command_dmtell(object *op, const char *params) {
319  do_tell(op, params, 1);
320 }
321 
334 void command_reply(object *op, const char *params) {
335  player *pl;
336 
337  if (*params == '\0') {
339  "Reply what?");
340  return;
341  }
342 
343  if (op->contr->last_tell[0] == '\0') {
345  "You can't reply to nobody.");
346  return;
347  }
348 
349  /* Find player object of player to reply to and check if player still exists */
350  pl = find_player(op->contr->last_tell);
351  if (pl == NULL) {
353  "You can't reply, this player left.");
354  return;
355  }
356 
357  /* Update last_tell value */
358  safe_strncpy(pl->last_tell, op->name, MAX_NAME);
359 
361  "%s tells you: %s",
362  op->name, params);
363 
364  if (pl->hidden && !QUERY_FLAG(op, FLAG_WIZ)) {
366  "You can't reply, this player left.");
367  return;
368  }
369 
371  "You tell to %s: %s",
372  pl->ob->name, params);
373 }
374 
379 #define EMOTE_FIRST 0
380 #define EMOTE_NOD 1
381 #define EMOTE_DANCE 2
382 #define EMOTE_KISS 3
383 #define EMOTE_BOUNCE 4
384 #define EMOTE_SMILE 5
385 #define EMOTE_CACKLE 6
386 #define EMOTE_LAUGH 7
387 #define EMOTE_GIGGLE 8
388 #define EMOTE_SHAKE 9
389 #define EMOTE_PUKE 10
390 #define EMOTE_GROWL 11
391 #define EMOTE_SCREAM 12
392 #define EMOTE_SIGH 13
393 #define EMOTE_SULK 14
394 #define EMOTE_HUG 15
395 #define EMOTE_CRY 16
396 #define EMOTE_POKE 17
397 #define EMOTE_ACCUSE 18
398 #define EMOTE_GRIN 19
399 #define EMOTE_BOW 20
400 #define EMOTE_CLAP 21
401 #define EMOTE_BLUSH 22
402 #define EMOTE_BURP 23
403 #define EMOTE_CHUCKLE 24
404 #define EMOTE_COUGH 25
405 #define EMOTE_FLIP 26
406 #define EMOTE_FROWN 27
407 #define EMOTE_GASP 28
408 #define EMOTE_GLARE 29
409 #define EMOTE_GROAN 30
410 #define EMOTE_HICCUP 31
411 #define EMOTE_LICK 32
412 #define EMOTE_POUT 33
413 #define EMOTE_SHIVER 34
414 #define EMOTE_SHRUG 35
415 #define EMOTE_SLAP 36
416 #define EMOTE_SMIRK 37
417 #define EMOTE_SNAP 38
418 #define EMOTE_SNEEZE 39
419 #define EMOTE_SNICKER 40
420 #define EMOTE_SNIFF 41
421 #define EMOTE_SNORE 42
422 #define EMOTE_SPIT 43
423 #define EMOTE_STRUT 44
424 #define EMOTE_THANK 45
425 #define EMOTE_TWIDDLE 46
426 #define EMOTE_WAVE 47
427 #define EMOTE_WHISTLE 48
428 #define EMOTE_WINK 49
429 #define EMOTE_YAWN 50
430 #define EMOTE_BEG 51
431 #define EMOTE_BLEED 52
432 #define EMOTE_CRINGE 53
433 #define EMOTE_THINK 54
434 #define EMOTE_LAST 55
435 
443 static const char* single_emotes[EMOTE_LAST - 1][2] = {
444  { "You nod solemnly.", "%s nods solemnly." },
445  { "You dance with glee.", "%s expresses himself through interpretive dance." },
446  { "All the lonely people...", "%s makes a weird facial contortion" },
447  { "BOIINNNNNNGG!", "%s bounces around." },
448  { "You smile happily.", "%s smiles happily." },
449  { "You cackle gleefully.", "%s throws back his head and cackles with insane glee!" },
450  { "You fall down laughing.", "%s falls down laughing." },
451  { "You giggle.", "%s giggles." },
452  { "You shake your head.", "%s shakes his head." },
453  { "Bleaaaaaghhhhhhh!", "%s pukes." },
454  { "Grrrrrrrrr....", "%s growls." },
455  { "ARRRRRRRRRRGH!!!!!", "%s screams at the top of his lungs!" },
456  { "You sigh.", "%s sighs loudly." },
457  { "You sulk.", "%s sulks in the corner." },
458  { NULL, NULL },
459  { "Waaaaaaahhh...", "%s bursts into tears." },
460  { NULL, NULL },
461  { NULL, NULL },
462  { "You grin evilly.", "%s grins evilly." },
463  { "You bow deeply.", "%s bows deeply." },
464  { "Clap, clap, clap.", "%s gives a round of applause." },
465  { "Your cheeks are burning.", "%s blushes." },
466  { "You burp loudly.", "%s burps loudly." },
467  { "You chuckle politely", "%s chuckles politely." },
468  { "Yuck, try to cover your mouth next time!", "%s coughs loudly." },
469  { "You flip head over heels.", "%s flips head over heels." },
470  { "What's bothering you?", "%s frowns." },
471  { "You gasp in astonishment.", "%s gasps in astonishment." },
472  { "You glare at nothing in particular.", "%s glares around him." },
473  { "You groan loudly.", "%s groans loudly." },
474  { "*HIC*", "%s hiccups." },
475  { "You lick your mouth and smile.", "%s licks his mouth and smiles." },
476  { "Aww, don't take it so hard.", "%s pouts." },
477  { "Brrrrrrrrr.", "%s shivers uncomfortably." },
478  { "You shrug.", "%s shrugs helplessly." },
479  { NULL, NULL },
480  { "You smirk.", "%s smirks." },
481  { "PRONTO! You snap your fingers.", "%s snaps his fingers." },
482  { "Gesundheit!", "%s sneezes." },
483  { "You snicker softly.", "%s snickers softly." },
484  { "You sniff sadly. *SNIFF*", "%s sniffs sadly." },
485  { "Zzzzzzzzzzzzzzz.", "%s snores loudly." },
486  { "You spit over your left shoulder.", "%s spits over his left shoulder." },
487  { "Strut your stuff.", "%s struts proudly." },
488  { NULL, NULL },
489  { "You patiently twiddle your thumbs.", "%s patiently twiddles his thumbs." },
490  { "You wave.", "%s waves happily." },
491  { "You whistle appreciatively.", "%s whistles appreciatively." },
492  { "Have you got something in your eye?", "%s winks suggestively." },
493  { "You open up your yap and let out a big breeze of stale air.", "%s yawns sleepily." },
494  { NULL, NULL },
495  { "You bleed all over your nice new armour.", "%s is bleeding all over the carpet - got a spare tourniquet?" },
496  { "You cringe in terror.", "%s cringes in terror!" },
497  { "Anything in particular that you'd care to think about?", "%s closes his eyes and thinks really hard." },
498 };
505 static const char* self_emotes[EMOTE_LAST - 1][2] = {
506  { "My god! is that LEGAL?", "You look away from %s." },
507  { "You skip and dance around by yourself.", "%s embraces himself and begins to dance!"},
508  { NULL, NULL },
509  { NULL, NULL },
510  { NULL, NULL },
511  { NULL, NULL },
512  { "Laugh at yourself all you want, the others won't understand." "%s is laughing at something." },
513  { NULL, NULL },
514  { "You are shaken by yourself.", "%s shakes and quivers like a bowlful of jelly." },
515  { "You puke on yourself.", "%s pukes on his clothes." },
516  { NULL, NULL },
517  { NULL, NULL },
518  { NULL, NULL },
519  { NULL, NULL },
520  { "You hug yourself.", "%s hugs himself." },
521  { "You cry to yourself.", "%s sobs quietly to himself." },
522  { "You poke yourself in the ribs, feeling very silly.", "%s pokes himself in the ribs, looking very sheepish." },
523  { "You accuse yourself.", "%s seems to have a bad conscience." },
524  { NULL, NULL },
525  { "You kiss your toes.", "%s folds up like a jackknife and kisses his own toes." },
526  { NULL, NULL },
527  { NULL, NULL },
528  { NULL, NULL },
529  { NULL, NULL },
530  { NULL, NULL },
531  { NULL, NULL },
532  { "You frown at yourself.", "%s frowns at himself." },
533  { NULL, NULL },
534  { "You glare icily at your feet, they are suddenly very cold.", "%s glares at his feet, what is bothering him?" },
535  { NULL, NULL },
536  { NULL, NULL },
537  { "You lick yourself.", "%s licks himself - YUCK." },
538  { NULL, NULL },
539  { NULL, NULL },
540  { NULL, NULL },
541  { "You slap yourself, silly you.", "%s slaps himself, really strange..." },
542  { NULL, NULL },
543  { NULL, NULL },
544  { "You sneeze on yourself, what a mess!", "%s sneezes, and covers himself in a slimy substance." },
545  { NULL, NULL },
546  { "You sniff yourself.", "%s sniffs himself." },
547  { NULL, NULL },
548  { "You drool all over yourself.", "%s drools all over himself." },
549  { NULL, NULL },
550  { "You thank yourself since nobody else wants to!", "%s thanks himself since you won't." },
551  { NULL, NULL },
552  { "Are you going on adventures as well??", "%s waves goodbye to himself."},
553  { "You whistle while you work.", "%s whistles to himself in boredom." },
554  { "You wink at yourself?? What are you up to?", "%s winks at himself - something strange is going on..." },
555  { NULL, NULL },
556  { NULL, NULL },
557  { "Very impressive! You wipe your blood all over yourself.", "%s performs some satanic ritual while wiping his blood on himself." },
558  { NULL, NULL },
559  { NULL, NULL },
560 };
569 static const char* other_emotes[EMOTE_LAST - 1][3] = {
570  { "You nod solemnly to %s.", "%s nods solemnly to you.", "%s nods solemnly to %s." },
571  { "You grab %s and begin doing the Cha-Cha!", "%s grabs you, and begins dancing!", "Yipe! %s and %s are doing the Macarena!" },
572  { "You kiss %s.", "%s kisses you.", "%s kisses %s." },
573  { "You bounce around the room with %s.", "%s bounces around the room with you.", "%s bounces around the room with %s." },
574  { "You smile at %s.", "%s smiles at you.", "%s beams a smile at %s." },
575  { NULL, NULL, NULL },
576  { "You take one look at %s and fall down laughing.", "%s looks at you and falls down on the ground laughing.", "%s looks at %s and falls down on the ground laughing." },
577  { NULL, NULL, NULL },
578  { "You shake %s's hand.", "%s shakes your hand.", "%s shakes %s's hand." },
579  { "You puke on %s.", "%s pukes on your clothes!", "%s pukes on %s." },
580  { NULL, NULL, NULL },
581  { NULL, NULL, NULL },
582  { NULL, NULL, NULL },
583  { NULL, NULL, NULL },
584  { "You hug %s.", "%s hugs you.", "%s hugs %s." },
585  { "You cry on %s's shoulder.", "%s cries on your shoulder.", "%s cries on %s's shoulder." },
586  { "You poke %s in the ribs.", "%s pokes you in the ribs.", "%s pokes %s in the ribs." },
587  { "You look accusingly at %s.", "%s looks accusingly at you.", "%s looks accusingly at %s." },
588  { "You grin at %s.", "%s grins evilly at you.", "%s grins evilly at %s." },
589  { "You bow before %s.", "%s bows before you.", "%s bows before %s." },
590  { NULL, NULL, NULL },
591  { NULL, NULL, NULL },
592  { NULL, NULL, NULL },
593  { NULL, NULL, NULL },
594  { NULL, NULL, NULL },
595  { NULL, NULL, NULL },
596  { "You frown darkly at %s.", "%s frowns darkly at you.", "%s frowns darkly at %s." },
597  { NULL, NULL, NULL },
598  { "You glare icily at %s.", "%s glares icily at you, you feel cold to your bones.", "%s glares at %s." },
599  { NULL, NULL, NULL },
600  { NULL, NULL, NULL },
601  { "You lick %s.", "%s licks you.", "%s licks %s." },
602  { NULL, NULL, NULL },
603  { NULL, NULL, NULL },
604  { "You shrug at %s.", "%s shrugs at you.", "%s shrugs at %s." },
605  { "You slap %s.", "You are slapped by %s.", "%s slaps %s." },
606  { NULL, NULL, NULL },
607  { NULL, NULL, NULL },
608  { "You sneeze at %s and a film of snot shoots onto him.", "%s sneezes on you, you feel the snot cover you. EEEEEEW.", "%s sneezes on %s and a film of snot covers him." },
609  { NULL, NULL, NULL },
610  { "You sniff %s.", "%s sniffs you.", "%s sniffs %s" },
611  { NULL, NULL, NULL },
612  { "You spit on %s.", "%s spits in your face!", "%s spits in %s's face." },
613  { NULL, NULL, NULL },
614  { "You thank %s heartily.", "%s thanks you heartily.", "%s thanks %s heartily." },
615  { NULL, NULL, NULL },
616  { "You wave goodbye to %s.", "%s waves goodbye to you. Have a good journey.", "%s waves goodbye to %s." },
617  { "You whistle at %s.", "%s whistles at you.", "%s whistles at %s." },
618  { "You wink suggestively at %s.", "%s winks suggestively at you.", "%s winks at %s." },
619  { NULL, NULL, NULL },
620  { "You beg %s for mercy.", "%s begs you for mercy! Show no quarter!", "%s begs %s for mercy!" },
621  { "You slash your wrist and bleed all over %s", "%s slashes his wrist and bleeds all over you.", "%s slashes his wrist and bleeds all over %s." },
622  { "You cringe away from %s.", "%s cringes away from you.", "%s cringes away from %s in mortal terror." },
623  { NULL, NULL, NULL },
624 };
625 
645 static void basic_emote(object *op, const char *params, int emotion) {
646  char buf[MAX_BUF], buf2[MAX_BUF], buf3[MAX_BUF];
647  player *pl;
648 
649  if (*params == '\0') {
650  const char *self_reply;
651  if (emotion > EMOTE_FIRST && emotion < EMOTE_LAST && single_emotes[emotion - 1][0] != NULL) {
652  self_reply = single_emotes[emotion - 1][0];
653  snprintf(buf2, sizeof(buf2), single_emotes[emotion - 1][1], op->name);
654  } else {
655  self_reply = "You are a nut.";
656  snprintf(buf2, sizeof(buf2), "%s dances with glee.", op->name);
657  }
658 
660  MSG_TYPE_COMMUNICATION_EMOTE, self_reply);
663  return;
664  }
665 
667  if (pl == NULL) {
669  MSG_TYPE_COMMAND_ERROR, "%s is not around.", params);
670  return;
671  }
672 
673  if (pl->ob == op) {
674  /* Player doing self-emote. */
675  const char *self_reply;
676  if (emotion > EMOTE_FIRST && emotion < EMOTE_LAST && self_emotes[emotion - 1][0] != NULL) {
677  self_reply = self_emotes[emotion - 1][0];
678  snprintf(buf2, sizeof(buf2), self_emotes[emotion - 1][1], op->name);
679  } else {
680  self_reply = "My god! is that LEGAL?";
681  snprintf(buf2, sizeof(buf2), "You look away from %s.", op->name);
682  }
683 
685  MSG_TYPE_COMMUNICATION_EMOTE, self_reply);
688  return;
689  }
690 
691  if (emotion > EMOTE_FIRST && emotion < EMOTE_LAST && other_emotes[emotion - 1][0] != NULL) {
692  snprintf(buf, sizeof(buf), other_emotes[emotion - 1][0], pl->ob->name);
693  snprintf(buf2, sizeof(buf2), other_emotes[emotion - 1][1], op->name);
694  snprintf(buf3, sizeof(buf3), other_emotes[emotion - 1][2], op->name, pl->ob->name);
695  } else {
696  snprintf(buf, sizeof(buf), "You are still nuts.");
697  snprintf(buf2, sizeof(buf2), "You get the distinct feeling that %s is nuts.", op->name);
698  snprintf(buf3, sizeof(buf3), "%s is eyeing %s quizzically.", pl->ob->name, op->name);
699  }
700 
702  buf);
704  buf2);
706  buf3);
707 }
708 
709 /*
710  * everything from here on out are just wrapper calls to basic_emote
711  */
712 
720 void command_nod(object *op, const char *params) {
721  basic_emote(op, params, EMOTE_NOD);
722 }
723 
731 void command_dance(object *op, const char *params) {
732  basic_emote(op, params, EMOTE_DANCE);
733 }
734 
742 void command_kiss(object *op, const char *params) {
743  basic_emote(op, params, EMOTE_KISS);
744 }
745 
753 void command_bounce(object *op, const char *params) {
754  basic_emote(op, params, EMOTE_BOUNCE);
755 }
756 
764 void command_smile(object *op, const char *params) {
765  basic_emote(op, params, EMOTE_SMILE);
766 }
767 
775 void command_cackle(object *op, const char *params) {
776  basic_emote(op, params, EMOTE_CACKLE);
777 }
778 
786 void command_laugh(object *op, const char *params) {
787  basic_emote(op, params, EMOTE_LAUGH);
788 }
789 
797 void command_giggle(object *op, const char *params) {
798  basic_emote(op, params, EMOTE_GIGGLE);
799 }
800 
808 void command_shake(object *op, const char *params) {
809  basic_emote(op, params, EMOTE_SHAKE);
810 }
811 
819 void command_puke(object *op, const char *params) {
820  basic_emote(op, params, EMOTE_PUKE);
821 }
822 
830 void command_growl(object *op, const char *params) {
831  basic_emote(op, params, EMOTE_GROWL);
832 }
833 
841 void command_scream(object *op, const char *params) {
842  basic_emote(op, params, EMOTE_SCREAM);
843 }
844 
852 void command_sigh(object *op, const char *params) {
853  basic_emote(op, params, EMOTE_SIGH);
854 }
855 
863 void command_sulk(object *op, const char *params) {
864  basic_emote(op, params, EMOTE_SULK);
865 }
866 
874 void command_hug(object *op, const char *params) {
875  basic_emote(op, params, EMOTE_HUG);
876 }
877 
885 void command_cry(object *op, const char *params) {
886  basic_emote(op, params, EMOTE_CRY);
887 }
888 
896 void command_poke(object *op, const char *params) {
897  basic_emote(op, params, EMOTE_POKE);
898 }
899 
907 void command_accuse(object *op, const char *params) {
908  basic_emote(op, params, EMOTE_ACCUSE);
909 }
910 
918 void command_grin(object *op, const char *params) {
919  basic_emote(op, params, EMOTE_GRIN);
920 }
921 
929 void command_bow(object *op, const char *params) {
930  basic_emote(op, params, EMOTE_BOW);
931 }
932 
940 void command_clap(object *op, const char *params) {
941  basic_emote(op, params, EMOTE_CLAP);
942 }
943 
951 void command_blush(object *op, const char *params) {
952  basic_emote(op, params, EMOTE_BLUSH);
953 }
954 
962 void command_burp(object *op, const char *params) {
963  basic_emote(op, params, EMOTE_BURP);
964 }
965 
973 void command_chuckle(object *op, const char *params) {
974  basic_emote(op, params, EMOTE_CHUCKLE);
975 }
976 
984 void command_cough(object *op, const char *params) {
985  basic_emote(op, params, EMOTE_COUGH);
986 }
987 
995 void command_flip(object *op, const char *params) {
996  basic_emote(op, params, EMOTE_FLIP);
997 }
998 
1006 void command_frown(object *op, const char *params) {
1007  basic_emote(op, params, EMOTE_FROWN);
1008 }
1009 
1017 void command_gasp(object *op, const char *params) {
1018  basic_emote(op, params, EMOTE_GASP);
1019 }
1020 
1028 void command_glare(object *op, const char *params) {
1029  basic_emote(op, params, EMOTE_GLARE);
1030 }
1031 
1039 void command_groan(object *op, const char *params) {
1040  basic_emote(op, params, EMOTE_GROAN);
1041 }
1042 
1050 void command_hiccup(object *op, const char *params) {
1051  basic_emote(op, params, EMOTE_HICCUP);
1052 }
1053 
1061 void command_lick(object *op, const char *params) {
1062  basic_emote(op, params, EMOTE_LICK);
1063 }
1064 
1072 void command_pout(object *op, const char *params) {
1073  basic_emote(op, params, EMOTE_POUT);
1074 }
1075 
1083 void command_shiver(object *op, const char *params) {
1084  basic_emote(op, params, EMOTE_SHIVER);
1085 }
1086 
1094 void command_shrug(object *op, const char *params) {
1095  basic_emote(op, params, EMOTE_SHRUG);
1096 }
1097 
1105 void command_slap(object *op, const char *params) {
1106  basic_emote(op, params, EMOTE_SLAP);
1107 }
1108 
1116 void command_smirk(object *op, const char *params) {
1117  basic_emote(op, params, EMOTE_SMIRK);
1118 }
1119 
1127 void command_snap(object *op, const char *params) {
1128  basic_emote(op, params, EMOTE_SNAP);
1129 }
1130 
1138 void command_sneeze(object *op, const char *params) {
1139  basic_emote(op, params, EMOTE_SNEEZE);
1140 }
1141 
1149 void command_snicker(object *op, const char *params) {
1150  basic_emote(op, params, EMOTE_SNICKER);
1151 }
1152 
1160 void command_sniff(object *op, const char *params) {
1161  basic_emote(op, params, EMOTE_SNIFF);
1162 }
1163 
1171 void command_snore(object *op, const char *params) {
1172  basic_emote(op, params, EMOTE_SNORE);
1173 }
1174 
1182 void command_spit(object *op, const char *params) {
1183  basic_emote(op, params, EMOTE_SPIT);
1184 }
1185 
1193 void command_strut(object *op, const char *params) {
1194  basic_emote(op, params, EMOTE_STRUT);
1195 }
1196 
1204 void command_thank(object *op, const char *params) {
1205  basic_emote(op, params, EMOTE_THANK);
1206 }
1207 
1215 void command_twiddle(object *op, const char *params) {
1216  basic_emote(op, params, EMOTE_TWIDDLE);
1217 }
1218 
1226 void command_wave(object *op, const char *params) {
1227  basic_emote(op, params, EMOTE_WAVE);
1228 }
1229 
1237 void command_whistle(object *op, const char *params) {
1238  basic_emote(op, params, EMOTE_WHISTLE);
1239 }
1240 
1248 void command_wink(object *op, const char *params) {
1249  basic_emote(op, params, EMOTE_WINK);
1250 }
1251 
1259 void command_yawn(object *op, const char *params) {
1260  basic_emote(op, params, EMOTE_YAWN);
1261 }
1262 
1270 void command_beg(object *op, const char *params) {
1271  basic_emote(op, params, EMOTE_BEG);
1272 }
1273 
1281 void command_bleed(object *op, const char *params) {
1282  basic_emote(op, params, EMOTE_BLEED);
1283 }
1284 
1292 void command_cringe(object *op, const char *params) {
1293  basic_emote(op, params, EMOTE_CRINGE);
1294 }
1295 
1303 void command_think(object *op, const char *params) {
1304  basic_emote(op, params, EMOTE_THINK);
1305 }
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
Definition: main.c:313
Definition: player.h:92
#define MSG_TYPE_COMMUNICATION_ME
Definition: newclient.h:619
#define EMOTE_SCREAM
Definition: c_chat.c:391
void command_glare(object *op, const char *params)
Definition: c_chat.c:1028
void command_clap(object *op, const char *params)
Definition: c_chat.c:940
void monster_communicate(object *op, const char *txt)
Definition: monster.c:2188
#define DICE
Definition: c_chat.c:90
#define EMOTE_THINK
Definition: c_chat.c:433
#define NDI_ALL
Definition: newclient.h:246
#define EMOTE_POUT
Definition: c_chat.c:412
unsigned char uint8_t
Definition: win32.h:161
#define EMOTE_SMILE
Definition: c_chat.c:384
StringBuffer * buf
Definition: readable.c:1591
static void basic_emote(object *op, const char *params, int emotion)
Definition: c_chat.c:645
void command_whistle(object *op, const char *params)
Definition: c_chat.c:1237
#define NDI_WHITE
Definition: newclient.h:222
#define EMOTE_BURP
Definition: c_chat.c:402
#define MSG_TYPE_COMMUNICATION_EMOTE
Definition: newclient.h:621
#define EMOTE_SNAP
Definition: c_chat.c:417
#define EMOTE_GROAN
Definition: c_chat.c:409
#define NDI_ORANGE
Definition: newclient.h:225
void command_snore(object *op, const char *params)
Definition: c_chat.c:1171
void command_dance(object *op, const char *params)
Definition: c_chat.c:731
#define EMOTE_GASP
Definition: c_chat.c:407
#define EMOTE_STRUT
Definition: c_chat.c:423
void command_shout(object *op, const char *params)
Definition: c_chat.c:208
void command_chat(object *op, const char *params)
Definition: c_chat.c:219
#define EMOTE_CHUCKLE
Definition: c_chat.c:403
void command_pout(object *op, const char *params)
Definition: c_chat.c:1072
#define EMOTE_SHAKE
Definition: c_chat.c:388
#define NDI_BLUE
Definition: newclient.h:226
void command_frown(object *op, const char *params)
Definition: c_chat.c:1006
void command_kiss(object *op, const char *params)
Definition: c_chat.c:742
#define EMOTE_SULK
Definition: c_chat.c:393
void command_burp(object *op, const char *params)
Definition: c_chat.c:962
void command_growl(object *op, const char *params)
Definition: c_chat.c:830
#define EMOTE_PUKE
Definition: c_chat.c:389
player * find_player_options(const char *plname, int options, const mapstruct *map)
Definition: player.c:66
player * find_player(const char *plname)
Definition: player.c:55
void command_laugh(object *op, const char *params)
Definition: c_chat.c:786
#define EMOTE_CLAP
Definition: c_chat.c:400
void command_cackle(object *op, const char *params)
Definition: c_chat.c:775
static const char *const orcknuckle[7]
Definition: c_chat.c:80
void command_think(object *op, const char *params)
Definition: c_chat.c:1303
#define safe_strncpy
Definition: compat.h:23
uint32_t hidden
Definition: player.h:132
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Definition: main.c:308
#define EMOTE_THANK
Definition: c_chat.c:424
#define EMOTE_HICCUP
Definition: c_chat.c:410
void events_execute_global_event(int eventcode,...)
Definition: events.cpp:27
#define EMOTE_NOD
Definition: c_chat.c:380
void command_scream(object *op, const char *params)
Definition: c_chat.c:841
#define EMOTE_WINK
Definition: c_chat.c:428
#define EMOTE_FIRST
Definition: c_chat.c:379
void command_groan(object *op, const char *params)
Definition: c_chat.c:1039
void command_snap(object *op, const char *params)
Definition: c_chat.c:1127
#define FIND_PLAYER_PARTIAL_NAME
Definition: player.h:212
#define EMOTE_BEG
Definition: c_chat.c:430
int rndm(int min, int max)
Definition: utils.c:162
#define EMOTE_KISS
Definition: c_chat.c:382
static const char * single_emotes[EMOTE_LAST - 1][2]
Definition: c_chat.c:443
void command_gasp(object *op, const char *params)
Definition: c_chat.c:1017
#define NDI_RED
Definition: newclient.h:224
sstring find_string(const char *str)
Definition: shstr.c:236
void command_wave(object *op, const char *params)
Definition: c_chat.c:1226
#define MSG_TYPE_COMMAND
Definition: newclient.h:379
void command_lick(object *op, const char *params)
Definition: c_chat.c:1061
void command_smirk(object *op, const char *params)
Definition: c_chat.c:1116
void command_bow(object *op, const char *params)
Definition: c_chat.c:929
void command_strut(object *op, const char *params)
Definition: c_chat.c:1193
#define MSG_TYPE_COMMUNICATION_SHOUT
Definition: newclient.h:623
#define MSG_TYPE_COMMAND_ERROR
Definition: newclient.h:509
void command_reply(object *op, const char *params)
Definition: c_chat.c:334
void command_spit(object *op, const char *params)
Definition: c_chat.c:1182
#define EMOTE_DANCE
Definition: c_chat.c:381
void command_cough(object *op, const char *params)
Definition: c_chat.c:984
#define EMOTE_SNORE
Definition: c_chat.c:421
#define EVENT_SHOUT
Definition: events.h:53
#define snprintf
Definition: win32.h:46
void command_nod(object *op, const char *params)
Definition: c_chat.c:720
#define EMOTE_FLIP
Definition: c_chat.c:405
#define MSG_TYPE_COMMUNICATION_RANDOM
Definition: newclient.h:617
void command_snicker(object *op, const char *params)
Definition: c_chat.c:1149
#define EMOTE_CRINGE
Definition: c_chat.c:432
#define FOR_INV_FINISH()
Definition: define.h:714
#define EMOTE_SHIVER
Definition: c_chat.c:413
int die_roll(int num, int size, const object *op, int goodbad)
Definition: utils.c:122
static void do_tell(object *op, const char *params, int adjust_listen)
Definition: c_chat.c:233
void command_poke(object *op, const char *params)
Definition: c_chat.c:896
void command_me(object *op, const char *params)
Definition: c_chat.c:47
void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1)
Definition: info.c:185
#define EMOTE_TWIDDLE
Definition: c_chat.c:425
static void command_tell_all(object *op, const char *params, int pri, int color, int subtype, const char *desc)
Definition: c_chat.c:181
#define EMOTE_COUGH
Definition: c_chat.c:404
void command_flip(object *op, const char *params)
Definition: c_chat.c:995
#define MSG_TYPE_COMMUNICATION
Definition: newclient.h:386
char last_tell[MAX_NAME]
Definition: player.h:172
#define MSG_TYPE_COMMUNICATION_TELL
Definition: newclient.h:620
#define EMOTE_WAVE
Definition: c_chat.c:426
uint8_t listening
Definition: player.h:120
void command_hiccup(object *op, const char *params)
Definition: c_chat.c:1050
void command_shake(object *op, const char *params)
Definition: c_chat.c:808
void command_slap(object *op, const char *params)
Definition: c_chat.c:1105
static const char * self_emotes[EMOTE_LAST - 1][2]
Definition: c_chat.c:505
void command_hug(object *op, const char *params)
Definition: c_chat.c:874
void command_wink(object *op, const char *params)
Definition: c_chat.c:1248
#define EMOTE_GLARE
Definition: c_chat.c:408
#define EMOTE_YAWN
Definition: c_chat.c:429
#define QUERY_FLAG(xyz, p)
Definition: define.h:225
void command_shrug(object *op, const char *params)
Definition: c_chat.c:1094
void command_twiddle(object *op, const char *params)
Definition: c_chat.c:1215
#define FLAG_WIZ
Definition: define.h:231
#define EMOTE_SIGH
Definition: c_chat.c:392
#define MAX_BUF
Definition: define.h:35
void command_tell(object *op, const char *params)
Definition: c_chat.c:306
#define EMOTE_BOW
Definition: c_chat.c:399
void command_bleed(object *op, const char *params)
Definition: c_chat.c:1281
object * ob
Definition: player.h:158
void command_sneeze(object *op, const char *params)
Definition: c_chat.c:1138
#define EMOTE_CRY
Definition: c_chat.c:395
#define EMOTE_FROWN
Definition: c_chat.c:406
void command_cointoss(object *op, const char *params)
Definition: c_chat.c:64
#define EMOTE_BLEED
Definition: c_chat.c:431
#define EMOTE_SHRUG
Definition: c_chat.c:414
void command_puke(object *op, const char *params)
Definition: c_chat.c:819
void command_giggle(object *op, const char *params)
Definition: c_chat.c:797
#define object_decrease_nrof_by_one(xyz)
Definition: compat.h:28
void command_sigh(object *op, const char *params)
Definition: c_chat.c:852
void command_cringe(object *op, const char *params)
Definition: c_chat.c:1292
#define EMOTE_SNIFF
Definition: c_chat.c:420
#define MSG_TYPE_COMMUNICATION_CHAT
Definition: newclient.h:624
#define EMOTE_LICK
Definition: c_chat.c:411
void command_grin(object *op, const char *params)
Definition: c_chat.c:918
void command_bounce(object *op, const char *params)
Definition: c_chat.c:753
#define EMOTE_LAST
Definition: c_chat.c:434
#define EMOTE_BLUSH
Definition: c_chat.c:401
void command_sniff(object *op, const char *params)
Definition: c_chat.c:1160
#define EMOTE_HUG
Definition: c_chat.c:394
#define EMOTE_GRIN
Definition: c_chat.c:398
void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1)
Definition: info.c:211
#define EMOTE_BOUNCE
Definition: c_chat.c:383
#define FIND_PLAYER_NO_HIDDEN_DM
Definition: player.h:213
static const char * other_emotes[EMOTE_LAST - 1][3]
Definition: c_chat.c:569
#define NDI_UNIQUE
Definition: newclient.h:245
void command_sulk(object *op, const char *params)
Definition: c_chat.c:863
void command_smile(object *op, const char *params)
Definition: c_chat.c:764
void command_chuckle(object *op, const char *params)
Definition: c_chat.c:973
void command_cry(object *op, const char *params)
Definition: c_chat.c:885
#define EVENT_TELL
Definition: events.h:54
#define MAX_NAME
Definition: define.h:41
#define EMOTE_WHISTLE
Definition: c_chat.c:427
#define EMOTE_SNEEZE
Definition: c_chat.c:418
void command_say(object *op, const char *params)
Definition: c_chat.c:34
#define EMOTE_CACKLE
Definition: c_chat.c:385
#define EMOTE_SMIRK
Definition: c_chat.c:416
#define EMOTE_GIGGLE
Definition: c_chat.c:387
#define EMOTE_ACCUSE
Definition: c_chat.c:397
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
Definition: main.c:323
void command_blush(object *op, const char *params)
Definition: c_chat.c:951
#define EMOTE_GROWL
Definition: c_chat.c:390
#define EMOTE_SLAP
Definition: c_chat.c:415
void command_shiver(object *op, const char *params)
Definition: c_chat.c:1083
#define EMOTE_SNICKER
Definition: c_chat.c:419
player * find_player_partial_name(const char *plname)
Definition: player.c:110
void command_beg(object *op, const char *params)
Definition: c_chat.c:1270
void command_dmtell(object *op, const char *params)
Definition: c_chat.c:318
void command_thank(object *op, const char *params)
Definition: c_chat.c:1204
size_t strlcpy(char *dst, const char *src, size_t size)
Definition: porting.c:370
#define FOR_INV_PREPARE(op_, it_)
Definition: define.h:707
void command_yawn(object *op, const char *params)
Definition: c_chat.c:1259
#define EMOTE_POKE
Definition: c_chat.c:396
#define EMOTE_SPIT
Definition: c_chat.c:422
void command_accuse(object *op, const char *params)
Definition: c_chat.c:907
#define EMOTE_LAUGH
Definition: c_chat.c:386