Go to the documentation of this file.
20 #define WANT_UNARMED_SKILLS
55 "Maps matching search: '%s'", search);
59 "[fixed]Path Reset In (HH:MM:SS) Pl IM TO");
62 "[fixed]Path Reset In (HH:MM)");
66 char *to_be_freed = NULL;
67 char *search_array[64];
68 int search_array_count = 0;
70 to_be_freed = strdup(search);
72 search_array[0] = to_be_freed;
73 search_array_count = 1;
75 search_array_count =
split_string(to_be_freed,search_array,64,
',');
81 if ( search_array_count ) {
83 for (
int i=0; i<search_array_count; ++i) {
84 if ( strstr(
m->path,search_array[i]) ) {
90 if ( !
match )
continue;
94 if (strlen(
m->path) <= 26) {
103 ttr = (
m->unique ? 0 :
m->reset_timeout) + 300;
105 else if (
m->timeout) {
106 ttr = (
m->unique ? 0 :
m->reset_timeout) +
m->timeout;
108 const uint32_t hh = ttr/3600, mm = (ttr%3600)/60, ss = ttr%60;
112 "[fixed]%-26.26s %2d:%02d:%02d %2d %2d %4d",
113 map_path, hh, mm, ss,
m->players,
m->in_memory,
m->timeout);
117 "[fixed]%-26.26s %2d:%02d%s",
map_path, hh, mm,
118 m->players ?
" (in use)" :
"");
121 if ( to_be_freed ) free( to_be_freed );
140 "Your current language is set to: English.");
142 "Available languages:");
150 if (language ==
nullptr) {
152 "Unknown language.");
156 op->contr->language = language;
159 "Your current language is set to English.");
183 "The first column is the name of the body location.");
186 "The second column is how many of those locations your body has.");
189 "The third column is how many slots in that location are available.");
195 if (
op->body_info[i] ||
op->body_used[i]) {
197 "[fixed]%-30s %5d %5d",
203 "You are not allowed to wear armor.");
206 "You are not allowed to use weapons.");
256 int nrm = 0, mapmem = 0, anr,
anims, sum_alloc = 0, sum_used = 0, i, alnr;
271 for (
m =
first_map, nrofmaps = 0;
m != NULL;
m =
m->next, nrofmaps++)
278 "Sizeof: object=%zu player=%zu map=%zu",
285 "[fixed]%6d used", ob_used);
289 "[fixed] (used list mismatch: %d)",
294 "[fixed]%6d free (%.2f%% of %d allocated)",
299 "[fixed] (free list mismatch: %d)",
304 "[fixed]%6d on active list",
307 i = (ob_used*
sizeof(
object));
312 "[fixed] object total: %11d", i);
314 i = (ob_free*
sizeof(
object));
318 "[fixed]%4d players: %8d",
325 "[fixed]%4d maps allocated: %8d",
326 nrofmaps, i = (nrofmaps*
sizeof(
mapstruct)));
332 "[fixed]%4d maps in memory: %8d",
339 "[fixed]%4d archetypes: %8d",
346 "[fixed]%4d animations: %8d",
353 "[fixed]%4zu treasurelists %8d",
360 "[fixed]%4ld treasures %8d",
367 "[fixed]%4ld artifacts %8d",
374 "[fixed]%4ld artifacts strngs %8d",
381 "[fixed]%4d artifactlists %8d",
388 "[fixed]Total space allocated:%8d",
392 "[fixed]Total space used: %8d",
419 "You are in %s.\n%s",
441 "players:%d difficulty:%d size:%dx%d start:%dx%d timeout %d reset_group: %s",
442 m->players,
m->difficulty,
451 #ifdef DEBUG_MALLOC_LEVEL
460 void command_malloc_verify(
object *
op,
char *
parms) {
461 extern int malloc_verify(
void);
463 if (!malloc_verify())
465 "Heap is corrupted.");
468 "Heap checks out OK.");
497 if (
pl->ob->map != NULL)
502 if (reg->longname == NULL && reg->counter > 0) {
503 if (reg->parent != NULL) {
504 reg->parent->counter += reg->counter;
507 LOG(
llevError,
"command_whereabouts() Region %s with no longname has no parent\n", reg->name);
511 "In the world currently there are:");
514 if (reg->counter > 0) {
554 int num_players = 0, num_wiz = 0, num_afk = 0, num_bot = 0;
563 if (
pl->ob->map == NULL)
570 if (party &&
pl->party != party)
578 "who failed - out of memory!");
591 if (
pl->socket->is_bot)
596 if (reg == NULL && party == NULL)
598 "Total Players (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
600 else if (party == NULL)
602 "Total Players in %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
606 "Total Players in party %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
645 strcpy(outbuf,
"[fixed]");
648 LOG(
llevError,
"display_who_entry(): I was passed a null player\n");
651 for (i = 0; i <= strlen(
format); i++) {
655 strcat(outbuf, tmpbuf);
656 }
else if (
format[i] ==
'_') {
659 snprintf(tmpbuf,
sizeof(tmpbuf),
"%c",
format[i]);
660 strcat(outbuf, tmpbuf);
707 snprintf(return_val, size,
"%u",
pl->ob->count);
711 snprintf(return_val, size,
"\n");
715 strlcpy(return_val,
pl->peaceful ?
"" :
" <Hostile>", size);
719 snprintf(return_val, size,
"%d",
pl->ob->level);
731 strlcpy(return_val, (
pl->socket->is_bot == 1) ?
" <BOT>" :
"", size);
735 strlcpy(return_val,
pl->ob->map->path, size);
739 strlcpy(return_val,
pl->ob->map->name ?
pl->ob->map->name :
"Untitled", size);
751 strlcpy(return_val,
pl->socket->host, size);
755 snprintf(return_val, size,
"%%");
759 snprintf(return_val, size,
"_");
763 return_val[0] =
'\0';
780 "You are no longer AFK");
898 "Global debug level is %d.",
904 "Debug level set to %d.",
930 "You will now walk through walls.");
934 "You will now be stopped by walls.");
960 "You can now cast spells anywhere.");
964 "You now cannot cast spells in no-magic areas.");
1095 "Set listen to what (presently %d)?",
1096 op->contr->listening);
1101 "Verbose level should be positive.");
1104 op->contr->listening = (char)i;
1106 "Your verbose level is now %d.",
1123 uint32_t hours, minutes;
1141 "[fixed]\nStat Nat/Real/Max");
1144 "[fixed]Str %2d/ %3d/%3d",
1145 pl->contr->orig_stats.Str,
pl->stats.Str, 20+
pl->arch->clone.stats.Str);
1147 "[fixed]Dex %2d/ %3d/%3d",
1148 pl->contr->orig_stats.Dex,
pl->stats.Dex, 20+
pl->arch->clone.stats.Dex);
1150 "[fixed]Con %2d/ %3d/%3d",
1151 pl->contr->orig_stats.Con,
pl->stats.Con, 20+
pl->arch->clone.stats.Con);
1153 "[fixed]Int %2d/ %3d/%3d",
1154 pl->contr->orig_stats.Int,
pl->stats.Int, 20+
pl->arch->clone.stats.Int);
1156 "[fixed]Wis %2d/ %3d/%3d",
1157 pl->contr->orig_stats.Wis,
pl->stats.Wis, 20+
pl->arch->clone.stats.Wis);
1159 "[fixed]Pow %2d/ %3d/%3d",
1160 pl->contr->orig_stats.Pow,
pl->stats.Pow, 20+
pl->arch->clone.stats.Pow);
1162 "[fixed]Cha %2d/ %3d/%3d",
1163 pl->contr->orig_stats.Cha,
pl->stats.Cha, 20+
pl->arch->clone.stats.Cha);
1165 "\nAttack Mode: %s",
1166 i18n(
pl,
pl->contr->peaceful ?
"Peaceful" :
"Hostile"));
1170 float weap_speed =
pl->weapon_speed;
1171 if (weap_speed < 0.0f)
1173 if (weap_speed > 1.0f)
1177 float dps = (1000000.0f /
tick_duration) * weap_speed *
pl->stats.dam;
1181 "\n\nDam/Sec: %4d", (
int)(dps + 0.5f));
1192 minutes = (uint32_t)
seconds / 60;
1193 hours = minutes / 60;
1194 minutes = minutes % 60;
1197 "You have played this character for %u ticks, which amounts "
1198 "to %d hours and %d minutes.",
1199 pl->contr->ticks_played, hours, minutes);
1236 const struct dirent *
entry;
1240 if (!((
entry->d_name[0] ==
'.' &&
entry->d_name[1] ==
'\0')
1241 || (
entry->d_name[0] ==
'.' &&
entry->d_name[1] ==
'.' &&
entry->d_name[2] ==
'\0'))) {
1244 strcpy(
t,
entry->d_name);
1245 if (stat(
buf, &
st) == 0) {
1249 if (S_ISDIR(
st.st_mode)) {
1250 struct tm *tm = localtime(&
st.st_mtime);
1253 "[fixed]%s\t%04d %02d %02d %02d %02d %02d",
1279 static const char *
const types[] = {
1287 "applymode is set to %s",
1292 if (!strcmp(
params,
"nochoice"))
1294 else if (!strcmp(
params,
"never"))
1296 else if (!strcmp(
params,
"always"))
1300 "applymode: Unknown options %s, valid options are nochoice, never, always",
1305 "applymode%s set to %s",
1306 (unapply ==
op->contr->unapply ?
"" :
" now"),
1320 static const char *
const types[] = {
1338 "bowmode is set to %s",
1367 "bowmode%s set to %s",
1368 (oldtype ==
op->contr->bowtype ?
"" :
" now"),
1387 "unarmed skill is set to %s",
1388 op->contr->unarmed_skill ?
op->contr->unarmed_skill:
"nothing");
1400 "You do not know any such skill called %s",
1404 for (i = 0; i <
sizeof(unarmed_skills); i++)
1405 if (
skill->subtype == unarmed_skills[i])
1407 if (i ==
sizeof(unarmed_skills)) {
1409 "%s is not an unarmed skill!",
1415 if (
op->contr->unarmed_skill)
1424 "unarmed skill is now set to %s",
1425 op->contr->unarmed_skill);
1439 static const char *
const types[] = {
1448 "petmode is set to %s",
1453 if (!strcmp(
params,
"normal"))
1455 else if (!strcmp(
params,
"sad"))
1457 else if (!strcmp(
params,
"defend"))
1459 else if (!strcmp(
params,
"arena"))
1463 "petmode: Unknown options %s, valid options are normal, sad (seek and destroy), defend, arena",
1468 "petmode%s set to %s",
1469 (oldtype ==
op->contr->petmode ?
"" :
" now"),
1483 int counter = 0, target = 0;
1484 int have_shown_pet = 0;
1490 for (obl =
list; obl != NULL; obl = obl->
next) {
1491 object *
ob = obl->
ob;
1499 ++counter,
ob->name,
ob->level);
1500 }
else if (!have_shown_pet && ++counter == target) {
1502 "[fixed]level %d %s",
1503 ob->level,
ob->name);
1505 "[fixed]%d/%d HP, %d/%d SP",
1506 ob->stats.hp,
ob->stats.maxhp,
ob->stats.sp,
ob->stats.maxsp);
1531 "[fixed]wc %d damage %d ac %d",
1532 ob->stats.wc,
ob->stats.dam,
ob->stats.ac);
1542 "You have no pets.");
1543 else if (target != 0 && have_shown_pet == 0)
1558 static const char *
const types[] = {
1566 "usekeys is set to %s",
1571 if (!strcmp(
params,
"inventory"))
1573 else if (!strcmp(
params,
"keyrings"))
1575 else if (!strcmp(
params,
"containers"))
1579 "usekeys: Unknown option %s, valid options are inventory, keyrings, containers",
1584 "usekeys%s set to %s",
1585 (oldtype ==
op->contr->usekeys ?
"" :
" now"),
1608 "[fixed]%-20s %+5d",
1620 "\nNatural skin resistances:");
1622 for (attack = 0; attack <
NROFATTACKS; attack++) {
1649 const char *language;
1681 && *de->d_name ==
'.'
1682 && (namelen == 1 || de->d_name[1] ==
'.'))
1684 if (strstr(de->d_name,
suffix)) {
1685 strcat(
line, strtok(de->d_name,
"."));
1707 if (stat(
path, &
st) == 0 && S_ISREG(
st.st_mode)) {
1774 const char *language;
1788 if (!strcmp(
params,
"topics")) {
1799 if (!strcmp(
params,
"commands")) {
1809 "Illegal characters in '%s'",
1818 "No help available on '%s'",
1842 if (sscanf(
line,
"%d", &i))
1877 "To leave the game, sleep in (apply) a bed to reality. To "
1878 "permenantly delete your character, use the 'delete' command.");
1897 i18n(
op,
"Quitting will delete your character.\nAre you sure you want to delete your character (y/n):"));
1913 op->contr->socket->sound =
op->contr->socket->sound|
SND_MUTE;
1915 "Sounds are turned off.");
1917 op->contr->socket->sound =
op->contr->socket->sound&~
SND_MUTE;
1919 "The sounds are enabled.");
1943 op->contr->name_changed = 1;
1956 unsigned int pwd_len = strlen(password);
1958 if (pwd_len == 0 || pwd_len > 16) {
1963 "Password changed cancelled.");
1974 LOG(
llevInfo,
"Banned player tried to add: [%s@%s]\n",
op->name,
op->contr->socket->host);
1976 "You are not allowed to play.");
1984 "The passwords did not match.");
1988 LOG(
llevInfo,
"LOGIN: New player named %s from ip %s\n",
op->name,
op->contr->socket->host);
1991 "\nWelcome, Brave New Warrior!\n");
2000 "You entered the wrong current password.");
2011 sizeof(
op->contr->new_password));
2013 i18n(
op,
"Please confirm your new password, or blank to cancel:"));
2021 "The new passwords don't match!");
2024 "Password changed.");
2025 strncpy(
op->contr->password,
op->contr->new_password, 13);
2032 sizeof(
op->contr->password));
2052 "You cannot change your title.");
2059 "Dragons cannot change titles.");
2067 snprintf(
buf,
sizeof(
buf),
"Your title is '%s'.",
tmp);
2071 if (strcmp(
params,
"clear") == 0 || strcmp(
params,
"default") == 0) {
2074 "Your title is the default title.");
2077 "Title set to default.");
2102 "You can not save on unholy ground.");
2103 }
else if (!
op->stats.exp) {
2105 "You don't deserve to save yet.");
2109 "You have been saved.");
2126 if ((
op->contr->peaceful = !
op->contr->peaceful))
2128 "You will not attack other players.");
2131 "You will attack other players.");
2147 "Your current wimpy level is %d.",
2152 if (i < 0 || i > 100) {
2154 "Wimpy level must be between 1 and 100.");
2159 "Your new wimpy level is %d.",
2174 op->contr->braced = !
op->contr->braced;
2178 if (
op->contr->braced)
2200 "Your pets have been killed.");
2203 int counter = 0, removecount = 0;
2204 int target = atoi(
params);
2206 for (obl =
list; obl != NULL; obl = obl->
next) {
2207 object *
ob = obl->
ob;
2221 if (removecount != 0)
2227 "Couldn't find any suitable pets to kill.");
2242 if (
pl->contr->socket->login_method < 1){
2250 "passwd is maintained for older clients that do not support the account system. Please use the 'Password' button in your character selection screen to change your password.");
2265 int count = 0, proba;
2266 int level, exp, check_exhaust = 0;
2269 object *
item, *
inv, *harvested;
2270 sstring trace, ttool, tspeed, race, tool, slevel, sexp;
2288 if (!
pl->chosen_skill ||
pl->chosen_skill->skill !=
skill->skill)
2294 if (!trace || strcmp(trace,
"") == 0 || !ttool || strcmp(ttool,
"") == 0 || !tspeed || strcmp(tspeed,
"") == 0) {
2296 LOG(
llevError,
"do_harvest: tool %s without harvest_[race|tool|speed]\n",
pl->chosen_skill->name);
2309 if (race && (!slevel || !sexp)) {
2310 LOG(
llevError,
"do_harvest: item %s without harvest_[level|exp]\n",
inv->name);
2313 if (race == trace && (!tool || tool == ttool))
2330 level = atoi(slevel);
2333 speed = atof(tspeed);
2366 if (
inv->nrof == 0) {
2370 if (
count == 1 &&
inv->nrof == 1) {
2373 if (
inv->nrof == 1 ) {
2401 if (check_exhaust) {
2404 if (replacement[0] !=
'-') {
bool object_value_set(const object *op, const char *const key)
#define GET_MAP_OB(M, X, Y)
void command_dumpallarchetypes(object *op, const char *params)
object * object_get_owner(object *op)
const char * get_name_of_region_for_map(const mapstruct *m)
Install Bug reporting Credits so make sure you have version or later There are files involved in the automatic convert convertall and filelist py GuildList has the list of guilds for the server GuildLocations is what is used by the install script for setting up the maps It has columns in the first is the name of the no spaces The second is the region of the the third is the destination folder for the the fourth is the exit the fifth and sixth are the x and y coords within the exit the seventh eighth and ninth are the exit location for the storage hall If field seven is then it uses the same exit map as for the guild hall itself filelist py has a list of which files to process for each guild hall convert py takes all the files in filelist py and customises them to the specific guild then outputs them into a in the same order that they are listed in GuildLocations convertall py reads the lines from GuildLocations and runs line by line
#define ST_CHANGE_PASSWORD_OLD
void remove_friendly_object(object *op)
void pets_terminate_all(object *owner)
int object_count_active(void)
#define NUM_BODY_LOCATIONS
void command_list(object *pl, bool is_dm)
static int name_cmp(const chars_names *c1, const chars_names *c2)
void hiscore_display(object *op, int max, const char *match)
void LOG(LogLevel logLevel, const char *format,...)
void send_news(const object *op)
region * get_region_by_name(const char *region_name)
static void map_info(object *op, const char *search)
void ss_dump_statistics(char *buf, size_t size)
void dump_friendly_objects(void)
void time_info(object *op)
#define QUERY_FLAG(xyz, p)
void receive_player_name(object *op, const char *name)
char const * newhash(char const *password)
I ve redone this file to hopefully make it a little easier to read through and quickly get some idea what to do There are sections section is current programming style hints for developers to make things easier Section is programming guide for new addition Section is notes for making patches Section currently used conventions hints for new code ob is for object
void command_dumpallobjects(object *op, const char *params)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
void command_dumpallmaps(object *op, const char *params)
void command_body(object *op, const char *params)
objectlink * get_friends_of(const object *owner)
int region_is_child_of_region(const region *child, const region *r)
StringBuffer * stringbuffer_new(void)
void command_showpets(object *op, const char *params)
void object_dump_all(void)
static int onoff_value(const char *line)
void get_password(object *op)
void player_set_own_title(struct player *pl, const char *title)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void command_statistics(object *pl, const char *params)
void map_path(const char *map, int flags, char *pathname, size_t bufsize)
#define CS_QUERY_SINGLECHAR
void bufferreader_destroy(BufferReader *br)
void command_hiscore(object *op, const char *params)
int player_has_own_title(const struct player *pl)
void command_kill_pets(object *op, const char *params)
void fix_object(object *op)
void dump_map(const mapstruct *m)
void command_rules(object *op, const char *params)
void command_ssdumptable(object *op, const char *params)
void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed)
#define MSG_TYPE_COMMAND_ERROR
const char * object_get_value(const object *op, const char *const key)
AssetsManager * getManager()
object * object_insert_in_ob(object *op, object *where)
const char * get_region_longname(const region *r)
Plugin animator file specs[Config] name
static void help_topics(object *op, int what)
#define MSG_TYPE_ADMIN_DM
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters as well as how often the character can attack this affects the prices when buying and selling items if this drops the player will start losing hit points wd Cleric or Dwarf sm Elf wd Fireborn ft Human ra Mage C Monk se Ninja hi Priest C Quetzalcoatl mw Swashbuckler st
void command_debug(object *op, const char *params)
void command_time(object *op, const char *params)
static event_registration m
char * stringbuffer_finish(StringBuffer *sb)
void object_free_drop_inventory(object *ob)
BufferReader * bufferreader_init_from_file(BufferReader *br, const char *filepath, const char *failureMessage, LogLevel failureLevel)
void command_news(object *op, const char *params)
DIR * opendir(const char *)
uint32_t map_size(mapstruct *m)
void send_rules(const object *op)
static void display_who_entry(object *op, player *pl, const char *format)
static void current_region_info(object *op)
short freearr_y[SIZEOFFREE]
#define ST_CHANGE_PASSWORD_CONFIRM
void command_malloc(object *op, const char *params)
sstring i18n_get_language_code(language_t language)
void check_login(object *op, const char *password)
void list_players(object *op, region *reg, partylist *party)
void command_dumpfriendlyobjects(object *op, const char *params)
void command_language(object *op, const char *params)
void command_petmode(object *op, const char *params)
#define MSG_TYPE_COMMAND_INFO
sstring add_string(const char *str)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters speed
int object_count_free(void)
const char * get_region_msg(const region *r)
void display_motd(const object *op)
#define MAP_WHEN_RESET(m)
struct dirent * readdir(DIR *)
#define MSG_TYPE_COMMAND_MALLOC
void command_passwd(object *pl, const char *params)
#define MSG_TYPE_COMMAND_STATISTICS
const char *const change_resist_msg[NROFATTACKS]
#define FREE_AND_COPY(sv, nv)
object * object_create_arch(archetype *at)
void do_harvest(object *pl, int dir, object *skill)
void command_quit(object *op, const char *params)
void object_free(object *ob, int flags)
static int find_help_file_in(const char *dir, const char *name, const char *language, char *path, int length)
Archetypes * archetypes()
#define ST_CHANGE_PASSWORD_NEW
#define INS_BELOW_ORIGINATOR
void command_applymode(object *op, const char *params)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
int64_t level_exp(int level, double expmul)
body_locations_struct body_locations[NUM_BODY_LOCATIONS]
static void display_help_file(object *op, const char *filename)
void command_strings(object *op, const char *params)
char * ss_dump_table(int what, char *buf, size_t size)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
void command_usekeys(object *op, const char *params)
void command_whereabouts(object *op, const char *params)
void command_afk(object *op, const char *params)
void command_sound(object *op, const char *params)
void command_save(object *op, const char *params)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void command_resistances(object *op, const char *params)
object * find_skill_by_name(object *who, const char *name)
void receive_player_password(object *op, const char *password)
size_t strlcpy(char *dst, const char *src, size_t size)
int checkbanned(const char *login, const char *host)
object * object_new(void)
void command_printlos(object *op, const char *params)
void set_map_reset_time(mapstruct *map)
uint32_t get_weight_limit(int stat)
pluglist shows those as well as a short text describing each the list will simply appear empty The keyword for the Python plugin is Python plugout< keyword > Unloads a given identified by its _keyword_ So if you want to unload the Python you need to do plugout Python plugin< libname > Loads a given whose _filename_ is libname So in the case of you d have to do a plugin cfpython so Note that all filenames are relative to the default plugin path(SHARE/plugins). Console messages. ----------------- When Crossfire starts
void free_string(sstring str)
static bool IS_PLAYER(object *op)
void print_los(object *op)
void command_delete(object *op, const char *params)
void command_version(object *op, const char *params)
void command_players(object *op, const char *params)
std::vector< region * > all_regions
const char *const attacktype_desc[NROFATTACKS]
#define MSG_TYPE_SKILL_FAILURE
int object_count_used(void)
void command_dumpmap(object *op, const char *params)
int is_dragon_pl(const object *op)
std::vector< archetype * > players
#define ST_CONFIRM_PASSWORD
void command_maps(object *op, const char *params)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define MSG_TYPE_COMMAND_BODY
non standard information is not specified num_players
const typedef char * sstring
void roll_again(object *op)
void command_motd(object *op, const char *params)
size_t assets_number_of_treasurelists()
void i18n_list_languages(object *who)
Crossfire Protocol most of the time after the actual code was already omit certain important and possibly make life miserable any new developer or curious player should be able to find most of the relevant information here If inconsistencies are found or this documentation proves to be consider the latest server side protocol code in the public source code repository as the authoritative reference Introduction If you were ever curious enough to telnet or netcat to a Crossfire chances are you were sorely disappointed While the protocol may seem to use plain text at it actually uses a mix of ASCII and binary data This handbook attempts to document various aspects of the Crossfire protocol As consult the README file to find out how to get in touch with helpful people via mailing and more History the communications plan was set to be a text based system It was up to the server and client to parse these messages and determine what to do These messages were assumed to be line per message At a reasonably early stage of Eric Anderson wrote a then the data itself you could send many data types
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
void command_brace(object *op, const char *params)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
void command_title(object *op, const char *params)
Python Guilds Quick outline Add a guild(mapmakers) this is still a problem *after dropping the token to gain access to the stove a woodfloor now appears which is Toolshed Token(found in Guild_HQ) *Note also have multiple gates in place to protect players and items from the mana explosion drop x for Jewelers room *Jewelers room works just need to determine what x is drop x for Thaumaturgy room *Thaumaturgy room works just need to determine what x is drop gold dropping the Firestar named fearless allows access to but I suspect that the drop location of the chest is not as intended because the player is in the way once you enter the chest the exit back to the basement is things such as the message et al reside on teleporters which then transport items to the map as they are when the map is already purchased items reappear in that area From my this does not cause any problems at the moment But this should be corrected fixed Major it s now possible to buy guilds Ryo Update Uploaded guild package to CVS Changes the cauldrons and the charging room I spent a while agonizing over They were natural guild enhancements but much too much value for any reasonable expense to buy them Then I thought that they should be pay access but at a greatly reduced rate SO when you buy a forge or whatever for your guild it is available on a perplayer daily rate but it will be accessable for testing and to DMs to play with Like I said lots still to do with the especially comingt up with quest items for buying things like the new workshops and stuff One of the things I would like some input on would be proposals for additional fields for either the guildhouses or guild datafiles to play with Currently the Guildhouse but there is no reason we can t have more than one measure of a guild perhaps have dues relate to Dues and use points for some other suspended or inactive or when a guild is founded inactive active Guilds have the format
language_t i18n_find_language_by_code(const char *code)
#define CLEAR_FLAG(xyz, p)
int random_roll(int min, int max, const object *op, int goodbad)
region * get_region_from_string(const char *name)
#define MSG_TYPE_COMMAND_CONFIG
int atnr_is_dragon_enabled(int attacknr)
void command_who(object *op, const char *params)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various stats
artifactlist * first_artifactlist
size_t split_string(char *str, char *array[], size_t array_size, char sep)
#define MSG_TYPE_COMMAND_MAPS
int strcasecmp(const char *s1, const char *s2)
static void malloc_info(object *op)
static int find_help_file(const char *name, const char *language, int wiz, char *path, int length)
void command_whereami(object *op, const char *params)
region * get_region_by_map(mapstruct *m)
void command_help(object *op, const char *params)
void command_bowmode(object *op, const char *params)
int save_player(object *op, int flag)
#define ST_GET_PARTY_PASSWORD
void command_wizpass(object *op, const char *params)
static void current_map_info(object *op)
void object_remove(object *op)
void player_set_state(player *pl, uint8_t state)
archetype * try_find_archetype(const char *name)
static void get_who_escape_code_value(char *return_val, int size, const char letter, player *pl)
void free_objectlink(objectlink *ol)
signed long object_sum_weight(object *op)
bool check_password(const char *typed, const char *crypted)
#define FREE_OBJ_FREE_INVENTORY
void command_wimpy(object *op, const char *params)
int rndm(int min, int max)
#define MSG_TYPE_ADMIN_VERSION
int object_set_value(object *op, const char *key, const char *value, int add_key)
void command_unarmed_skill(object *op, const char *params)
short freearr_x[SIZEOFFREE]
AllAnimations * animations()
int check_name(player *me, const char *name)
#define MSG_TYPE_COMMAND_WHO
char who_wiz_format[MAX_BUF]
void command_wizcast(object *op, const char *params)
void send_query(socket_struct *ns, uint8_t flags, const char *text)
void command_peaceful(object *op, const char *params)
void command_mapinfo(object *op, const char *params)
#define FOR_INV_PREPARE(op_, it_)
void command_listen(object *op, const char *params)
void command_fix_me(object *op, const char *params)
void dump_all_archetypes(void)
size_t assets_number_of_treasures()
const char * i18n(const object *who, const char *code)
void player_get_title(const player *pl, char *buf, size_t bufsize)
void get_name(object *op)
char * bufferreader_next_line(BufferReader *br)
#define CS_QUERY_HIDEINPUT
player * find_player(const char *plname)