Crossfire Server, Trunk
R21670
|
Go to the source code of this file.
Macros | |
#define | DICE 4 |
#define | EMOTE_ACCUSE 18 |
#define | EMOTE_BEG 51 |
#define | EMOTE_BLEED 52 |
#define | EMOTE_BLUSH 22 |
#define | EMOTE_BOUNCE 4 |
#define | EMOTE_BOW 20 |
#define | EMOTE_BURP 23 |
#define | EMOTE_CACKLE 6 |
#define | EMOTE_CHUCKLE 24 |
#define | EMOTE_CLAP 21 |
#define | EMOTE_COUGH 25 |
#define | EMOTE_CRINGE 53 |
#define | EMOTE_CRY 16 |
#define | EMOTE_DANCE 2 |
#define | EMOTE_FIRST 0 |
#define | EMOTE_FLIP 26 |
#define | EMOTE_FROWN 27 |
#define | EMOTE_GASP 28 |
#define | EMOTE_GIGGLE 8 |
#define | EMOTE_GLARE 29 |
#define | EMOTE_GRIN 19 |
#define | EMOTE_GROAN 30 |
#define | EMOTE_GROWL 11 |
#define | EMOTE_HICCUP 31 |
#define | EMOTE_HUG 15 |
#define | EMOTE_KISS 3 |
#define | EMOTE_LAST 55 |
#define | EMOTE_LAUGH 7 |
#define | EMOTE_LICK 32 |
#define | EMOTE_NOD 1 |
#define | EMOTE_POKE 17 |
#define | EMOTE_POUT 33 |
#define | EMOTE_PUKE 10 |
#define | EMOTE_SCREAM 12 |
#define | EMOTE_SHAKE 9 |
#define | EMOTE_SHIVER 34 |
#define | EMOTE_SHRUG 35 |
#define | EMOTE_SIGH 13 |
#define | EMOTE_SLAP 36 |
#define | EMOTE_SMILE 5 |
#define | EMOTE_SMIRK 37 |
#define | EMOTE_SNAP 38 |
#define | EMOTE_SNEEZE 39 |
#define | EMOTE_SNICKER 40 |
#define | EMOTE_SNIFF 41 |
#define | EMOTE_SNORE 42 |
#define | EMOTE_SPIT 43 |
#define | EMOTE_STRUT 44 |
#define | EMOTE_SULK 14 |
#define | EMOTE_THANK 45 |
#define | EMOTE_THINK 54 |
#define | EMOTE_TWIDDLE 46 |
#define | EMOTE_WAVE 47 |
#define | EMOTE_WHISTLE 48 |
#define | EMOTE_WINK 49 |
#define | EMOTE_YAWN 50 |
Functions | |
static void | basic_emote (object *op, const char *params, int emotion) |
void | command_accuse (object *op, const char *params) |
void | command_beg (object *op, const char *params) |
void | command_bleed (object *op, const char *params) |
void | command_blush (object *op, const char *params) |
void | command_bounce (object *op, const char *params) |
void | command_bow (object *op, const char *params) |
void | command_burp (object *op, const char *params) |
void | command_cackle (object *op, const char *params) |
void | command_chat (object *op, const char *params) |
void | command_chuckle (object *op, const char *params) |
void | command_clap (object *op, const char *params) |
void | command_cointoss (object *op, const char *params) |
void | command_cough (object *op, const char *params) |
void | command_cringe (object *op, const char *params) |
void | command_cry (object *op, const char *params) |
void | command_dance (object *op, const char *params) |
void | command_dmtell (object *op, const char *params) |
void | command_flip (object *op, const char *params) |
void | command_frown (object *op, const char *params) |
void | command_gasp (object *op, const char *params) |
void | command_giggle (object *op, const char *params) |
void | command_glare (object *op, const char *params) |
void | command_grin (object *op, const char *params) |
void | command_groan (object *op, const char *params) |
void | command_growl (object *op, const char *params) |
void | command_hiccup (object *op, const char *params) |
void | command_hug (object *op, const char *params) |
void | command_kiss (object *op, const char *params) |
void | command_laugh (object *op, const char *params) |
void | command_lick (object *op, const char *params) |
void | command_me (object *op, const char *params) |
void | command_nod (object *op, const char *params) |
void | command_orcknuckle (object *op, const char *params) |
void | command_poke (object *op, const char *params) |
void | command_pout (object *op, const char *params) |
void | command_puke (object *op, const char *params) |
void | command_reply (object *op, const char *params) |
void | command_say (object *op, const char *params) |
void | command_scream (object *op, const char *params) |
void | command_shake (object *op, const char *params) |
void | command_shiver (object *op, const char *params) |
void | command_shout (object *op, const char *params) |
void | command_shrug (object *op, const char *params) |
void | command_sigh (object *op, const char *params) |
void | command_slap (object *op, const char *params) |
void | command_smile (object *op, const char *params) |
void | command_smirk (object *op, const char *params) |
void | command_snap (object *op, const char *params) |
void | command_sneeze (object *op, const char *params) |
void | command_snicker (object *op, const char *params) |
void | command_sniff (object *op, const char *params) |
void | command_snore (object *op, const char *params) |
void | command_spit (object *op, const char *params) |
void | command_strut (object *op, const char *params) |
void | command_sulk (object *op, const char *params) |
void | command_tell (object *op, const char *params) |
static void | command_tell_all (object *op, const char *params, int pri, int color, int subtype, const char *desc) |
void | command_thank (object *op, const char *params) |
void | command_think (object *op, const char *params) |
void | command_twiddle (object *op, const char *params) |
void | command_wave (object *op, const char *params) |
void | command_whistle (object *op, const char *params) |
void | command_wink (object *op, const char *params) |
void | command_yawn (object *op, const char *params) |
static void | do_tell (object *op, const char *params, int adjust_listen) |
Variables | |
static const char *const | orcknuckle [7] |
static const char * | other_emotes [EMOTE_LAST - 1][3] |
static const char * | self_emotes [EMOTE_LAST - 1][2] |
static const char * | single_emotes [EMOTE_LAST - 1][2] |
All player communication commands, except the 'gsay' one.
Definition in file c_chat.c.
|
static |
This function covers basic emotions a player can have. An emotion can be one of three things currently. Directed at oneself, directed at someone, or directed at nobody. The first set is nobody, the second at someone, and the third is directed at oneself. Every emotion does not have to be filled out in every category. The default case will take care of the ones that are not. Helper functions will call basic_emote with the proper arguments, translating them into commands. Adding a new emotion can be done by editing command.c and command.h. [garbled 09-25-2001]
op | player. |
params | message. |
emotion | emotion code, one of EMOTE_xxx. |
Definition at line 646 of file c_chat.c.
References draw_ext_info(), draw_ext_info_format(), EMOTE_FIRST, EMOTE_LAST, ext_info_map_except(), ext_info_map_except2(), FIND_PLAYER_NO_HIDDEN_DM, find_player_options(), FIND_PLAYER_PARTIAL_NAME, obj::map, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_EMOTE, obj::name, NDI_UNIQUE, NDI_WHITE, pl::ob, and snprintf.
Referenced by command_accuse(), command_beg(), command_bleed(), command_blush(), command_bounce(), command_bow(), command_burp(), command_cackle(), command_chuckle(), command_clap(), command_cough(), command_cringe(), command_cry(), command_dance(), command_flip(), command_frown(), command_gasp(), command_giggle(), command_glare(), command_grin(), command_groan(), command_growl(), command_hiccup(), command_hug(), command_kiss(), command_laugh(), command_lick(), command_nod(), command_poke(), command_pout(), command_puke(), command_scream(), command_shake(), command_shiver(), command_shrug(), command_sigh(), command_slap(), command_smile(), command_smirk(), command_snap(), command_sneeze(), command_snicker(), command_sniff(), command_snore(), command_spit(), command_strut(), command_sulk(), command_thank(), command_think(), command_twiddle(), command_wave(), command_whistle(), command_wink(), and command_yawn().
void command_accuse | ( | object * | op, |
const char * | params | ||
) |
'accuse' command.
op | player. |
params | message. |
Definition at line 908 of file c_chat.c.
References basic_emote(), and EMOTE_ACCUSE.
void command_beg | ( | object * | op, |
const char * | params | ||
) |
'beg' command.
op | player. |
params | message. |
Definition at line 1271 of file c_chat.c.
References basic_emote(), and EMOTE_BEG.
void command_bleed | ( | object * | op, |
const char * | params | ||
) |
'bleed' command.
op | player. |
params | message. |
Definition at line 1282 of file c_chat.c.
References basic_emote(), and EMOTE_BLEED.
void command_blush | ( | object * | op, |
const char * | params | ||
) |
'blush' command.
op | player. |
params | message. |
Definition at line 952 of file c_chat.c.
References basic_emote(), and EMOTE_BLUSH.
void command_bounce | ( | object * | op, |
const char * | params | ||
) |
'bounce' command.
op | player. |
params | message. |
Definition at line 754 of file c_chat.c.
References basic_emote(), and EMOTE_BOUNCE.
void command_bow | ( | object * | op, |
const char * | params | ||
) |
'bow' command.
op | player. |
params | message. |
Definition at line 930 of file c_chat.c.
References basic_emote(), and EMOTE_BOW.
void command_burp | ( | object * | op, |
const char * | params | ||
) |
'burp' command.
op | player. |
params | message. |
Definition at line 963 of file c_chat.c.
References basic_emote(), and EMOTE_BURP.
void command_cackle | ( | object * | op, |
const char * | params | ||
) |
'cackle' command.
op | player. |
params | message. |
Definition at line 776 of file c_chat.c.
References basic_emote(), and EMOTE_CACKLE.
void command_chat | ( | object * | op, |
const char * | params | ||
) |
'chat' command.
op | player. |
params | message. |
Definition at line 220 of file c_chat.c.
References command_tell_all(), MSG_TYPE_COMMUNICATION_CHAT, and NDI_BLUE.
void command_chuckle | ( | object * | op, |
const char * | params | ||
) |
'chuckle' command.
op | player. |
params | message. |
Definition at line 974 of file c_chat.c.
References basic_emote(), and EMOTE_CHUCKLE.
void command_clap | ( | object * | op, |
const char * | params | ||
) |
'clap' command.
op | player. |
params | message. |
Definition at line 941 of file c_chat.c.
References basic_emote(), and EMOTE_CLAP.
void command_cointoss | ( | object * | op, |
const char * | params | ||
) |
'cointoss' command.
op | player. |
params | message. |
Definition at line 64 of file c_chat.c.
References draw_ext_info_format(), ext_info_map_except(), obj::map, MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_RANDOM, obj::name, NDI_UNIQUE, NDI_WHITE, rndm(), and snprintf.
void command_cough | ( | object * | op, |
const char * | params | ||
) |
'cough' command.
op | player. |
params | message. |
Definition at line 985 of file c_chat.c.
References basic_emote(), and EMOTE_COUGH.
void command_cringe | ( | object * | op, |
const char * | params | ||
) |
'cringe' command.
op | player. |
params | message. |
Definition at line 1293 of file c_chat.c.
References basic_emote(), and EMOTE_CRINGE.
void command_cry | ( | object * | op, |
const char * | params | ||
) |
'cry' command.
op | player. |
params | message. |
Definition at line 886 of file c_chat.c.
References basic_emote(), and EMOTE_CRY.
void command_dance | ( | object * | op, |
const char * | params | ||
) |
'dance' command.
op | player. |
params | message. |
Definition at line 732 of file c_chat.c.
References basic_emote(), and EMOTE_DANCE.
void command_dmtell | ( | object * | op, |
const char * | params | ||
) |
void command_flip | ( | object * | op, |
const char * | params | ||
) |
'flip' command.
op | player. |
params | message. |
Definition at line 996 of file c_chat.c.
References basic_emote(), and EMOTE_FLIP.
void command_frown | ( | object * | op, |
const char * | params | ||
) |
'frown' command.
op | player. |
params | message. |
Definition at line 1007 of file c_chat.c.
References basic_emote(), and EMOTE_FROWN.
void command_gasp | ( | object * | op, |
const char * | params | ||
) |
'gasp' command.
op | player. |
params | message. |
Definition at line 1018 of file c_chat.c.
References basic_emote(), and EMOTE_GASP.
void command_giggle | ( | object * | op, |
const char * | params | ||
) |
'giggle' command.
op | player. |
params | message. |
Definition at line 798 of file c_chat.c.
References basic_emote(), and EMOTE_GIGGLE.
void command_glare | ( | object * | op, |
const char * | params | ||
) |
'glare' command.
op | player. |
params | message. |
Definition at line 1029 of file c_chat.c.
References basic_emote(), and EMOTE_GLARE.
void command_grin | ( | object * | op, |
const char * | params | ||
) |
'grin' command.
op | player. |
params | message. |
Definition at line 919 of file c_chat.c.
References basic_emote(), and EMOTE_GRIN.
void command_groan | ( | object * | op, |
const char * | params | ||
) |
'groan' command.
op | player. |
params | message. |
Definition at line 1040 of file c_chat.c.
References basic_emote(), and EMOTE_GROAN.
void command_growl | ( | object * | op, |
const char * | params | ||
) |
'growl' command.
op | player. |
params | message. |
Definition at line 831 of file c_chat.c.
References basic_emote(), and EMOTE_GROWL.
void command_hiccup | ( | object * | op, |
const char * | params | ||
) |
'hiccup' command.
op | player. |
params | message. |
Definition at line 1051 of file c_chat.c.
References basic_emote(), and EMOTE_HICCUP.
void command_hug | ( | object * | op, |
const char * | params | ||
) |
'hug' command.
op | player. |
params | message. |
Definition at line 875 of file c_chat.c.
References basic_emote(), and EMOTE_HUG.
void command_kiss | ( | object * | op, |
const char * | params | ||
) |
'kiss' command.
op | player. |
params | message. |
Definition at line 743 of file c_chat.c.
References basic_emote(), and EMOTE_KISS.
void command_laugh | ( | object * | op, |
const char * | params | ||
) |
'laugh' command.
op | player. |
params | message. |
Definition at line 787 of file c_chat.c.
References basic_emote(), and EMOTE_LAUGH.
void command_lick | ( | object * | op, |
const char * | params | ||
) |
'lick' command.
op | player. |
params | message. |
Definition at line 1062 of file c_chat.c.
References basic_emote(), and EMOTE_LICK.
void command_me | ( | object * | op, |
const char * | params | ||
) |
'me' command.
op | player. |
params | message. |
Definition at line 47 of file c_chat.c.
References ext_info_map(), obj::map, MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_ME, obj::name, NDI_BLUE, NDI_UNIQUE, and snprintf.
void command_nod | ( | object * | op, |
const char * | params | ||
) |
'nod' command.
op | player. |
params | message. |
Definition at line 721 of file c_chat.c.
References basic_emote(), and EMOTE_NOD.
void command_orcknuckle | ( | object * | op, |
const char * | params | ||
) |
Plays the "orcknucke" game.
If there is an "dice" archetype in server arches, this command will require the player to have at least 4 dice to play. There is a 5% chance to lose one dice at each play. Dice can be made through alchemy (finding the recipe is left as an exercice to the player). Note that the check is on the name 'dice', so you can have multiple archetypes for that name, they'll be all taken into account.
op | player who plays. |
params | string sent by the player. Ignored. |
void command_poke | ( | object * | op, |
const char * | params | ||
) |
'poke' command.
op | player. |
params | message. |
Definition at line 897 of file c_chat.c.
References basic_emote(), and EMOTE_POKE.
void command_pout | ( | object * | op, |
const char * | params | ||
) |
'pout' command.
op | player. |
params | message. |
Definition at line 1073 of file c_chat.c.
References basic_emote(), and EMOTE_POUT.
void command_puke | ( | object * | op, |
const char * | params | ||
) |
'puke' command.
op | player. |
params | message. |
Definition at line 820 of file c_chat.c.
References basic_emote(), and EMOTE_PUKE.
void command_reply | ( | object * | op, |
const char * | params | ||
) |
Reply to last person who told you something [mids 01/14/2002]
Must have been told something by someone first.
op | who is telling. |
params | message to say. |
Definition at line 335 of file c_chat.c.
References obj::contr, draw_ext_info(), draw_ext_info_format(), find_player(), FLAG_WIZ, pl::hidden, pl::last_tell, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, obj::name, NDI_ORANGE, NDI_UNIQUE, pl::ob, QUERY_FLAG, and safe_strncpy.
void command_say | ( | object * | op, |
const char * | params | ||
) |
'say' command.
op | player. |
params | message. |
Definition at line 34 of file c_chat.c.
References monster_communicate().
Referenced by cfapi_object_say().
void command_scream | ( | object * | op, |
const char * | params | ||
) |
'scream' command.
op | player. |
params | message. |
Definition at line 842 of file c_chat.c.
References basic_emote(), and EMOTE_SCREAM.
void command_shake | ( | object * | op, |
const char * | params | ||
) |
'shake' command.
op | player. |
params | message. |
Definition at line 809 of file c_chat.c.
References basic_emote(), and EMOTE_SHAKE.
void command_shiver | ( | object * | op, |
const char * | params | ||
) |
'shiver' command.
op | player. |
params | message. |
Definition at line 1084 of file c_chat.c.
References basic_emote(), and EMOTE_SHIVER.
void command_shout | ( | object * | op, |
const char * | params | ||
) |
'shout' command.
op | player. |
params | message. |
Definition at line 209 of file c_chat.c.
References command_tell_all(), MSG_TYPE_COMMUNICATION_SHOUT, and NDI_RED.
void command_shrug | ( | object * | op, |
const char * | params | ||
) |
'shrug' command.
op | player. |
params | message. |
Definition at line 1095 of file c_chat.c.
References basic_emote(), and EMOTE_SHRUG.
void command_sigh | ( | object * | op, |
const char * | params | ||
) |
'sigh' command.
op | player. |
params | message. |
Definition at line 853 of file c_chat.c.
References basic_emote(), and EMOTE_SIGH.
void command_slap | ( | object * | op, |
const char * | params | ||
) |
'slap' command.
op | player. |
params | message. |
Definition at line 1106 of file c_chat.c.
References basic_emote(), and EMOTE_SLAP.
void command_smile | ( | object * | op, |
const char * | params | ||
) |
'smile' command.
op | player. |
params | message. |
Definition at line 765 of file c_chat.c.
References basic_emote(), and EMOTE_SMILE.
void command_smirk | ( | object * | op, |
const char * | params | ||
) |
'smirk' command.
op | player. |
params | message. |
Definition at line 1117 of file c_chat.c.
References basic_emote(), and EMOTE_SMIRK.
void command_snap | ( | object * | op, |
const char * | params | ||
) |
'snap' command.
op | player. |
params | message. |
Definition at line 1128 of file c_chat.c.
References basic_emote(), and EMOTE_SNAP.
void command_sneeze | ( | object * | op, |
const char * | params | ||
) |
'sneeze' command.
op | player. |
params | message. |
Definition at line 1139 of file c_chat.c.
References basic_emote(), and EMOTE_SNEEZE.
void command_snicker | ( | object * | op, |
const char * | params | ||
) |
'snicker' command.
op | player. |
params | message. |
Definition at line 1150 of file c_chat.c.
References basic_emote(), and EMOTE_SNICKER.
void command_sniff | ( | object * | op, |
const char * | params | ||
) |
'sniff' command.
op | player. |
params | message. |
Definition at line 1161 of file c_chat.c.
References basic_emote(), and EMOTE_SNIFF.
void command_snore | ( | object * | op, |
const char * | params | ||
) |
'snore' command.
op | player. |
params | message. |
Definition at line 1172 of file c_chat.c.
References basic_emote(), and EMOTE_SNORE.
void command_spit | ( | object * | op, |
const char * | params | ||
) |
'spit' command.
op | player. |
params | message. |
Definition at line 1183 of file c_chat.c.
References basic_emote(), and EMOTE_SPIT.
void command_strut | ( | object * | op, |
const char * | params | ||
) |
'strut' command.
op | player. |
params | message. |
Definition at line 1194 of file c_chat.c.
References basic_emote(), and EMOTE_STRUT.
void command_sulk | ( | object * | op, |
const char * | params | ||
) |
'sulk' command.
op | player. |
params | message. |
Definition at line 864 of file c_chat.c.
References basic_emote(), and EMOTE_SULK.
void command_tell | ( | object * | op, |
const char * | params | ||
) |
|
static |
Utility function for chat or shout.
op | player. |
params | message. |
pri | message priority. |
color | message color. |
subtype | message subtype. |
desc | 'chat' or 'shouts', will be appened after the player's name and before a :. |
Definition at line 181 of file c_chat.c.
References obj::contr, draw_ext_info(), draw_ext_info_format(), EVENT_SHOUT, execute_global_event(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, obj::name, NDI_ALL, NDI_UNIQUE, and pl::no_shout.
Referenced by command_chat(), and command_shout().
void command_thank | ( | object * | op, |
const char * | params | ||
) |
'thank' command.
op | player. |
params | message. |
Definition at line 1205 of file c_chat.c.
References basic_emote(), and EMOTE_THANK.
void command_think | ( | object * | op, |
const char * | params | ||
) |
'think' command.
op | player. |
params | message. |
Definition at line 1304 of file c_chat.c.
References basic_emote(), and EMOTE_THINK.
void command_twiddle | ( | object * | op, |
const char * | params | ||
) |
'twiddle' command.
op | player. |
params | message. |
Definition at line 1216 of file c_chat.c.
References basic_emote(), and EMOTE_TWIDDLE.
void command_wave | ( | object * | op, |
const char * | params | ||
) |
'wave' command.
op | player. |
params | message. |
Definition at line 1227 of file c_chat.c.
References basic_emote(), and EMOTE_WAVE.
void command_whistle | ( | object * | op, |
const char * | params | ||
) |
'whistle' command.
op | player. |
params | message. |
Definition at line 1238 of file c_chat.c.
References basic_emote(), and EMOTE_WHISTLE.
void command_wink | ( | object * | op, |
const char * | params | ||
) |
'wink' command.
op | player. |
params | message. |
Definition at line 1249 of file c_chat.c.
References basic_emote(), and EMOTE_WINK.
void command_yawn | ( | object * | op, |
const char * | params | ||
) |
'yawn' command.
op | player. |
params | message. |
Definition at line 1260 of file c_chat.c.
References basic_emote(), and EMOTE_YAWN.
|
static |
Actual function sending a private message.
op | player trying to tell something to someone. |
params | who to tell, and message |
adjust_listen | if non-zero, recipient can't ignore the message through 'listen' levels. |
Definition at line 234 of file c_chat.c.
References draw_ext_info(), draw_ext_info_format(), EVENT_TELL, execute_global_event(), find_player_partial_name(), FLAG_WIZ, pl::hidden, pl::last_tell, pl::listening, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, obj::name, archt::name, NDI_ORANGE, NDI_UNIQUE, pl::ob, QUERY_FLAG, snprintf, and strlcpy().
Referenced by command_dmtell(), and command_tell().
|
static |
|
static |
Emote texts when the player applies the emote to someone else. Three strings, first is sent to the player, second to the recipient, third to others. The first two must contain s (player's name), second must contain 2 s (player and victim's name). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.
|
static |
Emote texts when the player applies the emote to herself. Two strings, first is sent to the player, second to other players (must contain s). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.
|
static |
Emote texts when the player does not specify who to apply the emote. Two strings, first is sent to the player herself, second to other players (must contain s). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.