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 |
static int |
101 |
basic_emote (object *op, char *params, int emotion) |
102 |
{ |
103 |
char buf[MAX_BUF], buf2[MAX_BUF], buf3[MAX_BUF]; |
104 |
player *pl; |
105 |
|
106 |
if (!params) |
107 |
{ |
108 |
switch (emotion) |
109 |
{ |
110 |
case EMOTE_NOD: |
111 |
sprintf (buf, "%s nods solemnly.", &op->name); |
112 |
sprintf (buf2, "You nod solemnly."); |
113 |
break; |
114 |
case EMOTE_DANCE: |
115 |
sprintf (buf, "%s expresses himself through interpretive dance.", &op->name); |
116 |
sprintf (buf2, "You dance with glee."); |
117 |
break; |
118 |
case EMOTE_KISS: |
119 |
sprintf (buf, "%s makes a weird facial contortion", &op->name); |
120 |
sprintf (buf2, "All the lonely people.."); |
121 |
break; |
122 |
case EMOTE_BOUNCE: |
123 |
sprintf (buf, "%s bounces around.", &op->name); |
124 |
sprintf (buf2, "BOIINNNNNNGG!"); |
125 |
break; |
126 |
case EMOTE_SMILE: |
127 |
sprintf (buf, "%s smiles happily.", &op->name); |
128 |
sprintf (buf2, "You smile happily."); |
129 |
break; |
130 |
case EMOTE_CACKLE: |
131 |
sprintf (buf, "%s throws back his head and cackles with insane " "glee!", &op->name); |
132 |
sprintf (buf2, "You cackle gleefully."); |
133 |
break; |
134 |
case EMOTE_LAUGH: |
135 |
sprintf (buf, "%s falls down laughing.", &op->name); |
136 |
sprintf (buf2, "You fall down laughing."); |
137 |
break; |
138 |
case EMOTE_GIGGLE: |
139 |
sprintf (buf, "%s giggles.", &op->name); |
140 |
sprintf (buf2, "You giggle."); |
141 |
break; |
142 |
case EMOTE_SHAKE: |
143 |
sprintf (buf, "%s shakes his head.", &op->name); |
144 |
sprintf (buf2, "You shake your head."); |
145 |
break; |
146 |
case EMOTE_PUKE: |
147 |
sprintf (buf, "%s pukes.", &op->name); |
148 |
sprintf (buf2, "Bleaaaaaghhhhhhh!"); |
149 |
break; |
150 |
case EMOTE_GROWL: |
151 |
sprintf (buf, "%s growls.", &op->name); |
152 |
sprintf (buf2, "Grrrrrrrrr...."); |
153 |
break; |
154 |
case EMOTE_SCREAM: |
155 |
sprintf (buf, "%s screams at the top of his lungs!", &op->name); |
156 |
sprintf (buf2, "ARRRRRRRRRRGH!!!!!"); |
157 |
break; |
158 |
case EMOTE_SIGH: |
159 |
sprintf (buf, "%s sighs loudly.", &op->name); |
160 |
sprintf (buf2, "You sigh."); |
161 |
break; |
162 |
case EMOTE_SULK: |
163 |
sprintf (buf, "%s sulks in the corner.", &op->name); |
164 |
sprintf (buf2, "You sulk."); |
165 |
break; |
166 |
case EMOTE_CRY: |
167 |
sprintf (buf, "%s bursts into tears.", &op->name); |
168 |
sprintf (buf2, "Waaaaaaahhh.."); |
169 |
break; |
170 |
case EMOTE_GRIN: |
171 |
sprintf (buf, "%s grins evilly.", &op->name); |
172 |
sprintf (buf2, "You grin evilly."); |
173 |
break; |
174 |
case EMOTE_BOW: |
175 |
sprintf (buf, "%s bows deeply.", &op->name); |
176 |
sprintf (buf2, "You bow deeply."); |
177 |
break; |
178 |
case EMOTE_CLAP: |
179 |
sprintf (buf, "%s gives a round of applause.", &op->name); |
180 |
sprintf (buf2, "Clap, clap, clap."); |
181 |
break; |
182 |
case EMOTE_BLUSH: |
183 |
sprintf (buf, "%s blushes.", &op->name); |
184 |
sprintf (buf2, "Your cheeks are burning."); |
185 |
break; |
186 |
case EMOTE_BURP: |
187 |
sprintf (buf, "%s burps loudly.", &op->name); |
188 |
sprintf (buf2, "You burp loudly."); |
189 |
break; |
190 |
case EMOTE_CHUCKLE: |
191 |
sprintf (buf, "%s chuckles politely.", &op->name); |
192 |
sprintf (buf2, "You chuckle politely"); |
193 |
break; |
194 |
case EMOTE_COUGH: |
195 |
sprintf (buf, "%s coughs loudly.", &op->name); |
196 |
sprintf (buf2, "Yuck, try to cover your mouth next time!"); |
197 |
break; |
198 |
case EMOTE_FLIP: |
199 |
sprintf (buf, "%s flips head over heels.", &op->name); |
200 |
sprintf (buf2, "You flip head over heels."); |
201 |
break; |
202 |
case EMOTE_FROWN: |
203 |
sprintf (buf, "%s frowns.", &op->name); |
204 |
sprintf (buf2, "What's bothering you?"); |
205 |
break; |
206 |
case EMOTE_GASP: |
207 |
sprintf (buf, "%s gasps in astonishment.", &op->name); |
208 |
sprintf (buf2, "You gasp in astonishment."); |
209 |
break; |
210 |
case EMOTE_GLARE: |
211 |
sprintf (buf, "%s glares around him.", &op->name); |
212 |
sprintf (buf2, "You glare at nothing in particular."); |
213 |
break; |
214 |
case EMOTE_GROAN: |
215 |
sprintf (buf, "%s groans loudly.", &op->name); |
216 |
sprintf (buf2, "You groan loudly."); |
217 |
break; |
218 |
case EMOTE_HICCUP: |
219 |
sprintf (buf, "%s hiccups.", &op->name); |
220 |
sprintf (buf2, "*HIC*"); |
221 |
break; |
222 |
case EMOTE_LICK: |
223 |
sprintf (buf, "%s licks his mouth and smiles.", &op->name); |
224 |
sprintf (buf2, "You lick your mouth and smile."); |
225 |
break; |
226 |
case EMOTE_POUT: |
227 |
sprintf (buf, "%s pouts.", &op->name); |
228 |
sprintf (buf2, "Aww, don't take it so hard."); |
229 |
break; |
230 |
case EMOTE_SHIVER: |
231 |
sprintf (buf, "%s shivers uncomfortably.", &op->name); |
232 |
sprintf (buf2, "Brrrrrrrrr."); |
233 |
break; |
234 |
case EMOTE_SHRUG: |
235 |
sprintf (buf, "%s shrugs helplessly.", &op->name); |
236 |
sprintf (buf2, "You shrug."); |
237 |
break; |
238 |
case EMOTE_SMIRK: |
239 |
sprintf (buf, "%s smirks.", &op->name); |
240 |
sprintf (buf2, "You smirk."); |
241 |
break; |
242 |
case EMOTE_SNAP: |
243 |
sprintf (buf, "%s snaps his fingers.", &op->name); |
244 |
sprintf (buf2, "PRONTO! You snap your fingers."); |
245 |
break; |
246 |
case EMOTE_SNEEZE: |
247 |
sprintf (buf, "%s sneezes.", &op->name); |
248 |
sprintf (buf2, "Gesundheit!"); |
249 |
break; |
250 |
case EMOTE_SNICKER: |
251 |
sprintf (buf, "%s snickers softly.", &op->name); |
252 |
sprintf (buf2, "You snicker softly."); |
253 |
break; |
254 |
case EMOTE_SNIFF: |
255 |
sprintf (buf, "%s sniffs sadly.", &op->name); |
256 |
sprintf (buf2, "You sniff sadly. *SNIFF*"); |
257 |
break; |
258 |
case EMOTE_SNORE: |
259 |
sprintf (buf, "%s snores loudly.", &op->name); |
260 |
sprintf (buf2, "Zzzzzzzzzzzzzzz."); |
261 |
break; |
262 |
case EMOTE_SPIT: |
263 |
sprintf (buf, "%s spits over his left shoulder.", &op->name); |
264 |
sprintf (buf2, "You spit over your left shoulder."); |
265 |
break; |
266 |
case EMOTE_STRUT: |
267 |
sprintf (buf, "%s struts proudly.", &op->name); |
268 |
sprintf (buf2, "Strut your stuff."); |
269 |
break; |
270 |
case EMOTE_TWIDDLE: |
271 |
sprintf (buf, "%s patiently twiddles his thumbs.", &op->name); |
272 |
sprintf (buf2, "You patiently twiddle your thumbs."); |
273 |
break; |
274 |
case EMOTE_WAVE: |
275 |
sprintf (buf, "%s waves happily.", &op->name); |
276 |
sprintf (buf2, "You wave."); |
277 |
break; |
278 |
case EMOTE_WHISTLE: |
279 |
sprintf (buf, "%s whistles appreciatively.", &op->name); |
280 |
sprintf (buf2, "You whistle appreciatively."); |
281 |
break; |
282 |
case EMOTE_WINK: |
283 |
sprintf (buf, "%s winks suggestively.", &op->name); |
284 |
sprintf (buf2, "Have you got something in your eye?"); |
285 |
break; |
286 |
case EMOTE_YAWN: |
287 |
sprintf (buf, "%s yawns sleepily.", &op->name); |
288 |
sprintf (buf2, "You open up your yap and let out a big breeze " "of stale air."); |
289 |
break; |
290 |
case EMOTE_CRINGE: |
291 |
sprintf (buf, "%s cringes in terror!", &op->name); |
292 |
sprintf (buf2, "You cringe in terror."); |
293 |
break; |
294 |
case EMOTE_BLEED: |
295 |
sprintf (buf, "%s is bleeding all over the carpet" " - got a spare tourniquet?", &op->name); |
296 |
sprintf (buf2, "You bleed all over your nice new armour."); |
297 |
break; |
298 |
case EMOTE_THINK: |
299 |
sprintf (buf, "%s closes his eyes and thinks really hard.", &op->name); |
300 |
sprintf (buf2, "Anything in particular that you'd care to think " "about?"); |
301 |
break; |
302 |
default: |
303 |
sprintf (buf, "%s dances with glee.", &op->name); |
304 |
sprintf (buf2, "You are a nut."); |
305 |
break; |
306 |
} /*case */ |
307 |
|
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 |
|
474 |
new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); |
475 |
new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, pl->ob, buf2); |
476 |
new_info_map_except2 (NDI_WHITE, op->map, op, pl->ob, buf3); |
477 |
return (0); |
478 |
} |
479 |
if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && pl->ob->map == op->map && pl->ob == op) |
480 |
{ |
481 |
switch (emotion) |
482 |
{ |
483 |
case EMOTE_DANCE: |
484 |
sprintf (buf, "You skip and dance around by yourself."); |
485 |
sprintf (buf2, "%s embraces himself and begins to dance!", &op->name); |
486 |
break; |
487 |
case EMOTE_LAUGH: |
488 |
sprintf (buf, "Laugh at yourself all you want, the others " "won't understand."); |
489 |
sprintf (buf2, "%s is laughing at something.", &op->name); |
490 |
break; |
491 |
case EMOTE_SHAKE: |
492 |
sprintf (buf, "You are shaken by yourself."); |
493 |
sprintf (buf2, "%s shakes and quivers like a bowlful of " "jelly.", &op->name); |
494 |
break; |
495 |
case EMOTE_PUKE: |
496 |
sprintf (buf, "You puke on yourself."); |
497 |
sprintf (buf2, "%s pukes on his clothes.", &op->name); |
498 |
break; |
499 |
case EMOTE_HUG: |
500 |
sprintf (buf, "You hug yourself."); |
501 |
sprintf (buf2, "%s hugs himself.", &op->name); |
502 |
break; |
503 |
case EMOTE_CRY: |
504 |
sprintf (buf, "You cry to yourself."); |
505 |
sprintf (buf2, "%s sobs quietly to himself.", &op->name); |
506 |
break; |
507 |
case EMOTE_POKE: |
508 |
sprintf (buf, "You poke yourself in the ribs, feeling very" " silly."); |
509 |
sprintf (buf2, "%s pokes himself in the ribs, looking very" " sheepish.", &op->name); |
510 |
break; |
511 |
case EMOTE_ACCUSE: |
512 |
sprintf (buf, "You accuse yourself."); |
513 |
sprintf (buf2, "%s seems to have a bad conscience.", &op->name); |
514 |
break; |
515 |
case EMOTE_BOW: |
516 |
sprintf (buf, "You kiss your toes."); |
517 |
sprintf (buf2, "%s folds up like a jackknife and kisses his" " own toes.", &op->name); |
518 |
break; |
519 |
case EMOTE_FROWN: |
520 |
sprintf (buf, "You frown at yourself."); |
521 |
sprintf (buf2, "%s frowns at himself.", &op->name); |
522 |
break; |
523 |
case EMOTE_GLARE: |
524 |
sprintf (buf, "You glare icily at your feet, they are " "suddenly very cold."); |
525 |
sprintf (buf2, "%s glares at his feet, what is bothering " "him?", &op->name); |
526 |
break; |
527 |
case EMOTE_LICK: |
528 |
sprintf (buf, "You lick yourself."); |
529 |
sprintf (buf2, "%s licks himself - YUCK.", &op->name); |
530 |
break; |
531 |
case EMOTE_SLAP: |
532 |
sprintf (buf, "You slap yourself, silly you."); |
533 |
sprintf (buf2, "%s slaps himself, really strange...", &op->name); |
534 |
break; |
535 |
case EMOTE_SNEEZE: |
536 |
sprintf (buf, "You sneeze on yourself, what a mess!"); |
537 |
sprintf (buf2, "%s sneezes, and covers himself in a slimy" " substance.", &op->name); |
538 |
break; |
539 |
case EMOTE_SNIFF: |
540 |
sprintf (buf, "You sniff yourself."); |
541 |
sprintf (buf2, "%s sniffs himself.", &op->name); |
542 |
break; |
543 |
case EMOTE_SPIT: |
544 |
sprintf (buf, "You drool all over yourself."); |
545 |
sprintf (buf2, "%s drools all over himself.", &op->name); |
546 |
break; |
547 |
case EMOTE_THANK: |
548 |
sprintf (buf, "You thank yourself since nobody else " "wants to!"); |
549 |
sprintf (buf2, "%s thanks himself since you won't.", &op->name); |
550 |
break; |
551 |
case EMOTE_WAVE: |
552 |
sprintf (buf, "Are you going on adventures as well??"); |
553 |
sprintf (buf2, "%s waves goodbye to himself.", &op->name); |
554 |
break; |
555 |
case EMOTE_WHISTLE: |
556 |
sprintf (buf, "You whistle while you work."); |
557 |
sprintf (buf2, "%s whistles to himself in boredom.", &op->name); |
558 |
break; |
559 |
case EMOTE_WINK: |
560 |
sprintf (buf, "You wink at yourself?? What are you up to?"); |
561 |
sprintf (buf2, "%s winks at himself - something strange " "is going on...", &op->name); |
562 |
break; |
563 |
case EMOTE_BLEED: |
564 |
sprintf (buf, "Very impressive! You wipe your blood all " "over yourself."); |
565 |
sprintf (buf2, "%s performs some satanic ritual while " "wiping his blood on himself.", &op->name); |
566 |
break; |
567 |
default: |
568 |
sprintf (buf, "My god! is that LEGAL?"); |
569 |
sprintf (buf2, "You look away from %s.", &op->name); |
570 |
break; |
571 |
} /*case */ |
572 |
new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); |
573 |
new_info_map_except (NDI_WHITE, op->map, op, buf2); |
574 |
return (0); |
575 |
} /*if self */ |
576 |
} /*for */ |
577 |
|
578 |
new_draw_info_format (NDI_UNIQUE, 0, op, "%s is not around.", params); |
579 |
return (1); |
580 |
} /*else */ |
581 |
|
582 |
return (0); |
583 |
} |
584 |
|
585 |
/* |
586 |
* everything from here on out are just wrapper calls to basic_emote |
587 |
*/ |
588 |
|
589 |
int |
590 |
command_nod (object *op, char *params) |
591 |
{ |
592 |
return (basic_emote (op, params, EMOTE_NOD)); |
593 |
} |
594 |
|
595 |
int |
596 |
command_dance (object *op, char *params) |
597 |
{ |
598 |
return (basic_emote (op, params, EMOTE_DANCE)); |
599 |
} |
600 |
|
601 |
int |
602 |
command_kiss (object *op, char *params) |
603 |
{ |
604 |
return (basic_emote (op, params, EMOTE_KISS)); |
605 |
} |
606 |
|
607 |
int |
608 |
command_bounce (object *op, char *params) |
609 |
{ |
610 |
return (basic_emote (op, params, EMOTE_BOUNCE)); |
611 |
} |
612 |
|
613 |
int |
614 |
command_smile (object *op, char *params) |
615 |
{ |
616 |
return (basic_emote (op, params, EMOTE_SMILE)); |
617 |
} |
618 |
|
619 |
int |
620 |
command_cackle (object *op, char *params) |
621 |
{ |
622 |
return (basic_emote (op, params, EMOTE_CACKLE)); |
623 |
} |
624 |
|
625 |
int |
626 |
command_laugh (object *op, char *params) |
627 |
{ |
628 |
return (basic_emote (op, params, EMOTE_LAUGH)); |
629 |
} |
630 |
|
631 |
int |
632 |
command_giggle (object *op, char *params) |
633 |
{ |
634 |
return (basic_emote (op, params, EMOTE_GIGGLE)); |
635 |
} |
636 |
|
637 |
int |
638 |
command_shake (object *op, char *params) |
639 |
{ |
640 |
return (basic_emote (op, params, EMOTE_SHAKE)); |
641 |
} |
642 |
|
643 |
int |
644 |
command_puke (object *op, char *params) |
645 |
{ |
646 |
return (basic_emote (op, params, EMOTE_PUKE)); |
647 |
} |
648 |
|
649 |
int |
650 |
command_growl (object *op, char *params) |
651 |
{ |
652 |
return (basic_emote (op, params, EMOTE_GROWL)); |
653 |
} |
654 |
|
655 |
int |
656 |
command_scream (object *op, char *params) |
657 |
{ |
658 |
return (basic_emote (op, params, EMOTE_SCREAM)); |
659 |
} |
660 |
|
661 |
int |
662 |
command_sigh (object *op, char *params) |
663 |
{ |
664 |
return (basic_emote (op, params, EMOTE_SIGH)); |
665 |
} |
666 |
|
667 |
int |
668 |
command_sulk (object *op, char *params) |
669 |
{ |
670 |
return (basic_emote (op, params, EMOTE_SULK)); |
671 |
} |
672 |
|
673 |
int |
674 |
command_hug (object *op, char *params) |
675 |
{ |
676 |
return (basic_emote (op, params, EMOTE_HUG)); |
677 |
} |
678 |
|
679 |
int |
680 |
command_cry (object *op, char *params) |
681 |
{ |
682 |
return (basic_emote (op, params, EMOTE_CRY)); |
683 |
} |
684 |
|
685 |
int |
686 |
command_poke (object *op, char *params) |
687 |
{ |
688 |
return (basic_emote (op, params, EMOTE_POKE)); |
689 |
} |
690 |
|
691 |
int |
692 |
command_accuse (object *op, char *params) |
693 |
{ |
694 |
return (basic_emote (op, params, EMOTE_ACCUSE)); |
695 |
} |
696 |
|
697 |
int |
698 |
command_grin (object *op, char *params) |
699 |
{ |
700 |
return (basic_emote (op, params, EMOTE_GRIN)); |
701 |
} |
702 |
|
703 |
int |
704 |
command_bow (object *op, char *params) |
705 |
{ |
706 |
return (basic_emote (op, params, EMOTE_BOW)); |
707 |
} |
708 |
|
709 |
int |
710 |
command_clap (object *op, char *params) |
711 |
{ |
712 |
return (basic_emote (op, params, EMOTE_CLAP)); |
713 |
} |
714 |
|
715 |
int |
716 |
command_blush (object *op, char *params) |
717 |
{ |
718 |
return (basic_emote (op, params, EMOTE_BLUSH)); |
719 |
} |
720 |
|
721 |
int |
722 |
command_burp (object *op, char *params) |
723 |
{ |
724 |
return (basic_emote (op, params, EMOTE_BURP)); |
725 |
} |
726 |
|
727 |
int |
728 |
command_chuckle (object *op, char *params) |
729 |
{ |
730 |
return (basic_emote (op, params, EMOTE_CHUCKLE)); |
731 |
} |
732 |
|
733 |
int |
734 |
command_cough (object *op, char *params) |
735 |
{ |
736 |
return (basic_emote (op, params, EMOTE_COUGH)); |
737 |
} |
738 |
|
739 |
int |
740 |
command_flip (object *op, char *params) |
741 |
{ |
742 |
return (basic_emote (op, params, EMOTE_FLIP)); |
743 |
} |
744 |
|
745 |
int |
746 |
command_frown (object *op, char *params) |
747 |
{ |
748 |
return (basic_emote (op, params, EMOTE_FROWN)); |
749 |
} |
750 |
|
751 |
int |
752 |
command_gasp (object *op, char *params) |
753 |
{ |
754 |
return (basic_emote (op, params, EMOTE_GASP)); |
755 |
} |
756 |
|
757 |
int |
758 |
command_glare (object *op, char *params) |
759 |
{ |
760 |
return (basic_emote (op, params, EMOTE_GLARE)); |
761 |
} |
762 |
|
763 |
int |
764 |
command_groan (object *op, char *params) |
765 |
{ |
766 |
return (basic_emote (op, params, EMOTE_GROAN)); |
767 |
} |
768 |
|
769 |
int |
770 |
command_hiccup (object *op, char *params) |
771 |
{ |
772 |
return (basic_emote (op, params, EMOTE_HICCUP)); |
773 |
} |
774 |
|
775 |
int |
776 |
command_lick (object *op, char *params) |
777 |
{ |
778 |
return (basic_emote (op, params, EMOTE_LICK)); |
779 |
} |
780 |
|
781 |
int |
782 |
command_pout (object *op, char *params) |
783 |
{ |
784 |
return (basic_emote (op, params, EMOTE_POUT)); |
785 |
} |
786 |
|
787 |
int |
788 |
command_shiver (object *op, char *params) |
789 |
{ |
790 |
return (basic_emote (op, params, EMOTE_SHIVER)); |
791 |
} |
792 |
|
793 |
int |
794 |
command_shrug (object *op, char *params) |
795 |
{ |
796 |
return (basic_emote (op, params, EMOTE_SHRUG)); |
797 |
} |
798 |
|
799 |
int |
800 |
command_slap (object *op, char *params) |
801 |
{ |
802 |
return (basic_emote (op, params, EMOTE_SLAP)); |
803 |
} |
804 |
|
805 |
int |
806 |
command_smirk (object *op, char *params) |
807 |
{ |
808 |
return (basic_emote (op, params, EMOTE_SMIRK)); |
809 |
} |
810 |
|
811 |
int |
812 |
command_snap (object *op, char *params) |
813 |
{ |
814 |
return (basic_emote (op, params, EMOTE_SNAP)); |
815 |
} |
816 |
|
817 |
int |
818 |
command_sneeze (object *op, char *params) |
819 |
{ |
820 |
return (basic_emote (op, params, EMOTE_SNEEZE)); |
821 |
} |
822 |
|
823 |
int |
824 |
command_snicker (object *op, char *params) |
825 |
{ |
826 |
return (basic_emote (op, params, EMOTE_SNICKER)); |
827 |
} |
828 |
|
829 |
int |
830 |
command_sniff (object *op, char *params) |
831 |
{ |
832 |
return (basic_emote (op, params, EMOTE_SNIFF)); |
833 |
} |
834 |
|
835 |
int |
836 |
command_snore (object *op, char *params) |
837 |
{ |
838 |
return (basic_emote (op, params, EMOTE_SNORE)); |
839 |
} |
840 |
|
841 |
int |
842 |
command_spit (object *op, char *params) |
843 |
{ |
844 |
return (basic_emote (op, params, EMOTE_SPIT)); |
845 |
} |
846 |
|
847 |
int |
848 |
command_strut (object *op, char *params) |
849 |
{ |
850 |
return (basic_emote (op, params, EMOTE_STRUT)); |
851 |
} |
852 |
|
853 |
int |
854 |
command_thank (object *op, char *params) |
855 |
{ |
856 |
return (basic_emote (op, params, EMOTE_THANK)); |
857 |
} |
858 |
|
859 |
int |
860 |
command_twiddle (object *op, char *params) |
861 |
{ |
862 |
return (basic_emote (op, params, EMOTE_TWIDDLE)); |
863 |
} |
864 |
|
865 |
int |
866 |
command_wave (object *op, char *params) |
867 |
{ |
868 |
return (basic_emote (op, params, EMOTE_WAVE)); |
869 |
} |
870 |
|
871 |
int |
872 |
command_whistle (object *op, char *params) |
873 |
{ |
874 |
return (basic_emote (op, params, EMOTE_WHISTLE)); |
875 |
} |
876 |
|
877 |
int |
878 |
command_wink (object *op, char *params) |
879 |
{ |
880 |
return (basic_emote (op, params, EMOTE_WINK)); |
881 |
} |
882 |
|
883 |
int |
884 |
command_yawn (object *op, char *params) |
885 |
{ |
886 |
return (basic_emote (op, params, EMOTE_YAWN)); |
887 |
} |
888 |
|
889 |
int |
890 |
command_beg (object *op, char *params) |
891 |
{ |
892 |
return (basic_emote (op, params, EMOTE_BEG)); |
893 |
} |
894 |
|
895 |
int |
896 |
command_bleed (object *op, char *params) |
897 |
{ |
898 |
return (basic_emote (op, params, EMOTE_BLEED)); |
899 |
} |
900 |
|
901 |
int |
902 |
command_cringe (object *op, char *params) |
903 |
{ |
904 |
return (basic_emote (op, params, EMOTE_CRINGE)); |
905 |
} |
906 |
|
907 |
int |
908 |
command_think (object *op, char *params) |
909 |
{ |
910 |
return (basic_emote (op, params, EMOTE_THINK)); |
911 |
} |