 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
98 int flags,
int pri,
const object *pl, uint8_t
type,
99 uint8_t subtype,
const char *
message) {
163 va_start(ap, format);
169 va_start(ap, format);
175 else if (*
buf ==
'\0')
199 if (pl->
ob != NULL && pl->
ob->
map == map) {
223 if (pl->
ob != NULL && pl->
ob->
map == map && pl->
ob != op) {
249 if (pl->
ob != NULL && pl->
ob->
map == map
250 && pl->
ob != op1 && pl->
ob != op2) {
269 strncpy(obuf,
"Range: nothing", len);
275 for (op = pl->
inv; op; op = op->
below)
282 snprintf(obuf, len,
"Range: %s (%s)",
name, op->
race ? op->
race :
"nothing");
289 snprintf(obuf, len,
"Range: Holding spell (%s)", pl->
spell->
name);
291 snprintf(obuf, len,
"Range: Casting spell (%s)", pl->
spell->
name);
302 snprintf(obuf, len,
"Range: %s",
name);
313 strncpy(obuf,
"Range: nothing", len);
323 snprintf(obuf, len,
"Builder: %s",
name);
327 strncpy(obuf,
"Range: illegal", len);
337 snprintf(
buf, len,
"Player: %s ", pl->
name);
338 p = strchr(
buf,
'\0');
360 int x, y, dx, dy, mflags, l;
366 for (dx = -1; dx <= 1; dx++) {
367 for (dy = -1; dy <= 1; dy++) {
434 for (x = -strength; x < strength; x++) {
435 for (y = -strength; y < strength; y++) {
477 int xmin, xmax, ymin, ymax;
512 for (y = ymin; y <= ymax; y++) {
513 for (x = xmin; x <= xmax; x++) {
uint8_t casting_time
It takes awhile to cast a spell.
New face structure - this enforces the notion that data is face by face only - you can not change the...
player * next
Pointer to next player, NULL if this is last.
player * first_player
First player.
struct Settings settings
Server settings.
@ llevError
Error, serious thing.
#define FABS(x)
Decstations have trouble with fabs()...
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
#define NDI_NO_TRANSLATE
Do not attempt to translate.
object * inv
Pointer to the first object in the inventory.
void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1)
Writes to everyone on the map except *op.
#define QUERY_FLAG(xyz, p)
Socket structure, represents a client-server connection.
int16_t invisible
How much longer the object will be invis.
object * ob
The object representing the player.
#define NDI_COLOR_MASK
Gives lots of room for expansion - we are using an int anyways, so we have the space to still do all ...
struct mapstruct * map
Pointer to the map in which this object is present.
@ range_none
No range selected.
#define NDI_ALL_DMS
Inform all logged in DMs.
static const flag_definition flags[]
Flag mapping.
const Face * blank_face
Following can just as easily be pointers, but it is easier to keep them like this.
@ range_golem
Control golem.
#define FLAG_APPLIED
Object is ready for use by living.
#define HUGE_BUF
Used for messages - some can be quite long.
Plugin animator file specs[Config] name
static void magic_mapping_mark_recursive(object *pl, char *map_mark, int px, int py)
Helper for magic map creation.
@ range_builder
Map builder.
int16_t y
Position in the map for this object.
struct player * contr
Pointer to the player which control this object.
object * chosen_skill
The skill chosen to use.
void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message)
Draws an extended message on the client.
void magic_mapping_mark(object *pl, char *map_mark, int strength)
Creates magic map for player.
object * ranges[range_size]
Object for each range.
object * spell
Spell that was being cast.
object * below
Pointer to the object stacked below this one.
int16_t casting_time
Time left before spell goes off.
#define NDI_DELAYED
If set, then message is sent only after the player's tick completes.
void SockList_AddChar(SockList *sl, unsigned char c)
Adds an 8 bit value.
const Face * face
Face with colors.
#define GET_MAP_FACE_OBJ(M, X, Y, L)
Gets the layer face of specified square.
#define FACE_WALL
Or'd into the color value by the server right before sending.
uint8_t type
PLAYER, BULLET, etc.
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
static void do_print_ext(SockList *sl, int color, uint8_t type, uint8_t subtype, const char *message)
Fill a socket buffer with an extended message.
rangetype shoottype
Which range-attack is being used by player.
sstring race
Human, goblin, dragon, etc.
void SockList_Init(SockList *sl)
Initializes the SockList instance.
#define P_OUT_OF_MAP
This space is outside the map.
#define MAX_BUF
Used for all kinds of things.
void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1)
Writes to everyone on the map except op1 and op2.
uint8_t listening
Which priority will be used in info_all.
void SockList_Term(SockList *sl)
Frees all resources allocated by a SockList instance.
#define FLAG_WIZ
Object has special privilegies.
void set_title(const object *pl, char *buf, size_t len)
Sets player title.
sstring name
The name of the object, obviously...
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Sends message to player(s).
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
This rolls up wall, blocks_magic, blocks_view, etc, all into one function that just returns a P_.
void rangetostring(const object *pl, char *obuf, size_t len)
Get player's current range attack in obuf.
#define NDI_ALL
Inform all players of this message.
uint8_t magicmap
Color to show this in magic map.
void draw_magic_map(object *pl)
Creates and sends magic map to player.
SockList * player_get_delayed_buffer(player *pl)
Get a delayed socket buffer, that will be sent after the player's tick is complete.
socket_struct * socket
Socket information for this player.
void query_base_name(const object *op, int plural, char *buf, size_t size)
Query a short name for the item.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
Sends message to player(s).
void Send_With_Handling(socket_struct *ns, SockList *sl)
Calls Write_To_Socket to send data to the client.
Contains the base information we use to make up a packet we want to send.
void SockList_AddPrintf(SockList *sl, const char *format,...)
Adds a printf like formatted string.
const char * i18n(const object *who, const char *code)
Translate a message in the appropriate language.
#define P_BLOCKSVIEW
This spot blocks the player's view.
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
Writes to everyone on the specified map.
void player_get_title(const player *pl, char *buf, size_t bufsize)
Returns the player's title.