Changes made in the following files: Makefile db.c db.h act.wizard.c interpreter.c map.c olc.h zedit.c 1) Makefile Add map.o in the .o files and at the end add map.o: map.c conf.h sysdep.h structs.h interpreter.h utils.h db.h $(CC) -c $(CFLAGS) map.c 2) db.c in void load_zones(FILE * fl, char *zonename) change if (sscanf(buf, " %d %d %d %d %d %c", &Z.top, &Z.lifespan, &Z.reset_mode, &Z.xpos, &Z.ypos, &Z.sy) != 6) { fprintf(stderr, "Format error in 6-constant line of %s", zname); exit(0); } 3) db.h in struct zone_data { add int xpos; int ypos; char sy; 4) act.wizard.c change the function void print_zone_to_buf(char *bufptr, int zone) to void print_zone_to_buf(char *bufptr, int zone) { sprintf(bufptr, "%s%3d %-30.30s Age: %3d; Reset: %3d (%1d); Top: %5d X/Y:%d/%d\r\n", bufptr, zone_table[zone].number, zone_table[zone].name, zone_table[zone].age, zone_table[zone].lifespan, zone_table[zone].reset_mode, zone_table[zone].top, zone_table[zone].xpos, zone_table[zone].ypos); } 5) interpreter.c add the following: ACMD(do_map); { "map" , POS_DEAD , do_map , 0, 0 }, 6) map.c #include "conf.h" #include "sysdep.h" #include "structs.h" #include "interpreter.h" #include "utils.h" #include "db.h" #include "comm.h" #define MAP_X 21 /* 0 .. 1 .. 20 .. 21 */ #define MAP_Y 51 /* 0 .. 1 .. 50 .. 51 */ extern struct room_data *world; extern int top_of_zone_table; char map[MAP_X][MAP_Y]; void draw_map(struct char_data *ch) { int i, x, y; extern struct zone_data *zone_table; struct room_data *rm = &world[ch->in_room]; GET_XPOS(ch) = zone_table[rm->zone].xpos; GET_YPOS(ch) = zone_table[rm->zone].ypos; for (x = 0; x <= MAP_X; x++) { for (y = 0; y <= MAP_Y; y++) { map[x][y] = '.'; for (i = 0; i <= top_of_zone_table; i++) { if (x == zone_table[i].xpos && y == zone_table[i].ypos) { if (GET_XPOS(ch) == zone_table[i].xpos && GET_YPOS(ch) == zone_table[i].ypos) map[x][y] = 'X'; else map[x][y] = zone_table[i].sy; } } } } } ACMD(do_map) { int x, y; *buf='\0'; *buf2='\0'; draw_map(ch); for (x = 0; x <= MAP_X; x++) { for (y = 0; y <= MAP_Y; y++) { sprintf(buf, "%c", map[x][y]); strcat(buf2, buf); if (y == MAP_Y) strcat(buf2, "\r\n"); } } page_string(ch->desc, buf2, 1); } 7) olc.h add the following after ZEDIT_CONFIRM_SAVESTRING #define ZEDIT_XPOS 14 #define ZEDIT_YPOS 15 #define ZEDIT_SY 16 8) zedit.c in void zedit_setup(struct descriptor_data *d, int room_num) add zone->xpos = zone_table[OLC_ZNUM(d)].xpos; zone->ypos = zone_table[OLC_ZNUM(d)].ypos; zone->sy = zone_table[OLC_ZNUM(d)].sy; in void zedit_new_zone(struct char_data *ch, int vzone_num) change fprintf(fp, "#%d\nNew Zone~\n%d 30 2 %d %d %c\nS\n$\n", vzone_num, (vzone_num * 100) + 99, zone_table[vzone_num].xpos, zone_table[vzone_num].ypos, zone_table[vzone_num].sy); fclose(fp); and after 'Ok, insert new zone here.' add new_table[i].xpos = -1; new_table[i].ypos = -1; new_table[i].sy = '*'; in void zedit_save_internally(struct descriptor_data *d) add in the last if zone_table[OLC_ZNUM(d)].xpos = OLC_ZONE(d)->xpos; zone_table[OLC_ZNUM(d)].ypos = OLC_ZONE(d)->ypos; zone_table[OLC_ZNUM(d)].sy = OLC_ZONE(d)->sy; in void zedit_save_to_disk(int zone_num) change to: fprintf(zfile, "#%d\n" "%s~\n" "%d %d %d %d %d %c\n", zone_table[zone_num].number, (zone_table[zone_num].name && *zone_table[zone_num].name) ? zone_table[zone_num].name : "undefined", zone_table[zone_num].top, zone_table[zone_num].lifespan, zone_table[zone_num].reset_mode, zone_table[zone_num].xpos, zone_table[zone_num].ypos, zone_table[zone_num].sy ); in void zedit_disp_menu(struct descriptor_data *d) change to sprintf(buf, "^[[H^[[J" "Room number: %s%d%s Room zone: %s%d\r\n" "%sZ%s) Zone name : %s%s\r\n" "%sL%s) Lifespan : %s%d minutes\r\n" "%sT%s) Top of zone : %s%d\r\n" "%sP%s) X-Pos/Y-Pos : %s%d/%d\r\n" "%sC%s) Zone-Symbol : %s%c\r\n" "%sR%s) Reset Mode : %s%s%s\r\n" "[Command list]\r\n", cyn, OLC_NUM(d), nrm, cyn, zone_table[OLC_ZNUM(d)].number, grn, nrm, yel, OLC_ZONE(d)->name ? OLC_ZONE(d)->name : "", grn, nrm, yel, OLC_ZONE(d)->lifespan, grn, nrm, yel, OLC_ZONE(d)->top, grn, nrm, yel, OLC_ZONE(d)->xpos, OLC_ZONE(d)->ypos, grn, nrm, yel, OLC_ZONE(d)->sy, grn, nrm, yel, OLC_ZONE(d)->reset_mode ? ((OLC_ZONE(d)->reset_mode == 1) ? "Reset when no players are in zone." : "Normal reset.") : "Never reset", nrm ); then add a ZEDIT_XPOS, ZEDIT_YPOS and ZEDIT_SY case. /*-------------------------------------------------------------------*/ case ZEDIT_XPOS: pos = atoi(arg); if (!isdigit(*arg) || (pos < 1) || (pos > 20)) send_to_char("Try again (1-20) : ", d->character); else { OLC_ZONE(d)->xpos = pos; OLC_ZONE(d)->number = 1; send_to_char("Enter Y-Location on map : ", d->character); OLC_MODE(d) = ZEDIT_YPOS; } break; case ZEDIT_YPOS: pos = atoi(arg); if (!isdigit(*arg) || (pos < 1) || (pos > 50)) send_to_char("Try again (1-50) : ", d->character); else { OLC_ZONE(d)->ypos = pos; OLC_ZONE(d)->number = 1; zedit_disp_menu(d); } break; case ZEDIT_SY: OLC_ZONE(d)->sy = *arg; OLC_ZONE(d)->number = 1; zedit_disp_menu(d); break; in ZEDIT_MAIN_MENU add 2 cases: case 's': case 'S': send_to_char("Enter X-Location on map : ", d->character); OLC_MODE(d) = ZEDIT_XPOS; break; case 'c': case 'C': default: send_to_char("Enter Symbol on map : ", d->character); OLC_MODE(d) = ZEDIT_SY; break;