Crossfire Server  1.75.0
c_chat.cpp File Reference

All player communication commands, except the 'gsay' one. More...

#include "global.h"
#include <stdlib.h>
#include <string.h>
#include "loader.h"
#include "sproto.h"

Go to the source code of this file.

Macros

#define DICE   4
 How many dice to roll for orcknuckle. More...
 
#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)
 This function covers basic emotions a player can have. More...
 
void command_accuse (object *op, const char *params)
 'accuse' command. More...
 
void command_beg (object *op, const char *params)
 'beg' command. More...
 
void command_bleed (object *op, const char *params)
 'bleed' command. More...
 
void command_blush (object *op, const char *params)
 'blush' command. More...
 
void command_bounce (object *op, const char *params)
 'bounce' command. More...
 
void command_bow (object *op, const char *params)
 'bow' command. More...
 
void command_burp (object *op, const char *params)
 'burp' command. More...
 
void command_cackle (object *op, const char *params)
 'cackle' command. More...
 
void command_chat (object *op, const char *params)
 'chat' command. More...
 
void command_chuckle (object *op, const char *params)
 'chuckle' command. More...
 
void command_clap (object *op, const char *params)
 'clap' command. More...
 
void command_cointoss (object *op, const char *params)
 'cointoss' command. More...
 
void command_cough (object *op, const char *params)
 'cough' command. More...
 
void command_cringe (object *op, const char *params)
 'cringe' command. More...
 
void command_cry (object *op, const char *params)
 'cry' command. More...
 
void command_dance (object *op, const char *params)
 'dance' command. More...
 
void command_dmtell (object *op, const char *params)
 Private communication, by a DM (can't be ignored by player). More...
 
void command_flip (object *op, const char *params)
 'flip' command. More...
 
void command_frown (object *op, const char *params)
 'frown' command. More...
 
void command_gasp (object *op, const char *params)
 'gasp' command. More...
 
void command_giggle (object *op, const char *params)
 'giggle' command. More...
 
void command_glare (object *op, const char *params)
 'glare' command. More...
 
void command_grin (object *op, const char *params)
 'grin' command. More...
 
void command_groan (object *op, const char *params)
 'groan' command. More...
 
void command_growl (object *op, const char *params)
 'growl' command. More...
 
void command_hiccup (object *op, const char *params)
 'hiccup' command. More...
 
void command_hug (object *op, const char *params)
 'hug' command. More...
 
void command_kiss (object *op, const char *params)
 'kiss' command. More...
 
void command_laugh (object *op, const char *params)
 'laugh' command. More...
 
void command_lick (object *op, const char *params)
 'lick' command. More...
 
void command_me (object *op, const char *params)
 'me' command. More...
 
void command_nod (object *op, const char *params)
 'nod' command. More...
 
void command_orcknuckle (object *op, const char *params)
 Plays the "orcknucke" game. More...
 
void command_poke (object *op, const char *params)
 'poke' command. More...
 
void command_pout (object *op, const char *params)
 'pout' command. More...
 
void command_puke (object *op, const char *params)
 'puke' command. More...
 
void command_reply (object *op, const char *params)
 Reply to last person who told you something [mids 01/14/2002]. More...
 
void command_say (object *op, const char *params)
 'say' command. More...
 
void command_scream (object *op, const char *params)
 'scream' command. More...
 
void command_shake (object *op, const char *params)
 'shake' command. More...
 
void command_shiver (object *op, const char *params)
 'shiver' command. More...
 
void command_shout (object *op, const char *params)
 'shout' command. More...
 
void command_shrug (object *op, const char *params)
 'shrug' command. More...
 
void command_sigh (object *op, const char *params)
 'sigh' command. More...
 
void command_slap (object *op, const char *params)
 'slap' command. More...
 
void command_smile (object *op, const char *params)
 'smile' command. More...
 
void command_smirk (object *op, const char *params)
 'smirk' command. More...
 
void command_snap (object *op, const char *params)
 'snap' command. More...
 
void command_sneeze (object *op, const char *params)
 'sneeze' command. More...
 
void command_snicker (object *op, const char *params)
 'snicker' command. More...
 
void command_sniff (object *op, const char *params)
 'sniff' command. More...
 
void command_snore (object *op, const char *params)
 'snore' command. More...
 
void command_spit (object *op, const char *params)
 'spit' command. More...
 
void command_strut (object *op, const char *params)
 'strut' command. More...
 
void command_sulk (object *op, const char *params)
 'sulk' command. More...
 
void command_tell (object *op, const char *params)
 Private communication. More...
 
static void command_tell_all (object *op, const char *params, int pri, int color, int subtype, const char *desc)
 Utility function for chat or shout. More...
 
void command_thank (object *op, const char *params)
 'thank' command. More...
 
void command_think (object *op, const char *params)
 'think' command. More...
 
void command_twiddle (object *op, const char *params)
 'twiddle' command. More...
 
void command_wave (object *op, const char *params)
 'wave' command. More...
 
void command_whistle (object *op, const char *params)
 'whistle' command. More...
 
void command_wink (object *op, const char *params)
 'wink' command. More...
 
void command_yawn (object *op, const char *params)
 'yawn' command. More...
 
static void do_tell (object *op, const char *params, int adjust_listen)
 Actual function sending a private message. More...
 

Variables

static const char *const orcknuckle [7]
 Results for the "orcknucle" game. More...
 
static const char * other_emotes [EMOTE_LAST - 1][3]
 Emote texts when the player applies the emote to someone else. More...
 
static const char * self_emotes [EMOTE_LAST - 1][2]
 Emote texts when the player applies the emote to herself. More...
 
static const char * single_emotes [EMOTE_LAST - 1][2]
 Emote texts when the player does not specify who to apply the emote. More...
 

Detailed Description

All player communication commands, except the 'gsay' one.

Definition in file c_chat.cpp.

Macro Definition Documentation

◆ DICE

#define DICE   4

How many dice to roll for orcknuckle.

Definition at line 91 of file c_chat.cpp.

Function Documentation

◆ basic_emote()

static void basic_emote ( object op,
const char *  params,
int  emotion 
)
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]

Parameters
opplayer.
paramsmessage.
emotionemotion code, one of EMOTE_xxx.
Todo:
simplify function (indexed array, for instance).

Definition at line 647 of file c_chat.cpp.

References buf, 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, object::map, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_EMOTE, object::name, NDI_UNIQUE, NDI_WHITE, and player::ob.

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().

◆ command_accuse()

void command_accuse ( object op,
const char *  params 
)

'accuse' command.

Parameters
opplayer.
paramsmessage.

Definition at line 909 of file c_chat.cpp.

References basic_emote(), and EMOTE_ACCUSE.

Referenced by commands_init().

◆ command_beg()

void command_beg ( object op,
const char *  params 
)

'beg' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1272 of file c_chat.cpp.

References basic_emote(), and EMOTE_BEG.

Referenced by commands_init().

◆ command_bleed()

void command_bleed ( object op,
const char *  params 
)

'bleed' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1283 of file c_chat.cpp.

References basic_emote(), and EMOTE_BLEED.

Referenced by commands_init().

◆ command_blush()

void command_blush ( object op,
const char *  params 
)

'blush' command.

Parameters
opplayer.
paramsmessage.

Definition at line 953 of file c_chat.cpp.

References basic_emote(), and EMOTE_BLUSH.

Referenced by commands_init().

◆ command_bounce()

void command_bounce ( object op,
const char *  params 
)

'bounce' command.

Parameters
opplayer.
paramsmessage.

Definition at line 755 of file c_chat.cpp.

References basic_emote(), and EMOTE_BOUNCE.

Referenced by commands_init().

◆ command_bow()

void command_bow ( object op,
const char *  params 
)

'bow' command.

Parameters
opplayer.
paramsmessage.

Definition at line 931 of file c_chat.cpp.

References basic_emote(), and EMOTE_BOW.

Referenced by commands_init().

◆ command_burp()

void command_burp ( object op,
const char *  params 
)

'burp' command.

Parameters
opplayer.
paramsmessage.

Definition at line 964 of file c_chat.cpp.

References basic_emote(), and EMOTE_BURP.

Referenced by commands_init().

◆ command_cackle()

void command_cackle ( object op,
const char *  params 
)

'cackle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 777 of file c_chat.cpp.

References basic_emote(), and EMOTE_CACKLE.

Referenced by commands_init().

◆ command_chat()

void command_chat ( object op,
const char *  params 
)

'chat' command.

Parameters
opplayer.
paramsmessage.

Definition at line 221 of file c_chat.cpp.

References command_tell_all(), MSG_TYPE_COMMUNICATION_CHAT, and NDI_BLUE.

Referenced by commands_init().

◆ command_chuckle()

void command_chuckle ( object op,
const char *  params 
)

'chuckle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 975 of file c_chat.cpp.

References basic_emote(), and EMOTE_CHUCKLE.

Referenced by commands_init().

◆ command_clap()

void command_clap ( object op,
const char *  params 
)

'clap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 942 of file c_chat.cpp.

References basic_emote(), and EMOTE_CLAP.

Referenced by commands_init().

◆ command_cointoss()

void command_cointoss ( object op,
const char *  params 
)

'cointoss' command.

Parameters
opplayer.
paramsmessage.

Definition at line 64 of file c_chat.cpp.

References buf, draw_ext_info_format(), ext_info_map_except(), object::map, MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_RANDOM, object::name, NDI_UNIQUE, NDI_WHITE, and rndm().

Referenced by commands_init().

◆ command_cough()

void command_cough ( object op,
const char *  params 
)

'cough' command.

Parameters
opplayer.
paramsmessage.

Definition at line 986 of file c_chat.cpp.

References basic_emote(), and EMOTE_COUGH.

Referenced by commands_init().

◆ command_cringe()

void command_cringe ( object op,
const char *  params 
)

'cringe' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1294 of file c_chat.cpp.

References basic_emote(), and EMOTE_CRINGE.

Referenced by commands_init().

◆ command_cry()

void command_cry ( object op,
const char *  params 
)

'cry' command.

Parameters
opplayer.
paramsmessage.

Definition at line 887 of file c_chat.cpp.

References basic_emote(), and EMOTE_CRY.

Referenced by commands_init().

◆ command_dance()

void command_dance ( object op,
const char *  params 
)

'dance' command.

Parameters
opplayer.
paramsmessage.

Definition at line 733 of file c_chat.cpp.

References basic_emote(), and EMOTE_DANCE.

Referenced by commands_init().

◆ command_dmtell()

void command_dmtell ( object op,
const char *  params 
)

Private communication, by a DM (can't be ignored by player).

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message.

Definition at line 320 of file c_chat.cpp.

References do_tell().

Referenced by commands_init().

◆ command_flip()

void command_flip ( object op,
const char *  params 
)

'flip' command.

Parameters
opplayer.
paramsmessage.

Definition at line 997 of file c_chat.cpp.

References basic_emote(), and EMOTE_FLIP.

Referenced by commands_init().

◆ command_frown()

void command_frown ( object op,
const char *  params 
)

'frown' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1008 of file c_chat.cpp.

References basic_emote(), and EMOTE_FROWN.

Referenced by commands_init().

◆ command_gasp()

void command_gasp ( object op,
const char *  params 
)

'gasp' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1019 of file c_chat.cpp.

References basic_emote(), and EMOTE_GASP.

Referenced by commands_init().

◆ command_giggle()

void command_giggle ( object op,
const char *  params 
)

'giggle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 799 of file c_chat.cpp.

References basic_emote(), and EMOTE_GIGGLE.

Referenced by commands_init().

◆ command_glare()

void command_glare ( object op,
const char *  params 
)

'glare' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1030 of file c_chat.cpp.

References basic_emote(), and EMOTE_GLARE.

Referenced by commands_init().

◆ command_grin()

void command_grin ( object op,
const char *  params 
)

'grin' command.

Parameters
opplayer.
paramsmessage.

Definition at line 920 of file c_chat.cpp.

References basic_emote(), and EMOTE_GRIN.

Referenced by commands_init().

◆ command_groan()

void command_groan ( object op,
const char *  params 
)

'groan' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1041 of file c_chat.cpp.

References basic_emote(), and EMOTE_GROAN.

Referenced by commands_init().

◆ command_growl()

void command_growl ( object op,
const char *  params 
)

'growl' command.

Parameters
opplayer.
paramsmessage.

Definition at line 832 of file c_chat.cpp.

References basic_emote(), and EMOTE_GROWL.

Referenced by commands_init().

◆ command_hiccup()

void command_hiccup ( object op,
const char *  params 
)

'hiccup' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1052 of file c_chat.cpp.

References basic_emote(), and EMOTE_HICCUP.

Referenced by commands_init().

◆ command_hug()

void command_hug ( object op,
const char *  params 
)

'hug' command.

Parameters
opplayer.
paramsmessage.

Definition at line 876 of file c_chat.cpp.

References basic_emote(), and EMOTE_HUG.

Referenced by commands_init().

◆ command_kiss()

void command_kiss ( object op,
const char *  params 
)

'kiss' command.

Parameters
opplayer.
paramsmessage.

Definition at line 744 of file c_chat.cpp.

References basic_emote(), and EMOTE_KISS.

Referenced by commands_init().

◆ command_laugh()

void command_laugh ( object op,
const char *  params 
)

'laugh' command.

Parameters
opplayer.
paramsmessage.

Definition at line 788 of file c_chat.cpp.

References basic_emote(), and EMOTE_LAUGH.

Referenced by commands_init().

◆ command_lick()

void command_lick ( object op,
const char *  params 
)

'lick' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1063 of file c_chat.cpp.

References basic_emote(), and EMOTE_LICK.

Referenced by commands_init().

◆ command_me()

void command_me ( object op,
const char *  params 
)

'me' command.

Parameters
opplayer.
paramsmessage.

Definition at line 47 of file c_chat.cpp.

References buf, ext_info_map(), object::map, MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_ME, object::name, NDI_BLUE, and NDI_UNIQUE.

Referenced by commands_init().

◆ command_nod()

void command_nod ( object op,
const char *  params 
)

'nod' command.

Parameters
opplayer.
paramsmessage.

Definition at line 722 of file c_chat.cpp.

References basic_emote(), and EMOTE_NOD.

Referenced by commands_init().

◆ command_orcknuckle()

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.

Parameters
opplayer who plays.
paramsstring sent by the player. Ignored.

Definition at line 108 of file c_chat.cpp.

Referenced by commands_init().

◆ command_poke()

void command_poke ( object op,
const char *  params 
)

'poke' command.

Parameters
opplayer.
paramsmessage.

Definition at line 898 of file c_chat.cpp.

References basic_emote(), and EMOTE_POKE.

Referenced by commands_init().

◆ command_pout()

void command_pout ( object op,
const char *  params 
)

'pout' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1074 of file c_chat.cpp.

References basic_emote(), and EMOTE_POUT.

Referenced by commands_init().

◆ command_puke()

void command_puke ( object op,
const char *  params 
)

'puke' command.

Parameters
opplayer.
paramsmessage.

Definition at line 821 of file c_chat.cpp.

References basic_emote(), and EMOTE_PUKE.

Referenced by commands_init().

◆ command_reply()

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.

Parameters
opwho is telling.
paramsmessage to say.
Returns
1.

Definition at line 336 of file c_chat.cpp.

References object::contr, draw_ext_info(), draw_ext_info_format(), find_player(), FLAG_WIZ, player::hidden, player::last_tell, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, object::name, NDI_ORANGE, NDI_UNIQUE, player::ob, QUERY_FLAG, and safe_strncpy.

Referenced by commands_init().

◆ command_say()

void command_say ( object op,
const char *  params 
)

'say' command.

Parameters
opplayer.
paramsmessage.

Definition at line 34 of file c_chat.cpp.

References monster_communicate().

Referenced by cfapi_object_say(), and commands_init().

◆ command_scream()

void command_scream ( object op,
const char *  params 
)

'scream' command.

Parameters
opplayer.
paramsmessage.

Definition at line 843 of file c_chat.cpp.

References basic_emote(), and EMOTE_SCREAM.

Referenced by commands_init().

◆ command_shake()

void command_shake ( object op,
const char *  params 
)

'shake' command.

Parameters
opplayer.
paramsmessage.

Definition at line 810 of file c_chat.cpp.

References basic_emote(), and EMOTE_SHAKE.

Referenced by commands_init().

◆ command_shiver()

void command_shiver ( object op,
const char *  params 
)

'shiver' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1085 of file c_chat.cpp.

References basic_emote(), and EMOTE_SHIVER.

Referenced by commands_init().

◆ command_shout()

void command_shout ( object op,
const char *  params 
)

'shout' command.

Parameters
opplayer.
paramsmessage.

Definition at line 210 of file c_chat.cpp.

References command_tell_all(), MSG_TYPE_COMMUNICATION_SHOUT, and NDI_RED.

Referenced by commands_init().

◆ command_shrug()

void command_shrug ( object op,
const char *  params 
)

'shrug' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1096 of file c_chat.cpp.

References basic_emote(), and EMOTE_SHRUG.

Referenced by commands_init().

◆ command_sigh()

void command_sigh ( object op,
const char *  params 
)

'sigh' command.

Parameters
opplayer.
paramsmessage.

Definition at line 854 of file c_chat.cpp.

References basic_emote(), and EMOTE_SIGH.

Referenced by commands_init().

◆ command_slap()

void command_slap ( object op,
const char *  params 
)

'slap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1107 of file c_chat.cpp.

References basic_emote(), and EMOTE_SLAP.

Referenced by commands_init().

◆ command_smile()

void command_smile ( object op,
const char *  params 
)

'smile' command.

Parameters
opplayer.
paramsmessage.

Definition at line 766 of file c_chat.cpp.

References basic_emote(), and EMOTE_SMILE.

Referenced by commands_init().

◆ command_smirk()

void command_smirk ( object op,
const char *  params 
)

'smirk' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1118 of file c_chat.cpp.

References basic_emote(), and EMOTE_SMIRK.

Referenced by commands_init().

◆ command_snap()

void command_snap ( object op,
const char *  params 
)

'snap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1129 of file c_chat.cpp.

References basic_emote(), and EMOTE_SNAP.

Referenced by commands_init().

◆ command_sneeze()

void command_sneeze ( object op,
const char *  params 
)

'sneeze' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1140 of file c_chat.cpp.

References basic_emote(), and EMOTE_SNEEZE.

Referenced by commands_init().

◆ command_snicker()

void command_snicker ( object op,
const char *  params 
)

'snicker' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1151 of file c_chat.cpp.

References basic_emote(), and EMOTE_SNICKER.

Referenced by commands_init().

◆ command_sniff()

void command_sniff ( object op,
const char *  params 
)

'sniff' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1162 of file c_chat.cpp.

References basic_emote(), and EMOTE_SNIFF.

Referenced by commands_init().

◆ command_snore()

void command_snore ( object op,
const char *  params 
)

'snore' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1173 of file c_chat.cpp.

References basic_emote(), and EMOTE_SNORE.

Referenced by commands_init().

◆ command_spit()

void command_spit ( object op,
const char *  params 
)

'spit' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1184 of file c_chat.cpp.

References basic_emote(), and EMOTE_SPIT.

Referenced by commands_init().

◆ command_strut()

void command_strut ( object op,
const char *  params 
)

'strut' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1195 of file c_chat.cpp.

References basic_emote(), and EMOTE_STRUT.

Referenced by commands_init().

◆ command_sulk()

void command_sulk ( object op,
const char *  params 
)

'sulk' command.

Parameters
opplayer.
paramsmessage.

Definition at line 865 of file c_chat.cpp.

References basic_emote(), and EMOTE_SULK.

Referenced by commands_init().

◆ command_tell()

void command_tell ( object op,
const char *  params 
)

Private communication.

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message.

Definition at line 308 of file c_chat.cpp.

References do_tell().

Referenced by commands_init().

◆ command_tell_all()

static void command_tell_all ( object op,
const char *  params,
int  pri,
int  color,
int  subtype,
const char *  desc 
)
static

Utility function for chat or shout.

Parameters
opplayer.
paramsmessage.
primessage priority.
colormessage color.
subtypemessage subtype.
desc'chat' or 'shouts', will be appened after the player's name and before a :.

Definition at line 183 of file c_chat.cpp.

References object::contr, draw_ext_info(), draw_ext_info_format(), EVENT_SHOUT, events_execute_global_event(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, object::name, NDI_ALL, NDI_UNIQUE, and player::no_shout.

Referenced by command_chat(), and command_shout().

◆ command_thank()

void command_thank ( object op,
const char *  params 
)

'thank' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1206 of file c_chat.cpp.

References basic_emote(), and EMOTE_THANK.

Referenced by commands_init().

◆ command_think()

void command_think ( object op,
const char *  params 
)

'think' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1305 of file c_chat.cpp.

References basic_emote(), and EMOTE_THINK.

Referenced by commands_init().

◆ command_twiddle()

void command_twiddle ( object op,
const char *  params 
)

'twiddle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1217 of file c_chat.cpp.

References basic_emote(), and EMOTE_TWIDDLE.

Referenced by commands_init().

◆ command_wave()

void command_wave ( object op,
const char *  params 
)

'wave' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1228 of file c_chat.cpp.

References basic_emote(), and EMOTE_WAVE.

Referenced by commands_init().

◆ command_whistle()

void command_whistle ( object op,
const char *  params 
)

'whistle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1239 of file c_chat.cpp.

References basic_emote(), and EMOTE_WHISTLE.

Referenced by commands_init().

◆ command_wink()

void command_wink ( object op,
const char *  params 
)

'wink' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1250 of file c_chat.cpp.

References basic_emote(), and EMOTE_WINK.

Referenced by commands_init().

◆ command_yawn()

void command_yawn ( object op,
const char *  params 
)

'yawn' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1261 of file c_chat.cpp.

References basic_emote(), and EMOTE_YAWN.

Referenced by commands_init().

◆ do_tell()

static void do_tell ( object op,
const char *  params,
int  adjust_listen 
)
static

Actual function sending a private message.

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message
adjust_listenif non-zero, recipient can't ignore the message through 'listen' levels.

Definition at line 235 of file c_chat.cpp.

References buf, draw_ext_info(), draw_ext_info_format(), EVENT_TELL, events_execute_global_event(), find_player_partial_name(), FLAG_WIZ, player::hidden, player::last_tell, player::listening, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, object::name, archetype::name, NDI_ORANGE, NDI_UNIQUE, player::ob, QUERY_FLAG, and strlcpy().

Referenced by command_dmtell(), and command_tell().

Variable Documentation

◆ orcknuckle

const char* const orcknuckle[7]
static
Initial value:
= {
"none",
"beholder",
"ghost",
"knight",
"princess",
"dragon",
"orc"
}

Results for the "orcknucle" game.

Definition at line 81 of file c_chat.cpp.

◆ other_emotes

const char* other_emotes[EMOTE_LAST - 1][3]
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.

Definition at line 571 of file c_chat.cpp.

◆ self_emotes

const char* self_emotes[EMOTE_LAST - 1][2]
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.

Definition at line 507 of file c_chat.cpp.

◆ single_emotes

const char* single_emotes[EMOTE_LAST - 1][2]
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.

Definition at line 445 of file c_chat.cpp.