Go to the documentation of this file.
71 "alive",
"wiz", NULL, NULL,
"was_wiz",
"applied",
"unpaid",
72 "can_use_shield",
"no_pick",
"client_anim_sync",
"client_anim_random",
74 NULL ,
"monster",
"friendly",
"generator",
75 "is_thrown",
"auto_apply",
"treasure",
"player sold",
76 "see_invisible",
"can_roll",
"overlay_floor",
77 "is_turnable", NULL , NULL ,
78 NULL ,
"is_used_up",
"identified",
"reflecting",
79 "changing",
"splitting",
"hitback",
"startequip",
80 "blocksview",
"undead",
"scared",
"unaggressive",
81 "reflect_missile",
"reflect_spell",
82 "no_magic",
"no_fix_player",
"is_lightable",
"tear_down",
83 "run_away", NULL , NULL ,
84 "pick_up",
"unique",
"no_drop",
85 NULL ,
"can_cast_spell",
"can_use_scroll",
"can_use_range",
86 "can_use_bow",
"can_use_armour",
"can_use_weapon",
87 "can_use_ring",
"has_ready_range",
"has_ready_bow",
88 "xrays", NULL,
"is_floor",
"lifesave",
"no_strength",
"sleep",
89 "stand_still",
"random_movement",
"only_attack",
"confused",
90 "stealth", NULL, NULL,
"cursed",
"damned",
91 "see_anywhere",
"known_magical",
"known_cursed",
92 "can_use_skill",
"been_applied",
93 "has_ready_scroll", NULL, NULL,
94 NULL,
"make_invisible",
"inv_locked",
"is_wooded",
95 "is_hilly",
"has_ready_skill",
"has_ready_weapon",
96 "no_skill_ident",
"is_blind",
"can_see_in_dark",
"is_cauldron",
97 "is_dust",
"no_steal",
"one_hit", NULL,
"berserk",
"neutral",
98 "no_attack",
"no_damage", NULL, NULL,
"activate_on_push",
99 "activate_on_release",
"is_water",
"use_content_on_gen", NULL,
"is_buildable",
100 NULL,
"blessed",
"known_blessed"
137 if (stat(
name, &info)) {
138 printf(
"Couldn't stat template %s!\n",
name);
142 (*buffer) = calloc(1, info.st_size+1);
144 printf(
"Template %s calloc failed!\n",
name);
148 if (info.st_size == 0) {
155 printf(
"Couldn't open template %s!\n",
name);
159 if (fread(*buffer, info.st_size, 1,
file) != 1) {
160 printf(
"Couldn't read template %s!\n",
name);
186 static char *
do_template(
const char *
template,
const char **vars,
const char **values) {
188 const char *sharp =
template;
192 char *current_result;
195 while ((sharp = strchr(sharp,
'#')) != NULL) {
200 return strdup(
template);
202 printf(
"Malformed template, mismatched #!\n");
203 return strdup(
template);
206 while (vars[var] != NULL) {
207 if (strlen(values[var]) > maxlen)
208 maxlen = strlen(values[var]);
211 result = calloc(1, strlen(
template)+maxlen*(
count/2)+1);
217 while ((sharp = strchr(sharp,
'#')) != NULL) {
218 end = strchr(sharp+1,
'#');
219 strncpy(current_result,
template, sharp-
template);
220 if (end == sharp+1) {
221 strcat(current_result,
"#");
223 current_result = current_result+strlen(current_result);
225 while (vars[var] != 0 && strncmp(vars[var], sharp+1, end-sharp-1))
228 printf(
"Wrong tag: %s\n", sharp);
230 strcpy(current_result, values[var]);
232 current_result = current_result+strlen(current_result);
236 strcat(current_result,
template);
255 if (p && strlen(p) > 0) {
273 return (
strcasecmp(*(
const char **)
a, *(
const char **)
b));
312 int16_t i = array->count;
330 free(array->item[
item]);
349 newtext = calloc(1, 1);
350 qsort(array->item, array->count,
sizeof(
char *),
sortbyname);
351 for (i = 0; i < array->count; i++) {
353 newtext = realloc(newtext, strlen(newtext)+strlen(
", ")+1);
354 newtext = strncat(newtext,
", ", 2);
356 newtext = realloc(newtext, strlen(newtext)+strlen(array->item[i])+1);
357 newtext = strncat(newtext, array->item[i], strlen(array->item[i]));
362 int main(
int argc,
char *argv[]) {
370 char *wiki_page = NULL;
371 char *monster_entries = NULL;
375 char image_list_path[128];
379 const char *wikidir =
"/tmp";
406 sprintf(image_list_path,
"%s/image_list", wikidir);
407 image_list = fopen(image_list_path,
"w");
420 printf(
"Sorting...");
423 printf(
"done. %i items found\n", archnum);
427 for (i = 0; i < archnum; i++) {
430 const char *
key[16] = { NULL, };
431 const char *val[16] = { NULL, };
440 if (
letter != last_letter) {
443 key[keycount] = NULL;
445 res = fprintf(fp,
"%s",
template);
454 snprintf(wikifile,
sizeof(wikifile),
"%s/%c", wikidir,
letter);
455 fp = fopen(wikifile,
"w");
457 fprintf(stderr,
"Unable to write to wiki file!\n");
461 char letterindex[256] =
"";
462 char letterindexnext[7];
464 letterindexnext[0] =
'\0';
465 for (li =
'a'; li <=
'z'; li++) {
469 sprintf(letterindexnext,
"%c ", toupper(li));
471 sprintf(letterindexnext,
"[[%c]] ", toupper(li));
473 p = strchr(letterindex,
'\0');
474 snprintf(p, letterindex+
sizeof(letterindex)-p,
"%s", letterindexnext);
478 key[keycount] =
"LETTER";
479 sprintf(
buf[keycount],
"%c", toupper(
letter));
480 val[keycount++] =
buf[keycount];
481 key[keycount] =
"LETTERINDEX";
482 val[keycount++] = letterindex;
483 key[keycount] = NULL;
485 res = fprintf(fp,
template);
496 char *vulnerable_row;
500 const int CANUSE_LENGTH = 16;
510 const int8_t special_flags[] = { 21, 93, 52, 38, 13, 32, 61, -1 };
511 const char *special_names[] = {
522 canuse.
item = calloc((CANUSE_LENGTH+1),
sizeof(
const char *));
530 key[keycount] =
"LORE";
531 key[keycount+1] = NULL;
536 lore_row = strdup(
"");
549 key[keycount] =
"CANUSE";
550 key[keycount+1] = NULL;
555 canuse_row = strdup(
"");
566 push(&vulner, rowtext);
569 push(&resist, rowtext);
575 key[keycount] =
"PROTECTED";
576 key[keycount+1] = NULL;
581 protected_row = strdup(
"");
585 key[keycount] =
"VULNERABLE";
586 key[keycount+1] = NULL;
591 vulnerable_row = strdup(
"");
596 val[keycount] = NULL;
603 key[keycount] =
"ATTACKS";
604 key[keycount+1] = NULL;
609 attack_row = strdup(
"");
614 val[keycount] = NULL;
615 for (j = 0; special_flags[j] >= 0; j++) {
617 push(&special, special_names[j]);
621 key[keycount] =
"SPECIAL";
622 key[keycount+1] = NULL;
627 special_row = strdup(
"");
630 key[keycount] =
"CANUSEROW";
631 val[keycount++] = canuse_row;
632 key[keycount] =
"PROTECTEDROW";
633 val[keycount++] = protected_row;
634 key[keycount] =
"VULNERABLEROW";
635 val[keycount++] = vulnerable_row;
636 key[keycount] =
"SPECIALROW";
637 val[keycount++] = attack_row;
638 key[keycount] =
"ATTACKROW";
639 val[keycount++] = special_row;
640 key[keycount] =
"LOREROW";
641 val[keycount++] = lore_row;
642 key[keycount] =
"XP";
644 val[keycount++] =
buf[keycount];
645 key[keycount] =
"HP";
647 val[keycount++] =
buf[keycount];
648 key[keycount] =
"AC";
650 val[keycount++] =
buf[keycount];
651 key[keycount] =
"NAME";
653 key[keycount] =
"RACE";
657 val[keycount++] =
NA;
660 key[keycount] =
"FACE";
661 sprintf(
buf[keycount],
"{{http://aaron.baugher.biz/images/cf/%s.png}}", at->
clone.
face->
name);
662 val[keycount++] =
buf[keycount];
664 fprintf(image_list,
buf[keycount]);
667 key[keycount] =
"GENFACE";
668 val[keycount++] =
"";
669 key[keycount] = NULL;
672 fprintf(fp,
template);
683 free(vulnerable_row);
730 while ((
op->stats.hp--) > 0)
758 while ((
tmp->stats.hp--) > 0)
765 &&
tmp->randomitems) {
768 while ((
tmp->stats.hp--) > 0)
786 #ifndef DOXYGEN_SHOULD_SKIP_THIS
805 fprintf(
logfile,
"ext_info_map: %s\n", str1);
#define GET_MAP_OB(M, X, Y)
#define HAS_RANDOM_ITEMS(op)
void esrv_update_spells(player *pl)
void dragon_ability_gain(object *ob, int x, int y)
static int sort_archetypes(const void *a, const void *b)
int main(int argc, char *argv[])
void LOG(LogLevel logLevel, const char *format,...)
#define QUERY_FLAG(xyz, p)
archetype * get_next_archetype(archetype *current)
const char *const flag_names[NUM_FLAGS+1]
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *txt)
static char * do_template(const char *template, const char **vars, const char **values)
void set_darkness_map(mapstruct *m)
char * monster_vulnerable_row
static const flag_definition flags[]
void free_data(String_Array *array)
the faster the spell may be cast there are several other common only the caster may be affected by the spell The most common spell range is that of touch This denotes that the caster much touch the recipient of the spell in order to release the spell monster
char * monster_protected_row
Almost all the spell_ *base png files are taken from JXClient s source
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
int16_t resist[NROFATTACKS]
Plugin animator file specs[Config] name
static void free_if_used(char *p)
void clean_tmp_files(void)
static event_registration m
const char * join_with_comma(String_Array *array)
void object_free_drop_inventory(object *ob)
char * monster_special_row
struct string_array String_Array
void push(String_Array *array, const char *string)
void esrv_send_item(object *ob, object *obx)
char * monster_canuse_row
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void move_firewall(object *ob)
void monster_check_apply_all(object *monster)
void apply_auto_fix(mapstruct *m)
object * find_skill_by_number(object *who, int skillno)
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have so the higher your the better hidden the runes you make are Examples of whichever way you re facing invoke magic rune transfer as above
void esrv_del_item(player *pl, object *ob)
const char *const attacktype_desc[NROFATTACKS]
void emergency_save(int x)
int apply_auto(object *op)
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
Install Bug reporting Credits but rather whatever guild name you are using *With the current map and server there are three they and GreenGoblin *Whatever name you give the folder should but it will still use GUILD_TEMPLATE *You can change what guild it uses by editing the map files Modify Map or objects if you want to use the optional Python based Guild Storage hall The first three are on the main the next two are in the guild_hq and the final one is in hallofjoining Withe the Storage three objects are found on the main floor and the last two are in the basement It s not that but you will need a map editor You find the object that has the click edit and change the line script options(which currently is "GUILD_TEMPALTE") to the guild you wish to use. And make sure you use the same one for all of them or it won 't work. Here 's a quick HOWTO for using the map editor to make these changes edit the mainfloor map exit(x15, y29 - set to/Edit/This/Exit/Path in the template) back to the world map as well. If you are using the Storage Hall map(storage_hall)
#define CLEAR_FLAG(xyz, p)
static int read_template(const char *name, char **buffer)
int strcasecmp(const char *s1, const char *s2)
void set_map_timeout(void)
char * monster_attack_row
void object_remove(object *op)
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have a(your level/2) chance of being visible in any given round
static int sortbyname(const void *a, const void *b)
static char * cat_template(char *source, char *add)
object * generate_treasure(treasurelist *t, int difficulty)
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
object * identify(object *op)