ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_chat.C
(Generate patch)

Comparing deliantra/server/server/c_chat.C (file contents):
Revision 1.5 by root, Sun Sep 10 15:59:57 2006 UTC vs.
Revision 1.9 by root, Mon Jan 8 22:32:11 2007 UTC

1
2/*
3 * static char *rcsid_c_chat_c =
4 * "$Id: c_chat.C,v 1.5 2006/09/10 15:59:57 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
12 7
13 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
14 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
22 17
23 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
24 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 21
27 The authors can be reached via e-mail at crossfire-devel@real-time.com 22 The authors can be reached via e-mail at <crossfire@schmorp.de>
28*/ 23*/
29 24
30#include <global.h> 25#include <global.h>
31#include <loader.h> 26#include <loader.h>
32#include <sproto.h> 27#include <sproto.h>
100 * that are not. Helper functions will call basic_emote with the proper 95 * that are not. Helper functions will call basic_emote with the proper
101 * arguments, translating them into commands. Adding a new emotion can be 96 * arguments, translating them into commands. Adding a new emotion can be
102 * done by editing command.c and command.h. 97 * done by editing command.c and command.h.
103 * [garbled 09-25-2001] 98 * [garbled 09-25-2001]
104 */ 99 */
105
106static int 100static int
107basic_emote (object *op, char *params, int emotion) 101basic_emote (object *op, char *params, int emotion)
108{ 102{
109 char buf[MAX_BUF], buf2[MAX_BUF], buf3[MAX_BUF]; 103 char buf[MAX_BUF], buf2[MAX_BUF], buf3[MAX_BUF];
110 player *pl; 104 player *pl;
111 105
112 if (!params) 106 if (!params)
113 { 107 {
114 switch (emotion) 108 switch (emotion)
115 { 109 {
116 case EMOTE_NOD: 110 case EMOTE_NOD:
117 sprintf (buf, "%s nods solemnly.", &op->name); 111 sprintf (buf, "%s nods solemnly.", &op->name);
118 sprintf (buf2, "You nod solemnly."); 112 sprintf (buf2, "You nod solemnly.");
119 break; 113 break;
120 case EMOTE_DANCE: 114 case EMOTE_DANCE:
121 sprintf (buf, "%s expresses himself through interpretive dance.", &op->name); 115 sprintf (buf, "%s expresses himself through interpretive dance.", &op->name);
122 sprintf (buf2, "You dance with glee."); 116 sprintf (buf2, "You dance with glee.");
123 break; 117 break;
124 case EMOTE_KISS: 118 case EMOTE_KISS:
125 sprintf (buf, "%s makes a weird facial contortion", &op->name); 119 sprintf (buf, "%s makes a weird facial contortion", &op->name);
126 sprintf (buf2, "All the lonely people.."); 120 sprintf (buf2, "All the lonely people..");
127 break; 121 break;
128 case EMOTE_BOUNCE: 122 case EMOTE_BOUNCE:
129 sprintf (buf, "%s bounces around.", &op->name); 123 sprintf (buf, "%s bounces around.", &op->name);
130 sprintf (buf2, "BOIINNNNNNGG!"); 124 sprintf (buf2, "BOIINNNNNNGG!");
131 break; 125 break;
132 case EMOTE_SMILE: 126 case EMOTE_SMILE:
133 sprintf (buf, "%s smiles happily.", &op->name); 127 sprintf (buf, "%s smiles happily.", &op->name);
134 sprintf (buf2, "You smile happily."); 128 sprintf (buf2, "You smile happily.");
135 break; 129 break;
136 case EMOTE_CACKLE: 130 case EMOTE_CACKLE:
137 sprintf (buf, "%s throws back his head and cackles with insane " "glee!", &op->name); 131 sprintf (buf, "%s throws back his head and cackles with insane " "glee!", &op->name);
138 sprintf (buf2, "You cackle gleefully."); 132 sprintf (buf2, "You cackle gleefully.");
139 break; 133 break;
140 case EMOTE_LAUGH: 134 case EMOTE_LAUGH:
141 sprintf (buf, "%s falls down laughing.", &op->name); 135 sprintf (buf, "%s falls down laughing.", &op->name);
142 sprintf (buf2, "You fall down laughing."); 136 sprintf (buf2, "You fall down laughing.");
143 break; 137 break;
144 case EMOTE_GIGGLE: 138 case EMOTE_GIGGLE:
145 sprintf (buf, "%s giggles.", &op->name); 139 sprintf (buf, "%s giggles.", &op->name);
146 sprintf (buf2, "You giggle."); 140 sprintf (buf2, "You giggle.");
147 break; 141 break;
148 case EMOTE_SHAKE: 142 case EMOTE_SHAKE:
149 sprintf (buf, "%s shakes his head.", &op->name); 143 sprintf (buf, "%s shakes his head.", &op->name);
150 sprintf (buf2, "You shake your head."); 144 sprintf (buf2, "You shake your head.");
151 break; 145 break;
152 case EMOTE_PUKE: 146 case EMOTE_PUKE:
153 sprintf (buf, "%s pukes.", &op->name); 147 sprintf (buf, "%s pukes.", &op->name);
154 sprintf (buf2, "Bleaaaaaghhhhhhh!"); 148 sprintf (buf2, "Bleaaaaaghhhhhhh!");
155 break; 149 break;
156 case EMOTE_GROWL: 150 case EMOTE_GROWL:
157 sprintf (buf, "%s growls.", &op->name); 151 sprintf (buf, "%s growls.", &op->name);
158 sprintf (buf2, "Grrrrrrrrr...."); 152 sprintf (buf2, "Grrrrrrrrr....");
159 break; 153 break;
160 case EMOTE_SCREAM: 154 case EMOTE_SCREAM:
161 sprintf (buf, "%s screams at the top of his lungs!", &op->name); 155 sprintf (buf, "%s screams at the top of his lungs!", &op->name);
162 sprintf (buf2, "ARRRRRRRRRRGH!!!!!"); 156 sprintf (buf2, "ARRRRRRRRRRGH!!!!!");
163 break; 157 break;
164 case EMOTE_SIGH: 158 case EMOTE_SIGH:
165 sprintf (buf, "%s sighs loudly.", &op->name); 159 sprintf (buf, "%s sighs loudly.", &op->name);
166 sprintf (buf2, "You sigh."); 160 sprintf (buf2, "You sigh.");
167 break; 161 break;
168 case EMOTE_SULK: 162 case EMOTE_SULK:
169 sprintf (buf, "%s sulks in the corner.", &op->name); 163 sprintf (buf, "%s sulks in the corner.", &op->name);
170 sprintf (buf2, "You sulk."); 164 sprintf (buf2, "You sulk.");
171 break; 165 break;
172 case EMOTE_CRY: 166 case EMOTE_CRY:
173 sprintf (buf, "%s bursts into tears.", &op->name); 167 sprintf (buf, "%s bursts into tears.", &op->name);
174 sprintf (buf2, "Waaaaaaahhh.."); 168 sprintf (buf2, "Waaaaaaahhh..");
175 break; 169 break;
176 case EMOTE_GRIN: 170 case EMOTE_GRIN:
177 sprintf (buf, "%s grins evilly.", &op->name); 171 sprintf (buf, "%s grins evilly.", &op->name);
178 sprintf (buf2, "You grin evilly."); 172 sprintf (buf2, "You grin evilly.");
179 break; 173 break;
180 case EMOTE_BOW: 174 case EMOTE_BOW:
181 sprintf (buf, "%s bows deeply.", &op->name); 175 sprintf (buf, "%s bows deeply.", &op->name);
182 sprintf (buf2, "You bow deeply."); 176 sprintf (buf2, "You bow deeply.");
183 break; 177 break;
184 case EMOTE_CLAP: 178 case EMOTE_CLAP:
185 sprintf (buf, "%s gives a round of applause.", &op->name); 179 sprintf (buf, "%s gives a round of applause.", &op->name);
186 sprintf (buf2, "Clap, clap, clap."); 180 sprintf (buf2, "Clap, clap, clap.");
187 break; 181 break;
188 case EMOTE_BLUSH: 182 case EMOTE_BLUSH:
189 sprintf (buf, "%s blushes.", &op->name); 183 sprintf (buf, "%s blushes.", &op->name);
190 sprintf (buf2, "Your cheeks are burning."); 184 sprintf (buf2, "Your cheeks are burning.");
191 break; 185 break;
192 case EMOTE_BURP: 186 case EMOTE_BURP:
193 sprintf (buf, "%s burps loudly.", &op->name); 187 sprintf (buf, "%s burps loudly.", &op->name);
194 sprintf (buf2, "You burp loudly."); 188 sprintf (buf2, "You burp loudly.");
195 break; 189 break;
196 case EMOTE_CHUCKLE: 190 case EMOTE_CHUCKLE:
197 sprintf (buf, "%s chuckles politely.", &op->name); 191 sprintf (buf, "%s chuckles politely.", &op->name);
198 sprintf (buf2, "You chuckle politely"); 192 sprintf (buf2, "You chuckle politely");
199 break; 193 break;
200 case EMOTE_COUGH: 194 case EMOTE_COUGH:
201 sprintf (buf, "%s coughs loudly.", &op->name); 195 sprintf (buf, "%s coughs loudly.", &op->name);
202 sprintf (buf2, "Yuck, try to cover your mouth next time!"); 196 sprintf (buf2, "Yuck, try to cover your mouth next time!");
203 break; 197 break;
204 case EMOTE_FLIP: 198 case EMOTE_FLIP:
205 sprintf (buf, "%s flips head over heels.", &op->name); 199 sprintf (buf, "%s flips head over heels.", &op->name);
206 sprintf (buf2, "You flip head over heels."); 200 sprintf (buf2, "You flip head over heels.");
207 break; 201 break;
208 case EMOTE_FROWN: 202 case EMOTE_FROWN:
209 sprintf (buf, "%s frowns.", &op->name); 203 sprintf (buf, "%s frowns.", &op->name);
210 sprintf (buf2, "What's bothering you?"); 204 sprintf (buf2, "What's bothering you?");
211 break; 205 break;
212 case EMOTE_GASP: 206 case EMOTE_GASP:
213 sprintf (buf, "%s gasps in astonishment.", &op->name); 207 sprintf (buf, "%s gasps in astonishment.", &op->name);
214 sprintf (buf2, "You gasp in astonishment."); 208 sprintf (buf2, "You gasp in astonishment.");
215 break; 209 break;
216 case EMOTE_GLARE: 210 case EMOTE_GLARE:
217 sprintf (buf, "%s glares around him.", &op->name); 211 sprintf (buf, "%s glares around him.", &op->name);
218 sprintf (buf2, "You glare at nothing in particular."); 212 sprintf (buf2, "You glare at nothing in particular.");
219 break; 213 break;
220 case EMOTE_GROAN: 214 case EMOTE_GROAN:
221 sprintf (buf, "%s groans loudly.", &op->name); 215 sprintf (buf, "%s groans loudly.", &op->name);
222 sprintf (buf2, "You groan loudly."); 216 sprintf (buf2, "You groan loudly.");
223 break; 217 break;
224 case EMOTE_HICCUP: 218 case EMOTE_HICCUP:
225 sprintf (buf, "%s hiccups.", &op->name); 219 sprintf (buf, "%s hiccups.", &op->name);
226 sprintf (buf2, "*HIC*"); 220 sprintf (buf2, "*HIC*");
227 break; 221 break;
228 case EMOTE_LICK: 222 case EMOTE_LICK:
229 sprintf (buf, "%s licks his mouth and smiles.", &op->name); 223 sprintf (buf, "%s licks his mouth and smiles.", &op->name);
230 sprintf (buf2, "You lick your mouth and smile."); 224 sprintf (buf2, "You lick your mouth and smile.");
231 break; 225 break;
232 case EMOTE_POUT: 226 case EMOTE_POUT:
233 sprintf (buf, "%s pouts.", &op->name); 227 sprintf (buf, "%s pouts.", &op->name);
234 sprintf (buf2, "Aww, don't take it so hard."); 228 sprintf (buf2, "Aww, don't take it so hard.");
235 break; 229 break;
236 case EMOTE_SHIVER: 230 case EMOTE_SHIVER:
237 sprintf (buf, "%s shivers uncomfortably.", &op->name); 231 sprintf (buf, "%s shivers uncomfortably.", &op->name);
238 sprintf (buf2, "Brrrrrrrrr."); 232 sprintf (buf2, "Brrrrrrrrr.");
239 break; 233 break;
240 case EMOTE_SHRUG: 234 case EMOTE_SHRUG:
241 sprintf (buf, "%s shrugs helplessly.", &op->name); 235 sprintf (buf, "%s shrugs helplessly.", &op->name);
242 sprintf (buf2, "You shrug."); 236 sprintf (buf2, "You shrug.");
243 break; 237 break;
244 case EMOTE_SMIRK: 238 case EMOTE_SMIRK:
245 sprintf (buf, "%s smirks.", &op->name); 239 sprintf (buf, "%s smirks.", &op->name);
246 sprintf (buf2, "You smirk."); 240 sprintf (buf2, "You smirk.");
247 break; 241 break;
248 case EMOTE_SNAP: 242 case EMOTE_SNAP:
249 sprintf (buf, "%s snaps his fingers.", &op->name); 243 sprintf (buf, "%s snaps his fingers.", &op->name);
250 sprintf (buf2, "PRONTO! You snap your fingers."); 244 sprintf (buf2, "PRONTO! You snap your fingers.");
251 break; 245 break;
252 case EMOTE_SNEEZE: 246 case EMOTE_SNEEZE:
253 sprintf (buf, "%s sneezes.", &op->name); 247 sprintf (buf, "%s sneezes.", &op->name);
254 sprintf (buf2, "Gesundheit!"); 248 sprintf (buf2, "Gesundheit!");
255 break; 249 break;
256 case EMOTE_SNICKER: 250 case EMOTE_SNICKER:
257 sprintf (buf, "%s snickers softly.", &op->name); 251 sprintf (buf, "%s snickers softly.", &op->name);
258 sprintf (buf2, "You snicker softly."); 252 sprintf (buf2, "You snicker softly.");
259 break; 253 break;
260 case EMOTE_SNIFF: 254 case EMOTE_SNIFF:
261 sprintf (buf, "%s sniffs sadly.", &op->name); 255 sprintf (buf, "%s sniffs sadly.", &op->name);
262 sprintf (buf2, "You sniff sadly. *SNIFF*"); 256 sprintf (buf2, "You sniff sadly. *SNIFF*");
263 break; 257 break;
264 case EMOTE_SNORE: 258 case EMOTE_SNORE:
265 sprintf (buf, "%s snores loudly.", &op->name); 259 sprintf (buf, "%s snores loudly.", &op->name);
266 sprintf (buf2, "Zzzzzzzzzzzzzzz."); 260 sprintf (buf2, "Zzzzzzzzzzzzzzz.");
267 break; 261 break;
268 case EMOTE_SPIT: 262 case EMOTE_SPIT:
269 sprintf (buf, "%s spits over his left shoulder.", &op->name); 263 sprintf (buf, "%s spits over his left shoulder.", &op->name);
270 sprintf (buf2, "You spit over your left shoulder."); 264 sprintf (buf2, "You spit over your left shoulder.");
271 break; 265 break;
272 case EMOTE_STRUT: 266 case EMOTE_STRUT:
273 sprintf (buf, "%s struts proudly.", &op->name); 267 sprintf (buf, "%s struts proudly.", &op->name);
274 sprintf (buf2, "Strut your stuff."); 268 sprintf (buf2, "Strut your stuff.");
275 break; 269 break;
276 case EMOTE_TWIDDLE: 270 case EMOTE_TWIDDLE:
277 sprintf (buf, "%s patiently twiddles his thumbs.", &op->name); 271 sprintf (buf, "%s patiently twiddles his thumbs.", &op->name);
278 sprintf (buf2, "You patiently twiddle your thumbs."); 272 sprintf (buf2, "You patiently twiddle your thumbs.");
279 break; 273 break;
280 case EMOTE_WAVE: 274 case EMOTE_WAVE:
281 sprintf (buf, "%s waves happily.", &op->name); 275 sprintf (buf, "%s waves happily.", &op->name);
282 sprintf (buf2, "You wave."); 276 sprintf (buf2, "You wave.");
283 break; 277 break;
284 case EMOTE_WHISTLE: 278 case EMOTE_WHISTLE:
285 sprintf (buf, "%s whistles appreciatively.", &op->name); 279 sprintf (buf, "%s whistles appreciatively.", &op->name);
286 sprintf (buf2, "You whistle appreciatively."); 280 sprintf (buf2, "You whistle appreciatively.");
287 break; 281 break;
288 case EMOTE_WINK: 282 case EMOTE_WINK:
289 sprintf (buf, "%s winks suggestively.", &op->name); 283 sprintf (buf, "%s winks suggestively.", &op->name);
290 sprintf (buf2, "Have you got something in your eye?"); 284 sprintf (buf2, "Have you got something in your eye?");
291 break; 285 break;
292 case EMOTE_YAWN: 286 case EMOTE_YAWN:
293 sprintf (buf, "%s yawns sleepily.", &op->name); 287 sprintf (buf, "%s yawns sleepily.", &op->name);
294 sprintf (buf2, "You open up your yap and let out a big breeze " "of stale air."); 288 sprintf (buf2, "You open up your yap and let out a big breeze " "of stale air.");
295 break; 289 break;
296 case EMOTE_CRINGE: 290 case EMOTE_CRINGE:
297 sprintf (buf, "%s cringes in terror!", &op->name); 291 sprintf (buf, "%s cringes in terror!", &op->name);
298 sprintf (buf2, "You cringe in terror."); 292 sprintf (buf2, "You cringe in terror.");
299 break; 293 break;
300 case EMOTE_BLEED: 294 case EMOTE_BLEED:
301 sprintf (buf, "%s is bleeding all over the carpet" " - got a spare tourniquet?", &op->name); 295 sprintf (buf, "%s is bleeding all over the carpet" " - got a spare tourniquet?", &op->name);
302 sprintf (buf2, "You bleed all over your nice new armour."); 296 sprintf (buf2, "You bleed all over your nice new armour.");
303 break; 297 break;
304 case EMOTE_THINK: 298 case EMOTE_THINK:
305 sprintf (buf, "%s closes his eyes and thinks really hard.", &op->name); 299 sprintf (buf, "%s closes his eyes and thinks really hard.", &op->name);
306 sprintf (buf2, "Anything in particular that you'd care to think " "about?"); 300 sprintf (buf2, "Anything in particular that you'd care to think " "about?");
307 break; 301 break;
308 default: 302 default:
309 sprintf (buf, "%s dances with glee.", &op->name); 303 sprintf (buf, "%s dances with glee.", &op->name);
310 sprintf (buf2, "You are a nut."); 304 sprintf (buf2, "You are a nut.");
311 break; 305 break;
312 } /*case */ 306 } /*case */
307
313 new_info_map_except (NDI_WHITE, op->map, op, buf); 308 new_info_map_except (NDI_WHITE, op->map, op, buf);
314 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf2); 309 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf2);
315 return (0); 310 return (0);
316 } 311 }
317 else 312 else
318 { 313 {
319 for (pl = first_player; pl != NULL; pl = pl->next) 314 for_all_players (pl)
320 { 315 {
321 if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && 316 if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 &&
322 pl->ob->map == op->map && pl->ob != op && !(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden)) 317 pl->ob->map == op->map && pl->ob != op && !(QUERY_FLAG (pl->ob, FLAG_WIZ) && pl->ob->contr->hidden))
323 { 318 {
324 /* Hidden dms are not affected by emotions */ 319 /* Hidden dms are not affected by emotions */
325 switch (emotion) 320 switch (emotion)
326 { 321 {
327 case EMOTE_NOD: 322 case EMOTE_NOD:
328 sprintf (buf, "You nod solemnly to %s.", &pl->ob->name); 323 sprintf (buf, "You nod solemnly to %s.", &pl->ob->name);
329 sprintf (buf2, "%s nods solemnly to you.", &op->name); 324 sprintf (buf2, "%s nods solemnly to you.", &op->name);
330 sprintf (buf3, "%s nods solemnly to %s.", &op->name, &pl->ob->name); 325 sprintf (buf3, "%s nods solemnly to %s.", &op->name, &pl->ob->name);
331 break; 326 break;
332 case EMOTE_DANCE: 327 case EMOTE_DANCE:
333 sprintf (buf, "You grab %s and begin doing the Cha-Cha!", &pl->ob->name); 328 sprintf (buf, "You grab %s and begin doing the Cha-Cha!", &pl->ob->name);
334 sprintf (buf2, "%s grabs you, and begins dancing!", &op->name); 329 sprintf (buf2, "%s grabs you, and begins dancing!", &op->name);
335 sprintf (buf3, "Yipe! %s and %s are doing the Macarena!", &op->name, &pl->ob->name); 330 sprintf (buf3, "Yipe! %s and %s are doing the Macarena!", &op->name, &pl->ob->name);
336 break; 331 break;
337 case EMOTE_KISS: 332 case EMOTE_KISS:
338 sprintf (buf, "You kiss %s.", &pl->ob->name); 333 sprintf (buf, "You kiss %s.", &pl->ob->name);
339 sprintf (buf2, "%s kisses you.", &op->name); 334 sprintf (buf2, "%s kisses you.", &op->name);
340 sprintf (buf3, "%s kisses %s.", &op->name, &pl->ob->name); 335 sprintf (buf3, "%s kisses %s.", &op->name, &pl->ob->name);
341 break; 336 break;
342 case EMOTE_BOUNCE: 337 case EMOTE_BOUNCE:
343 sprintf (buf, "You bounce around the room with %s.", &pl->ob->name); 338 sprintf (buf, "You bounce around the room with %s.", &pl->ob->name);
344 sprintf (buf2, "%s bounces around the room with you.", &op->name); 339 sprintf (buf2, "%s bounces around the room with you.", &op->name);
345 sprintf (buf3, "%s bounces around the room with %s.", &op->name, &pl->ob->name); 340 sprintf (buf3, "%s bounces around the room with %s.", &op->name, &pl->ob->name);
346 break; 341 break;
347 case EMOTE_SMILE: 342 case EMOTE_SMILE:
348 sprintf (buf, "You smile at %s.", &pl->ob->name); 343 sprintf (buf, "You smile at %s.", &pl->ob->name);
349 sprintf (buf2, "%s smiles at you.", &op->name); 344 sprintf (buf2, "%s smiles at you.", &op->name);
350 sprintf (buf3, "%s beams a smile at %s.", &op->name, &pl->ob->name); 345 sprintf (buf3, "%s beams a smile at %s.", &op->name, &pl->ob->name);
351 break; 346 break;
352 case EMOTE_LAUGH: 347 case EMOTE_LAUGH:
353 sprintf (buf, "You take one look at %s and fall down " "laughing.", &pl->ob->name); 348 sprintf (buf, "You take one look at %s and fall down " "laughing.", &pl->ob->name);
354 sprintf (buf2, "%s looks at you and falls down on the " "ground laughing.", &op->name); 349 sprintf (buf2, "%s looks at you and falls down on the " "ground laughing.", &op->name);
355 sprintf (buf3, "%s looks at %s and falls down on the " "ground laughing.", &op->name, &pl->ob->name); 350 sprintf (buf3, "%s looks at %s and falls down on the " "ground laughing.", &op->name, &pl->ob->name);
356 break; 351 break;
357 case EMOTE_SHAKE: 352 case EMOTE_SHAKE:
358 sprintf (buf, "You shake %s's hand.", &pl->ob->name); 353 sprintf (buf, "You shake %s's hand.", &pl->ob->name);
359 sprintf (buf2, "%s shakes your hand.", &op->name); 354 sprintf (buf2, "%s shakes your hand.", &op->name);
360 sprintf (buf3, "%s shakes %s's hand.", &op->name, &pl->ob->name); 355 sprintf (buf3, "%s shakes %s's hand.", &op->name, &pl->ob->name);
361 break; 356 break;
362 case EMOTE_PUKE: 357 case EMOTE_PUKE:
363 sprintf (buf, "You puke on %s.", &pl->ob->name); 358 sprintf (buf, "You puke on %s.", &pl->ob->name);
364 sprintf (buf2, "%s pukes on your clothes!", &op->name); 359 sprintf (buf2, "%s pukes on your clothes!", &op->name);
365 sprintf (buf3, "%s pukes on %s.", &op->name, &pl->ob->name); 360 sprintf (buf3, "%s pukes on %s.", &op->name, &pl->ob->name);
366 break; 361 break;
367 case EMOTE_HUG: 362 case EMOTE_HUG:
368 sprintf (buf, "You hug %s.", &pl->ob->name); 363 sprintf (buf, "You hug %s.", &pl->ob->name);
369 sprintf (buf2, "%s hugs you.", &op->name); 364 sprintf (buf2, "%s hugs you.", &op->name);
370 sprintf (buf3, "%s hugs %s.", &op->name, &pl->ob->name); 365 sprintf (buf3, "%s hugs %s.", &op->name, &pl->ob->name);
371 break; 366 break;
372 case EMOTE_CRY: 367 case EMOTE_CRY:
373 sprintf (buf, "You cry on %s's shoulder.", &pl->ob->name); 368 sprintf (buf, "You cry on %s's shoulder.", &pl->ob->name);
374 sprintf (buf2, "%s cries on your shoulder.", &op->name); 369 sprintf (buf2, "%s cries on your shoulder.", &op->name);
375 sprintf (buf3, "%s cries on %s's shoulder.", &op->name, &pl->ob->name); 370 sprintf (buf3, "%s cries on %s's shoulder.", &op->name, &pl->ob->name);
376 break; 371 break;
377 case EMOTE_POKE: 372 case EMOTE_POKE:
378 sprintf (buf, "You poke %s in the ribs.", &pl->ob->name); 373 sprintf (buf, "You poke %s in the ribs.", &pl->ob->name);
379 sprintf (buf2, "%s pokes you in the ribs.", &op->name); 374 sprintf (buf2, "%s pokes you in the ribs.", &op->name);
380 sprintf (buf3, "%s pokes %s in the ribs.", &op->name, &pl->ob->name); 375 sprintf (buf3, "%s pokes %s in the ribs.", &op->name, &pl->ob->name);
381 break; 376 break;
382 case EMOTE_ACCUSE: 377 case EMOTE_ACCUSE:
383 sprintf (buf, "You look accusingly at %s.", &pl->ob->name); 378 sprintf (buf, "You look accusingly at %s.", &pl->ob->name);
384 sprintf (buf2, "%s looks accusingly at you.", &op->name); 379 sprintf (buf2, "%s looks accusingly at you.", &op->name);
385 sprintf (buf3, "%s looks accusingly at %s.", &op->name, &pl->ob->name); 380 sprintf (buf3, "%s looks accusingly at %s.", &op->name, &pl->ob->name);
386 break; 381 break;
387 case EMOTE_GRIN: 382 case EMOTE_GRIN:
388 sprintf (buf, "You grin at %s.", &pl->ob->name); 383 sprintf (buf, "You grin at %s.", &pl->ob->name);
389 sprintf (buf2, "%s grins evilly at you.", &op->name); 384 sprintf (buf2, "%s grins evilly at you.", &op->name);
390 sprintf (buf3, "%s grins evilly at %s.", &op->name, &pl->ob->name); 385 sprintf (buf3, "%s grins evilly at %s.", &op->name, &pl->ob->name);
391 break; 386 break;
392 case EMOTE_BOW: 387 case EMOTE_BOW:
393 sprintf (buf, "You bow before %s.", &pl->ob->name); 388 sprintf (buf, "You bow before %s.", &pl->ob->name);
394 sprintf (buf2, "%s bows before you.", &op->name); 389 sprintf (buf2, "%s bows before you.", &op->name);
395 sprintf (buf3, "%s bows before %s.", &op->name, &pl->ob->name); 390 sprintf (buf3, "%s bows before %s.", &op->name, &pl->ob->name);
396 break; 391 break;
397 case EMOTE_FROWN: 392 case EMOTE_FROWN:
398 sprintf (buf, "You frown darkly at %s.", &pl->ob->name); 393 sprintf (buf, "You frown darkly at %s.", &pl->ob->name);
399 sprintf (buf2, "%s frowns darkly at you.", &op->name); 394 sprintf (buf2, "%s frowns darkly at you.", &op->name);
400 sprintf (buf3, "%s frowns darkly at %s.", &op->name, &pl->ob->name); 395 sprintf (buf3, "%s frowns darkly at %s.", &op->name, &pl->ob->name);
401 break; 396 break;
402 case EMOTE_GLARE: 397 case EMOTE_GLARE:
403 sprintf (buf, "You glare icily at %s.", &pl->ob->name); 398 sprintf (buf, "You glare icily at %s.", &pl->ob->name);
404 sprintf (buf2, "%s glares icily at you, you feel cold to" " your bones.", &op->name); 399 sprintf (buf2, "%s glares icily at you, you feel cold to" " your bones.", &op->name);
405 sprintf (buf3, "%s glares at %s.", &op->name, &pl->ob->name); 400 sprintf (buf3, "%s glares at %s.", &op->name, &pl->ob->name);
406 break; 401 break;
407 case EMOTE_LICK: 402 case EMOTE_LICK:
408 sprintf (buf, "You lick %s.", &pl->ob->name); 403 sprintf (buf, "You lick %s.", &pl->ob->name);
409 sprintf (buf2, "%s licks you.", &op->name); 404 sprintf (buf2, "%s licks you.", &op->name);
410 sprintf (buf3, "%s licks %s.", &op->name, &pl->ob->name); 405 sprintf (buf3, "%s licks %s.", &op->name, &pl->ob->name);
411 break; 406 break;
412 case EMOTE_SHRUG: 407 case EMOTE_SHRUG:
413 sprintf (buf, "You shrug at %s.", &pl->ob->name); 408 sprintf (buf, "You shrug at %s.", &pl->ob->name);
414 sprintf (buf2, "%s shrugs at you.", &op->name); 409 sprintf (buf2, "%s shrugs at you.", &op->name);
415 sprintf (buf3, "%s shrugs at %s.", &op->name, &pl->ob->name); 410 sprintf (buf3, "%s shrugs at %s.", &op->name, &pl->ob->name);
416 break; 411 break;
417 case EMOTE_SLAP: 412 case EMOTE_SLAP:
418 sprintf (buf, "You slap %s.", &pl->ob->name); 413 sprintf (buf, "You slap %s.", &pl->ob->name);
419 sprintf (buf2, "You are slapped by %s.", &op->name); 414 sprintf (buf2, "You are slapped by %s.", &op->name);
420 sprintf (buf3, "%s slaps %s.", &op->name, &pl->ob->name); 415 sprintf (buf3, "%s slaps %s.", &op->name, &pl->ob->name);
421 break; 416 break;
422 case EMOTE_SNEEZE: 417 case EMOTE_SNEEZE:
423 sprintf (buf, "You sneeze at %s and a film of snot shoots" " onto him.", &pl->ob->name); 418 sprintf (buf, "You sneeze at %s and a film of snot shoots" " onto him.", &pl->ob->name);
424 sprintf (buf2, "%s sneezes on you, you feel the snot cover" " you. EEEEEEW.", &op->name); 419 sprintf (buf2, "%s sneezes on you, you feel the snot cover" " you. EEEEEEW.", &op->name);
425 sprintf (buf3, "%s sneezes on %s and a film of snot covers" " him.", &op->name, &pl->ob->name); 420 sprintf (buf3, "%s sneezes on %s and a film of snot covers" " him.", &op->name, &pl->ob->name);
426 break; 421 break;
427 case EMOTE_SNIFF: 422 case EMOTE_SNIFF:
428 sprintf (buf, "You sniff %s.", &pl->ob->name); 423 sprintf (buf, "You sniff %s.", &pl->ob->name);
429 sprintf (buf2, "%s sniffs you.", &op->name); 424 sprintf (buf2, "%s sniffs you.", &op->name);
430 sprintf (buf3, "%s sniffs %s", &op->name, &pl->ob->name); 425 sprintf (buf3, "%s sniffs %s", &op->name, &pl->ob->name);
431 break; 426 break;
432 case EMOTE_SPIT: 427 case EMOTE_SPIT:
433 sprintf (buf, "You spit on %s.", &pl->ob->name); 428 sprintf (buf, "You spit on %s.", &pl->ob->name);
434 sprintf (buf2, "%s spits in your face!", &op->name); 429 sprintf (buf2, "%s spits in your face!", &op->name);
435 sprintf (buf3, "%s spits in %s's face.", &op->name, &pl->ob->name); 430 sprintf (buf3, "%s spits in %s's face.", &op->name, &pl->ob->name);
436 break; 431 break;
437 case EMOTE_THANK: 432 case EMOTE_THANK:
438 sprintf (buf, "You thank %s heartily.", &pl->ob->name); 433 sprintf (buf, "You thank %s heartily.", &pl->ob->name);
439 sprintf (buf2, "%s thanks you heartily.", &op->name); 434 sprintf (buf2, "%s thanks you heartily.", &op->name);
440 sprintf (buf3, "%s thanks %s heartily.", &op->name, &pl->ob->name); 435 sprintf (buf3, "%s thanks %s heartily.", &op->name, &pl->ob->name);
441 break; 436 break;
442 case EMOTE_WAVE: 437 case EMOTE_WAVE:
443 sprintf (buf, "You wave goodbye to %s.", &pl->ob->name); 438 sprintf (buf, "You wave goodbye to %s.", &pl->ob->name);
444 sprintf (buf2, "%s waves goodbye to you. Have a good" " journey.", &op->name); 439 sprintf (buf2, "%s waves goodbye to you. Have a good" " journey.", &op->name);
445 sprintf (buf3, "%s waves goodbye to %s.", &op->name, &pl->ob->name); 440 sprintf (buf3, "%s waves goodbye to %s.", &op->name, &pl->ob->name);
446 break; 441 break;
447 case EMOTE_WHISTLE: 442 case EMOTE_WHISTLE:
448 sprintf (buf, "You whistle at %s.", &pl->ob->name); 443 sprintf (buf, "You whistle at %s.", &pl->ob->name);
449 sprintf (buf2, "%s whistles at you.", &op->name); 444 sprintf (buf2, "%s whistles at you.", &op->name);
450 sprintf (buf2, "%s whistles at %s.", &op->name, &pl->ob->name); 445 sprintf (buf2, "%s whistles at %s.", &op->name, &pl->ob->name);
451 break; 446 break;
452 case EMOTE_WINK: 447 case EMOTE_WINK:
453 sprintf (buf, "You wink suggestively at %s.", &pl->ob->name); 448 sprintf (buf, "You wink suggestively at %s.", &pl->ob->name);
454 sprintf (buf2, "%s winks suggestively at you.", &op->name); 449 sprintf (buf2, "%s winks suggestively at you.", &op->name);
455 sprintf (buf2, "%s winks at %s.", &op->name, &pl->ob->name); 450 sprintf (buf2, "%s winks at %s.", &op->name, &pl->ob->name);
456 break; 451 break;
457 case EMOTE_BEG: 452 case EMOTE_BEG:
458 sprintf (buf, "You beg %s for mercy.", &pl->ob->name); 453 sprintf (buf, "You beg %s for mercy.", &pl->ob->name);
459 sprintf (buf2, "%s begs you for mercy! Show no quarter!", &op->name); 454 sprintf (buf2, "%s begs you for mercy! Show no quarter!", &op->name);
460 sprintf (buf2, "%s begs %s for mercy!", &op->name, &pl->ob->name); 455 sprintf (buf2, "%s begs %s for mercy!", &op->name, &pl->ob->name);
461 break; 456 break;
462 case EMOTE_BLEED: 457 case EMOTE_BLEED:
463 sprintf (buf, "You slash your wrist and bleed all over %s", &pl->ob->name); 458 sprintf (buf, "You slash your wrist and bleed all over %s", &pl->ob->name);
464 sprintf (buf2, "%s slashes his wrist and bleeds all over" " you.", &op->name); 459 sprintf (buf2, "%s slashes his wrist and bleeds all over" " you.", &op->name);
465 sprintf (buf2, "%s slashes his wrist and bleeds all " "over %s.", &op->name, &pl->ob->name); 460 sprintf (buf2, "%s slashes his wrist and bleeds all " "over %s.", &op->name, &pl->ob->name);
466 break; 461 break;
467 case EMOTE_CRINGE: 462 case EMOTE_CRINGE:
468 sprintf (buf, "You cringe away from %s.", &pl->ob->name); 463 sprintf (buf, "You cringe away from %s.", &pl->ob->name);
469 sprintf (buf2, "%s cringes away from you.", &op->name); 464 sprintf (buf2, "%s cringes away from you.", &op->name);
470 sprintf (buf2, "%s cringes away from %s in mortal terror.", &op->name, &pl->ob->name); 465 sprintf (buf2, "%s cringes away from %s in mortal terror.", &op->name, &pl->ob->name);
471 break; 466 break;
472 default: 467 default:
473 sprintf (buf, "You are still nuts."); 468 sprintf (buf, "You are still nuts.");
474 sprintf (buf2, "You get the distinct feeling that %s is nuts.", &op->name); 469 sprintf (buf2, "You get the distinct feeling that %s is nuts.", &op->name);
475 sprintf (buf3, "%s is eyeing %s quizzically.", &pl->ob->name, &op->name); 470 sprintf (buf3, "%s is eyeing %s quizzically.", &pl->ob->name, &op->name);
476 break; 471 break;
477 } /*case */ 472 } /*case */
473
478 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); 474 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf);
479 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, pl->ob, buf2); 475 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, pl->ob, buf2);
480 new_info_map_except2 (NDI_WHITE, op->map, op, pl->ob, buf3); 476 new_info_map_except2 (NDI_WHITE, op->map, op, pl->ob, buf3);
481 return (0); 477 return (0);
482 } 478 }
483 if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && pl->ob->map == op->map && pl->ob == op) 479 if (strncasecmp (pl->ob->name, params, MAX_NAME) == 0 && pl->ob->map == op->map && pl->ob == op)
484 { 480 {
485 switch (emotion) 481 switch (emotion)
486 { 482 {
487 case EMOTE_DANCE: 483 case EMOTE_DANCE:
488 sprintf (buf, "You skip and dance around by yourself."); 484 sprintf (buf, "You skip and dance around by yourself.");
489 sprintf (buf2, "%s embraces himself and begins to dance!", &op->name); 485 sprintf (buf2, "%s embraces himself and begins to dance!", &op->name);
490 break; 486 break;
491 case EMOTE_LAUGH: 487 case EMOTE_LAUGH:
492 sprintf (buf, "Laugh at yourself all you want, the others " "won't understand."); 488 sprintf (buf, "Laugh at yourself all you want, the others " "won't understand.");
493 sprintf (buf2, "%s is laughing at something.", &op->name); 489 sprintf (buf2, "%s is laughing at something.", &op->name);
494 break; 490 break;
495 case EMOTE_SHAKE: 491 case EMOTE_SHAKE:
496 sprintf (buf, "You are shaken by yourself."); 492 sprintf (buf, "You are shaken by yourself.");
497 sprintf (buf2, "%s shakes and quivers like a bowlful of " "jelly.", &op->name); 493 sprintf (buf2, "%s shakes and quivers like a bowlful of " "jelly.", &op->name);
498 break; 494 break;
499 case EMOTE_PUKE: 495 case EMOTE_PUKE:
500 sprintf (buf, "You puke on yourself."); 496 sprintf (buf, "You puke on yourself.");
501 sprintf (buf2, "%s pukes on his clothes.", &op->name); 497 sprintf (buf2, "%s pukes on his clothes.", &op->name);
502 break; 498 break;
503 case EMOTE_HUG: 499 case EMOTE_HUG:
504 sprintf (buf, "You hug yourself."); 500 sprintf (buf, "You hug yourself.");
505 sprintf (buf2, "%s hugs himself.", &op->name); 501 sprintf (buf2, "%s hugs himself.", &op->name);
506 break; 502 break;
507 case EMOTE_CRY: 503 case EMOTE_CRY:
508 sprintf (buf, "You cry to yourself."); 504 sprintf (buf, "You cry to yourself.");
509 sprintf (buf2, "%s sobs quietly to himself.", &op->name); 505 sprintf (buf2, "%s sobs quietly to himself.", &op->name);
510 break; 506 break;
511 case EMOTE_POKE: 507 case EMOTE_POKE:
512 sprintf (buf, "You poke yourself in the ribs, feeling very" " silly."); 508 sprintf (buf, "You poke yourself in the ribs, feeling very" " silly.");
513 sprintf (buf2, "%s pokes himself in the ribs, looking very" " sheepish.", &op->name); 509 sprintf (buf2, "%s pokes himself in the ribs, looking very" " sheepish.", &op->name);
514 break; 510 break;
515 case EMOTE_ACCUSE: 511 case EMOTE_ACCUSE:
516 sprintf (buf, "You accuse yourself."); 512 sprintf (buf, "You accuse yourself.");
517 sprintf (buf2, "%s seems to have a bad conscience.", &op->name); 513 sprintf (buf2, "%s seems to have a bad conscience.", &op->name);
518 break; 514 break;
519 case EMOTE_BOW: 515 case EMOTE_BOW:
520 sprintf (buf, "You kiss your toes."); 516 sprintf (buf, "You kiss your toes.");
521 sprintf (buf2, "%s folds up like a jackknife and kisses his" " own toes.", &op->name); 517 sprintf (buf2, "%s folds up like a jackknife and kisses his" " own toes.", &op->name);
522 break; 518 break;
523 case EMOTE_FROWN: 519 case EMOTE_FROWN:
524 sprintf (buf, "You frown at yourself."); 520 sprintf (buf, "You frown at yourself.");
525 sprintf (buf2, "%s frowns at himself.", &op->name); 521 sprintf (buf2, "%s frowns at himself.", &op->name);
526 break; 522 break;
527 case EMOTE_GLARE: 523 case EMOTE_GLARE:
528 sprintf (buf, "You glare icily at your feet, they are " "suddenly very cold."); 524 sprintf (buf, "You glare icily at your feet, they are " "suddenly very cold.");
529 sprintf (buf2, "%s glares at his feet, what is bothering " "him?", &op->name); 525 sprintf (buf2, "%s glares at his feet, what is bothering " "him?", &op->name);
530 break; 526 break;
531 case EMOTE_LICK: 527 case EMOTE_LICK:
532 sprintf (buf, "You lick yourself."); 528 sprintf (buf, "You lick yourself.");
533 sprintf (buf2, "%s licks himself - YUCK.", &op->name); 529 sprintf (buf2, "%s licks himself - YUCK.", &op->name);
534 break; 530 break;
535 case EMOTE_SLAP: 531 case EMOTE_SLAP:
536 sprintf (buf, "You slap yourself, silly you."); 532 sprintf (buf, "You slap yourself, silly you.");
537 sprintf (buf2, "%s slaps himself, really strange...", &op->name); 533 sprintf (buf2, "%s slaps himself, really strange...", &op->name);
538 break; 534 break;
539 case EMOTE_SNEEZE: 535 case EMOTE_SNEEZE:
540 sprintf (buf, "You sneeze on yourself, what a mess!"); 536 sprintf (buf, "You sneeze on yourself, what a mess!");
541 sprintf (buf2, "%s sneezes, and covers himself in a slimy" " substance.", &op->name); 537 sprintf (buf2, "%s sneezes, and covers himself in a slimy" " substance.", &op->name);
542 break; 538 break;
543 case EMOTE_SNIFF: 539 case EMOTE_SNIFF:
544 sprintf (buf, "You sniff yourself."); 540 sprintf (buf, "You sniff yourself.");
545 sprintf (buf2, "%s sniffs himself.", &op->name); 541 sprintf (buf2, "%s sniffs himself.", &op->name);
546 break; 542 break;
547 case EMOTE_SPIT: 543 case EMOTE_SPIT:
548 sprintf (buf, "You drool all over yourself."); 544 sprintf (buf, "You drool all over yourself.");
549 sprintf (buf2, "%s drools all over himself.", &op->name); 545 sprintf (buf2, "%s drools all over himself.", &op->name);
550 break; 546 break;
551 case EMOTE_THANK: 547 case EMOTE_THANK:
552 sprintf (buf, "You thank yourself since nobody else " "wants to!"); 548 sprintf (buf, "You thank yourself since nobody else " "wants to!");
553 sprintf (buf2, "%s thanks himself since you won't.", &op->name); 549 sprintf (buf2, "%s thanks himself since you won't.", &op->name);
554 break; 550 break;
555 case EMOTE_WAVE: 551 case EMOTE_WAVE:
556 sprintf (buf, "Are you going on adventures as well??"); 552 sprintf (buf, "Are you going on adventures as well??");
557 sprintf (buf2, "%s waves goodbye to himself.", &op->name); 553 sprintf (buf2, "%s waves goodbye to himself.", &op->name);
558 break; 554 break;
559 case EMOTE_WHISTLE: 555 case EMOTE_WHISTLE:
560 sprintf (buf, "You whistle while you work."); 556 sprintf (buf, "You whistle while you work.");
561 sprintf (buf2, "%s whistles to himself in boredom.", &op->name); 557 sprintf (buf2, "%s whistles to himself in boredom.", &op->name);
562 break; 558 break;
563 case EMOTE_WINK: 559 case EMOTE_WINK:
564 sprintf (buf, "You wink at yourself?? What are you up to?"); 560 sprintf (buf, "You wink at yourself?? What are you up to?");
565 sprintf (buf2, "%s winks at himself - something strange " "is going on...", &op->name); 561 sprintf (buf2, "%s winks at himself - something strange " "is going on...", &op->name);
566 break; 562 break;
567 case EMOTE_BLEED: 563 case EMOTE_BLEED:
568 sprintf (buf, "Very impressive! You wipe your blood all " "over yourself."); 564 sprintf (buf, "Very impressive! You wipe your blood all " "over yourself.");
569 sprintf (buf2, "%s performs some satanic ritual while " "wiping his blood on himself.", &op->name); 565 sprintf (buf2, "%s performs some satanic ritual while " "wiping his blood on himself.", &op->name);
570 break; 566 break;
571 default: 567 default:
572 sprintf (buf, "My god! is that LEGAL?"); 568 sprintf (buf, "My god! is that LEGAL?");
573 sprintf (buf2, "You look away from %s.", &op->name); 569 sprintf (buf2, "You look away from %s.", &op->name);
574 break; 570 break;
575 } /*case */ 571 } /*case */
576 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf); 572 new_draw_info (NDI_UNIQUE | NDI_WHITE, 0, op, buf);
577 new_info_map_except (NDI_WHITE, op->map, op, buf2); 573 new_info_map_except (NDI_WHITE, op->map, op, buf2);
578 return (0); 574 return (0);
579 } /*if self */ 575 } /*if self */
580 } /*for */ 576 } /*for */
577
581 new_draw_info_format (NDI_UNIQUE, 0, op, "%s is not around.", params); 578 new_draw_info_format (NDI_UNIQUE, 0, op, "%s is not around.", params);
582 return (1); 579 return (1);
583 } /*else */ 580 } /*else */
584 581
585 return (0); 582 return (0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines