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