ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_chat.C
Revision: 1.1
Committed: Sun Aug 13 17:16:03 2006 UTC (17 years, 9 months ago) by elmex
Content type: text/plain
Branch: MAIN
Log Message:
Made server compile with C++.
Removed cfanim plugin and crossedit.
C++ here we come.

File Contents

# User Rev Content
1 elmex 1.1 /*
2     * static char *rcsid_c_chat_c =
3     * "$Id$";
4     */
5    
6     /*
7     CrossFire, A Multiplayer game for X-windows
8    
9     Copyright (C) 2002 Mark Wedel & Crossfire Development Team
10     Copyright (C) 1992 Frank Tore Johansen
11    
12     This program is free software; you can redistribute it and/or modify
13     it under the terms of the GNU General Public License as published by
14     the Free Software Foundation; either version 2 of the License, or
15     (at your option) any later version.
16    
17     This program is distributed in the hope that it will be useful,
18     but WITHOUT ANY WARRANTY; without even the implied warranty of
19     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20     GNU General Public License for more details.
21    
22     You should have received a copy of the GNU General Public License
23     along with this program; if not, write to the Free Software
24     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25    
26     The authors can be reached via e-mail at crossfire-devel@real-time.com
27     */
28    
29     #include <global.h>
30     #include <loader.h>
31     #include <sproto.h>
32    
33     int command_say (object *op, char *params)
34     {
35     char buf[MAX_BUF];
36    
37     if (!params) return 0;
38     snprintf(buf, MAX_BUF-1, "%s says: %s",op->name, params);
39     new_info_map(NDI_WHITE,op->map, buf);
40     communicate(op, params);
41    
42     return 0;
43     }
44    
45    
46     int command_me (object *op, char *params)
47     {
48     char buf[MAX_BUF];
49    
50     if (!params) return 0;
51     snprintf(buf, MAX_BUF-1, "%s %s",op->name, params);
52     new_info_map(NDI_UNIQUE|NDI_BLUE,op->map, buf);
53    
54     return 0;
55     }
56    
57    
58     int command_cointoss(object *op, char *params)
59     {
60     char buf[MAX_BUF];
61     char buf2[MAX_BUF];
62     int i;
63    
64     i = rndm(1, 2);
65     if (i == 1) {
66     snprintf(buf, MAX_BUF-1, "%s flips a coin.... Heads!", op->name);
67     snprintf(buf2, MAX_BUF-1, "You flip a coin.... Heads!");
68     } else {
69     snprintf(buf, MAX_BUF-1, "%s flips a coin.... Tails!", op->name);
70     snprintf(buf2, MAX_BUF-1, "You flip a coin.... Tails!");
71     }
72     new_draw_info(NDI_UNIQUE, 0, op, buf2);
73     new_info_map_except(NDI_WHITE, op->map, op, buf);
74     return 0;
75     }
76    
77     static const char* const orcknuckle[7] = {"none", "beholder", "ghost", "knight",
78     "princess", "dragon", "orc"};
79    
80     int command_orcknuckle(object *op, char *params)
81     {
82     char buf[MAX_BUF];
83     char buf2[MAX_BUF];
84     int i, j, k, l;
85    
86     i = rndm(1, 5);
87     j = rndm(1, 5);
88     k = rndm(1, 5);
89     l = rndm(1, 6);
90    
91     snprintf(buf2, MAX_BUF-1, "%s rolls %s, %s, %s, %s!", op->name,
92     orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
93     snprintf(buf, MAX_BUF-1, "You roll %s, %s, %s, %s!",
94     orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
95     new_draw_info(NDI_UNIQUE, 0, op, buf);
96     new_info_map_except(NDI_UNIQUE, op->map, op, buf2);
97     return 0;
98     }
99    
100     static int command_tell_all(object *op, char *params, int pri, int color, char *desc)
101     {
102     if (op->contr->no_shout == 1){
103     new_draw_info(NDI_UNIQUE, 0,op,"You are no longer allowed to shout or chat.");
104     return 1;
105     } else {
106     if (params == NULL) {
107     new_draw_info(NDI_UNIQUE, 0,op,"Shout/Chat what?");
108     return 1;
109     }
110     new_draw_info_format(NDI_UNIQUE | NDI_ALL | color, pri, NULL,
111     "%s %s: %s", op->name, desc, params);
112    
113     /* Lauwenmark : Here we handle the SHOUT global event */
114     execute_global_event(EVENT_SHOUT,op,params,pri);
115     return 1;
116     }
117     }
118    
119     int command_shout (object *op, char *params)
120     {
121     return command_tell_all(op, params, 1, NDI_RED, "shouts");
122     }
123    
124     int command_chat (object *op, char *params)
125     {
126     return command_tell_all(op, params, 9, NDI_BLUE, "chats");
127     }
128    
129    
130    
131     int command_tell (object *op, char *params)
132     {
133     char buf[MAX_BUF],*name = NULL ,*msg = NULL;
134     player *pl;
135    
136     if ( params != NULL){
137     name = params;
138     msg = strchr(name, ' ');
139     if(msg){
140     *(msg++)=0;
141     if(*msg == 0)
142     msg = NULL;
143     }
144     }
145    
146     if( name == NULL ){
147     new_draw_info(NDI_UNIQUE, 0,op,"Tell whom what?");
148     return 1;
149     } else if ( msg == NULL){
150     new_draw_info_format(NDI_UNIQUE, 0,op,"Tell %s what?", name);
151     return 1;
152     }
153    
154     snprintf(buf,MAX_BUF-1, "%s tells you: %s",op->name, msg);
155    
156     pl = find_player_partial_name( name );
157    
158     if ( pl )
159     {
160     new_draw_info(NDI_UNIQUE | NDI_ORANGE, 0, pl->ob, buf);
161     new_draw_info_format(NDI_UNIQUE | NDI_ORANGE, 0, op,
162     "You tell %s: %s", pl->ob->name, msg);
163    
164     /* Update last_tell value [mids 01/14/2002] */
165     strcpy(pl->last_tell, op->name);
166     return 1;
167     }
168    
169     new_draw_info(NDI_UNIQUE, 0,op,"No such player or ambiguous name.");
170     return 1;
171     }
172    
173     /* Reply to last person who told you something [mids 01/14/2002] */
174     int command_reply (object *op, char *params) {
175     player *pl;
176    
177     if (params == NULL) {
178     new_draw_info(NDI_UNIQUE, 0, op, "Reply what?");
179     return 1;
180     }
181    
182     if (op->contr->last_tell[0] == '\0') {
183     new_draw_info(NDI_UNIQUE, 0, op, "You can't reply to nobody.");
184     return 1;
185     }
186    
187     /* Find player object of player to reply to and check if player still exists */
188     pl = find_player(op->contr->last_tell);
189    
190     if (pl == NULL) {
191     new_draw_info(NDI_UNIQUE, 0, op, "You can't reply, this player left.");
192     return 1;
193     }
194    
195     /* Update last_tell value */
196     strcpy(pl->last_tell, op->name);
197    
198     new_draw_info_format(NDI_UNIQUE | NDI_ORANGE, 0, pl->ob,
199     "%s tells you: %s", op->name, params);
200     new_draw_info_format(NDI_UNIQUE | NDI_ORANGE, 0, op,
201     "You tell to %s: %s", pl->ob->name, params);
202     return 1;
203     }
204    
205     /*
206     * This function covers basic emotions a player can have. An emotion can be
207     * one of three things currently. Directed at oneself, directed at someone,
208     * or directed at nobody. The first set is nobody, the second at someone, and
209     * the third is directed at oneself. Every emotion does not have to be
210     * filled out in every category. The default case will take care of the ones
211     * that are not. Helper functions will call basic_emote with the proper
212     * arguments, translating them into commands. Adding a new emotion can be
213     * done by editing command.c and command.h.
214     * [garbled 09-25-2001]
215     */
216    
217     static int basic_emote(object *op, char *params, int emotion)
218     {
219     char buf[MAX_BUF], buf2[MAX_BUF], buf3[MAX_BUF];
220     player *pl;
221    
222     if (!params) {
223     switch(emotion) {
224     case EMOTE_NOD:
225     sprintf(buf, "%s nods solemnly.", op->name);
226     sprintf(buf2, "You nod solemnly.");
227     break;
228     case EMOTE_DANCE:
229     sprintf(buf, "%s expresses himself through interpretive dance.",
230     op->name);
231     sprintf(buf2, "You dance with glee.");
232     break;
233     case EMOTE_KISS:
234     sprintf(buf, "%s makes a weird facial contortion", op->name);
235     sprintf(buf2, "All the lonely people..");
236     break;
237     case EMOTE_BOUNCE:
238     sprintf(buf, "%s bounces around.", op->name);
239     sprintf(buf2, "BOIINNNNNNGG!");
240     break;
241     case EMOTE_SMILE:
242     sprintf(buf, "%s smiles happily.", op->name);
243     sprintf(buf2, "You smile happily.");
244     break;
245     case EMOTE_CACKLE:
246     sprintf(buf, "%s throws back his head and cackles with insane "
247     "glee!", op->name);
248     sprintf(buf2, "You cackle gleefully.");
249     break;
250     case EMOTE_LAUGH:
251     sprintf(buf, "%s falls down laughing.", op->name);
252     sprintf(buf2, "You fall down laughing.");
253     break;
254     case EMOTE_GIGGLE:
255     sprintf(buf, "%s giggles.", op->name);
256     sprintf(buf2, "You giggle.");
257     break;
258     case EMOTE_SHAKE:
259     sprintf(buf, "%s shakes his head.", op->name);
260     sprintf(buf2, "You shake your head.");
261     break;
262     case EMOTE_PUKE:
263     sprintf(buf, "%s pukes.", op->name);
264     sprintf(buf2, "Bleaaaaaghhhhhhh!");
265     break;
266     case EMOTE_GROWL:
267     sprintf(buf, "%s growls.", op->name);
268     sprintf(buf2, "Grrrrrrrrr....");
269     break;
270     case EMOTE_SCREAM:
271     sprintf(buf, "%s screams at the top of his lungs!", op->name);
272     sprintf(buf2, "ARRRRRRRRRRGH!!!!!");
273     break;
274     case EMOTE_SIGH:
275     sprintf(buf, "%s sighs loudly.", op->name);
276     sprintf(buf2, "You sigh.");
277     break;
278     case EMOTE_SULK:
279     sprintf(buf, "%s sulks in the corner.", op->name);
280     sprintf(buf2, "You sulk.");
281     break;
282     case EMOTE_CRY:
283     sprintf(buf, "%s bursts into tears.", op->name);
284     sprintf(buf2, "Waaaaaaahhh..");
285     break;
286     case EMOTE_GRIN:
287     sprintf(buf, "%s grins evilly.", op->name);
288     sprintf(buf2, "You grin evilly.");
289     break;
290     case EMOTE_BOW:
291     sprintf(buf, "%s bows deeply.", op->name);
292     sprintf(buf2, "You bow deeply.");
293     break;
294     case EMOTE_CLAP:
295     sprintf(buf, "%s gives a round of applause.", op->name);
296     sprintf(buf2, "Clap, clap, clap.");
297     break;
298     case EMOTE_BLUSH:
299     sprintf(buf, "%s blushes.", op->name);
300     sprintf(buf2, "Your cheeks are burning.");
301     break;
302     case EMOTE_BURP:
303     sprintf(buf, "%s burps loudly.", op->name);
304     sprintf(buf2, "You burp loudly.");
305     break;
306     case EMOTE_CHUCKLE:
307     sprintf(buf, "%s chuckles politely.", op->name);
308     sprintf(buf2, "You chuckle politely");
309     break;
310     case EMOTE_COUGH:
311     sprintf(buf, "%s coughs loudly.", op->name);
312     sprintf(buf2, "Yuck, try to cover your mouth next time!");
313     break;
314     case EMOTE_FLIP:
315     sprintf(buf, "%s flips head over heels.", op->name);
316     sprintf(buf2, "You flip head over heels.");
317     break;
318     case EMOTE_FROWN:
319     sprintf(buf, "%s frowns.", op->name);
320     sprintf(buf2, "What's bothering you?");
321     break;
322     case EMOTE_GASP:
323     sprintf(buf, "%s gasps in astonishment.", op->name);
324     sprintf(buf2, "You gasp in astonishment.");
325     break;
326     case EMOTE_GLARE:
327     sprintf(buf, "%s glares around him.", op->name);
328     sprintf(buf2, "You glare at nothing in particular.");
329     break;
330     case EMOTE_GROAN:
331     sprintf(buf, "%s groans loudly.", op->name);
332     sprintf(buf2, "You groan loudly.");
333     break;
334     case EMOTE_HICCUP:
335     sprintf(buf, "%s hiccups.", op->name);
336     sprintf(buf2, "*HIC*");
337     break;
338     case EMOTE_LICK:
339     sprintf(buf, "%s licks his mouth and smiles.", op->name);
340     sprintf(buf2, "You lick your mouth and smile.");
341     break;
342     case EMOTE_POUT:
343     sprintf(buf, "%s pouts.", op->name);
344     sprintf(buf2, "Aww, don't take it so hard.");
345     break;
346     case EMOTE_SHIVER:
347     sprintf(buf, "%s shivers uncomfortably.", op->name);
348     sprintf(buf2, "Brrrrrrrrr.");
349     break;
350     case EMOTE_SHRUG:
351     sprintf(buf, "%s shrugs helplessly.", op->name);
352     sprintf(buf2, "You shrug.");
353     break;
354     case EMOTE_SMIRK:
355     sprintf(buf, "%s smirks.", op->name);
356     sprintf(buf2, "You smirk.");
357     break;
358     case EMOTE_SNAP:
359     sprintf(buf, "%s snaps his fingers.", op->name);
360     sprintf(buf2, "PRONTO! You snap your fingers.");
361     break;
362     case EMOTE_SNEEZE:
363     sprintf(buf, "%s sneezes.", op->name);
364     sprintf(buf2, "Gesundheit!");
365     break;
366     case EMOTE_SNICKER:
367     sprintf(buf, "%s snickers softly.", op->name);
368     sprintf(buf2, "You snicker softly.");
369     break;
370     case EMOTE_SNIFF:
371     sprintf(buf, "%s sniffs sadly.", op->name);
372     sprintf(buf2, "You sniff sadly. *SNIFF*");
373     break;
374     case EMOTE_SNORE:
375     sprintf(buf, "%s snores loudly.", op->name);
376     sprintf(buf2, "Zzzzzzzzzzzzzzz.");
377     break;
378     case EMOTE_SPIT:
379     sprintf(buf, "%s spits over his left shoulder.", op->name);
380     sprintf(buf2, "You spit over your left shoulder.");
381     break;
382     case EMOTE_STRUT:
383     sprintf(buf, "%s struts proudly.", op->name);
384     sprintf(buf2, "Strut your stuff.");
385     break;
386     case EMOTE_TWIDDLE:
387     sprintf(buf, "%s patiently twiddles his thumbs.", op->name);
388     sprintf(buf2, "You patiently twiddle your thumbs.");
389     break;
390     case EMOTE_WAVE:
391     sprintf(buf, "%s waves happily.", op->name);
392     sprintf(buf2, "You wave.");
393     break;
394     case EMOTE_WHISTLE:
395     sprintf(buf, "%s whistles appreciatively.", op->name);
396     sprintf(buf2, "You whistle appreciatively.");
397     break;
398     case EMOTE_WINK:
399     sprintf(buf, "%s winks suggestively.", op->name);
400     sprintf(buf2, "Have you got something in your eye?");
401     break;
402     case EMOTE_YAWN:
403     sprintf(buf, "%s yawns sleepily.", op->name);
404     sprintf(buf2, "You open up your yap and let out a big breeze "
405     "of stale air.");
406     break;
407     case EMOTE_CRINGE:
408     sprintf(buf, "%s cringes in terror!", op->name);
409     sprintf(buf2, "You cringe in terror.");
410     break;
411     case EMOTE_BLEED:
412     sprintf(buf, "%s is bleeding all over the carpet"
413     " - got a spare tourniquet?", op->name);
414     sprintf(buf2, "You bleed all over your nice new armour.");
415     break;
416     case EMOTE_THINK:
417     sprintf(buf, "%s closes his eyes and thinks really hard.",
418     op->name);
419     sprintf(buf2, "Anything in particular that you'd care to think "
420     "about?");
421     break;
422     default:
423     sprintf(buf, "%s dances with glee.", op->name);
424     sprintf(buf2, "You are a nut.");
425     break;
426     } /*case*/
427     new_info_map_except(NDI_WHITE, op->map, op, buf);
428     new_draw_info(NDI_UNIQUE|NDI_WHITE, 0, op, buf2);
429     return(0);
430     } else {
431     for(pl=first_player;pl!=NULL;pl=pl->next) {
432     if(strncasecmp(pl->ob->name, params, MAX_NAME)==0 &&
433     pl->ob->map == op->map && pl->ob != op &&
434     !(QUERY_FLAG(pl->ob,FLAG_WIZ) && pl->ob->contr->hidden)) {
435     /* Hidden dms are not affected by emotions*/
436     switch(emotion) {
437     case EMOTE_NOD:
438     sprintf(buf, "You nod solemnly to %s.", pl->ob->name);
439     sprintf(buf2, "%s nods solemnly to you.", op->name);
440     sprintf(buf3, "%s nods solemnly to %s.", op->name,
441     pl->ob->name);
442     break;
443     case EMOTE_DANCE:
444     sprintf(buf, "You grab %s and begin doing the Cha-Cha!",
445     pl->ob->name);
446     sprintf(buf2, "%s grabs you, and begins dancing!",
447     op->name);
448     sprintf(buf3, "Yipe! %s and %s are doing the Macarena!",
449     op->name, pl->ob->name);
450     break;
451     case EMOTE_KISS:
452     sprintf(buf, "You kiss %s.", pl->ob->name);
453     sprintf(buf2, "%s kisses you.", op->name);
454     sprintf(buf3, "%s kisses %s.", op->name, pl->ob->name);
455     break;
456     case EMOTE_BOUNCE:
457     sprintf(buf, "You bounce around the room with %s.",
458     pl->ob->name);
459     sprintf(buf2, "%s bounces around the room with you.",
460     op->name);
461     sprintf(buf3, "%s bounces around the room with %s.",
462     op->name, pl->ob->name);
463     break;
464     case EMOTE_SMILE:
465     sprintf(buf, "You smile at %s.", pl->ob->name);
466     sprintf(buf2, "%s smiles at you.", op->name);
467     sprintf(buf3, "%s beams a smile at %s.", op->name,
468     pl->ob->name);
469     break;
470     case EMOTE_LAUGH:
471     sprintf(buf, "You take one look at %s and fall down "
472     "laughing.", pl->ob->name);
473     sprintf(buf2, "%s looks at you and falls down on the "
474     "ground laughing.", op->name);
475     sprintf(buf3, "%s looks at %s and falls down on the "
476     "ground laughing.", op->name, pl->ob->name);
477     break;
478     case EMOTE_SHAKE:
479     sprintf(buf, "You shake %s's hand.", pl->ob->name);
480     sprintf(buf2, "%s shakes your hand.", op->name);
481     sprintf(buf3, "%s shakes %s's hand.", op->name,
482     pl->ob->name);
483     break;
484     case EMOTE_PUKE:
485     sprintf(buf, "You puke on %s.", pl->ob->name);
486     sprintf(buf2, "%s pukes on your clothes!", op->name);
487     sprintf(buf3, "%s pukes on %s.", op->name, pl->ob->name);
488     break;
489     case EMOTE_HUG:
490     sprintf(buf, "You hug %s.", pl->ob->name);
491     sprintf(buf2, "%s hugs you.", op->name);
492     sprintf(buf3, "%s hugs %s.", op->name, pl->ob->name);
493     break;
494     case EMOTE_CRY:
495     sprintf(buf, "You cry on %s's shoulder.", pl->ob->name);
496     sprintf(buf2, "%s cries on your shoulder.", op->name);
497     sprintf(buf3, "%s cries on %s's shoulder.", op->name,
498     pl->ob->name);
499     break;
500     case EMOTE_POKE:
501     sprintf(buf, "You poke %s in the ribs.", pl->ob->name);
502     sprintf(buf2, "%s pokes you in the ribs.", op->name);
503     sprintf(buf3, "%s pokes %s in the ribs.", op->name,
504     pl->ob->name);
505     break;
506     case EMOTE_ACCUSE:
507     sprintf(buf, "You look accusingly at %s.", pl->ob->name);
508     sprintf(buf2, "%s looks accusingly at you.", op->name);
509     sprintf(buf3, "%s looks accusingly at %s.", op->name,
510     pl->ob->name);
511     break;
512     case EMOTE_GRIN:
513     sprintf(buf, "You grin at %s.", pl->ob->name);
514     sprintf(buf2, "%s grins evilly at you.", op->name);
515     sprintf(buf3, "%s grins evilly at %s.", op->name,
516     pl->ob->name);
517     break;
518     case EMOTE_BOW:
519     sprintf(buf, "You bow before %s.", pl->ob->name);
520     sprintf(buf2, "%s bows before you.", op->name);
521     sprintf(buf3, "%s bows before %s.", op->name,
522     pl->ob->name);
523     break;
524     case EMOTE_FROWN:
525     sprintf(buf, "You frown darkly at %s.", pl->ob->name);
526     sprintf(buf2, "%s frowns darkly at you.", op->name);
527     sprintf(buf3, "%s frowns darkly at %s.", op->name,
528     pl->ob->name);
529     break;
530     case EMOTE_GLARE:
531     sprintf(buf, "You glare icily at %s.", pl->ob->name);
532     sprintf(buf2, "%s glares icily at you, you feel cold to"
533     " your bones.", op->name);
534     sprintf(buf3, "%s glares at %s.", op->name, pl->ob->name);
535     break;
536     case EMOTE_LICK:
537     sprintf(buf, "You lick %s.", pl->ob->name);
538     sprintf(buf2, "%s licks you.", op->name);
539     sprintf(buf3, "%s licks %s.", op->name, pl->ob->name);
540     break;
541     case EMOTE_SHRUG:
542     sprintf(buf, "You shrug at %s.", pl->ob->name);
543     sprintf(buf2, "%s shrugs at you.", op->name);
544     sprintf(buf3, "%s shrugs at %s.", op->name, pl->ob->name);
545     break;
546     case EMOTE_SLAP:
547     sprintf(buf, "You slap %s.", pl->ob->name);
548     sprintf(buf2, "You are slapped by %s.", op->name);
549     sprintf(buf3, "%s slaps %s.", op->name, pl->ob->name);
550     break;
551     case EMOTE_SNEEZE:
552     sprintf(buf, "You sneeze at %s and a film of snot shoots"
553     " onto him.", pl->ob->name);
554     sprintf(buf2, "%s sneezes on you, you feel the snot cover"
555     " you. EEEEEEW.", op->name);
556     sprintf(buf3, "%s sneezes on %s and a film of snot covers"
557     " him.", op->name, pl->ob->name);
558     break;
559     case EMOTE_SNIFF:
560     sprintf(buf, "You sniff %s.", pl->ob->name);
561     sprintf(buf2, "%s sniffs you.", op->name);
562     sprintf(buf3, "%s sniffs %s", op->name, pl->ob->name);
563     break;
564     case EMOTE_SPIT:
565     sprintf(buf, "You spit on %s.", pl->ob->name);
566     sprintf(buf2, "%s spits in your face!", op->name);
567     sprintf(buf3, "%s spits in %s's face.", op->name,
568     pl->ob->name);
569     break;
570     case EMOTE_THANK:
571     sprintf(buf, "You thank %s heartily.", pl->ob->name);
572     sprintf(buf2, "%s thanks you heartily.", op->name);
573     sprintf(buf3, "%s thanks %s heartily.", op->name,
574     pl->ob->name);
575     break;
576     case EMOTE_WAVE:
577     sprintf(buf, "You wave goodbye to %s.", pl->ob->name);
578     sprintf(buf2, "%s waves goodbye to you. Have a good"
579     " journey.", op->name);
580     sprintf(buf3, "%s waves goodbye to %s.", op->name,
581     pl->ob->name);
582     break;
583     case EMOTE_WHISTLE:
584     sprintf(buf, "You whistle at %s.", pl->ob->name);
585     sprintf(buf2, "%s whistles at you.", op->name);
586     sprintf(buf2, "%s whistles at %s.", op->name, pl->ob->name);
587     break;
588     case EMOTE_WINK:
589     sprintf(buf, "You wink suggestively at %s.", pl->ob->name);
590     sprintf(buf2, "%s winks suggestively at you.", op->name);
591     sprintf(buf2, "%s winks at %s.", op->name, pl->ob->name);
592     break;
593     case EMOTE_BEG:
594     sprintf(buf, "You beg %s for mercy.", pl->ob->name);
595     sprintf(buf2, "%s begs you for mercy! Show no quarter!",
596     op->name);
597     sprintf(buf2, "%s begs %s for mercy!", op->name,
598     pl->ob->name);
599     break;
600     case EMOTE_BLEED:
601     sprintf(buf, "You slash your wrist and bleed all over %s",
602     pl->ob->name);
603     sprintf(buf2, "%s slashes his wrist and bleeds all over"
604     " you.", op->name);
605     sprintf(buf2, "%s slashes his wrist and bleeds all "
606     "over %s.", op->name, pl->ob->name);
607     break;
608     case EMOTE_CRINGE:
609     sprintf(buf, "You cringe away from %s.", pl->ob->name);
610     sprintf(buf2, "%s cringes away from you.", op->name);
611     sprintf(buf2, "%s cringes away from %s in mortal terror.",
612     op->name, pl->ob->name);
613     break;
614     default:
615     sprintf(buf, "You are still nuts.");
616     sprintf(buf2, "You get the distinct feeling that %s is nuts.",
617     op->name);
618     sprintf(buf3, "%s is eyeing %s quizzically.", pl->ob->name,
619     op->name);
620     break;
621     } /*case*/
622     new_draw_info(NDI_UNIQUE|NDI_WHITE, 0, op, buf);
623     new_draw_info(NDI_UNIQUE|NDI_WHITE, 0, pl->ob, buf2);
624     new_info_map_except2(NDI_WHITE, op->map, op, pl->ob, buf3);
625     return(0);
626     }
627     if(strncasecmp(pl->ob->name, params, MAX_NAME)==0 &&
628     pl->ob->map == op->map && pl->ob == op) {
629     switch(emotion) {
630     case EMOTE_DANCE:
631     sprintf(buf, "You skip and dance around by yourself.");
632     sprintf(buf2, "%s embraces himself and begins to dance!",
633     op->name);
634     break;
635     case EMOTE_LAUGH:
636     sprintf(buf, "Laugh at yourself all you want, the others "
637     "won't understand.");
638     sprintf(buf2, "%s is laughing at something.", op->name);
639     break;
640     case EMOTE_SHAKE:
641     sprintf(buf, "You are shaken by yourself.");
642     sprintf(buf2, "%s shakes and quivers like a bowlful of "
643     "jelly.", op->name);
644     break;
645     case EMOTE_PUKE:
646     sprintf(buf, "You puke on yourself.");
647     sprintf(buf2, "%s pukes on his clothes.", op->name);
648     break;
649     case EMOTE_HUG:
650     sprintf(buf, "You hug yourself.");
651     sprintf(buf2, "%s hugs himself.", op->name);
652     break;
653     case EMOTE_CRY:
654     sprintf(buf, "You cry to yourself.");
655     sprintf(buf2, "%s sobs quietly to himself.", op->name);
656     break;
657     case EMOTE_POKE:
658     sprintf(buf, "You poke yourself in the ribs, feeling very"
659     " silly.");
660     sprintf(buf2, "%s pokes himself in the ribs, looking very"
661     " sheepish.", op->name);
662     break;
663     case EMOTE_ACCUSE:
664     sprintf(buf, "You accuse yourself.");
665     sprintf(buf2, "%s seems to have a bad conscience.",
666     op->name);
667     break;
668     case EMOTE_BOW:
669     sprintf(buf, "You kiss your toes.");
670     sprintf(buf2, "%s folds up like a jackknife and kisses his"
671     " own toes.", op->name);
672     break;
673     case EMOTE_FROWN:
674     sprintf(buf, "You frown at yourself.");
675     sprintf(buf2, "%s frowns at himself.", op->name);
676     break;
677     case EMOTE_GLARE:
678     sprintf(buf, "You glare icily at your feet, they are "
679     "suddenly very cold.");
680     sprintf(buf2, "%s glares at his feet, what is bothering "
681     "him?", op->name);
682     break;
683     case EMOTE_LICK:
684     sprintf(buf, "You lick yourself.");
685     sprintf(buf2, "%s licks himself - YUCK.", op->name);
686     break;
687     case EMOTE_SLAP:
688     sprintf(buf, "You slap yourself, silly you.");
689     sprintf(buf2, "%s slaps himself, really strange...",
690     op->name);
691     break;
692     case EMOTE_SNEEZE:
693     sprintf(buf, "You sneeze on yourself, what a mess!");
694     sprintf(buf2, "%s sneezes, and covers himself in a slimy"
695     " substance.", op->name);
696     break;
697     case EMOTE_SNIFF:
698     sprintf(buf, "You sniff yourself.");
699     sprintf(buf2, "%s sniffs himself.", op->name);
700     break;
701     case EMOTE_SPIT:
702     sprintf(buf, "You drool all over yourself.");
703     sprintf(buf2, "%s drools all over himself.", op->name);
704     break;
705     case EMOTE_THANK:
706     sprintf(buf, "You thank yourself since nobody else "
707     "wants to!");
708     sprintf(buf2, "%s thanks himself since you won't.",
709     op->name);
710     break;
711     case EMOTE_WAVE:
712     sprintf(buf, "Are you going on adventures as well??");
713     sprintf(buf2, "%s waves goodbye to himself.", op->name);
714     break;
715     case EMOTE_WHISTLE:
716     sprintf(buf, "You whistle while you work.");
717     sprintf(buf2, "%s whistles to himself in boredom.",
718     op->name);
719     break;
720     case EMOTE_WINK:
721     sprintf(buf, "You wink at yourself?? What are you up to?");
722     sprintf(buf2, "%s winks at himself - something strange "
723     "is going on...", op->name);
724     break;
725     case EMOTE_BLEED:
726     sprintf(buf, "Very impressive! You wipe your blood all "
727     "over yourself.");
728     sprintf(buf2, "%s performs some satanic ritual while "
729     "wiping his blood on himself.", op->name);
730     break;
731     default:
732     sprintf(buf, "My god! is that LEGAL?");
733     sprintf(buf2, "You look away from %s.", op->name);
734     break;
735     }/*case*/
736     new_draw_info(NDI_UNIQUE|NDI_WHITE, 0, op, buf);
737     new_info_map_except(NDI_WHITE, op->map, op, buf2);
738     return(0);
739     }/*if self*/
740     }/*for*/
741     new_draw_info_format(NDI_UNIQUE, 0, op, "%s is not around.", params);
742     return(1);
743     } /*else*/
744    
745     return(0);
746     }
747    
748     /*
749     * everything from here on out are just wrapper calls to basic_emote
750     */
751    
752     int command_nod(object *op, char *params)
753     {
754     return(basic_emote(op, params, EMOTE_NOD));
755     }
756    
757     int command_dance(object *op, char *params)
758     {
759     return(basic_emote(op, params, EMOTE_DANCE));
760     }
761    
762     int command_kiss(object *op, char *params)
763     {
764     return(basic_emote(op, params, EMOTE_KISS));
765     }
766    
767     int command_bounce(object *op, char *params)
768     {
769     return(basic_emote(op, params, EMOTE_BOUNCE));
770     }
771    
772     int command_smile(object *op, char *params)
773     {
774     return(basic_emote(op, params, EMOTE_SMILE));
775     }
776    
777     int command_cackle(object *op, char *params)
778     {
779     return(basic_emote(op, params, EMOTE_CACKLE));
780     }
781    
782     int command_laugh(object *op, char *params)
783     {
784     return(basic_emote(op, params, EMOTE_LAUGH));
785     }
786    
787     int command_giggle(object *op, char *params)
788     {
789     return(basic_emote(op, params, EMOTE_GIGGLE));
790     }
791    
792     int command_shake(object *op, char *params)
793     {
794     return(basic_emote(op, params, EMOTE_SHAKE));
795     }
796    
797     int command_puke(object *op, char *params)
798     {
799     return(basic_emote(op, params, EMOTE_PUKE));
800     }
801    
802     int command_growl(object *op, char *params)
803     {
804     return(basic_emote(op, params, EMOTE_GROWL));
805     }
806    
807     int command_scream(object *op, char *params)
808     {
809     return(basic_emote(op, params, EMOTE_SCREAM));
810     }
811    
812     int command_sigh(object *op, char *params)
813     {
814     return(basic_emote(op, params, EMOTE_SIGH));
815     }
816    
817     int command_sulk(object *op, char *params)
818     {
819     return(basic_emote(op, params, EMOTE_SULK));
820     }
821    
822     int command_hug(object *op, char *params)
823     {
824     return(basic_emote(op, params, EMOTE_HUG));
825     }
826    
827     int command_cry(object *op, char *params)
828     {
829     return(basic_emote(op, params, EMOTE_CRY));
830     }
831    
832     int command_poke(object *op, char *params)
833     {
834     return(basic_emote(op, params, EMOTE_POKE));
835     }
836    
837     int command_accuse(object *op, char *params)
838     {
839     return(basic_emote(op, params, EMOTE_ACCUSE));
840     }
841    
842     int command_grin(object *op, char *params)
843     {
844     return(basic_emote(op, params, EMOTE_GRIN));
845     }
846    
847     int command_bow(object *op, char *params)
848     {
849     return(basic_emote(op, params, EMOTE_BOW));
850     }
851    
852     int command_clap(object *op, char *params)
853     {
854     return(basic_emote(op, params, EMOTE_CLAP));
855     }
856    
857     int command_blush(object *op, char *params)
858     {
859     return(basic_emote(op, params, EMOTE_BLUSH));
860     }
861    
862     int command_burp(object *op, char *params)
863     {
864     return(basic_emote(op, params, EMOTE_BURP));
865     }
866    
867     int command_chuckle(object *op, char *params)
868     {
869     return(basic_emote(op, params, EMOTE_CHUCKLE));
870     }
871    
872     int command_cough(object *op, char *params)
873     {
874     return(basic_emote(op, params, EMOTE_COUGH));
875     }
876    
877     int command_flip(object *op, char *params)
878     {
879     return(basic_emote(op, params, EMOTE_FLIP));
880     }
881    
882     int command_frown(object *op, char *params)
883     {
884     return(basic_emote(op, params, EMOTE_FROWN));
885     }
886    
887     int command_gasp(object *op, char *params)
888     {
889     return(basic_emote(op, params, EMOTE_GASP));
890     }
891    
892     int command_glare(object *op, char *params)
893     {
894     return(basic_emote(op, params, EMOTE_GLARE));
895     }
896    
897     int command_groan(object *op, char *params)
898     {
899     return(basic_emote(op, params, EMOTE_GROAN));
900     }
901    
902     int command_hiccup(object *op, char *params)
903     {
904     return(basic_emote(op, params, EMOTE_HICCUP));
905     }
906    
907     int command_lick(object *op, char *params)
908     {
909     return(basic_emote(op, params, EMOTE_LICK));
910     }
911    
912     int command_pout(object *op, char *params)
913     {
914     return(basic_emote(op, params, EMOTE_POUT));
915     }
916    
917     int command_shiver(object *op, char *params)
918     {
919     return(basic_emote(op, params, EMOTE_SHIVER));
920     }
921    
922     int command_shrug(object *op, char *params)
923     {
924     return(basic_emote(op, params, EMOTE_SHRUG));
925     }
926    
927     int command_slap(object *op, char *params)
928     {
929     return(basic_emote(op, params, EMOTE_SLAP));
930     }
931    
932     int command_smirk(object *op, char *params)
933     {
934     return(basic_emote(op, params, EMOTE_SMIRK));
935     }
936    
937     int command_snap(object *op, char *params)
938     {
939     return(basic_emote(op, params, EMOTE_SNAP));
940     }
941    
942     int command_sneeze(object *op, char *params)
943     {
944     return(basic_emote(op, params, EMOTE_SNEEZE));
945     }
946    
947     int command_snicker(object *op, char *params)
948     {
949     return(basic_emote(op, params, EMOTE_SNICKER));
950     }
951    
952     int command_sniff(object *op, char *params)
953     {
954     return(basic_emote(op, params, EMOTE_SNIFF));
955     }
956    
957     int command_snore(object *op, char *params)
958     {
959     return(basic_emote(op, params, EMOTE_SNORE));
960     }
961    
962     int command_spit(object *op, char *params)
963     {
964     return(basic_emote(op, params, EMOTE_SPIT));
965     }
966    
967     int command_strut(object *op, char *params)
968     {
969     return(basic_emote(op, params, EMOTE_STRUT));
970     }
971    
972     int command_thank(object *op, char *params)
973     {
974     return(basic_emote(op, params, EMOTE_THANK));
975     }
976    
977     int command_twiddle(object *op, char *params)
978     {
979     return(basic_emote(op, params, EMOTE_TWIDDLE));
980     }
981    
982     int command_wave(object *op, char *params)
983     {
984     return(basic_emote(op, params, EMOTE_WAVE));
985     }
986    
987     int command_whistle(object *op, char *params)
988     {
989     return(basic_emote(op, params, EMOTE_WHISTLE));
990     }
991    
992     int command_wink(object *op, char *params)
993     {
994     return(basic_emote(op, params, EMOTE_WINK));
995     }
996    
997     int command_yawn(object *op, char *params)
998     {
999     return(basic_emote(op, params, EMOTE_YAWN));
1000     }
1001    
1002     int command_beg(object *op, char *params)
1003     {
1004     return(basic_emote(op, params, EMOTE_BEG));
1005     }
1006    
1007     int command_bleed(object *op, char *params)
1008     {
1009     return(basic_emote(op, params, EMOTE_BLEED));
1010     }
1011    
1012     int command_cringe(object *op, char *params)
1013     {
1014     return(basic_emote(op, params, EMOTE_CRINGE));
1015     }
1016    
1017     int command_think(object *op, char *params)
1018     {
1019     return(basic_emote(op, params, EMOTE_THINK));
1020     }