 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
62 "You entered the wrong password");
78 if (*params ==
'\0') {
82 strcpy(party_params,
"say ");
83 strcat(party_params, params);
100 if (*params ==
'\0') {
103 "You are not a member of any party. "
104 "For help try: party help");
107 "You are a member of party %s.",
112 if (strcmp(params,
"help") == 0) {
116 #ifdef PARTY_KILL_LOG
117 if (!strncmp(params,
"kills", 5)) {
125 "You are not a member of any party.");
129 if (!tmpparty->kills) {
131 "You haven't killed anything yet.");
134 max = tmpparty->kills-1;
135 if (max > PARTY_KILL_LOG-1)
136 max = PARTY_KILL_LOG-1;
138 "[fixed]Killed | Killer| Exp\n----------------+----------------+--------"
139 "Killed | Killer| Exp\n----------------+----------------+--------");
142 for (i = 0; i <= max; i++) {
143 exp = tmpparty->party_kills[i].exp;
148 }
else if (exp > 1000) {
154 "[fixed]%16s|%16s|%6.1f%c",
155 tmpparty->party_kills[i].dead,
156 tmpparty->party_kills[i].killer, exp, chr);
158 exp = tmpparty->total_exp;
163 }
else if (exp > 1000) {
169 "[fixed]----------------+----------------+--------");
171 "Totals: %d kills, %.1f%c exp", tmpparty->kills,
176 if (strncmp(params,
"say ", 4) == 0) {
179 "You are not a member of any party.");
191 if (strncmp(params,
"form ", 5) == 0) {
196 "The party %s already exists, pick another name",
203 if (strcmp(params,
"leave") == 0) {
206 "You are not a member of any party.");
212 if (strcmp(params,
"who") == 0) {
215 "You are not a member of any party.");
222 if (strncmp(params,
"passwd ", 7) == 0) {
227 "You are not a member of a party");
231 if (strlen(params) > 8) {
233 "The password must not exceed 8 characters");
239 "The password for party %s is %s",
242 snprintf(
buf,
MAX_BUF,
"Password for party %s is now %s, changed by %s",
248 if (strcmp(params,
"list") == 0) {
253 "There are no parties active right now");
258 "[fixed]Party name Leader\n---------- ------");
268 if (strncmp(params,
"join ", 5) == 0) {
276 "Party %s does not exist. You must form it first.",
310 if (*params ==
'\0') {
324 "invalid mode: %50s", params);
const char * party_get_leader(const partylist *party)
Returns the name of the party's leader.
#define MSG_TYPE_COMMAND_SUCCESS
Successful result from command.
int get_party_password(object *op, partylist *party)
Ask the player for the password of the party she wants to join.
void command_gsay(object *op, const char *params)
'gsay' command, talks to party.
partylist * party_find(const char *partyname)
Find a party by name.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
static const char * rejoin_modes[]
Valid modes for 'party_rejoin', indexed by party_rejoin_mode.
#define MSG_TYPE_COMMAND_ERROR
Bad syntax/can't use command.
#define MSG_TYPE_COMMAND
Responses to commands, eg, who.
void party_join(object *op, partylist *party)
Makes a player join a party.
partylist * party_get_first(void)
Returns the first party from the list of all parties.
struct player * contr
Pointer to the player which control this object.
int party_confirm_password(const partylist *party, const char *password)
Checks whether a given password matches the party's password.
void party_leave(object *op)
Makes a player leave his party.
static int confirm_party_password(object *op, const char *password)
Is the password the player entered to join a party the right one?
void command_help(object *op, const char *params)
Player is asking for some help.
void party_set_password(partylist *party, const char *password)
Sets a party's password.
char * partyname
Party name.
void list_players(object *op, region *reg, partylist *party)
Displays the players in a region or party.
partylist * party_form(object *op, const char *partyname)
Forms the party struct for a party called 'partyname'.
#define MAX_BUF
Used for all kinds of things.
partylist * party_get_next(const partylist *party)
Returns the next party from the list of all parties.
#define ST_PLAYING
Usual state.
void command_party_rejoin(object *op, const char *params)
Handles the 'party_rejoin' command.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring name
The name of the object, obviously...
const char * party_get_password(const partylist *party)
Returns the party's password.
partylist * party_to_join
Used when player wants to join a party but we will have to get password first so we have to remember ...
void party_send_message(object *op, const char *message)
Send a message to all party members except the speaker.
partylist * party
Party this player is part of.
#define MSG_TYPE_COMMUNICATION_PARTY
Party message.
void player_set_state(player *pl, uint8_t state)
Set the player's state to the specified one.
void command_party(object *op, const char *params)
'party' command, subdivided in different sub commands.
#define MSG_TYPE_COMMUNICATION
Communication between players.
party_rejoin_mode
Whether to rejoin party at login or not.
void receive_party_password(object *op, const char *password)
Player entered a party password.
party_rejoin_mode rejoin_party
Whether to rejoin or not party at login.