 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
61 "You have formed party: %s",
90 "You are already a member of party: %s",
99 "You have joined party: %s\n",
110 if (pl->party == party)
132 "You leave party %s.",
152 if (strcmp(party->
partyname, partyname) == 0)
169 previousparty = NULL;
171 if (*walk == party) {
176 if (pl->
party == party)
184 previousparty = *walk;
186 LOG(
llevError,
"party_remove: I was asked to remove party %s, but it could not be found.\n",
218 for (party =
firstparty; party != NULL; party = next) {
260 return strcmp(party->
passwd, password) == 0;
279 if (pl->party == party && pl !=
self)
296 #ifdef PARTY_KILL_LOG
309 void party_add_kill(
partylist *party,
const char *killer,
const char *dead,
long exp) {
312 if (party->kills >= PARTY_KILL_LOG) {
313 pos = PARTY_KILL_LOG-1;
314 for (i = 0; i < PARTY_KILL_LOG-1; i++)
315 memcpy(&(party->party_kills[i]), &(party->party_kills[i+1]),
sizeof(party->party_kills[0]));
319 party->total_exp += exp;
320 party->party_kills[pos].exp = exp;
321 strncpy(party->party_kills[pos].killer, killer,
MAX_NAME);
322 strncpy(party->party_kills[pos].dead, dead,
MAX_NAME);
323 party->party_kills[pos].killer[
MAX_NAME] = 0;
324 party->party_kills[pos].dead[
MAX_NAME] = 0;
player * next
Pointer to next player, NULL if this is last.
player * first_player
First player.
#define MSG_TYPE_COMMAND_SUCCESS
Successful result from command.
@ llevError
Error, serious thing.
partylist * next
Next party in list.
void party_leave(object *op)
Makes a player leave his party.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
void party_join(object *op, partylist *party)
Makes a player join a party.
static partylist * lastparty
Keeps track of last party in list.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
#define MSG_TYPE_COMMAND_ERROR
Bad syntax/can't use command.
#define MSG_TYPE_COMMAND
Responses to commands, eg, who.
struct player * contr
Pointer to the player which control this object.
char * partyleader
Who is the leader.
char passwd[9]
Party password.
static partylist * firstparty
Keeps track of first party in list.
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your message
partylist * party_form(object *op, const char *partyname)
Forms the party struct for a party called 'partyname'.
char * partyname
Party name.
void replace_unprintable_chars(char *buf)
Replaces any unprintable character in the given buffer with a space.
#define MAX_BUF
Used for all kinds of things.
size_t strlcpy(char *dst, const char *src, size_t size)
Portable implementation of strlcpy(3).
partylist * party_get_first(void)
Returns the first party from the list of all parties.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring name
The name of the object, obviously...
void party_remove(partylist *party)
Removes and frees a party.
const char * party_get_password(const partylist *party)
Returns the party's password.
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.
int party_confirm_password(const partylist *party, const char *password)
Checks whether a given password matches the party's password.
void party_set_password(partylist *party, const char *password)
Sets a party's password.
partylist * party_find(const char *partyname)
Find a party by name.
const char * party_get_leader(const partylist *party)
Returns the name of the party's leader.
#define MSG_TYPE_COMMUNICATION
Communication between players.
void party_obsolete_parties(void)
Remove unused parties (no players).
static void remove_if_unused(partylist *party)
Remove party if it has no players.
partylist * party_get_next(const partylist *party)
Returns the next party from the list of all parties.