1 | /* |
1 | /* |
2 | CrossFire, A Multiplayer game for X-windows |
2 | * CrossFire, A Multiplayer game for X-windows |
3 | |
3 | * |
|
|
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 1992 Frank Tore Johansen |
6 | * Copyright (C) 1992 Frank Tore Johansen |
6 | |
7 | * |
7 | This program is free software; you can redistribute it and/or modify |
8 | * This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | * the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
11 | * (at your option) any later version. |
11 | |
12 | * |
12 | This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
16 | |
17 | * |
17 | You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software |
19 | * along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | |
21 | * |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
22 | * The authors can be reached via e-mail at <crossfire@schmorp.de> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | #include <global.h> |
25 | #include <global.h> |
25 | #include <loader.h> |
26 | #include <loader.h> |
26 | #include <sproto.h> |
27 | #include <sproto.h> |
27 | |
|
|
28 | int |
|
|
29 | command_me (object *op, char *params) |
|
|
30 | { |
|
|
31 | char buf[MAX_BUF]; |
|
|
32 | |
|
|
33 | if (!params) |
|
|
34 | return 0; |
|
|
35 | snprintf (buf, MAX_BUF - 1, "%s %s", &op->name, params); |
|
|
36 | new_info_map (NDI_UNIQUE | NDI_BLUE, op->map, buf); |
|
|
37 | |
|
|
38 | return 0; |
|
|
39 | } |
|
|
40 | |
|
|
41 | |
28 | |
42 | int |
29 | int |
43 | command_cointoss (object *op, char *params) |
30 | command_cointoss (object *op, char *params) |
44 | { |
31 | { |
45 | char buf[MAX_BUF]; |
32 | char buf[MAX_BUF]; |
… | |
… | |
82 | snprintf (buf, MAX_BUF - 1, "You roll %s, %s, %s, %s!", orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]); |
69 | snprintf (buf, MAX_BUF - 1, "You roll %s, %s, %s, %s!", orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]); |
83 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
70 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
84 | new_info_map_except (NDI_UNIQUE, op->map, op, buf2); |
71 | new_info_map_except (NDI_UNIQUE, op->map, op, buf2); |
85 | return 0; |
72 | return 0; |
86 | } |
73 | } |
87 | |
|
|
88 | /* |
|
|
89 | * This function covers basic emotions a player can have. An emotion can be |
|
|
90 | * one of three things currently. Directed at oneself, directed at someone, |
|
|
91 | * or directed at nobody. The first set is nobody, the second at someone, and |
|
|
92 | * the third is directed at oneself. Every emotion does not have to be |
|
|
93 | * filled out in every category. The default case will take care of the ones |
|
|
94 | * that are not. Helper functions will call basic_emote with the proper |
|
|
95 | * arguments, translating them into commands. Adding a new emotion can be |
|
|
96 | * done by editing command.c and command.h. |
|
|
97 | * [garbled 09-25-2001] |
|
|
98 | */ |
|
|
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 | new_info_map_except (NDI_WHITE, op->map, op, buf); |
|
|
308 | new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf2); |
|
|
309 | return (0); |
|
|
310 | } |
|
|
311 | else |
|
|
312 | { |
|
|
313 | for (pl = first_player; pl != NULL; pl = pl->next) |
|
|
314 | { |
|
|
315 | if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && |
|
|
316 | pl->ob->map == op->map && pl->ob != op && !(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden)) |
|
|
317 | { |
|
|
318 | /* Hidden dms are not affected by emotions */ |
|
|
319 | switch (emotion) |
|
|
320 | { |
|
|
321 | case EMOTE_NOD: |
|
|
322 | sprintf (buf, "You nod solemnly to %s.", &pl->ob->name); |
|
|
323 | sprintf (buf2, "%s nods solemnly to you.", &op->name); |
|
|
324 | sprintf (buf3, "%s nods solemnly to %s.", &op->name, &pl->ob->name); |
|
|
325 | break; |
|
|
326 | case EMOTE_DANCE: |
|
|
327 | sprintf (buf, "You grab %s and begin doing the Cha-Cha!", &pl->ob->name); |
|
|
328 | sprintf (buf2, "%s grabs you, and begins dancing!", &op->name); |
|
|
329 | sprintf (buf3, "Yipe! %s and %s are doing the Macarena!", &op->name, &pl->ob->name); |
|
|
330 | break; |
|
|
331 | case EMOTE_KISS: |
|
|
332 | sprintf (buf, "You kiss %s.", &pl->ob->name); |
|
|
333 | sprintf (buf2, "%s kisses you.", &op->name); |
|
|
334 | sprintf (buf3, "%s kisses %s.", &op->name, &pl->ob->name); |
|
|
335 | break; |
|
|
336 | case EMOTE_BOUNCE: |
|
|
337 | sprintf (buf, "You bounce around the room with %s.", &pl->ob->name); |
|
|
338 | sprintf (buf2, "%s bounces around the room with you.", &op->name); |
|
|
339 | sprintf (buf3, "%s bounces around the room with %s.", &op->name, &pl->ob->name); |
|
|
340 | break; |
|
|
341 | case EMOTE_SMILE: |
|
|
342 | sprintf (buf, "You smile at %s.", &pl->ob->name); |
|
|
343 | sprintf (buf2, "%s smiles at you.", &op->name); |
|
|
344 | sprintf (buf3, "%s beams a smile at %s.", &op->name, &pl->ob->name); |
|
|
345 | break; |
|
|
346 | case EMOTE_LAUGH: |
|
|
347 | sprintf (buf, "You take one look at %s and fall down " "laughing.", &pl->ob->name); |
|
|
348 | sprintf (buf2, "%s looks at you and falls down on the " "ground laughing.", &op->name); |
|
|
349 | sprintf (buf3, "%s looks at %s and falls down on the " "ground laughing.", &op->name, &pl->ob->name); |
|
|
350 | break; |
|
|
351 | case EMOTE_SHAKE: |
|
|
352 | sprintf (buf, "You shake %s's hand.", &pl->ob->name); |
|
|
353 | sprintf (buf2, "%s shakes your hand.", &op->name); |
|
|
354 | sprintf (buf3, "%s shakes %s's hand.", &op->name, &pl->ob->name); |
|
|
355 | break; |
|
|
356 | case EMOTE_PUKE: |
|
|
357 | sprintf (buf, "You puke on %s.", &pl->ob->name); |
|
|
358 | sprintf (buf2, "%s pukes on your clothes!", &op->name); |
|
|
359 | sprintf (buf3, "%s pukes on %s.", &op->name, &pl->ob->name); |
|
|
360 | break; |
|
|
361 | case EMOTE_HUG: |
|
|
362 | sprintf (buf, "You hug %s.", &pl->ob->name); |
|
|
363 | sprintf (buf2, "%s hugs you.", &op->name); |
|
|
364 | sprintf (buf3, "%s hugs %s.", &op->name, &pl->ob->name); |
|
|
365 | break; |
|
|
366 | case EMOTE_CRY: |
|
|
367 | sprintf (buf, "You cry on %s's shoulder.", &pl->ob->name); |
|
|
368 | sprintf (buf2, "%s cries on your shoulder.", &op->name); |
|
|
369 | sprintf (buf3, "%s cries on %s's shoulder.", &op->name, &pl->ob->name); |
|
|
370 | break; |
|
|
371 | case EMOTE_POKE: |
|
|
372 | sprintf (buf, "You poke %s in the ribs.", &pl->ob->name); |
|
|
373 | sprintf (buf2, "%s pokes you in the ribs.", &op->name); |
|
|
374 | sprintf (buf3, "%s pokes %s in the ribs.", &op->name, &pl->ob->name); |
|
|
375 | break; |
|
|
376 | case EMOTE_ACCUSE: |
|
|
377 | sprintf (buf, "You look accusingly at %s.", &pl->ob->name); |
|
|
378 | sprintf (buf2, "%s looks accusingly at you.", &op->name); |
|
|
379 | sprintf (buf3, "%s looks accusingly at %s.", &op->name, &pl->ob->name); |
|
|
380 | break; |
|
|
381 | case EMOTE_GRIN: |
|
|
382 | sprintf (buf, "You grin at %s.", &pl->ob->name); |
|
|
383 | sprintf (buf2, "%s grins evilly at you.", &op->name); |
|
|
384 | sprintf (buf3, "%s grins evilly at %s.", &op->name, &pl->ob->name); |
|
|
385 | break; |
|
|
386 | case EMOTE_BOW: |
|
|
387 | sprintf (buf, "You bow before %s.", &pl->ob->name); |
|
|
388 | sprintf (buf2, "%s bows before you.", &op->name); |
|
|
389 | sprintf (buf3, "%s bows before %s.", &op->name, &pl->ob->name); |
|
|
390 | break; |
|
|
391 | case EMOTE_FROWN: |
|
|
392 | sprintf (buf, "You frown darkly at %s.", &pl->ob->name); |
|
|
393 | sprintf (buf2, "%s frowns darkly at you.", &op->name); |
|
|
394 | sprintf (buf3, "%s frowns darkly at %s.", &op->name, &pl->ob->name); |
|
|
395 | break; |
|
|
396 | case EMOTE_GLARE: |
|
|
397 | sprintf (buf, "You glare icily at %s.", &pl->ob->name); |
|
|
398 | sprintf (buf2, "%s glares icily at you, you feel cold to" " your bones.", &op->name); |
|
|
399 | sprintf (buf3, "%s glares at %s.", &op->name, &pl->ob->name); |
|
|
400 | break; |
|
|
401 | case EMOTE_LICK: |
|
|
402 | sprintf (buf, "You lick %s.", &pl->ob->name); |
|
|
403 | sprintf (buf2, "%s licks you.", &op->name); |
|
|
404 | sprintf (buf3, "%s licks %s.", &op->name, &pl->ob->name); |
|
|
405 | break; |
|
|
406 | case EMOTE_SHRUG: |
|
|
407 | sprintf (buf, "You shrug at %s.", &pl->ob->name); |
|
|
408 | sprintf (buf2, "%s shrugs at you.", &op->name); |
|
|
409 | sprintf (buf3, "%s shrugs at %s.", &op->name, &pl->ob->name); |
|
|
410 | break; |
|
|
411 | case EMOTE_SLAP: |
|
|
412 | sprintf (buf, "You slap %s.", &pl->ob->name); |
|
|
413 | sprintf (buf2, "You are slapped by %s.", &op->name); |
|
|
414 | sprintf (buf3, "%s slaps %s.", &op->name, &pl->ob->name); |
|
|
415 | break; |
|
|
416 | case EMOTE_SNEEZE: |
|
|
417 | sprintf (buf, "You sneeze at %s and a film of snot shoots" " onto him.", &pl->ob->name); |
|
|
418 | sprintf (buf2, "%s sneezes on you, you feel the snot cover" " you. EEEEEEW.", &op->name); |
|
|
419 | sprintf (buf3, "%s sneezes on %s and a film of snot covers" " him.", &op->name, &pl->ob->name); |
|
|
420 | break; |
|
|
421 | case EMOTE_SNIFF: |
|
|
422 | sprintf (buf, "You sniff %s.", &pl->ob->name); |
|
|
423 | sprintf (buf2, "%s sniffs you.", &op->name); |
|
|
424 | sprintf (buf3, "%s sniffs %s", &op->name, &pl->ob->name); |
|
|
425 | break; |
|
|
426 | case EMOTE_SPIT: |
|
|
427 | sprintf (buf, "You spit on %s.", &pl->ob->name); |
|
|
428 | sprintf (buf2, "%s spits in your face!", &op->name); |
|
|
429 | sprintf (buf3, "%s spits in %s's face.", &op->name, &pl->ob->name); |
|
|
430 | break; |
|
|
431 | case EMOTE_THANK: |
|
|
432 | sprintf (buf, "You thank %s heartily.", &pl->ob->name); |
|
|
433 | sprintf (buf2, "%s thanks you heartily.", &op->name); |
|
|
434 | sprintf (buf3, "%s thanks %s heartily.", &op->name, &pl->ob->name); |
|
|
435 | break; |
|
|
436 | case EMOTE_WAVE: |
|
|
437 | sprintf (buf, "You wave goodbye to %s.", &pl->ob->name); |
|
|
438 | sprintf (buf2, "%s waves goodbye to you. Have a good" " journey.", &op->name); |
|
|
439 | sprintf (buf3, "%s waves goodbye to %s.", &op->name, &pl->ob->name); |
|
|
440 | break; |
|
|
441 | case EMOTE_WHISTLE: |
|
|
442 | sprintf (buf, "You whistle at %s.", &pl->ob->name); |
|
|
443 | sprintf (buf2, "%s whistles at you.", &op->name); |
|
|
444 | sprintf (buf2, "%s whistles at %s.", &op->name, &pl->ob->name); |
|
|
445 | break; |
|
|
446 | case EMOTE_WINK: |
|
|
447 | sprintf (buf, "You wink suggestively at %s.", &pl->ob->name); |
|
|
448 | sprintf (buf2, "%s winks suggestively at you.", &op->name); |
|
|
449 | sprintf (buf2, "%s winks at %s.", &op->name, &pl->ob->name); |
|
|
450 | break; |
|
|
451 | case EMOTE_BEG: |
|
|
452 | sprintf (buf, "You beg %s for mercy.", &pl->ob->name); |
|
|
453 | sprintf (buf2, "%s begs you for mercy! Show no quarter!", &op->name); |
|
|
454 | sprintf (buf2, "%s begs %s for mercy!", &op->name, &pl->ob->name); |
|
|
455 | break; |
|
|
456 | case EMOTE_BLEED: |
|
|
457 | sprintf (buf, "You slash your wrist and bleed all over %s", &pl->ob->name); |
|
|
458 | sprintf (buf2, "%s slashes his wrist and bleeds all over" " you.", &op->name); |
|
|
459 | sprintf (buf2, "%s slashes his wrist and bleeds all " "over %s.", &op->name, &pl->ob->name); |
|
|
460 | break; |
|
|
461 | case EMOTE_CRINGE: |
|
|
462 | sprintf (buf, "You cringe away from %s.", &pl->ob->name); |
|
|
463 | sprintf (buf2, "%s cringes away from you.", &op->name); |
|
|
464 | sprintf (buf2, "%s cringes away from %s in mortal terror.", &op->name, &pl->ob->name); |
|
|
465 | break; |
|
|
466 | default: |
|
|
467 | sprintf (buf, "You are still nuts."); |
|
|
468 | sprintf (buf2, "You get the distinct feeling that %s is nuts.", &op->name); |
|
|
469 | sprintf (buf3, "%s is eyeing %s quizzically.", &pl->ob->name, &op->name); |
|
|
470 | break; |
|
|
471 | } /*case */ |
|
|
472 | new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); |
|
|
473 | new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, pl->ob, buf2); |
|
|
474 | new_info_map_except2 (NDI_WHITE, op->map, op, pl->ob, buf3); |
|
|
475 | return (0); |
|
|
476 | } |
|
|
477 | if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && pl->ob->map == op->map && pl->ob == op) |
|
|
478 | { |
|
|
479 | switch (emotion) |
|
|
480 | { |
|
|
481 | case EMOTE_DANCE: |
|
|
482 | sprintf (buf, "You skip and dance around by yourself."); |
|
|
483 | sprintf (buf2, "%s embraces himself and begins to dance!", &op->name); |
|
|
484 | break; |
|
|
485 | case EMOTE_LAUGH: |
|
|
486 | sprintf (buf, "Laugh at yourself all you want, the others " "won't understand."); |
|
|
487 | sprintf (buf2, "%s is laughing at something.", &op->name); |
|
|
488 | break; |
|
|
489 | case EMOTE_SHAKE: |
|
|
490 | sprintf (buf, "You are shaken by yourself."); |
|
|
491 | sprintf (buf2, "%s shakes and quivers like a bowlful of " "jelly.", &op->name); |
|
|
492 | break; |
|
|
493 | case EMOTE_PUKE: |
|
|
494 | sprintf (buf, "You puke on yourself."); |
|
|
495 | sprintf (buf2, "%s pukes on his clothes.", &op->name); |
|
|
496 | break; |
|
|
497 | case EMOTE_HUG: |
|
|
498 | sprintf (buf, "You hug yourself."); |
|
|
499 | sprintf (buf2, "%s hugs himself.", &op->name); |
|
|
500 | break; |
|
|
501 | case EMOTE_CRY: |
|
|
502 | sprintf (buf, "You cry to yourself."); |
|
|
503 | sprintf (buf2, "%s sobs quietly to himself.", &op->name); |
|
|
504 | break; |
|
|
505 | case EMOTE_POKE: |
|
|
506 | sprintf (buf, "You poke yourself in the ribs, feeling very" " silly."); |
|
|
507 | sprintf (buf2, "%s pokes himself in the ribs, looking very" " sheepish.", &op->name); |
|
|
508 | break; |
|
|
509 | case EMOTE_ACCUSE: |
|
|
510 | sprintf (buf, "You accuse yourself."); |
|
|
511 | sprintf (buf2, "%s seems to have a bad conscience.", &op->name); |
|
|
512 | break; |
|
|
513 | case EMOTE_BOW: |
|
|
514 | sprintf (buf, "You kiss your toes."); |
|
|
515 | sprintf (buf2, "%s folds up like a jackknife and kisses his" " own toes.", &op->name); |
|
|
516 | break; |
|
|
517 | case EMOTE_FROWN: |
|
|
518 | sprintf (buf, "You frown at yourself."); |
|
|
519 | sprintf (buf2, "%s frowns at himself.", &op->name); |
|
|
520 | break; |
|
|
521 | case EMOTE_GLARE: |
|
|
522 | sprintf (buf, "You glare icily at your feet, they are " "suddenly very cold."); |
|
|
523 | sprintf (buf2, "%s glares at his feet, what is bothering " "him?", &op->name); |
|
|
524 | break; |
|
|
525 | case EMOTE_LICK: |
|
|
526 | sprintf (buf, "You lick yourself."); |
|
|
527 | sprintf (buf2, "%s licks himself - YUCK.", &op->name); |
|
|
528 | break; |
|
|
529 | case EMOTE_SLAP: |
|
|
530 | sprintf (buf, "You slap yourself, silly you."); |
|
|
531 | sprintf (buf2, "%s slaps himself, really strange...", &op->name); |
|
|
532 | break; |
|
|
533 | case EMOTE_SNEEZE: |
|
|
534 | sprintf (buf, "You sneeze on yourself, what a mess!"); |
|
|
535 | sprintf (buf2, "%s sneezes, and covers himself in a slimy" " substance.", &op->name); |
|
|
536 | break; |
|
|
537 | case EMOTE_SNIFF: |
|
|
538 | sprintf (buf, "You sniff yourself."); |
|
|
539 | sprintf (buf2, "%s sniffs himself.", &op->name); |
|
|
540 | break; |
|
|
541 | case EMOTE_SPIT: |
|
|
542 | sprintf (buf, "You drool all over yourself."); |
|
|
543 | sprintf (buf2, "%s drools all over himself.", &op->name); |
|
|
544 | break; |
|
|
545 | case EMOTE_THANK: |
|
|
546 | sprintf (buf, "You thank yourself since nobody else " "wants to!"); |
|
|
547 | sprintf (buf2, "%s thanks himself since you won't.", &op->name); |
|
|
548 | break; |
|
|
549 | case EMOTE_WAVE: |
|
|
550 | sprintf (buf, "Are you going on adventures as well??"); |
|
|
551 | sprintf (buf2, "%s waves goodbye to himself.", &op->name); |
|
|
552 | break; |
|
|
553 | case EMOTE_WHISTLE: |
|
|
554 | sprintf (buf, "You whistle while you work."); |
|
|
555 | sprintf (buf2, "%s whistles to himself in boredom.", &op->name); |
|
|
556 | break; |
|
|
557 | case EMOTE_WINK: |
|
|
558 | sprintf (buf, "You wink at yourself?? What are you up to?"); |
|
|
559 | sprintf (buf2, "%s winks at himself - something strange " "is going on...", &op->name); |
|
|
560 | break; |
|
|
561 | case EMOTE_BLEED: |
|
|
562 | sprintf (buf, "Very impressive! You wipe your blood all " "over yourself."); |
|
|
563 | sprintf (buf2, "%s performs some satanic ritual while " "wiping his blood on himself.", &op->name); |
|
|
564 | break; |
|
|
565 | default: |
|
|
566 | sprintf (buf, "My god! is that LEGAL?"); |
|
|
567 | sprintf (buf2, "You look away from %s.", &op->name); |
|
|
568 | break; |
|
|
569 | } /*case */ |
|
|
570 | new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); |
|
|
571 | new_info_map_except (NDI_WHITE, op->map, op, buf2); |
|
|
572 | return (0); |
|
|
573 | } /*if self */ |
|
|
574 | } /*for */ |
|
|
575 | new_draw_info_format (NDI_UNIQUE, 0, op, "%s is not around.", params); |
|
|
576 | return (1); |
|
|
577 | } /*else */ |
|
|
578 | |
|
|
579 | return (0); |
|
|
580 | } |
|
|
581 | |
|
|
582 | /* |
|
|
583 | * everything from here on out are just wrapper calls to basic_emote |
|
|
584 | */ |
|
|
585 | |
|
|
586 | int |
|
|
587 | command_nod (object *op, char *params) |
|
|
588 | { |
|
|
589 | return (basic_emote (op, params, EMOTE_NOD)); |
|
|
590 | } |
|
|
591 | |
|
|
592 | int |
|
|
593 | command_dance (object *op, char *params) |
|
|
594 | { |
|
|
595 | return (basic_emote (op, params, EMOTE_DANCE)); |
|
|
596 | } |
|
|
597 | |
|
|
598 | int |
|
|
599 | command_kiss (object *op, char *params) |
|
|
600 | { |
|
|
601 | return (basic_emote (op, params, EMOTE_KISS)); |
|
|
602 | } |
|
|
603 | |
|
|
604 | int |
|
|
605 | command_bounce (object *op, char *params) |
|
|
606 | { |
|
|
607 | return (basic_emote (op, params, EMOTE_BOUNCE)); |
|
|
608 | } |
|
|
609 | |
|
|
610 | int |
|
|
611 | command_smile (object *op, char *params) |
|
|
612 | { |
|
|
613 | return (basic_emote (op, params, EMOTE_SMILE)); |
|
|
614 | } |
|
|
615 | |
|
|
616 | int |
|
|
617 | command_cackle (object *op, char *params) |
|
|
618 | { |
|
|
619 | return (basic_emote (op, params, EMOTE_CACKLE)); |
|
|
620 | } |
|
|
621 | |
|
|
622 | int |
|
|
623 | command_laugh (object *op, char *params) |
|
|
624 | { |
|
|
625 | return (basic_emote (op, params, EMOTE_LAUGH)); |
|
|
626 | } |
|
|
627 | |
|
|
628 | int |
|
|
629 | command_giggle (object *op, char *params) |
|
|
630 | { |
|
|
631 | return (basic_emote (op, params, EMOTE_GIGGLE)); |
|
|
632 | } |
|
|
633 | |
|
|
634 | int |
|
|
635 | command_shake (object *op, char *params) |
|
|
636 | { |
|
|
637 | return (basic_emote (op, params, EMOTE_SHAKE)); |
|
|
638 | } |
|
|
639 | |
|
|
640 | int |
|
|
641 | command_puke (object *op, char *params) |
|
|
642 | { |
|
|
643 | return (basic_emote (op, params, EMOTE_PUKE)); |
|
|
644 | } |
|
|
645 | |
|
|
646 | int |
|
|
647 | command_growl (object *op, char *params) |
|
|
648 | { |
|
|
649 | return (basic_emote (op, params, EMOTE_GROWL)); |
|
|
650 | } |
|
|
651 | |
|
|
652 | int |
|
|
653 | command_scream (object *op, char *params) |
|
|
654 | { |
|
|
655 | return (basic_emote (op, params, EMOTE_SCREAM)); |
|
|
656 | } |
|
|
657 | |
|
|
658 | int |
|
|
659 | command_sigh (object *op, char *params) |
|
|
660 | { |
|
|
661 | return (basic_emote (op, params, EMOTE_SIGH)); |
|
|
662 | } |
|
|
663 | |
|
|
664 | int |
|
|
665 | command_sulk (object *op, char *params) |
|
|
666 | { |
|
|
667 | return (basic_emote (op, params, EMOTE_SULK)); |
|
|
668 | } |
|
|
669 | |
|
|
670 | int |
|
|
671 | command_hug (object *op, char *params) |
|
|
672 | { |
|
|
673 | return (basic_emote (op, params, EMOTE_HUG)); |
|
|
674 | } |
|
|
675 | |
|
|
676 | int |
|
|
677 | command_cry (object *op, char *params) |
|
|
678 | { |
|
|
679 | return (basic_emote (op, params, EMOTE_CRY)); |
|
|
680 | } |
|
|
681 | |
|
|
682 | int |
|
|
683 | command_poke (object *op, char *params) |
|
|
684 | { |
|
|
685 | return (basic_emote (op, params, EMOTE_POKE)); |
|
|
686 | } |
|
|
687 | |
|
|
688 | int |
|
|
689 | command_accuse (object *op, char *params) |
|
|
690 | { |
|
|
691 | return (basic_emote (op, params, EMOTE_ACCUSE)); |
|
|
692 | } |
|
|
693 | |
|
|
694 | int |
|
|
695 | command_grin (object *op, char *params) |
|
|
696 | { |
|
|
697 | return (basic_emote (op, params, EMOTE_GRIN)); |
|
|
698 | } |
|
|
699 | |
|
|
700 | int |
|
|
701 | command_bow (object *op, char *params) |
|
|
702 | { |
|
|
703 | return (basic_emote (op, params, EMOTE_BOW)); |
|
|
704 | } |
|
|
705 | |
|
|
706 | int |
|
|
707 | command_clap (object *op, char *params) |
|
|
708 | { |
|
|
709 | return (basic_emote (op, params, EMOTE_CLAP)); |
|
|
710 | } |
|
|
711 | |
|
|
712 | int |
|
|
713 | command_blush (object *op, char *params) |
|
|
714 | { |
|
|
715 | return (basic_emote (op, params, EMOTE_BLUSH)); |
|
|
716 | } |
|
|
717 | |
|
|
718 | int |
|
|
719 | command_burp (object *op, char *params) |
|
|
720 | { |
|
|
721 | return (basic_emote (op, params, EMOTE_BURP)); |
|
|
722 | } |
|
|
723 | |
|
|
724 | int |
|
|
725 | command_chuckle (object *op, char *params) |
|
|
726 | { |
|
|
727 | return (basic_emote (op, params, EMOTE_CHUCKLE)); |
|
|
728 | } |
|
|
729 | |
|
|
730 | int |
|
|
731 | command_cough (object *op, char *params) |
|
|
732 | { |
|
|
733 | return (basic_emote (op, params, EMOTE_COUGH)); |
|
|
734 | } |
|
|
735 | |
|
|
736 | int |
|
|
737 | command_flip (object *op, char *params) |
|
|
738 | { |
|
|
739 | return (basic_emote (op, params, EMOTE_FLIP)); |
|
|
740 | } |
|
|
741 | |
|
|
742 | int |
|
|
743 | command_frown (object *op, char *params) |
|
|
744 | { |
|
|
745 | return (basic_emote (op, params, EMOTE_FROWN)); |
|
|
746 | } |
|
|
747 | |
|
|
748 | int |
|
|
749 | command_gasp (object *op, char *params) |
|
|
750 | { |
|
|
751 | return (basic_emote (op, params, EMOTE_GASP)); |
|
|
752 | } |
|
|
753 | |
|
|
754 | int |
|
|
755 | command_glare (object *op, char *params) |
|
|
756 | { |
|
|
757 | return (basic_emote (op, params, EMOTE_GLARE)); |
|
|
758 | } |
|
|
759 | |
|
|
760 | int |
|
|
761 | command_groan (object *op, char *params) |
|
|
762 | { |
|
|
763 | return (basic_emote (op, params, EMOTE_GROAN)); |
|
|
764 | } |
|
|
765 | |
|
|
766 | int |
|
|
767 | command_hiccup (object *op, char *params) |
|
|
768 | { |
|
|
769 | return (basic_emote (op, params, EMOTE_HICCUP)); |
|
|
770 | } |
|
|
771 | |
|
|
772 | int |
|
|
773 | command_lick (object *op, char *params) |
|
|
774 | { |
|
|
775 | return (basic_emote (op, params, EMOTE_LICK)); |
|
|
776 | } |
|
|
777 | |
|
|
778 | int |
|
|
779 | command_pout (object *op, char *params) |
|
|
780 | { |
|
|
781 | return (basic_emote (op, params, EMOTE_POUT)); |
|
|
782 | } |
|
|
783 | |
|
|
784 | int |
|
|
785 | command_shiver (object *op, char *params) |
|
|
786 | { |
|
|
787 | return (basic_emote (op, params, EMOTE_SHIVER)); |
|
|
788 | } |
|
|
789 | |
|
|
790 | int |
|
|
791 | command_shrug (object *op, char *params) |
|
|
792 | { |
|
|
793 | return (basic_emote (op, params, EMOTE_SHRUG)); |
|
|
794 | } |
|
|
795 | |
|
|
796 | int |
|
|
797 | command_slap (object *op, char *params) |
|
|
798 | { |
|
|
799 | return (basic_emote (op, params, EMOTE_SLAP)); |
|
|
800 | } |
|
|
801 | |
|
|
802 | int |
|
|
803 | command_smirk (object *op, char *params) |
|
|
804 | { |
|
|
805 | return (basic_emote (op, params, EMOTE_SMIRK)); |
|
|
806 | } |
|
|
807 | |
|
|
808 | int |
|
|
809 | command_snap (object *op, char *params) |
|
|
810 | { |
|
|
811 | return (basic_emote (op, params, EMOTE_SNAP)); |
|
|
812 | } |
|
|
813 | |
|
|
814 | int |
|
|
815 | command_sneeze (object *op, char *params) |
|
|
816 | { |
|
|
817 | return (basic_emote (op, params, EMOTE_SNEEZE)); |
|
|
818 | } |
|
|
819 | |
|
|
820 | int |
|
|
821 | command_snicker (object *op, char *params) |
|
|
822 | { |
|
|
823 | return (basic_emote (op, params, EMOTE_SNICKER)); |
|
|
824 | } |
|
|
825 | |
|
|
826 | int |
|
|
827 | command_sniff (object *op, char *params) |
|
|
828 | { |
|
|
829 | return (basic_emote (op, params, EMOTE_SNIFF)); |
|
|
830 | } |
|
|
831 | |
|
|
832 | int |
|
|
833 | command_snore (object *op, char *params) |
|
|
834 | { |
|
|
835 | return (basic_emote (op, params, EMOTE_SNORE)); |
|
|
836 | } |
|
|
837 | |
|
|
838 | int |
|
|
839 | command_spit (object *op, char *params) |
|
|
840 | { |
|
|
841 | return (basic_emote (op, params, EMOTE_SPIT)); |
|
|
842 | } |
|
|
843 | |
|
|
844 | int |
|
|
845 | command_strut (object *op, char *params) |
|
|
846 | { |
|
|
847 | return (basic_emote (op, params, EMOTE_STRUT)); |
|
|
848 | } |
|
|
849 | |
|
|
850 | int |
|
|
851 | command_thank (object *op, char *params) |
|
|
852 | { |
|
|
853 | return (basic_emote (op, params, EMOTE_THANK)); |
|
|
854 | } |
|
|
855 | |
|
|
856 | int |
|
|
857 | command_twiddle (object *op, char *params) |
|
|
858 | { |
|
|
859 | return (basic_emote (op, params, EMOTE_TWIDDLE)); |
|
|
860 | } |
|
|
861 | |
|
|
862 | int |
|
|
863 | command_wave (object *op, char *params) |
|
|
864 | { |
|
|
865 | return (basic_emote (op, params, EMOTE_WAVE)); |
|
|
866 | } |
|
|
867 | |
|
|
868 | int |
|
|
869 | command_whistle (object *op, char *params) |
|
|
870 | { |
|
|
871 | return (basic_emote (op, params, EMOTE_WHISTLE)); |
|
|
872 | } |
|
|
873 | |
|
|
874 | int |
|
|
875 | command_wink (object *op, char *params) |
|
|
876 | { |
|
|
877 | return (basic_emote (op, params, EMOTE_WINK)); |
|
|
878 | } |
|
|
879 | |
|
|
880 | int |
|
|
881 | command_yawn (object *op, char *params) |
|
|
882 | { |
|
|
883 | return (basic_emote (op, params, EMOTE_YAWN)); |
|
|
884 | } |
|
|
885 | |
|
|
886 | int |
|
|
887 | command_beg (object *op, char *params) |
|
|
888 | { |
|
|
889 | return (basic_emote (op, params, EMOTE_BEG)); |
|
|
890 | } |
|
|
891 | |
|
|
892 | int |
|
|
893 | command_bleed (object *op, char *params) |
|
|
894 | { |
|
|
895 | return (basic_emote (op, params, EMOTE_BLEED)); |
|
|
896 | } |
|
|
897 | |
|
|
898 | int |
|
|
899 | command_cringe (object *op, char *params) |
|
|
900 | { |
|
|
901 | return (basic_emote (op, params, EMOTE_CRINGE)); |
|
|
902 | } |
|
|
903 | |
|
|
904 | int |
|
|
905 | command_think (object *op, char *params) |
|
|
906 | { |
|
|
907 | return (basic_emote (op, params, EMOTE_THINK)); |
|
|
908 | } |
|
|