mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
Mostly Mudlog (#42)
* Added %log%, and made %send%, %echo%, etc. not force capitalization. * Fixed Previous Commit * Really fixed this time. * Fixed look 2.mail Also reverted CMMAND_TERMS, was increased in previous commit when it didn't need to be due to the removed of marena. * Fixed add_to_lookup_table Fixed as per Welcor https://www.tbamud.com/forum/2-general/4307-crash-bug-need-assistance-with-gdb?start=20#7390 * Fixed two crash bugs Fixed tw crash bugs Welcor found here https://www.tbamud.com/forum/4-development/4300-simple-list-forced-to-reset-itself * wizhelp changes Cleared buf in columns_list that was getting garbage data in it. Removed wizhelp subcommand from do_commands, and removed buf and sprintf line that were never sent to anyone and replaced it with a send_to_char. Removed arg capability from do_commands as it's no longer useful without the wizhelp subcommand. Replaced wizhelp subcommand with separate do_wizhelp command that sorts commands by their level and shows all imms all imm commands regardless of their level. * Fix Fixed previous commit * Trigedit Mostly Changed attributes to persist across logout when changed in trigedit. Made strength now loer for GRGOD and above when wearing equipment. Added npcflag field to trigedit. Fixed %actor.vnum()% * Log Files Fixed Farbled Data in Logfiles. Fix from Prool on forums. * Mudlog, Trigedit, New Pref Toggle Skimmed every call of mudlog for missing GET_INVIS_LEV and other obvious inconsistencies. Added affect_total() cals to dg_variables so stats adjust properly. Added zoneresets toggle to prefedit because syslog complete is super spammy as a result of zone resets so tey're now separate from other syslog options.
This commit is contained in:
parent
34b7f5b00c
commit
79e7ab10ea
31 changed files with 114 additions and 51 deletions
|
|
@ -225,6 +225,7 @@ ACMD(do_gen_tog);
|
||||||
#define SCMD_WIMPY 30
|
#define SCMD_WIMPY 30
|
||||||
#define SCMD_PAGELENGTH 31
|
#define SCMD_PAGELENGTH 31
|
||||||
#define SCMD_SCREENWIDTH 32
|
#define SCMD_SCREENWIDTH 32
|
||||||
|
#define SCMD_ZONERESETS 33
|
||||||
|
|
||||||
/* do_quit */
|
/* do_quit */
|
||||||
ACMD(do_quit);
|
ACMD(do_quit);
|
||||||
|
|
|
||||||
|
|
@ -1090,7 +1090,7 @@ ACMD(do_help)
|
||||||
|
|
||||||
if ((mid = search_help(argument, GET_LEVEL(ch))) == NOWHERE) {
|
if ((mid = search_help(argument, GET_LEVEL(ch))) == NOWHERE) {
|
||||||
send_to_char(ch, "There is no help on that word.\r\n");
|
send_to_char(ch, "There is no help on that word.\r\n");
|
||||||
mudlog(NRM, MAX(LVL_IMPL, GET_INVIS_LEV(ch)), TRUE,
|
mudlog(NRM, MIN(LVL_IMPL, GET_INVIS_LEV(ch)), TRUE,
|
||||||
"%s tried to get help on %s", GET_NAME(ch), argument);
|
"%s tried to get help on %s", GET_NAME(ch), argument);
|
||||||
for (i = 0; i < top_of_helpt; i++) {
|
for (i = 0; i < top_of_helpt; i++) {
|
||||||
if (help_table[i].min_level > GET_LEVEL(ch))
|
if (help_table[i].min_level > GET_LEVEL(ch))
|
||||||
|
|
@ -1924,6 +1924,9 @@ ACMD(do_toggle)
|
||||||
{"wimpy", 0, 0, "\n", "\n"},
|
{"wimpy", 0, 0, "\n", "\n"},
|
||||||
{"pagelength", 0, 0, "\n", "\n"},
|
{"pagelength", 0, 0, "\n", "\n"},
|
||||||
{"screenwidth", 0, 0, "\n", "\n"},
|
{"screenwidth", 0, 0, "\n", "\n"},
|
||||||
|
{"zoneresets", PRF_ZONERESETS, LVL_IMPL,
|
||||||
|
"You will no longer see zone resets.\r\n",
|
||||||
|
"You will now see zone resets.\r\n"},
|
||||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1957,7 +1960,7 @@ ACMD(do_toggle)
|
||||||
" NoHassle: %-3s "
|
" NoHassle: %-3s "
|
||||||
" Holylight: %-3s "
|
" Holylight: %-3s "
|
||||||
" ShowVnums: %-3s\r\n"
|
" ShowVnums: %-3s\r\n"
|
||||||
" Syslog: %-3s\r\n",
|
" Syslog: %-3s%s ",
|
||||||
|
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
||||||
|
|
@ -1965,7 +1968,13 @@ ACMD(do_toggle)
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_NOHASSLE)),
|
ONOFF(PRF_FLAGGED(ch, PRF_NOHASSLE)),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
||||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)],
|
||||||
|
GET_LEVEL(ch) == LVL_IMPL ? "" : "\r\n");
|
||||||
|
}
|
||||||
|
if (GET_LEVEL(ch) >= LVL_IMPL) {
|
||||||
|
send_to_char(ch,
|
||||||
|
" ZoneResets: %-3s\r\n",
|
||||||
|
ONOFF(PRF_FLAGGED(ch, PRF_ZONERESETS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
send_to_char(ch,
|
send_to_char(ch,
|
||||||
|
|
|
||||||
|
|
@ -655,7 +655,7 @@ ACMD(do_gen_door)
|
||||||
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) && IS_SET(flags_door[subcmd], NEED_UNLOCKED) && ((!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOKEY))) && (has_key(ch, keynum)) )
|
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) && IS_SET(flags_door[subcmd], NEED_UNLOCKED) && ((!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOKEY))) && (has_key(ch, keynum)) )
|
||||||
{
|
{
|
||||||
send_to_char(ch, "It is locked, but you have the key.\r\n");
|
send_to_char(ch, "It is locked, but you have the key.\r\n");
|
||||||
send_to_char(ch, "*Click*\r\n");
|
do_doorcmd(ch, obj, door, SCMD_UNLOCK);
|
||||||
do_doorcmd(ch, obj, door, subcmd);
|
do_doorcmd(ch, obj, door, subcmd);
|
||||||
}
|
}
|
||||||
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) && IS_SET(flags_door[subcmd], NEED_UNLOCKED) && ((!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOKEY))) && (!has_key(ch, keynum)) )
|
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) && IS_SET(flags_door[subcmd], NEED_UNLOCKED) && ((!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOKEY))) && (!has_key(ch, keynum)) )
|
||||||
|
|
|
||||||
|
|
@ -729,7 +729,9 @@ ACMD(do_gen_tog)
|
||||||
{"Autokey disabled.\r\n",
|
{"Autokey disabled.\r\n",
|
||||||
"Autokey enabled.\r\n"},
|
"Autokey enabled.\r\n"},
|
||||||
{"Autodoor disabled.\r\n",
|
{"Autodoor disabled.\r\n",
|
||||||
"Autodoor enabled.\r\n"}
|
"Autodoor enabled.\r\n"},
|
||||||
|
{"ZoneResets disabled.\r\n",
|
||||||
|
"ZoneResets enabled.\r\n"}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (IS_NPC(ch))
|
if (IS_NPC(ch))
|
||||||
|
|
@ -783,7 +785,7 @@ ACMD(do_gen_tog)
|
||||||
break;
|
break;
|
||||||
case SCMD_CLS:
|
case SCMD_CLS:
|
||||||
result = PRF_TOG_CHK(ch, PRF_CLS);
|
result = PRF_TOG_CHK(ch, PRF_CLS);
|
||||||
break;
|
break;
|
||||||
case SCMD_BUILDWALK:
|
case SCMD_BUILDWALK:
|
||||||
if (GET_LEVEL(ch) < LVL_BUILDER) {
|
if (GET_LEVEL(ch) < LVL_BUILDER) {
|
||||||
send_to_char(ch, "Builders only, sorry.\r\n");
|
send_to_char(ch, "Builders only, sorry.\r\n");
|
||||||
|
|
@ -840,6 +842,9 @@ ACMD(do_gen_tog)
|
||||||
case SCMD_AUTODOOR:
|
case SCMD_AUTODOOR:
|
||||||
result = PRF_TOG_CHK(ch, PRF_AUTODOOR);
|
result = PRF_TOG_CHK(ch, PRF_AUTODOOR);
|
||||||
break;
|
break;
|
||||||
|
case SCMD_ZONERESETS:
|
||||||
|
result = PRF_TOG_CHK(ch, PRF_ZONERESETS);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd);
|
log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1151,7 +1151,6 @@ static void stop_snooping(struct char_data *ch)
|
||||||
else {
|
else {
|
||||||
send_to_char(ch, "You stop snooping.\r\n");
|
send_to_char(ch, "You stop snooping.\r\n");
|
||||||
|
|
||||||
if (GET_LEVEL(ch) < LVL_IMPL)
|
|
||||||
mudlog(BRF, GET_LEVEL(ch), TRUE, "(GC) %s stops snooping", GET_NAME(ch));
|
mudlog(BRF, GET_LEVEL(ch), TRUE, "(GC) %s stops snooping", GET_NAME(ch));
|
||||||
|
|
||||||
ch->desc->snooping->snoop_by = NULL;
|
ch->desc->snooping->snoop_by = NULL;
|
||||||
|
|
@ -1193,7 +1192,6 @@ ACMD(do_snoop)
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%s", CONFIG_OK);
|
send_to_char(ch, "%s", CONFIG_OK);
|
||||||
|
|
||||||
if (GET_LEVEL(ch) < LVL_IMPL)
|
|
||||||
mudlog(BRF, GET_LEVEL(ch), TRUE, "(GC) %s snoops %s", GET_NAME(ch), GET_NAME(victim));
|
mudlog(BRF, GET_LEVEL(ch), TRUE, "(GC) %s snoops %s", GET_NAME(ch), GET_NAME(victim));
|
||||||
|
|
||||||
if (ch->desc->snooping)
|
if (ch->desc->snooping)
|
||||||
|
|
@ -1445,13 +1443,14 @@ ACMD(do_purge)
|
||||||
if (*buf) {
|
if (*buf) {
|
||||||
t = buf;
|
t = buf;
|
||||||
number = get_number(&t);
|
number = get_number(&t);
|
||||||
if ((vict = get_char_vis(ch, buf, &number, FIND_CHAR_ROOM)) != NULL) { if (!IS_NPC(vict) && (GET_LEVEL(ch) <= GET_LEVEL(vict))) {
|
if ((vict = get_char_vis(ch, buf, &number, FIND_CHAR_ROOM)) != NULL) {
|
||||||
send_to_char(ch, "You can't purge %s!\r\n", HMHR(vict));
|
if (!IS_NPC(vict) && (GET_LEVEL(ch) <= GET_LEVEL(vict))) {
|
||||||
|
send_to_char(ch, "You can't purge %s!\r\n", GET_NAME(vict));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
act("$n disintegrates $N.", FALSE, ch, 0, vict, TO_NOTVICT);
|
act("$n disintegrates $N.", FALSE, ch, 0, vict, TO_NOTVICT);
|
||||||
|
|
||||||
if (!IS_NPC(vict) && GET_LEVEL(ch) < LVL_GOD) {
|
if (!IS_NPC(vict)) {
|
||||||
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has purged %s.", GET_NAME(ch), GET_NAME(vict));
|
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has purged %s.", GET_NAME(ch), GET_NAME(vict));
|
||||||
if (vict->desc) {
|
if (vict->desc) {
|
||||||
STATE(vict->desc) = CON_CLOSE;
|
STATE(vict->desc) = CON_CLOSE;
|
||||||
|
|
@ -1602,6 +1601,8 @@ ACMD(do_restore)
|
||||||
else if (!IS_NPC(vict) && ch != vict && GET_LEVEL(vict) >= GET_LEVEL(ch))
|
else if (!IS_NPC(vict) && ch != vict && GET_LEVEL(vict) >= GET_LEVEL(ch))
|
||||||
act("$E doesn't need your help.", FALSE, ch, 0, vict, TO_CHAR);
|
act("$E doesn't need your help.", FALSE, ch, 0, vict, TO_CHAR);
|
||||||
else {
|
else {
|
||||||
|
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s restored %s",GET_NAME(ch), GET_NAME(vict));
|
||||||
|
|
||||||
GET_HIT(vict) = GET_MAX_HIT(vict);
|
GET_HIT(vict) = GET_MAX_HIT(vict);
|
||||||
GET_MANA(vict) = GET_MAX_MANA(vict);
|
GET_MANA(vict) = GET_MAX_MANA(vict);
|
||||||
GET_MOVE(vict) = GET_MAX_MOVE(vict);
|
GET_MOVE(vict) = GET_MAX_MOVE(vict);
|
||||||
|
|
@ -1616,7 +1617,7 @@ ACMD(do_restore)
|
||||||
vict->real_abils.intel = 25;
|
vict->real_abils.intel = 25;
|
||||||
vict->real_abils.wis = 25;
|
vict->real_abils.wis = 25;
|
||||||
vict->real_abils.dex = 25;
|
vict->real_abils.dex = 25;
|
||||||
vict->real_abils.str = 18;
|
vict->real_abils.str = 25;
|
||||||
vict->real_abils.con = 25;
|
vict->real_abils.con = 25;
|
||||||
vict->real_abils.cha = 25;
|
vict->real_abils.cha = 25;
|
||||||
}
|
}
|
||||||
|
|
@ -2279,7 +2280,7 @@ ACMD(do_zreset)
|
||||||
for (i = 0; i <= top_of_zone_table; i++)
|
for (i = 0; i <= top_of_zone_table; i++)
|
||||||
reset_zone(i);
|
reset_zone(i);
|
||||||
send_to_char(ch, "Reset world.\r\n");
|
send_to_char(ch, "Reset world.\r\n");
|
||||||
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s reset entire world.", GET_NAME(ch));
|
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s reset entire world.", GET_NAME(ch));
|
||||||
return; }
|
return; }
|
||||||
} else if (*arg == '.' || !*arg)
|
} else if (*arg == '.' || !*arg)
|
||||||
i = world[IN_ROOM(ch)].zone;
|
i = world[IN_ROOM(ch)].zone;
|
||||||
|
|
@ -2292,7 +2293,7 @@ ACMD(do_zreset)
|
||||||
if (i <= top_of_zone_table && (can_edit_zone(ch, i) || GET_LEVEL(ch) > LVL_IMMORT)) {
|
if (i <= top_of_zone_table && (can_edit_zone(ch, i) || GET_LEVEL(ch) > LVL_IMMORT)) {
|
||||||
reset_zone(i);
|
reset_zone(i);
|
||||||
send_to_char(ch, "Reset zone #%d: %s.\r\n", zone_table[i].number, zone_table[i].name);
|
send_to_char(ch, "Reset zone #%d: %s.\r\n", zone_table[i].number, zone_table[i].name);
|
||||||
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s reset zone %d (%s)", GET_NAME(ch), zone_table[i].number, zone_table[i].name);
|
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s reset zone %d (%s)", GET_NAME(ch), zone_table[i].number, zone_table[i].name);
|
||||||
} else
|
} else
|
||||||
send_to_char(ch, "You do not have permission to reset this zone. Try %d.\r\n", GET_OLC_ZONE(ch));
|
send_to_char(ch, "You do not have permission to reset this zone. Try %d.\r\n", GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
@ -4748,7 +4749,7 @@ ACMD(do_zlock)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%d zones have now been locked.\r\n", counter);
|
send_to_char(ch, "%d zones have now been locked.\r\n", counter);
|
||||||
mudlog(BRF, LVL_GOD, TRUE, "(GC) %s has locked ALL zones!", GET_NAME(ch));
|
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has locked ALL zones!", GET_NAME(ch));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_abbrev(arg, "list")) {
|
if (is_abbrev(arg, "list")) {
|
||||||
|
|
@ -4791,7 +4792,7 @@ ACMD(do_zlock)
|
||||||
}
|
}
|
||||||
SET_BIT_AR(ZONE_FLAGS(zn), ZONE_NOBUILD);
|
SET_BIT_AR(ZONE_FLAGS(zn), ZONE_NOBUILD);
|
||||||
if (save_zone(zn)) {
|
if (save_zone(zn)) {
|
||||||
mudlog(NRM, LVL_GRGOD, TRUE, "(GC) %s has locked zone %d", GET_NAME(ch), znvnum);
|
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has locked zone %d", GET_NAME(ch), znvnum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -4842,7 +4843,7 @@ ACMD(do_zunlock)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%d zones have now been unlocked.\r\n", counter);
|
send_to_char(ch, "%d zones have now been unlocked.\r\n", counter);
|
||||||
mudlog(BRF, LVL_GOD, TRUE, "(GC) %s has unlocked ALL zones!", GET_NAME(ch));
|
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has unlocked ALL zones!", GET_NAME(ch));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_abbrev(arg, "list")) {
|
if (is_abbrev(arg, "list")) {
|
||||||
|
|
@ -4885,7 +4886,7 @@ ACMD(do_zunlock)
|
||||||
}
|
}
|
||||||
REMOVE_BIT_AR(ZONE_FLAGS(zn), ZONE_NOBUILD);
|
REMOVE_BIT_AR(ZONE_FLAGS(zn), ZONE_NOBUILD);
|
||||||
if (save_zone(zn)) {
|
if (save_zone(zn)) {
|
||||||
mudlog(NRM, LVL_GRGOD, TRUE, "(GC) %s has unlocked zone %d", GET_NAME(ch), znvnum);
|
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s has unlocked zone %d", GET_NAME(ch), znvnum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ ACMD(do_oasis_aedit)
|
||||||
STATE(d) = CON_AEDIT;
|
STATE(d) = CON_AEDIT;
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing actions.", GET_NAME(ch));
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing actions.", GET_NAME(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aedit_setup_new(struct descriptor_data *d) {
|
static void aedit_setup_new(struct descriptor_data *d) {
|
||||||
|
|
@ -330,7 +330,7 @@ void aedit_parse(struct descriptor_data * d, char *arg) {
|
||||||
switch (*arg) {
|
switch (*arg) {
|
||||||
case 'y': case 'Y':
|
case 'y': case 'Y':
|
||||||
aedit_save_internally(d);
|
aedit_save_internally(d);
|
||||||
mudlog (CMP, LVL_IMPL, TRUE, "OLC: %s edits action %s",
|
mudlog (CMP, MAX(LVL_GOD, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits action %s",
|
||||||
GET_NAME(d->character), OLC_ACTION(d)->command);
|
GET_NAME(d->character), OLC_ACTION(d)->command);
|
||||||
|
|
||||||
/* do not free the strings.. just the structure */
|
/* do not free the strings.. just the structure */
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ ACMD(do_oasis_cedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE,
|
mudlog(BRF, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
|
||||||
"OLC: %s starts editing the game configuration.", GET_NAME(ch));
|
"OLC: %s starts editing the game configuration.", GET_NAME(ch));
|
||||||
return;
|
return;
|
||||||
} else if (str_cmp("save", buf1) != 0) {
|
} else if (str_cmp("save", buf1) != 0) {
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,7 @@ const char *preference_bits[] = {
|
||||||
"AUTOMAP",
|
"AUTOMAP",
|
||||||
"AUTOKEY",
|
"AUTOKEY",
|
||||||
"AUTODOOR",
|
"AUTODOOR",
|
||||||
|
"ZONERESETS",
|
||||||
"\n"
|
"\n"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
9
src/db.c
9
src/db.c
|
|
@ -37,6 +37,7 @@
|
||||||
#include "ibt.h"
|
#include "ibt.h"
|
||||||
#include "mud_event.h"
|
#include "mud_event.h"
|
||||||
#include "msgedit.h"
|
#include "msgedit.h"
|
||||||
|
#include "screen.h"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/* declarations of most of the 'global' variables */
|
/* declarations of most of the 'global' variables */
|
||||||
|
|
@ -2506,8 +2507,14 @@ void zone_update(void)
|
||||||
if (zone_table[update_u->zone_to_reset].reset_mode == 2 ||
|
if (zone_table[update_u->zone_to_reset].reset_mode == 2 ||
|
||||||
is_empty(update_u->zone_to_reset)) {
|
is_empty(update_u->zone_to_reset)) {
|
||||||
reset_zone(update_u->zone_to_reset);
|
reset_zone(update_u->zone_to_reset);
|
||||||
mudlog(CMP, LVL_IMPL, FALSE, "Auto zone reset: %s (Zone %d)",
|
mudlog(CMP, LVL_IMPL+1, FALSE, "Auto zone reset: %s (Zone %d)",
|
||||||
zone_table[update_u->zone_to_reset].name, zone_table[update_u->zone_to_reset].number);
|
zone_table[update_u->zone_to_reset].name, zone_table[update_u->zone_to_reset].number);
|
||||||
|
struct descriptor_data *pt;
|
||||||
|
for (pt = descriptor_list; pt; pt = pt->next)
|
||||||
|
if (IS_PLAYING(pt) && pt->character && PRF_FLAGGED(pt->character, PRF_ZONERESETS))
|
||||||
|
send_to_char(pt->character, "%s[Auto zone reset: %s (Zone %d)]%s",
|
||||||
|
CCGRN(pt->character, C_NRM), zone_table[update_u->zone_to_reset].name,
|
||||||
|
zone_table[update_u->zone_to_reset].number, CCNRM(pt->character, C_NRM));
|
||||||
/* dequeue */
|
/* dequeue */
|
||||||
if (update_u == reset_q.head)
|
if (update_u == reset_q.head)
|
||||||
reset_q.head = reset_q.head->next;
|
reset_q.head = reset_q.head->next;
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ void script_damage(struct char_data *vict, int dam)
|
||||||
|
|
||||||
if (GET_POS(vict) == POS_DEAD) {
|
if (GET_POS(vict) == POS_DEAD) {
|
||||||
if (!IS_NPC(vict))
|
if (!IS_NPC(vict))
|
||||||
mudlog( BRF, 0, TRUE, "%s killed by script at %s",
|
mudlog( BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(vict)), TRUE, "%s killed by script at %s",
|
||||||
GET_NAME(vict), vict->in_room == NOWHERE ? "NOWHERE" : world[vict->in_room].name);
|
GET_NAME(vict), vict->in_room == NOWHERE ? "NOWHERE" : world[vict->in_room].name);
|
||||||
die(vict, NULL);
|
die(vict, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ ACMD(do_oasis_trigedit)
|
||||||
d = ch->desc;
|
d = ch->desc;
|
||||||
/* Give descriptor an OLC structure. */
|
/* Give descriptor an OLC structure. */
|
||||||
if (d->olc) {
|
if (d->olc) {
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE,
|
mudlog(BRF, LVL_BUILDER, TRUE,
|
||||||
"SYSERR: do_oasis_trigedit: Player already had olc structure.");
|
"SYSERR: do_oasis_trigedit: Player already had olc structure.");
|
||||||
free(d->olc);
|
free(d->olc);
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +104,7 @@ ACMD(do_oasis_trigedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE,"OLC: %s starts editing zone %d [trigger](allowed zone %d)",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,"OLC: %s starts editing zone %d [trigger](allowed zone %d)",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -635,6 +635,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.cha += addition;
|
c->real_abils.cha += addition;
|
||||||
if (c->real_abils.cha > max) c->real_abils.cha = max;
|
if (c->real_abils.cha > max) c->real_abils.cha = max;
|
||||||
if (c->real_abils.cha < 3) c->real_abils.cha = 3;
|
if (c->real_abils.cha < 3) c->real_abils.cha = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_CHA(c));
|
snprintf(str, slen, "%d", GET_CHA(c));
|
||||||
}
|
}
|
||||||
|
|
@ -657,6 +658,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.con += addition;
|
c->real_abils.con += addition;
|
||||||
if (c->real_abils.con > max) c->real_abils.con = max;
|
if (c->real_abils.con > max) c->real_abils.con = max;
|
||||||
if (c->real_abils.con < 3) c->real_abils.con = 3;
|
if (c->real_abils.con < 3) c->real_abils.con = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_CON(c));
|
snprintf(str, slen, "%d", GET_CON(c));
|
||||||
}
|
}
|
||||||
|
|
@ -675,6 +677,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.dex += addition;
|
c->real_abils.dex += addition;
|
||||||
if (c->real_abils.dex > max) c->real_abils.dex = max;
|
if (c->real_abils.dex > max) c->real_abils.dex = max;
|
||||||
if (c->real_abils.dex < 3) c->real_abils.dex = 3;
|
if (c->real_abils.dex < 3) c->real_abils.dex = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_DEX(c));
|
snprintf(str, slen, "%d", GET_DEX(c));
|
||||||
}
|
}
|
||||||
|
|
@ -799,6 +802,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.intel += addition;
|
c->real_abils.intel += addition;
|
||||||
if (c->real_abils.intel > max) c->real_abils.intel = max;
|
if (c->real_abils.intel > max) c->real_abils.intel = max;
|
||||||
if (c->real_abils.intel < 3) c->real_abils.intel = 3;
|
if (c->real_abils.intel < 3) c->real_abils.intel = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_INT(c));
|
snprintf(str, slen, "%d", GET_INT(c));
|
||||||
}
|
}
|
||||||
|
|
@ -1059,6 +1063,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.str += addition;
|
c->real_abils.str += addition;
|
||||||
if (c->real_abils.str > max) c->real_abils.str = max;
|
if (c->real_abils.str > max) c->real_abils.str = max;
|
||||||
if (c->real_abils.str < 3) c->real_abils.str = 3;
|
if (c->real_abils.str < 3) c->real_abils.str = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_STR(c));
|
snprintf(str, slen, "%d", GET_STR(c));
|
||||||
}
|
}
|
||||||
|
|
@ -1069,6 +1074,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.str_add += addition;
|
c->real_abils.str_add += addition;
|
||||||
if (c->real_abils.str_add > 100) c->real_abils.str_add = 100;
|
if (c->real_abils.str_add > 100) c->real_abils.str_add = 100;
|
||||||
if (c->real_abils.str_add < 0) c->real_abils.str_add = 0;
|
if (c->real_abils.str_add < 0) c->real_abils.str_add = 0;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_ADD(c));
|
snprintf(str, slen, "%d", GET_ADD(c));
|
||||||
}
|
}
|
||||||
|
|
@ -1131,6 +1137,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||||
c->real_abils.wis += addition;
|
c->real_abils.wis += addition;
|
||||||
if (c->real_abils.wis > max) c->real_abils.wis = max;
|
if (c->real_abils.wis > max) c->real_abils.wis = max;
|
||||||
if (c->real_abils.wis < 3) c->real_abils.wis = 3;
|
if (c->real_abils.wis < 3) c->real_abils.wis = 3;
|
||||||
|
affect_total(c);
|
||||||
}
|
}
|
||||||
snprintf(str, slen, "%d", GET_WIS(c));
|
snprintf(str, slen, "%d", GET_WIS(c));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,8 @@ void check_killer(struct char_data *ch, struct char_data *vict)
|
||||||
|
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
|
||||||
send_to_char(ch, "If you want to be a PLAYER KILLER, so be it...\r\n");
|
send_to_char(ch, "If you want to be a PLAYER KILLER, so be it...\r\n");
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "PC Killer bit set on %s for initiating attack on %s at %s.",
|
mudlog(BRF, MAX(LVL_IMMORT, MAX(GET_INVIS_LEV(ch), GET_INVIS_LEV(vict))),
|
||||||
|
TRUE, "PC Killer bit set on %s for initiating attack on %s at %s.",
|
||||||
GET_NAME(ch), GET_NAME(vict), world[IN_ROOM(vict)].name);
|
GET_NAME(ch), GET_NAME(vict), world[IN_ROOM(vict)].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -743,7 +744,8 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_NPC(victim)) {
|
if (!IS_NPC(victim)) {
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "%s killed by %s at %s", GET_NAME(victim), GET_NAME(ch), world[IN_ROOM(victim)].name);
|
mudlog(BRF, MAX(LVL_IMMORT, MAX(GET_INVIS_LEV(ch), GET_INVIS_LEV(victim))),
|
||||||
|
TRUE, "%s killed by %s at %s", GET_NAME(victim), GET_NAME(ch), world[IN_ROOM(victim)].name);
|
||||||
if (MOB_FLAGGED(ch, MOB_MEMORY))
|
if (MOB_FLAGGED(ch, MOB_MEMORY))
|
||||||
forget(ch, victim);
|
forget(ch, victim);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,8 @@ ACMD(do_oasis_hedit)
|
||||||
STATE(d) = CON_HEDIT;
|
STATE(d) = CON_HEDIT;
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing help files.", GET_NAME(d->character));
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),
|
||||||
|
TRUE, "OLC: %s starts editing help files.", GET_NAME(d->character));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hedit_setup_new(struct descriptor_data *d)
|
static void hedit_setup_new(struct descriptor_data *d)
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,8 @@ ACMD(do_ibt)
|
||||||
case SCMD_TYPO: LINK( ibtData, first_typo, last_typo, next, prev );
|
case SCMD_TYPO: LINK( ibtData, first_typo, last_typo, next, prev );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mudlog(NRM,LVL_IMMORT, FALSE, "%s has posted %s %s!", GET_NAME(ch), TANA(CMD_NAME), CMD_NAME);
|
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)),
|
||||||
|
FALSE, "%s has posted %s %s!", GET_NAME(ch), TANA(CMD_NAME), CMD_NAME);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (is_abbrev(arg,"resolve"))
|
else if (is_abbrev(arg,"resolve"))
|
||||||
|
|
@ -839,7 +840,7 @@ ACMD(do_oasis_ibtedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE,"OLC: %s starts editing %s %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,"OLC: %s starts editing %s %d",
|
||||||
GET_NAME(ch), IBT_TYPE, OLC_NUM(d));
|
GET_NAME(ch), IBT_TYPE, OLC_NUM(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
||||||
{ "wizlock" , "wizlock" , POS_DEAD , do_wizlock , LVL_IMPL, 0 },
|
{ "wizlock" , "wizlock" , POS_DEAD , do_wizlock , LVL_IMPL, 0 },
|
||||||
{ "write" , "write" , POS_STANDING, do_write , 1, 0 },
|
{ "write" , "write" , POS_STANDING, do_write , 1, 0 },
|
||||||
|
|
||||||
|
{ "zoneresets", "zoner" , POS_DEAD , do_gen_tog , LVL_IMPL, SCMD_ZONERESETS },
|
||||||
{ "zreset" , "zreset" , POS_DEAD , do_zreset , LVL_BUILDER, 0 },
|
{ "zreset" , "zreset" , POS_DEAD , do_zreset , LVL_BUILDER, 0 },
|
||||||
{ "zedit" , "zedit" , POS_DEAD , do_oasis_zedit, LVL_BUILDER, 0 },
|
{ "zedit" , "zedit" , POS_DEAD , do_oasis_zedit, LVL_BUILDER, 0 },
|
||||||
{ "zlist" , "zlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_ZLIST },
|
{ "zlist" , "zlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_ZLIST },
|
||||||
|
|
@ -1148,7 +1149,7 @@ static int perform_dupe_check(struct descriptor_data *d)
|
||||||
case RECON:
|
case RECON:
|
||||||
write_to_output(d, "Reconnecting.\r\n");
|
write_to_output(d, "Reconnecting.\r\n");
|
||||||
act("$n has reconnected.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n has reconnected.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
mudlog(NRM, MAX(0, GET_INVIS_LEV(d->character)), TRUE, "%s [%s] has reconnected.", GET_NAME(d->character), d->host);
|
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s [%s] has reconnected.", GET_NAME(d->character), d->host);
|
||||||
if (has_mail(GET_IDNUM(d->character)))
|
if (has_mail(GET_IDNUM(d->character)))
|
||||||
write_to_output(d, "You have mail waiting.\r\n");
|
write_to_output(d, "You have mail waiting.\r\n");
|
||||||
break;
|
break;
|
||||||
|
|
@ -1775,7 +1776,8 @@ void nanny(struct descriptor_data *d, char *arg)
|
||||||
|
|
||||||
delete_variables(GET_NAME(d->character));
|
delete_variables(GET_NAME(d->character));
|
||||||
write_to_output(d, "Character '%s' deleted! Goodbye.\r\n", GET_NAME(d->character));
|
write_to_output(d, "Character '%s' deleted! Goodbye.\r\n", GET_NAME(d->character));
|
||||||
mudlog(NRM, LVL_GOD, TRUE, "%s (lev %d) has self-deleted.", GET_NAME(d->character), GET_LEVEL(d->character));
|
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(d->character)), TRUE, "%s (lev %d) has self-deleted.",
|
||||||
|
GET_NAME(d->character), GET_LEVEL(d->character));
|
||||||
STATE(d) = CON_CLOSE;
|
STATE(d) = CON_CLOSE;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ static void check_idling(struct char_data *ch)
|
||||||
Crash_rentsave(ch, 0);
|
Crash_rentsave(ch, 0);
|
||||||
else
|
else
|
||||||
Crash_idlesave(ch);
|
Crash_idlesave(ch);
|
||||||
mudlog(CMP, LVL_GOD, TRUE, "%s force-rented and extracted (idle).", GET_NAME(ch));
|
mudlog(CMP, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s force-rented and extracted (idle).", GET_NAME(ch));
|
||||||
add_llog_entry(ch, LAST_IDLEOUT);
|
add_llog_entry(ch, LAST_IDLEOUT);
|
||||||
extract_char(ch);
|
extract_char(ch);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ ACMD(do_oasis_medit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE,"OLC: %s starts editing zone %d allowed zone %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,"OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ ACMD(do_msgedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing message %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing message %d",
|
||||||
GET_NAME(ch), OLC_NUM(d));
|
GET_NAME(ch), OLC_NUM(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
13
src/oasis.c
13
src/oasis.c
|
|
@ -197,13 +197,18 @@ void cleanup_olc(struct descriptor_data *d, byte cleanup_type)
|
||||||
act("$n stops using OLC.", TRUE, d->character, NULL, NULL, TO_ROOM);
|
act("$n stops using OLC.", TRUE, d->character, NULL, NULL, TO_ROOM);
|
||||||
|
|
||||||
if (cleanup_type == CLEANUP_CONFIG)
|
if (cleanup_type == CLEANUP_CONFIG)
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "OLC: %s stops editing the game configuration", GET_NAME(d->character));
|
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),
|
||||||
|
TRUE, "OLC: %s stops editing the game configuration", GET_NAME(d->character));
|
||||||
else if (STATE(d) == CON_TEDIT)
|
else if (STATE(d) == CON_TEDIT)
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "OLC: %s stops editing text files.", GET_NAME(d->character));
|
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),
|
||||||
|
TRUE, "OLC: %s stops editing text files.", GET_NAME(d->character));
|
||||||
else if (STATE(d) == CON_HEDIT)
|
else if (STATE(d) == CON_HEDIT)
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s stops editing help files.", GET_NAME(d->character));
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),
|
||||||
|
TRUE, "OLC: %s stops editing help files.", GET_NAME(d->character));
|
||||||
else
|
else
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s stops editing zone %d allowed zone %d", GET_NAME(d->character), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(d->character));
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)),
|
||||||
|
TRUE, "OLC: %s stops editing zone %d allowed zone %d",
|
||||||
|
GET_NAME(d->character), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(d->character));
|
||||||
|
|
||||||
STATE(d) = CON_PLAYING;
|
STATE(d) = CON_PLAYING;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static void auto_equip(struct char_data *ch, struct obj_data *obj, int location)
|
||||||
else
|
else
|
||||||
equip_char(ch, obj, j);
|
equip_char(ch, obj, j);
|
||||||
} else { /* Oops, saved a player with double equipment? */
|
} else { /* Oops, saved a player with double equipment? */
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE,
|
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
|
||||||
"SYSERR: autoeq: '%s' already equipped in position %d.", GET_NAME(ch), location);
|
"SYSERR: autoeq: '%s' already equipped in position %d.", GET_NAME(ch), location);
|
||||||
location = LOC_INVENTORY;
|
location = LOC_INVENTORY;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ ACMD(do_oasis_oedit)
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
/* Log the OLC message. */
|
/* Log the OLC message. */
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,10 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
|
||||||
ONOFF(PREFEDIT_FLAGGED(PRF_NOHASSLE)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM),
|
ONOFF(PREFEDIT_FLAGGED(PRF_NOHASSLE)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM),
|
||||||
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM)
|
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM)
|
||||||
);
|
);
|
||||||
|
if (GET_LEVEL(PREFEDIT_GET_CHAR) == LVL_IMPL)
|
||||||
|
send_to_char(d->character, "%s7%s) Zone Resets %s[%s%3s%s]\r\n",
|
||||||
|
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||||
|
ONOFF(PREFEDIT_FLAGGED(PRF_ZONERESETS)), CCCYN(d->character, C_NRM));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finishing Off */
|
/* Finishing Off */
|
||||||
|
|
@ -360,7 +364,8 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
||||||
case 'y':
|
case 'y':
|
||||||
case 'Y':
|
case 'Y':
|
||||||
prefedit_save_to_char(d);
|
prefedit_save_to_char(d);
|
||||||
mudlog(CMP, LVL_BUILDER, TRUE, "OLC: %s edits toggles for %s", GET_NAME(d->character), GET_NAME(OLC_PREFS(d)->ch));
|
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits toggles for %s",
|
||||||
|
GET_NAME(d->character), GET_NAME(OLC_PREFS(d)->ch));
|
||||||
/*. No strings to save - cleanup all .*/
|
/*. No strings to save - cleanup all .*/
|
||||||
cleanup_olc(d, CLEANUP_ALL);
|
cleanup_olc(d, CLEANUP_ALL);
|
||||||
break;
|
break;
|
||||||
|
|
@ -500,6 +505,18 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '7':
|
||||||
|
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMPL)
|
||||||
|
{
|
||||||
|
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||||
|
prefedit_disp_main_menu(d);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_ZONERESETS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||||
prefedit_disp_main_menu(d);
|
prefedit_disp_main_menu(d);
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ ACMD(do_oasis_qedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE,
|
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
|
||||||
"OLC: %s starts editing zone %d allowed zone %d",
|
"OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ ACMD(do_oasis_redit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ ACMD(do_oasis_sedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,8 @@ ASPELL(spell_summon)
|
||||||
GET_NAME(ch), world[IN_ROOM(ch)].name);
|
GET_NAME(ch), world[IN_ROOM(ch)].name);
|
||||||
|
|
||||||
send_to_char(ch, "You failed because %s has summon protection on.\r\n", GET_NAME(victim));
|
send_to_char(ch, "You failed because %s has summon protection on.\r\n", GET_NAME(victim));
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "%s failed summoning %s to %s.", GET_NAME(ch), GET_NAME(victim), world[IN_ROOM(ch)].name);
|
mudlog(BRF, MAX(LVL_IMMORT, MAX(GET_INVIS_LEV(ch), GET_INVIS_LEV(victim))), TRUE,
|
||||||
|
"%s failed summoning %s to %s.", GET_NAME(ch), GET_NAME(victim), world[IN_ROOM(ch)].name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,9 @@
|
||||||
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
||||||
#define PRF_AUTOKEY 32 /**< Automatically unlock locked doors when opening */
|
#define PRF_AUTOKEY 32 /**< Automatically unlock locked doors when opening */
|
||||||
#define PRF_AUTODOOR 33 /**< Use the next available door */
|
#define PRF_AUTODOOR 33 /**< Use the next available door */
|
||||||
|
#define PRF_ZONERESETS 34
|
||||||
/** Total number of available PRF flags */
|
/** Total number of available PRF flags */
|
||||||
#define NUM_PRF_FLAGS 34
|
#define NUM_PRF_FLAGS 35
|
||||||
|
|
||||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ void tedit_string_cleanup(struct descriptor_data *d, int terminator)
|
||||||
fputs(*d->str, fl);
|
fputs(*d->str, fl);
|
||||||
}
|
}
|
||||||
fclose(fl);
|
fclose(fl);
|
||||||
mudlog(CMP, LVL_GOD, TRUE, "OLC: %s saves '%s'.", GET_NAME(d->character), storage);
|
mudlog(CMP, MAX(LVL_GOD, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s saves '%s'.", GET_NAME(d->character), storage);
|
||||||
write_to_output(d, "Saved.\r\n");
|
write_to_output(d, "Saved.\r\n");
|
||||||
if (!strcmp(storage, NEWS_FILE))
|
if (!strcmp(storage, NEWS_FILE))
|
||||||
newsmod = time(0);
|
newsmod = time(0);
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,9 @@ int strn_cmp(const char *arg1, const char *arg2, int n)
|
||||||
void basic_mud_vlog(const char *format, va_list args)
|
void basic_mud_vlog(const char *format, va_list args)
|
||||||
{
|
{
|
||||||
time_t ct = time(0);
|
time_t ct = time(0);
|
||||||
char timestr[20];
|
char timestr[21];
|
||||||
|
int i;
|
||||||
|
|
||||||
if (logfile == NULL) {
|
if (logfile == NULL) {
|
||||||
puts("SYSERR: Using log() before stream was initialized!");
|
puts("SYSERR: Using log() before stream was initialized!");
|
||||||
return;
|
return;
|
||||||
|
|
@ -201,6 +202,7 @@ void basic_mud_vlog(const char *format, va_list args)
|
||||||
if (format == NULL)
|
if (format == NULL)
|
||||||
format = "SYSERR: log() received a NULL format.";
|
format = "SYSERR: log() received a NULL format.";
|
||||||
|
|
||||||
|
for (i=0;i<21;i++) timestr[i]=0;
|
||||||
strftime(timestr, sizeof(timestr), "%b %d %H:%M:%S %Y", localtime(&ct));
|
strftime(timestr, sizeof(timestr), "%b %d %H:%M:%S %Y", localtime(&ct));
|
||||||
|
|
||||||
fprintf(logfile, "%-20.20s :: ", timestr);
|
fprintf(logfile, "%-20.20s :: ", timestr);
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ ACMD(do_oasis_zedit)
|
||||||
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
|
||||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
|
||||||
|
|
||||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
mudlog(CMP, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "OLC: %s starts editing zone %d allowed zone %d",
|
||||||
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue