MAJOR UPDATE: Admin Levels split from Mortal Levels

This commit is contained in:
JamDog 2010-11-24 20:07:22 +00:00
parent 2b30509371
commit dcba9d6441
77 changed files with 2882 additions and 2067 deletions

View file

@ -35,6 +35,19 @@ export (QQ's a zone into a tarball)
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too) (lots of major bugfixes too)
@ @
[Nov 24 2010] - Jamdog
Split mortal and admin levels (thanks fnord for original patch/idea)
Mortal level converted to ubyte for 255 max
Max mortal level now configurable in cedit
Level on help files now indicates admin level
Added 'set <player> admlevel <num>'
Added admin command for imms
Added mortal command, and modified return command to work for everyone
Added admin level to player index (for autowiz)
Added mortal flag to player index (for autowiz)
Autowiz converted to work with new admin levels
Socials are now admin-level dependant
Added imm ability to 'score <player>'
[Nov 06 2010] - Jamdog [Nov 06 2010] - Jamdog
Added HappyHour feature Added HappyHour feature
Added game_info function for sending global messages to all players Added game_info function for sending global messages to all players

View file

@ -115,13 +115,13 @@ static int is_tell_ok(struct char_data *ch, struct char_data *vict)
send_to_char(ch, "You try to tell yourself something.\r\n"); send_to_char(ch, "You try to tell yourself something.\r\n");
else if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOTELL)) else if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOTELL))
send_to_char(ch, "You can't tell other people while you have notell on.\r\n"); send_to_char(ch, "You can't tell other people while you have notell on.\r\n");
else if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD)) else if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_SOUNDPROOF) && !(IS_ADMIN(ch, ADMLVL_GOD)))
send_to_char(ch, "The walls seem to absorb your words.\r\n"); send_to_char(ch, "The walls seem to absorb your words.\r\n");
else if (!IS_NPC(vict) && !vict->desc) /* linkless */ else if (!IS_NPC(vict) && !vict->desc) /* linkless */
act("$E's linkless at the moment.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP); act("$E's linkless at the moment.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP);
else if (PLR_FLAGGED(vict, PLR_WRITING)) else if (PLR_FLAGGED(vict, PLR_WRITING))
act("$E's writing a message right now; try again later.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP); act("$E's writing a message right now; try again later.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP);
else if ((!IS_NPC(vict) && PRF_FLAGGED(vict, PRF_NOTELL)) || (ROOM_FLAGGED(IN_ROOM(vict), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD))) else if ((!IS_NPC(vict) && PRF_FLAGGED(vict, PRF_NOTELL)) || (ROOM_FLAGGED(IN_ROOM(vict), ROOM_SOUNDPROOF) && !(IS_ADMIN(ch, ADMLVL_GOD))))
act("$E can't hear you.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP); act("$E can't hear you.", FALSE, ch, 0, vict, TO_CHAR | TO_SLEEP);
else else
return (TRUE); return (TRUE);
@ -134,6 +134,7 @@ static int is_tell_ok(struct char_data *ch, struct char_data *vict)
ACMD(do_tell) ACMD(do_tell)
{ {
struct char_data *vict = NULL; struct char_data *vict = NULL;
struct descriptor_data *d = NULL;
char buf[MAX_INPUT_LENGTH], buf2[MAX_INPUT_LENGTH]; char buf[MAX_INPUT_LENGTH], buf2[MAX_INPUT_LENGTH];
half_chop(argument, buf, buf2); half_chop(argument, buf, buf2);
@ -174,12 +175,23 @@ ACMD(do_tell)
last_webster_teller = GET_IDNUM(ch); last_webster_teller = GET_IDNUM(ch);
send_to_char(ch, "You look up '%s' in Merriam-Webster.\r\n", word); send_to_char(ch, "You look up '%s' in Merriam-Webster.\r\n", word);
#endif /* platform specific part */ #endif /* platform specific part */
} else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD))) }
send_to_char(ch, "%s", CONFIG_NOPERSON); else if (is_abbrev(buf, "all") && ADM_FLAGGED(ch, ADM_TELLALL)) {
else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD))) for (d = descriptor_list; d; d = d->next) {
if (!(vict = d->character))
continue;
if (vict == ch || STATE(d) != CON_PLAYING)
continue;
perform_tell(ch, vict, buf2);
}
}
else if (IS_ADMIN(ch, ADMLVL_IMMORT) && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD))) {
if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
send_to_char(ch, "%s", CONFIG_NOPERSON); send_to_char(ch, "%s", CONFIG_NOPERSON);
else if (is_tell_ok(ch, vict)) else if (is_tell_ok(ch, vict))
perform_tell(ch, vict, buf2); perform_tell(ch, vict, buf2);
} else if (is_tell_ok(ch, vict))
perform_tell(ch, vict, buf2);
} }
ACMD(do_reply) ACMD(do_reply)
@ -356,7 +368,7 @@ ACMD(do_page)
snprintf(buf, sizeof(buf), "\007\007*$n* %s", buf2); snprintf(buf, sizeof(buf), "\007\007*$n* %s", buf2);
if (!str_cmp(arg, "all")) { if (!str_cmp(arg, "all")) {
if (GET_LEVEL(ch) > LVL_GOD) { if (ADM_FLAGGED(ch, ADM_TELLALL)) {
for (d = descriptor_list; d; d = d->next) for (d = descriptor_list; d; d = d->next)
if (STATE(d) == CON_PLAYING && d->character) if (STATE(d) == CON_PLAYING && d->character)
act(buf, FALSE, ch, 0, d->character, TO_VICT); act(buf, FALSE, ch, 0, d->character, TO_VICT);
@ -442,7 +454,7 @@ ACMD(do_gen_comm)
send_to_char(ch, "%s", com_msgs[subcmd][0]); send_to_char(ch, "%s", com_msgs[subcmd][0]);
return; return;
} }
if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD)) { if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_SOUNDPROOF) && !(IS_ADMIN(ch, ADMLVL_GOD))) {
send_to_char(ch, "The walls seem to absorb your words.\r\n"); send_to_char(ch, "The walls seem to absorb your words.\r\n");
return; return;
} }
@ -505,7 +517,7 @@ ACMD(do_gen_comm)
if (!IS_NPC(ch) && (PRF_FLAGGED(i->character, channels[subcmd]) || PLR_FLAGGED(i->character, PLR_WRITING))) if (!IS_NPC(ch) && (PRF_FLAGGED(i->character, channels[subcmd]) || PLR_FLAGGED(i->character, PLR_WRITING)))
continue; continue;
if (ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD)) if (ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF) && !(IS_ADMIN(ch, ADMLVL_GOD)))
continue; continue;
if (subcmd == SCMD_SHOUT && ((world[IN_ROOM(ch)].zone != world[IN_ROOM(i->character)].zone) || if (subcmd == SCMD_SHOUT && ((world[IN_ROOM(ch)].zone != world[IN_ROOM(i->character)].zone) ||
@ -544,7 +556,7 @@ ACMD(do_qcomm)
snprintf(buf, sizeof(buf), "$n quest-says, '%s'", argument); snprintf(buf, sizeof(buf), "$n quest-says, '%s'", argument);
else { else {
strlcpy(buf, argument, sizeof(buf)); strlcpy(buf, argument, sizeof(buf));
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "(GC) %s qechoed: %s", GET_NAME(ch), argument); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "(GC) %s qechoed: %s", GET_NAME(ch), argument);
} }
for (i = descriptor_list; i; i = i->next) for (i = descriptor_list; i; i = i->next)
if (STATE(i) == CON_PLAYING && i != ch->desc && PRF_FLAGGED(i->character, PRF_QUEST)) if (STATE(i) == CON_PLAYING && i != ch->desc && PRF_FLAGGED(i->character, PRF_QUEST))

View file

@ -281,6 +281,7 @@ void perform_immort_vis(struct char_data *ch);
void snoop_check(struct char_data *ch); void snoop_check(struct char_data *ch);
bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_name); bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_name);
bool AddRecentPlayer(char *chname, char *chhost, bool newplr, bool cpyplr); bool AddRecentPlayer(char *chname, char *chhost, bool newplr, bool cpyplr);
void set_default_admin_privs(struct char_data *ch, bool keep_old);
/* Functions with subcommands */ /* Functions with subcommands */
/* do_date */ /* do_date */
ACMD(do_date); ACMD(do_date);
@ -307,6 +308,7 @@ ACMD(do_wizutil);
#define SCMD_THAW 5 #define SCMD_THAW 5
#define SCMD_UNAFFECT 6 #define SCMD_UNAFFECT 6
/* Functions without subcommands */ /* Functions without subcommands */
ACMD(do_admin);
ACMD(do_advance); ACMD(do_advance);
ACMD(do_at); ACMD(do_at);
ACMD(do_checkloadstatus); ACMD(do_checkloadstatus);
@ -320,6 +322,7 @@ ACMD(do_goto);
ACMD(do_invis); ACMD(do_invis);
ACMD(do_links); ACMD(do_links);
ACMD(do_load); ACMD(do_load);
ACMD(do_mortal);
ACMD(do_peace); ACMD(do_peace);
ACMD(do_plist); ACMD(do_plist);
ACMD(do_purge); ACMD(do_purge);

View file

@ -202,9 +202,9 @@ static void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mo
display = j; display = j;
} }
/* When looking in room, hide objects starting with '.', except for holylight */ /* When looking in room, hide objects starting with '.', except for holylight and seesecret */
if (num > 0 && (mode != SHOW_OBJ_LONG || *display->description != '.' || if (num > 0 && (mode != SHOW_OBJ_LONG || *display->description != '.' ||
(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)))) { (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_HOLYLIGHT)) || (ADM_FLAGGED(ch, ADM_SEESECRET)))) {
if (mode == SHOW_OBJ_LONG) if (mode == SHOW_OBJ_LONG)
send_to_char(ch, "%s", CCGRN(ch, C_NRM)); send_to_char(ch, "%s", CCGRN(ch, C_NRM));
if (num != 1) if (num != 1)
@ -276,7 +276,7 @@ static void look_at_char(struct char_data *i, struct char_data *ch)
show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT); show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT);
} }
} }
if (ch != i && (IS_THIEF(ch) || GET_LEVEL(ch) >= LVL_IMMORT)) { if (ch != i && (IS_THIEF(ch) || (ADM_FLAGGED(ch, ADM_SEEINV)))) {
act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT); act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT);
list_obj_to_char(i->carrying, ch, SHOW_OBJ_SHORT, TRUE); list_obj_to_char(i->carrying, ch, SHOW_OBJ_SHORT, TRUE);
} }
@ -322,7 +322,7 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
if (AFF_FLAGGED(i, AFF_SANCTUARY)) if (AFF_FLAGGED(i, AFF_SANCTUARY))
act("...$e glows with a bright light!", FALSE, i, 0, ch, TO_VICT); act("...$e glows with a bright light!", FALSE, i, 0, ch, TO_VICT);
if (AFF_FLAGGED(i, AFF_BLIND) && GET_LEVEL(i) < LVL_IMMORT) if (AFF_FLAGGED(i, AFF_BLIND) && !IS_ADMIN(i, ADMLVL_IMMORT))
act("...$e is groping around blindly!", FALSE, i, 0, ch, TO_VICT); act("...$e is groping around blindly!", FALSE, i, 0, ch, TO_VICT);
return; return;
@ -389,7 +389,7 @@ static void list_char_to_char(struct char_data *list, struct char_data *ch)
for (i = list; i; i = i->next_in_room) for (i = list; i; i = i->next_in_room)
if (ch != i) { if (ch != i) {
/* hide npcs whose description starts with a '.' from non-holylighted people - Idea from Elaseth of TBA */ /* hide npcs whose description starts with a '.' from non-holylighted people - Idea from Elaseth of TBA */
if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_HOLYLIGHT) && if (!IS_NPC(ch) && !ADM_FLAGGED(ch, ADM_SEESECRET) &&
IS_NPC(i) && i->player.long_descr && *i->player.long_descr == '.') IS_NPC(i) && i->player.long_descr && *i->player.long_descr == '.')
continue; continue;
send_to_char(ch, "%s", CCYEL(ch, C_NRM)); send_to_char(ch, "%s", CCYEL(ch, C_NRM));
@ -427,7 +427,7 @@ ACMD(do_exits)
{ {
int door, len = 0; int door, len = 0;
if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) { if (AFF_FLAGGED(ch, AFF_BLIND) && !IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "You can't see a damned thing, you're blind!\r\n"); send_to_char(ch, "You can't see a damned thing, you're blind!\r\n");
return; return;
} }
@ -472,7 +472,7 @@ void look_at_room(struct char_data *ch, int ignore_brief)
if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) { if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) {
send_to_char(ch, "It is pitch black...\r\n"); send_to_char(ch, "It is pitch black...\r\n");
return; return;
} else if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) { } else if (AFF_FLAGGED(ch, AFF_BLIND) && !IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "You see nothing but infinite darkness...\r\n"); send_to_char(ch, "You see nothing but infinite darkness...\r\n");
return; return;
} }
@ -550,7 +550,7 @@ static void look_in_obj(struct char_data *ch, char *arg)
send_to_char(ch, "There's nothing inside that!\r\n"); send_to_char(ch, "There's nothing inside that!\r\n");
else { else {
if (GET_OBJ_TYPE(obj) == ITEM_CONTAINER) { if (GET_OBJ_TYPE(obj) == ITEM_CONTAINER) {
if (OBJVAL_FLAGGED(obj, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE))) if (OBJVAL_FLAGGED(obj, CONT_CLOSED) && (!IS_ADMIN(ch, ADMLVL_IMMORT) || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
send_to_char(ch, "It is closed.\r\n"); send_to_char(ch, "It is closed.\r\n");
else { else {
send_to_char(ch, "%s", fname(obj->name)); send_to_char(ch, "%s", fname(obj->name));
@ -565,7 +565,6 @@ static void look_in_obj(struct char_data *ch, char *arg)
send_to_char(ch, " (used): \r\n"); send_to_char(ch, " (used): \r\n");
break; break;
} }
list_obj_to_char(obj->contains, ch, SHOW_OBJ_SHORT, TRUE); list_obj_to_char(obj->contains, ch, SHOW_OBJ_SHORT, TRUE);
} }
} else { /* item must be a fountain or drink container */ } else { /* item must be a fountain or drink container */
@ -694,7 +693,7 @@ ACMD(do_look)
if (GET_POS(ch) < POS_SLEEPING) if (GET_POS(ch) < POS_SLEEPING)
send_to_char(ch, "You can't see anything but stars!\r\n"); send_to_char(ch, "You can't see anything but stars!\r\n");
else if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) else if (AFF_FLAGGED(ch, AFF_BLIND) && !IS_ADMIN(ch, ADMLVL_IMMORT))
send_to_char(ch, "You can't see a damned thing, you're blind!\r\n"); send_to_char(ch, "You can't see a damned thing, you're blind!\r\n");
else if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) { else if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) {
send_to_char(ch, "It is pitch black...\r\n"); send_to_char(ch, "It is pitch black...\r\n");
@ -778,52 +777,73 @@ ACMD(do_gold)
ACMD(do_score) ACMD(do_score)
{ {
int i,j,admin;
char arg[MAX_INPUT_LENGTH];
struct char_data *vict;
struct time_info_data playing_time; struct time_info_data playing_time;
if (IS_NPC(ch)) if (IS_NPC(ch))
return; return;
send_to_char(ch, "You are %d years old.", GET_AGE(ch)); vict = ch; /* Default is 'self' */
if (age(ch)->month == 0 && age(ch)->day == 0) /* Admins can type score <player> to see someone elses score */
if(IS_ADMIN(ch, ADMLVL_GOD)) {
one_argument(argument, arg);
if ((arg != NULL) && *arg) {
if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) {
send_to_char(ch, "%s", CONFIG_NOPERSON);
return;
}
}
}
if (IS_NPC(vict))
return;
if (ch != vict)
send_to_char(ch, "Score for: %s %s (level %d)\r\n", GET_NAME(vict), GET_TITLE(vict), GET_LEVEL(vict));
send_to_char(ch, "You are %d years old.", GET_AGE(vict));
if (age(vict)->month == 0 && age(vict)->day == 0)
send_to_char(ch, " It's your birthday today.\r\n"); send_to_char(ch, " It's your birthday today.\r\n");
else else
send_to_char(ch, "\r\n"); send_to_char(ch, "\r\n");
send_to_char(ch, "You have %d(%d) hit, %d(%d) mana and %d(%d) movement points.\r\n", send_to_char(ch, "You have %d(%d) hit, %d(%d) mana and %d(%d) movement points.\r\n",
GET_HIT(ch), GET_MAX_HIT(ch), GET_MANA(ch), GET_MAX_MANA(ch), GET_HIT(vict), GET_MAX_HIT(vict), GET_MANA(vict), GET_MAX_MANA(vict),
GET_MOVE(ch), GET_MAX_MOVE(ch)); GET_MOVE(vict), GET_MAX_MOVE(vict));
send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n", send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n",
compute_armor_class(ch), GET_ALIGNMENT(ch)); compute_armor_class(vict), GET_ALIGNMENT(vict));
send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n", send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n",
GET_EXP(ch), GET_GOLD(ch), GET_QUESTPOINTS(ch)); GET_EXP(vict), GET_GOLD(vict), GET_QUESTPOINTS(vict));
if (GET_LEVEL(ch) < 30) if (GET_LEVEL(vict) < CONFIG_MAX_LEVEL)
send_to_char(ch, "You need %d exp to reach your next level.\r\n", send_to_char(ch, "You need %d exp to reach your next level.\r\n",
level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1) - GET_EXP(ch)); level_exp(GET_CLASS(vict), GET_LEVEL(vict) + 1) - GET_EXP(vict));
send_to_char(ch, "You have earned %d quest points.\r\n", GET_QUESTPOINTS(ch)); send_to_char(ch, "You have earned %d quest points.\r\n", GET_QUESTPOINTS(vict));
send_to_char(ch, "You have completed %d quest%s, ", send_to_char(ch, "You have completed %d quest%s, ",
GET_NUM_QUESTS(ch), GET_NUM_QUESTS(vict),
GET_NUM_QUESTS(ch) == 1 ? "" : "s"); GET_NUM_QUESTS(vict) == 1 ? "" : "s");
if (GET_QUEST(ch) == NOTHING) if (GET_QUEST(vict) == NOTHING)
send_to_char(ch, "and you are not on a quest at the moment.\r\n"); send_to_char(ch, "and you are not on a quest at the moment.\r\n");
else else
send_to_char(ch, "and your current quest is %d.\r\n", send_to_char(ch, "and your current quest is %d.\r\n",
GET_QUEST(ch) == NOTHING ? -1 : GET_QUEST(ch)); GET_QUEST(vict) == NOTHING ? -1 : GET_QUEST(vict));
playing_time = *real_time_passed((time(0) - ch->player.time.logon) + playing_time = *real_time_passed((time(0) - vict->player.time.logon) +
ch->player.time.played, 0); vict->player.time.played, 0);
send_to_char(ch, "You have been playing for %d day%s and %d hour%s.\r\n", send_to_char(ch, "You have been playing for %d day%s and %d hour%s.\r\n",
playing_time.day, playing_time.day == 1 ? "" : "s", playing_time.day, playing_time.day == 1 ? "" : "s",
playing_time.hours, playing_time.hours == 1 ? "" : "s"); playing_time.hours, playing_time.hours == 1 ? "" : "s");
send_to_char(ch, "This ranks you as %s %s (level %d).\r\n", send_to_char(ch, "This ranks you as %s %s (level %d).\r\n",
GET_NAME(ch), GET_TITLE(ch), GET_LEVEL(ch)); GET_NAME(vict), GET_TITLE(vict), GET_LEVEL(vict));
switch (GET_POS(ch)) { switch (GET_POS(vict)) {
case POS_DEAD: case POS_DEAD:
send_to_char(ch, "You are DEAD!\r\n"); send_to_char(ch, "You are DEAD!\r\n");
break; break;
@ -843,15 +863,15 @@ ACMD(do_score)
send_to_char(ch, "You are resting.\r\n"); send_to_char(ch, "You are resting.\r\n");
break; break;
case POS_SITTING: case POS_SITTING:
if (!SITTING(ch)) if (!SITTING(vict))
send_to_char(ch, "You are sitting.\r\n"); send_to_char(ch, "You are sitting.\r\n");
else { else {
struct obj_data *furniture = SITTING(ch); struct obj_data *furniture = SITTING(vict);
send_to_char(ch, "You are sitting upon %s.\r\n", furniture->short_description); send_to_char(ch, "You are sitting upon %s.\r\n", furniture->short_description);
} }
break; break;
case POS_FIGHTING: case POS_FIGHTING:
send_to_char(ch, "You are fighting %s.\r\n", FIGHTING(ch) ? PERS(FIGHTING(ch), ch) : "thin air"); send_to_char(ch, "You are fighting %s.\r\n", FIGHTING(vict) ? PERS(FIGHTING(vict), vict) : "thin air");
break; break;
case POS_STANDING: case POS_STANDING:
send_to_char(ch, "You are standing.\r\n"); send_to_char(ch, "You are standing.\r\n");
@ -861,56 +881,72 @@ ACMD(do_score)
break; break;
} }
if (GET_COND(ch, DRUNK) > 10) if (GET_COND(vict, DRUNK) > 10)
send_to_char(ch, "You are intoxicated.\r\n"); send_to_char(ch, "You are intoxicated.\r\n");
if (GET_COND(ch, HUNGER) == 0) if (GET_COND(vict, HUNGER) == 0)
send_to_char(ch, "You are hungry.\r\n"); send_to_char(ch, "You are hungry.\r\n");
if (GET_COND(ch, THIRST) == 0) if (GET_COND(vict, THIRST) == 0)
send_to_char(ch, "You are thirsty.\r\n"); send_to_char(ch, "You are thirsty.\r\n");
if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) if (AFF_FLAGGED(vict, AFF_BLIND) && !IS_ADMIN(vict, ADMLVL_IMMORT))
send_to_char(ch, "You have been blinded!\r\n"); send_to_char(ch, "You have been blinded!\r\n");
if (AFF_FLAGGED(ch, AFF_INVISIBLE)) if (AFF_FLAGGED(vict, AFF_INVISIBLE))
send_to_char(ch, "You are invisible.\r\n"); send_to_char(ch, "You are invisible.\r\n");
if (AFF_FLAGGED(ch, AFF_DETECT_INVIS)) if (AFF_FLAGGED(vict, AFF_DETECT_INVIS))
send_to_char(ch, "You are sensitive to the presence of invisible things.\r\n"); send_to_char(ch, "You are sensitive to the presence of invisible things.\r\n");
if (AFF_FLAGGED(ch, AFF_SANCTUARY)) if (AFF_FLAGGED(vict, AFF_SANCTUARY))
send_to_char(ch, "You are protected by Sanctuary.\r\n"); send_to_char(ch, "You are protected by Sanctuary.\r\n");
if (AFF_FLAGGED(ch, AFF_POISON)) if (AFF_FLAGGED(vict, AFF_POISON))
send_to_char(ch, "You are poisoned!\r\n"); send_to_char(ch, "You are poisoned!\r\n");
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(vict, AFF_CHARM))
send_to_char(ch, "You have been charmed!\r\n"); send_to_char(ch, "You have been charmed!\r\n");
if (affected_by_spell(ch, SPELL_ARMOR)) if (affected_by_spell(vict, SPELL_ARMOR))
send_to_char(ch, "You feel protected.\r\n"); send_to_char(ch, "You feel protected.\r\n");
if (AFF_FLAGGED(ch, AFF_INFRAVISION)) if (AFF_FLAGGED(vict, AFF_INFRAVISION))
send_to_char(ch, "Your eyes are glowing red.\r\n"); send_to_char(ch, "Your eyes are glowing red.\r\n");
if (PRF_FLAGGED(ch, PRF_SUMMONABLE)) if (PRF_FLAGGED(vict, PRF_SUMMONABLE))
send_to_char(ch, "You are summonable by other players.\r\n"); send_to_char(ch, "You are summonable by other players.\r\n");
if (GET_LEVEL(ch) >= LVL_IMMORT) { if (ADM_FLAGGED(vict, ADM_POOF)) {
if (POOFIN(ch)) if (POOFIN(ch))
send_to_char(ch, "%sPOOFIN: %s%s %s%s\r\n", QYEL, QCYN, GET_NAME(ch), POOFIN(ch), QNRM); send_to_char(ch, "%sPOOFIN: %s%s %s%s\r\n", QYEL, QCYN, GET_NAME(vict), POOFIN(vict), QNRM);
else else
send_to_char(ch, "%sPOOFIN: %s%s appears with an ear-splitting bang.%s\r\n", QYEL, QCYN, GET_NAME(ch), QNRM); send_to_char(ch, "%sPOOFIN: %s%s appears with an ear-splitting bang.%s\r\n", QYEL, QCYN, GET_NAME(vict), QNRM);
if (POOFOUT(ch)) if (POOFOUT(ch))
send_to_char(ch, "%sPOOFOUT: %s%s %s%s\r\n", QYEL, QCYN, GET_NAME(ch), POOFOUT(ch), QNRM); send_to_char(ch, "%sPOOFOUT: %s%s %s%s\r\n", QYEL, QCYN, GET_NAME(vict), POOFOUT(vict), QNRM);
else else
send_to_char(ch, "%sPOOFOUT: %s%s disappears in a puff of smoke.%s\r\n", QYEL, QCYN, GET_NAME(ch), QNRM); send_to_char(ch, "%sPOOFOUT: %s%s disappears in a puff of smoke.%s\r\n", QYEL, QCYN, GET_NAME(vict), QNRM);
send_to_char(ch, "Your current zone: %s%d%s\r\n", CCCYN(ch, C_NRM), GET_OLC_ZONE(ch),
CCNRM(ch, C_NRM));
} }
if (ADM_FLAGGED(vict, ADM_BUILD)) {
send_to_char(ch, "Your current zone: %s%d%s\r\n", QCYN, GET_OLC_ZONE(vict), QNRM);
}
admin = 0;
for (i=0; i < NUM_ADMFLAGS; i++)
if (ADM_FLAGGED(vict, i))
admin++;
if (admin > 0) {
send_to_char(ch, "Admin Level: %d (%s)\r\n", GET_ADMLEVEL(vict), admin_level_names[(GET_ADMLEVEL(vict))]);
send_to_char(ch, "You possess the following administrative abilities:\r\n");
for (i=0,j=0; i < NUM_ADMFLAGS; i++) {
if (ADM_FLAGGED(vict, i))
send_to_char(ch, "%s%-40.40s%s%s", QYEL, admin_flags[i], (!(++j % 2)) ? "\r\n" : "", QNRM);
}
send_to_char(ch, "\r\n");
}
} }
ACMD(do_inventory) ACMD(do_inventory)
@ -994,7 +1030,7 @@ ACMD(do_weather)
send_to_char(ch, "The sky is %s and %s.\r\n", sky_look[weather_info.sky], send_to_char(ch, "The sky is %s and %s.\r\n", sky_look[weather_info.sky],
weather_info.change >= 0 ? "you feel a warm wind from south" : weather_info.change >= 0 ? "you feel a warm wind from south" :
"your foot tells you bad weather is due"); "your foot tells you bad weather is due");
if (GET_LEVEL(ch) >= LVL_GOD) if (ADM_FLAGGED(ch, ADM_KNOWWEATHER))
send_to_char(ch, "Pressure: %d (change: %d), Sky: %d (%s)\r\n", send_to_char(ch, "Pressure: %d (change: %d), Sky: %d (%s)\r\n",
weather_info.pressure, weather_info.pressure,
weather_info.change, weather_info.change,
@ -1060,7 +1096,7 @@ ACMD(do_help)
} }
if (!*argument) { if (!*argument) {
if (GET_LEVEL(ch) < LVL_IMMORT) if (!IS_ADMIN(ch, ADMLVL_IMMORT))
page_string(ch->desc, help, 0); page_string(ch->desc, help, 0);
else else
page_string(ch->desc, ihelp, 0); page_string(ch->desc, ihelp, 0);
@ -1069,12 +1105,12 @@ ACMD(do_help)
space_to_minus(argument); space_to_minus(argument);
if ((mid = search_help(argument, GET_LEVEL(ch))) == NOWHERE) { if ((mid = search_help(argument, GET_ADMLEVEL(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, MAX(ADMLVL_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_ADMLEVEL(ch))
continue; continue;
/* To help narrow down results, if they don't start with the same letters, move on. */ /* To help narrow down results, if they don't start with the same letters, move on. */
if (*argument != *help_table[i].keywords) if (*argument != *help_table[i].keywords)
@ -1103,7 +1139,7 @@ ACMD(do_who)
int i, num_can_see = 0; int i, num_can_see = 0;
char name_search[MAX_INPUT_LENGTH], buf[MAX_INPUT_LENGTH]; char name_search[MAX_INPUT_LENGTH], buf[MAX_INPUT_LENGTH];
char mode; char mode;
int low = 0, high = LVL_IMPL, localwho = 0, questwho = 0; int low = 0, high = CONFIG_MAX_LEVEL, localwho = 0, questwho = 0;
int showclass = 0, short_list = 0, outlaws = 0; int showclass = 0, short_list = 0, outlaws = 0;
int who_room = 0, showgroup = 0, showleader = 0; int who_room = 0, showgroup = 0, showleader = 0;
@ -1113,8 +1149,8 @@ ACMD(do_who)
int max_level; int max_level;
int count; /* must always start as 0 */ int count; /* must always start as 0 */
} rank[] = { } rank[] = {
{ "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0}, { "Immortals\r\n---------\r\n", ADMLVL_IMMORT, ADMLVL_IMPL, 0},
{ "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 }, { "Mortals\r\n-------\r\n", 0, ADMLVL_MORTAL, 0 },
{ "\n", 0, 0, 0 } { "\n", 0, 0, 0 }
}; };
@ -1204,7 +1240,10 @@ ACMD(do_who)
if (showleader && (!tch->followers || !AFF_FLAGGED(tch, AFF_GROUP))) if (showleader && (!tch->followers || !AFF_FLAGGED(tch, AFF_GROUP)))
continue; continue;
for (i = 0; *rank[i].disp != '\n'; i++) for (i = 0; *rank[i].disp != '\n'; i++)
if (GET_LEVEL(tch) >= rank[i].min_level && GET_LEVEL(tch) <= rank[i].max_level) if (GET_ADMLEVEL(tch) >= rank[i].min_level && GET_ADMLEVEL(tch) <= rank[i].max_level) {
if (rank[i].min_level >= ADMLVL_IMMORT && !PRF_FLAGGED(tch, PRF_MORTAL))
rank[i].count++;
} else if (rank[i].max_level < ADMLVL_IMMORT && PRF_FLAGGED(tch, PRF_MORTAL))
rank[i].count++; rank[i].count++;
} }
} }
@ -1224,8 +1263,13 @@ ACMD(do_who)
else if (!(tch = d->character)) else if (!(tch = d->character))
continue; continue;
if ((GET_LEVEL(tch) < rank[i].min_level || GET_LEVEL(tch) > rank[i].max_level) && !short_list) if (PRF_FLAGGED(tch, PRF_MORTAL)) {
if (rank[i].min_level >= ADMLVL_IMMORT)
continue; continue;
} else {
if ((GET_ADMLEVEL(tch) < rank[i].min_level || GET_ADMLEVEL(tch) > rank[i].max_level) && !short_list)
continue;
}
if (!IS_PLAYING(d)) if (!IS_PLAYING(d))
continue; continue;
if (*name_search && str_cmp(GET_NAME(tch), name_search) && if (*name_search && str_cmp(GET_NAME(tch), name_search) &&
@ -1250,13 +1294,13 @@ ACMD(do_who)
if (short_list) { if (short_list) {
send_to_char(ch, "%s[%2d %s] %-12.12s%s%s", send_to_char(ch, "%s[%2d %s] %-12.12s%s%s",
(GET_LEVEL(tch) >= LVL_IMMORT ? CCYEL(ch, C_SPR) : ""), (IS_ADMIN(tch, ADMLVL_IMMORT) ? CCYEL(ch, C_SPR) : ""),
GET_LEVEL(tch), CLASS_ABBR(tch), GET_NAME(tch), GET_LEVEL(tch), CLASS_ABBR(tch), GET_NAME(tch),
CCNRM(ch, C_SPR), ((!(++num_can_see % 4)) ? "\r\n" : "")); CCNRM(ch, C_SPR), ((!(++num_can_see % 4)) ? "\r\n" : ""));
} else { } else {
num_can_see++; num_can_see++;
send_to_char(ch, "%s[%2d %s] %s%s%s%s", send_to_char(ch, "%s[%2d %s] %s%s%s%s",
(GET_LEVEL(tch) >= LVL_IMMORT ? CCYEL(ch, C_SPR) : ""), (IS_ADMIN(tch, ADMLVL_IMMORT) ? CCYEL(ch, C_SPR) : ""),
GET_LEVEL(tch), CLASS_ABBR(tch), GET_LEVEL(tch), CLASS_ABBR(tch),
GET_NAME(tch), (*GET_TITLE(tch) ? " " : ""), GET_TITLE(tch), GET_NAME(tch), (*GET_TITLE(tch) ? " " : ""), GET_TITLE(tch),
CCNRM(ch, C_SPR)); CCNRM(ch, C_SPR));
@ -1338,7 +1382,7 @@ ACMD(do_who)
} }
#define USERS_FORMAT \ #define USERS_FORMAT \
"format: users [-l minlevel[-maxlevel]] [-n name] [-h host] [-c classlist] [-o] [-p]\r\n" "format: users [-l minadmlevel[-maxadmlevel]] [-n name] [-h host] [-c classlist] [-o] [-p]\r\n"
ACMD(do_users) ACMD(do_users)
{ {
@ -1347,7 +1391,7 @@ ACMD(do_users)
char name_search[MAX_INPUT_LENGTH], host_search[MAX_INPUT_LENGTH]; char name_search[MAX_INPUT_LENGTH], host_search[MAX_INPUT_LENGTH];
struct char_data *tch; struct char_data *tch;
struct descriptor_data *d; struct descriptor_data *d;
int low = 0, high = LVL_IMPL, num_can_see = 0; int low = ADMLVL_MORTAL, high = ADMLVL_IMPL, num_can_see = 0;
int showclass = 0, outlaws = 0, playing = 0, deadweight = 0; int showclass = 0, outlaws = 0, playing = 0, deadweight = 0;
char buf[MAX_INPUT_LENGTH], arg[MAX_INPUT_LENGTH]; char buf[MAX_INPUT_LENGTH], arg[MAX_INPUT_LENGTH];
@ -1424,14 +1468,14 @@ ACMD(do_users)
continue; continue;
if (*name_search && str_cmp(GET_NAME(tch), name_search)) if (*name_search && str_cmp(GET_NAME(tch), name_search))
continue; continue;
if (!CAN_SEE(ch, tch) || GET_LEVEL(tch) < low || GET_LEVEL(tch) > high) if (!CAN_SEE(ch, tch) || GET_ADMLEVEL(tch) < low || GET_ADMLEVEL(tch) > high)
continue; continue;
if (outlaws && !PLR_FLAGGED(tch, PLR_KILLER) && if (outlaws && !PLR_FLAGGED(tch, PLR_KILLER) &&
!PLR_FLAGGED(tch, PLR_THIEF)) !PLR_FLAGGED(tch, PLR_THIEF))
continue; continue;
if (showclass && !(showclass & (1 << GET_CLASS(tch)))) if (showclass && !(showclass & (1 << GET_CLASS(tch))))
continue; continue;
if (GET_INVIS_LEV(tch) > GET_LEVEL(ch)) if (GET_INVIS_LEV(tch) > GET_ADMLEVEL(ch))
continue; continue;
if (d->original) if (d->original)
@ -1661,7 +1705,7 @@ ACMD(do_where)
one_argument(argument, arg); one_argument(argument, arg);
if (GET_LEVEL(ch) >= LVL_IMMORT) if (ADM_FLAGGED(ch, ADM_FULLWHERE))
perform_immort_where(ch, arg); perform_immort_where(ch, arg);
else else
perform_mortal_where(ch, arg); perform_mortal_where(ch, arg);
@ -1671,7 +1715,7 @@ ACMD(do_levels)
{ {
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH]; char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
size_t len = 0, nlen; size_t len = 0, nlen;
int i, ret, min_lev=1, max_lev=LVL_IMMORT, val; int i, ret, min_lev=1, max_lev=CONFIG_MAX_LEVEL, val;
if (IS_NPC(ch)) { if (IS_NPC(ch)) {
send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n"); send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n");
@ -1685,25 +1729,25 @@ ACMD(do_levels)
if (ret == 0) { if (ret == 0) {
/* No valid args found */ /* No valid args found */
min_lev = 1; min_lev = 1;
max_lev = LVL_IMMORT; max_lev = CONFIG_MAX_LEVEL;
} }
else if (ret == 1) { else if (ret == 1) {
/* One arg = range is (num) either side of current level */ /* One arg = range is (num) either side of current level */
val = min_lev; val = min_lev;
max_lev = MIN(GET_LEVEL(ch) + val, LVL_IMMORT); max_lev = MIN(GET_LEVEL(ch) + val, CONFIG_MAX_LEVEL);
min_lev = MAX(GET_LEVEL(ch) - val, 1); min_lev = MAX(GET_LEVEL(ch) - val, 1);
} }
else if (ret == 2) { else if (ret == 2) {
/* Two args = min-max range limit - just do sanity checks */ /* Two args = min-max range limit - just do sanity checks */
min_lev = MAX(min_lev, 1); min_lev = MAX(min_lev, 1);
max_lev = MIN(max_lev + 1, LVL_IMMORT); max_lev = MIN(max_lev + 1, CONFIG_MAX_LEVEL);
} }
} }
else else
{ {
send_to_char(ch, "Usage: %slevels [<min>-<max> | <range>]%s\r\n\r\n", QYEL, QNRM); send_to_char(ch, "Usage: %slevels [<min>-<max> | <range>]%s\r\n\r\n", QYEL, QNRM);
send_to_char(ch, "Displays exp required for levels.\r\n"); send_to_char(ch, "Displays exp required for levels.\r\n");
send_to_char(ch, "%slevels %s- shows all levels (1-%d)\r\n", QCYN, QNRM, (LVL_IMMORT-1)); send_to_char(ch, "%slevels %s- shows all levels (1-%d)\r\n", QCYN, QNRM, CONFIG_MAX_LEVEL);
send_to_char(ch, "%slevels 5 %s- shows 5 levels either side of your current level\r\n", QCYN, QNRM); send_to_char(ch, "%slevels 5 %s- shows 5 levels either side of your current level\r\n", QCYN, QNRM);
send_to_char(ch, "%slevels 10-40 %s- shows level 10 to level 40\r\n",QCYN, QNRM); send_to_char(ch, "%slevels 10-40 %s- shows level 10 to level 40\r\n",QCYN, QNRM);
return; return;
@ -1734,9 +1778,6 @@ ACMD(do_levels)
len += nlen; len += nlen;
} }
if (len < sizeof(buf) && max_lev == LVL_IMMORT)
snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d : Immortality\r\n",
LVL_IMMORT, level_exp(GET_CLASS(ch), LVL_IMMORT));
page_string(ch->desc, buf, TRUE); page_string(ch->desc, buf, TRUE);
} }
@ -1815,99 +1856,99 @@ ACMD(do_toggle)
const struct { const struct {
char *command; char *command;
bitvector_t toggle; /* this needs changing once hashmaps are implemented */ bitvector_t toggle; /* this needs changing once hashmaps are implemented */
char min_level; char min_admlevel;
char *disable_msg; char *disable_msg;
char *enable_msg; char *enable_msg;
} tog_messages[] = { } tog_messages[] = {
{"summonable", PRF_SUMMONABLE, 0, {"summonable", PRF_SUMMONABLE, ADMLVL_MORTAL,
"You are now safe from summoning by other players.\r\n", "You are now safe from summoning by other players.\r\n",
"You may now be summoned by other players.\r\n"}, "You may now be summoned by other players.\r\n"},
{"nohassle", PRF_NOHASSLE, LVL_IMMORT, {"nohassle", PRF_NOHASSLE, ADMLVL_IMMORT,
"Nohassle disabled.\r\n", "Nohassle disabled.\r\n",
"Nohassle enabled.\r\n"}, "Nohassle enabled.\r\n"},
{"brief", PRF_BRIEF, 0, {"brief", PRF_BRIEF, ADMLVL_MORTAL,
"Brief mode off.\r\n", "Brief mode off.\r\n",
"Brief mode on.\r\n"}, "Brief mode on.\r\n"},
{"compact", PRF_COMPACT, 0, {"compact", PRF_COMPACT, ADMLVL_MORTAL,
"Compact mode off.\r\n", "Compact mode off.\r\n",
"Compact mode on.\r\n"}, "Compact mode on.\r\n"},
{"notell", PRF_NOTELL, 0, {"notell", PRF_NOTELL, ADMLVL_MORTAL,
"You can now hear tells.\r\n", "You can now hear tells.\r\n",
"You are now deaf to tells.\r\n"}, "You are now deaf to tells.\r\n"},
{"noauction", PRF_NOAUCT, 0, {"noauction", PRF_NOAUCT, ADMLVL_MORTAL,
"You can now hear auctions.\r\n", "You can now hear auctions.\r\n",
"You are now deaf to auctions.\r\n"}, "You are now deaf to auctions.\r\n"},
{"noshout", PRF_NOSHOUT, 0, {"noshout", PRF_NOSHOUT, ADMLVL_MORTAL,
"You can now hear shouts.\r\n", "You can now hear shouts.\r\n",
"You are now deaf to shouts.\r\n"}, "You are now deaf to shouts.\r\n"},
{"nogossip", PRF_NOGOSS, 0, {"nogossip", PRF_NOGOSS, ADMLVL_MORTAL,
"You can now hear gossip.\r\n", "You can now hear gossip.\r\n",
"You are now deaf to gossip.\r\n"}, "You are now deaf to gossip.\r\n"},
{"nograts", PRF_NOGRATZ, 0, {"nograts", PRF_NOGRATZ, ADMLVL_MORTAL,
"You can now hear gratz.\r\n", "You can now hear gratz.\r\n",
"You are now deaf to gratz.\r\n"}, "You are now deaf to gratz.\r\n"},
{"nowiz", PRF_NOWIZ, LVL_IMMORT, {"nowiz", PRF_NOWIZ, ADMLVL_IMMORT,
"You can now hear the Wiz-channel.\r\n", "You can now hear the Wiz-channel.\r\n",
"You are now deaf to the Wiz-channel.\r\n"}, "You are now deaf to the Wiz-channel.\r\n"},
{"quest", PRF_QUEST, 0, {"quest", PRF_QUEST, ADMLVL_MORTAL,
"You are no longer part of the Quest.\r\n", "You are no longer part of the Quest.\r\n",
"Okay, you are part of the Quest.\r\n"}, "Okay, you are part of the Quest.\r\n"},
{"showvnums", PRF_SHOWVNUMS, LVL_IMMORT, {"showvnums", PRF_SHOWVNUMS, ADMLVL_IMMORT,
"You will no longer see the vnums.\r\n", "You will no longer see the vnums.\r\n",
"You will now see the vnums.\r\n"}, "You will now see the vnums.\r\n"},
{"norepeat", PRF_NOREPEAT, 0, {"norepeat", PRF_NOREPEAT, ADMLVL_MORTAL,
"You will now have your communication repeated.\r\n", "You will now have your communication repeated.\r\n",
"You will no longer have your communication repeated.\r\n"}, "You will no longer have your communication repeated.\r\n"},
{"holylight", PRF_HOLYLIGHT, LVL_IMMORT, {"holylight", PRF_HOLYLIGHT, ADMLVL_IMMORT,
"HolyLight mode off.\r\n", "HolyLight mode off.\r\n",
"HolyLight mode on.\r\n"}, "HolyLight mode on.\r\n"},
{"slownameserver", 0, LVL_IMPL, {"slownameserver", 0, ADMLVL_IMPL,
"Nameserver_is_slow changed to OFF; IP addresses will now be resolved.\r\n", "Nameserver_is_slow changed to OFF; IP addresses will now be resolved.\r\n",
"Nameserver_is_slow changed to ON; sitenames will no longer be resolved.\r\n"}, "Nameserver_is_slow changed to ON; sitenames will no longer be resolved.\r\n"},
{"autoexits", PRF_AUTOEXIT, 0, {"autoexits", PRF_AUTOEXIT, ADMLVL_MORTAL,
"Autoexits disabled.\r\n", "Autoexits disabled.\r\n",
"Autoexits enabled.\r\n"}, "Autoexits enabled.\r\n"},
{"trackthru", 0, LVL_IMPL, {"trackthru", 0, ADMLVL_IMPL,
"Players can no longer track through doors.\r\n", "Players can no longer track through doors.\r\n",
"Players can now track through doors.\r\n"}, "Players can now track through doors.\r\n"},
{"clsolc", PRF_CLS, LVL_BUILDER, {"clsolc", PRF_CLS, ADMLVL_BUILDER,
"You will no longer clear screen in OLC.\r\n", "You will no longer clear screen in OLC.\r\n",
"You will now clear screen in OLC.\r\n"}, "You will now clear screen in OLC.\r\n"},
{"buildwalk", PRF_BUILDWALK, LVL_BUILDER, {"buildwalk", PRF_BUILDWALK, ADMLVL_BUILDER,
"Buildwalk is now Off.\r\n", "Buildwalk is now Off.\r\n",
"Buildwalk is now On.\r\n"}, "Buildwalk is now On.\r\n"},
{"afk", PRF_AFK, 0, {"afk", PRF_AFK, ADMLVL_MORTAL,
"AFK is now Off.\r\n", "AFK is now Off.\r\n",
"AFK is now On.\r\n"}, "AFK is now On.\r\n"},
{"autoloot", PRF_AUTOLOOT, 0, {"autoloot", PRF_AUTOLOOT, ADMLVL_MORTAL,
"Autoloot disabled.\r\n", "Autoloot disabled.\r\n",
"Autoloot enabled.\r\n"}, "Autoloot enabled.\r\n"},
{"autogold", PRF_AUTOGOLD, 0, {"autogold", PRF_AUTOGOLD, ADMLVL_MORTAL,
"Autogold disabled.\r\n", "Autogold disabled.\r\n",
"Autogold enabled.\r\n"}, "Autogold enabled.\r\n"},
{"autosplit", PRF_AUTOSPLIT, 0, {"autosplit", PRF_AUTOSPLIT, ADMLVL_MORTAL,
"Autosplit disabled.\r\n", "Autosplit disabled.\r\n",
"Autosplit enabled.\r\n"}, "Autosplit enabled.\r\n"},
{"autosac", PRF_AUTOSAC, 0, {"autosac", PRF_AUTOSAC, ADMLVL_MORTAL,
"Autosac disabled.\r\n", "Autosac disabled.\r\n",
"Autosac enabled.\r\n"}, "Autosac enabled.\r\n"},
{"autoassist", PRF_AUTOASSIST, 0, {"autoassist", PRF_AUTOASSIST, ADMLVL_MORTAL,
"Autoassist disabled.\r\n", "Autoassist disabled.\r\n",
"Autoassist enabled.\r\n"}, "Autoassist enabled.\r\n"},
{"automap", PRF_AUTOMAP, 1, {"automap", PRF_AUTOMAP, ADMLVL_MORTAL,
"You will no longer see the mini-map.\r\n", "You will no longer see the mini-map.\r\n",
"You will now see a mini-map at the side of room descriptions.\r\n"}, "You will now see a mini-map at the side of room descriptions.\r\n"},
{"autokey", PRF_AUTOKEY, 0, {"autokey", PRF_AUTOKEY, ADMLVL_MORTAL,
"You will now have to unlock doors manually before opening.\r\n", "You will now have to unlock doors manually before opening.\r\n",
"You will now automatically unlock doors when opening them (if you have the key).\r\n"}, "You will now automatically unlock doors when opening them (if you have the key).\r\n"},
{"autodoor", PRF_AUTODOOR, 0, {"autodoor", PRF_AUTODOOR, ADMLVL_MORTAL,
"You will now need to specify a door direction when opening, closing and unlocking.\r\n", "You will now need to specify a door direction when opening, closing and unlocking.\r\n",
"You will now find the next available door when opening, closing or unlocking.\r\n"}, "You will now find the next available door when opening, closing or unlocking.\r\n"},
{"color", 0, 0, "\n", "\n"}, {"color", 0, ADMLVL_MORTAL, "\n", "\n"},
{"syslog", 0, LVL_IMMORT, "\n", "\n"}, {"syslog", 0, ADMLVL_IMMORT, "\n", "\n"},
{"wimpy", 0, 0, "\n", "\n"}, {"wimpy", 0, ADMLVL_MORTAL, "\n", "\n"},
{"pagelength", 0, 0, "\n", "\n"}, {"pagelength", 0, ADMLVL_MORTAL, "\n", "\n"},
{"screenwidth", 0, 0, "\n", "\n"}, {"screenwidth", 0, ADMLVL_MORTAL, "\n", "\n"},
{"\n", 0, -1, "\n", "\n"} /* must be last */ {"\n", 0, -1, "\n", "\n"} /* must be last */
}; };
@ -1923,7 +1964,7 @@ ACMD(do_toggle)
else else
sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */ sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */
if (GET_LEVEL(ch) == LVL_IMPL) { if (IS_ADMIN(ch, ADMLVL_IMPL)) {
send_to_char(ch, send_to_char(ch,
" SlowNameserver: %-3s " " SlowNameserver: %-3s "
" " " "
@ -1933,7 +1974,7 @@ ACMD(do_toggle)
ONOFF(CONFIG_TRACK_T_DOORS)); ONOFF(CONFIG_TRACK_T_DOORS));
} }
if (GET_LEVEL(ch) >= LVL_IMMORT) { if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, send_to_char(ch,
" Buildwalk: %-3s " " Buildwalk: %-3s "
" NoWiz: %-3s " " NoWiz: %-3s "
@ -2032,7 +2073,7 @@ ACMD(do_toggle)
if (!strncmp(arg, tog_messages[toggle].command, len)) if (!strncmp(arg, tog_messages[toggle].command, len))
break; break;
if (*tog_messages[toggle].command == '\n' || tog_messages[toggle].min_level > GET_LEVEL(ch)) { if (*tog_messages[toggle].command == '\n' || tog_messages[toggle].min_admlevel > GET_ADMLEVEL(ch)) {
send_to_char(ch, "You can't toggle that!\r\n"); send_to_char(ch, "You can't toggle that!\r\n");
return; return;
} }
@ -2079,7 +2120,7 @@ ACMD(do_toggle)
result = (CONFIG_TRACK_T_DOORS = !CONFIG_TRACK_T_DOORS); result = (CONFIG_TRACK_T_DOORS = !CONFIG_TRACK_T_DOORS);
break; break;
case SCMD_BUILDWALK: case SCMD_BUILDWALK:
if (GET_LEVEL(ch) < LVL_BUILDER) { if (!IS_ADMIN(ch, ADMLVL_BUILDER)) {
send_to_char(ch, "Builders only, sorry.\r\n"); send_to_char(ch, "Builders only, sorry.\r\n");
return; return;
} }
@ -2088,7 +2129,7 @@ ACMD(do_toggle)
mudlog(CMP, GET_LEVEL(ch), TRUE, mudlog(CMP, GET_LEVEL(ch), TRUE,
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch)); "OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
else else
mudlog(CMP, GET_LEVEL(ch), TRUE, mudlog(CMP, GET_ADMLEVEL(ch), TRUE,
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch)); "OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
break; break;
case SCMD_AFK: case SCMD_AFK:
@ -2186,7 +2227,7 @@ ACMD(do_toggle)
ACMD(do_commands) ACMD(do_commands)
{ {
int no, i, cmd_num; int no, i, cmd_num, level;
int wizhelp = 0, socials = 0; int wizhelp = 0, socials = 0;
struct char_data *vict; struct char_data *vict;
char arg[MAX_INPUT_LENGTH]; char arg[MAX_INPUT_LENGTH];
@ -2217,6 +2258,31 @@ ACMD(do_commands)
socials ? "socials" : "commands", socials ? "socials" : "commands",
vict == ch ? "you" : GET_NAME(vict)); vict == ch ? "you" : GET_NAME(vict));
/* Wizhelp is now shown by level, and handled seperately */
if (wizhelp) {
for (level = GET_ADMLEVEL(vict); level > ADMLVL_MORTAL; level--) {
send_to_char(ch, "%sAdmin Level %d (%s)%s:\r\n", QCYN, level, admin_level_names[(level)], QNRM);
for (no = 1, cmd_num = 1; complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n'; cmd_num++) {
i = cmd_sort_info[cmd_num];
if (complete_cmd_info[i].command_pointer == do_action) /* Skip socials */
continue;
if (complete_cmd_info[i].minimum_admlevel != level) /* High enough level? */
continue;
/* Show disabled commands in gray, and allowed commands in yellow */
if ( (complete_cmd_info[i].admin_flag != ADM_NONE) && (!ADM_FLAGGED(vict, complete_cmd_info[i].admin_flag)) )
send_to_char(ch, "%s%-13s%s%s", QBBLK, complete_cmd_info[i].command, QNRM, no++ % 6 == 0 ? "\r\n" : "");
else
send_to_char(ch, "%s%-13s%s%s", QYEL, complete_cmd_info[i].command, QNRM, no++ % 6 == 0 ? "\r\n" : "");
}
if (no % 6 != 1)
send_to_char(ch, "\r\n");
if (level != ADMLVL_IMMORT)
send_to_char(ch, "\r\n");
}
} else {
/* cmd_num starts at 1, not 0, to remove 'RESERVED' */ /* cmd_num starts at 1, not 0, to remove 'RESERVED' */
for (no = 0, cmd_num = 1; for (no = 0, cmd_num = 1;
complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n'; complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n';
@ -2227,15 +2293,23 @@ ACMD(do_commands)
if (complete_cmd_info[i].minimum_level < 0 || GET_LEVEL(vict) < complete_cmd_info[i].minimum_level) if (complete_cmd_info[i].minimum_level < 0 || GET_LEVEL(vict) < complete_cmd_info[i].minimum_level)
continue; continue;
if ((complete_cmd_info[i].minimum_level >= LVL_IMMORT) != wizhelp) /* NOTE: The admin flag overrides the admlevel */
if ((complete_cmd_info[i].admin_flag == ADM_NONE) && (complete_cmd_info[i].minimum_admlevel < 0 ||
(GET_ADMLEVEL(vict) < complete_cmd_info[i].minimum_admlevel) ))
continue;
/* Don't show if the command normally shows on wizhelp for their level */
if ((complete_cmd_info[i].admin_flag == ADM_NONE) && (complete_cmd_info[i].minimum_admlevel >= ADMLVL_IMMORT))
continue;
/* Don't show if player doesn't have the correct admin flag */
if ((complete_cmd_info[i].admin_flag != ADM_NONE) && (!ADM_FLAGGED(vict, complete_cmd_info[i].admin_flag) ||
(GET_ADMLEVEL(vict) >= complete_cmd_info[i].minimum_admlevel)))
continue; continue;
if (!wizhelp && socials != (complete_cmd_info[i].command_pointer == do_action)) if (!wizhelp && socials != (complete_cmd_info[i].command_pointer == do_action))
continue; continue;
if (wizhelp && complete_cmd_info[i].command_pointer == do_action)
continue;
if (--overflow < 0) if (--overflow < 0)
continue; continue;
@ -2245,6 +2319,7 @@ ACMD(do_commands)
/* display commands list in a nice columnized format */ /* display commands list in a nice columnized format */
column_list(ch, 0, commands, no, FALSE); column_list(ch, 0, commands, no, FALSE);
}
} }
void free_history(struct char_data *ch, int type) void free_history(struct char_data *ch, int type)
@ -2375,7 +2450,7 @@ ACMD(do_whois)
send_to_char(ch, "Level: %d\r\n", GET_LEVEL(victim)); send_to_char(ch, "Level: %d\r\n", GET_LEVEL(victim));
if (!(GET_LEVEL(victim) < LVL_IMMORT) || (GET_LEVEL(ch) >= GET_LEVEL(victim))) if (!(GET_ADMLEVEL(victim) < ADMLVL_IMMORT) || (GET_ADMLEVEL(ch) >= GET_ADMLEVEL(victim)))
{ {
strcpy (buf, (char *) asctime(localtime(&(victim->player.time.logon)))); strcpy (buf, (char *) asctime(localtime(&(victim->player.time.logon))));
buf[10] = '\0'; buf[10] = '\0';

View file

@ -121,7 +121,7 @@ ACMD(do_put)
send_to_char(ch, "You don't see %s %s here.\r\n", AN(thecont), thecont); send_to_char(ch, "You don't see %s %s here.\r\n", AN(thecont), thecont);
else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER) else if (GET_OBJ_TYPE(cont) != ITEM_CONTAINER)
act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR); act("$p is not a container.", FALSE, ch, cont, 0, TO_CHAR);
else if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE))) else if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (!(IS_ADMIN(ch, ADMLVL_IMMORT)) || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
send_to_char(ch, "You'd better open it first!\r\n"); send_to_char(ch, "You'd better open it first!\r\n");
else { else {
if (obj_dotmode == FIND_INDIV) { /* put <obj> <container> */ if (obj_dotmode == FIND_INDIV) { /* put <obj> <container> */
@ -218,7 +218,7 @@ void get_from_container(struct char_data *ch, struct obj_data *cont,
obj_dotmode = find_all_dots(arg); obj_dotmode = find_all_dots(arg);
if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || !PRF_FLAGGED(ch, PRF_NOHASSLE))) if (OBJVAL_FLAGGED(cont, CONT_CLOSED) && (!(IS_ADMIN(ch, ADMLVL_IMMORT)) || !PRF_FLAGGED(ch, PRF_NOHASSLE)))
act("$p is closed.", FALSE, ch, cont, 0, TO_CHAR); act("$p is closed.", FALSE, ch, cont, 0, TO_CHAR);
else if (obj_dotmode == FIND_INDIV) { else if (obj_dotmode == FIND_INDIV) {
if (!(obj = get_obj_in_list_vis(ch, arg, NULL, cont->contains))) { if (!(obj = get_obj_in_list_vis(ch, arg, NULL, cont->contains))) {
@ -606,11 +606,11 @@ static void perform_give(struct char_data *ch, struct char_data *vict,
act("You can't let go of $p!! Yeech!", FALSE, ch, obj, 0, TO_CHAR); act("You can't let go of $p!! Yeech!", FALSE, ch, obj, 0, TO_CHAR);
return; return;
} }
if (IS_CARRYING_N(vict) >= CAN_CARRY_N(vict) && GET_LEVEL(ch) < LVL_IMMORT && GET_LEVEL(vict) < LVL_IMMORT) { if (IS_CARRYING_N(vict) >= CAN_CARRY_N(vict) && !(IS_ADMIN(ch, ADMLVL_IMMORT)) && !(IS_ADMIN(vict, ADMLVL_IMMORT))) {
act("$N seems to have $S hands full.", FALSE, ch, 0, vict, TO_CHAR); act("$N seems to have $S hands full.", FALSE, ch, 0, vict, TO_CHAR);
return; return;
} }
if (GET_OBJ_WEIGHT(obj) + IS_CARRYING_W(vict) > CAN_CARRY_W(vict) && GET_LEVEL(ch) < LVL_IMMORT && GET_LEVEL(vict) < LVL_IMMORT) { if (GET_OBJ_WEIGHT(obj) + IS_CARRYING_W(vict) > CAN_CARRY_W(vict) && !(IS_ADMIN(ch, ADMLVL_IMMORT)) && !(IS_ADMIN(vict, ADMLVL_IMMORT))) {
act("$E can't carry that much weight.", FALSE, ch, 0, vict, TO_CHAR); act("$E can't carry that much weight.", FALSE, ch, 0, vict, TO_CHAR);
return; return;
} }
@ -650,7 +650,7 @@ static void perform_give_gold(struct char_data *ch, struct char_data *vict,
send_to_char(ch, "Heh heh heh ... we are jolly funny today, eh?\r\n"); send_to_char(ch, "Heh heh heh ... we are jolly funny today, eh?\r\n");
return; return;
} }
if ((GET_GOLD(ch) < amount) && (IS_NPC(ch) || (GET_LEVEL(ch) < LVL_GOD))) { if ((GET_GOLD(ch) < amount) && (IS_NPC(ch) || (!ADM_FLAGGED(ch, ADM_MONEY)))) {
send_to_char(ch, "You don't have that many coins!\r\n"); send_to_char(ch, "You don't have that many coins!\r\n");
return; return;
} }
@ -662,7 +662,7 @@ static void perform_give_gold(struct char_data *ch, struct char_data *vict,
snprintf(buf, sizeof(buf), "$n gives %s to $N.", money_desc(amount)); snprintf(buf, sizeof(buf), "$n gives %s to $N.", money_desc(amount));
act(buf, TRUE, ch, 0, vict, TO_NOTVICT); act(buf, TRUE, ch, 0, vict, TO_NOTVICT);
if (IS_NPC(ch) || (GET_LEVEL(ch) < LVL_GOD)) if (IS_NPC(ch) || (!ADM_FLAGGED(ch, ADM_MONEY)))
GET_GOLD(ch) -= amount; GET_GOLD(ch) -= amount;
GET_GOLD(vict) += amount; GET_GOLD(vict) += amount;
@ -968,7 +968,7 @@ ACMD(do_eat)
do_drink(ch, argument, 0, SCMD_SIP); do_drink(ch, argument, 0, SCMD_SIP);
return; return;
} }
if ((GET_OBJ_TYPE(food) != ITEM_FOOD) && (GET_LEVEL(ch) < LVL_IMMORT)) { if ((GET_OBJ_TYPE(food) != ITEM_FOOD) && (!ADM_FLAGGED(ch, ADM_EATANYTHING))) {
send_to_char(ch, "You can't eat THAT!\r\n"); send_to_char(ch, "You can't eat THAT!\r\n");
return; return;
} }
@ -995,7 +995,7 @@ ACMD(do_eat)
if (GET_COND(ch, HUNGER) > 20) if (GET_COND(ch, HUNGER) > 20)
send_to_char(ch, "You are full.\r\n"); send_to_char(ch, "You are full.\r\n");
if (GET_OBJ_VAL(food, 3) && (GET_LEVEL(ch) < LVL_IMMORT)) { if (GET_OBJ_VAL(food, 3) && (!ADM_FLAGGED(ch, ADM_NOPOISON))) {
/* The crap was poisoned ! */ /* The crap was poisoned ! */
send_to_char(ch, "Oops, that tasted rather strange!\r\n"); send_to_char(ch, "Oops, that tasted rather strange!\r\n");
act("$n coughs and utters some strange sounds.", FALSE, ch, 0, 0, TO_ROOM); act("$n coughs and utters some strange sounds.", FALSE, ch, 0, 0, TO_ROOM);

View file

@ -41,7 +41,7 @@ static int has_boat(struct char_data *ch)
struct obj_data *obj; struct obj_data *obj;
int i; int i;
if (GET_LEVEL(ch) > LVL_IMMORT) if (ADM_FLAGGED(ch, ADM_WALKANYWHERE))
return (1); return (1);
if (AFF_FLAGGED(ch, AFF_WATERWALK) || AFF_FLAGGED(ch, AFF_FLYING)) if (AFF_FLAGGED(ch, AFF_WATERWALK) || AFF_FLAGGED(ch, AFF_FLYING))
@ -66,7 +66,7 @@ int has_flight(struct char_data *ch)
struct obj_data *obj; struct obj_data *obj;
int i; int i;
if (GET_LEVEL(ch) > LVL_IMMORT) if (ADM_FLAGGED(ch, ADM_WALKANYWHERE))
return (1); return (1);
if (AFF_FLAGGED(ch, AFF_FLYING)) if (AFF_FLAGGED(ch, AFF_FLYING))
@ -91,7 +91,7 @@ int has_scuba(struct char_data *ch)
struct obj_data *obj; struct obj_data *obj;
int i; int i;
if (GET_LEVEL(ch) > LVL_IMMORT) if (ADM_FLAGGED(ch, ADM_WALKANYWHERE))
return (1); return (1);
if (AFF_FLAGGED(ch, AFF_SCUBA)) if (AFF_FLAGGED(ch, AFF_SCUBA))
@ -219,11 +219,11 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
} }
/* Check zone flag restrictions */ /* Check zone flag restrictions */
if (ZONE_FLAGGED(GET_ROOM_ZONE(going_to), ZONE_CLOSED)) { if (ZONE_FLAGGED(GET_ROOM_ZONE(going_to), ZONE_CLOSED) && !ADM_FLAGGED(ch, ADM_WALKANYWHERE)) {
send_to_char(ch, "A mysterious barrier forces you back! That area is off-limits.\r\n"); send_to_char(ch, "A mysterious barrier forces you back! That area is off-limits.\r\n");
return (0); return (0);
} }
if (ZONE_FLAGGED(GET_ROOM_ZONE(going_to), ZONE_NOIMMORT) && (GET_LEVEL(ch) >= LVL_IMMORT) && (GET_LEVEL(ch) < LVL_GRGOD)) { if (ZONE_FLAGGED(GET_ROOM_ZONE(going_to), ZONE_NOIMMORT) && (IS_ADMIN(ch, ADMLVL_IMMORT)) && !(IS_ADMIN(ch, ADMLVL_GRGOD))) {
send_to_char(ch, "A mysterious barrier forces you back! That area is off-limits.\r\n"); send_to_char(ch, "A mysterious barrier forces you back! That area is off-limits.\r\n");
return (0); return (0);
} }
@ -240,7 +240,7 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
} }
/* Room Level Requirements: Is ch privileged enough to enter the room? */ /* Room Level Requirements: Is ch privileged enough to enter the room? */
if (ROOM_FLAGGED(going_to, ROOM_GODROOM) && GET_LEVEL(ch) < LVL_GOD) if (ROOM_FLAGGED(going_to, ROOM_GODROOM) && !(IS_ADMIN(ch, ADMLVL_GOD)))
{ {
send_to_char(ch, "You aren't godly enough to use that room!\r\n"); send_to_char(ch, "You aren't godly enough to use that room!\r\n");
return (0); return (0);
@ -253,7 +253,7 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
movement_loss[SECT(going_to)]) / 2; movement_loss[SECT(going_to)]) / 2;
/* Move Point Requirement Check */ /* Move Point Requirement Check */
if (GET_MOVE(ch) < need_movement && !IS_NPC(ch)) if (GET_MOVE(ch) < need_movement && !IS_NPC(ch) && !ADM_FLAGGED(ch, ADM_WALKANYWHERE))
{ {
if (need_specials_check && ch->master) if (need_specials_check && ch->master)
send_to_char(ch, "You are too exhausted to follow.\r\n"); send_to_char(ch, "You are too exhausted to follow.\r\n");
@ -270,7 +270,7 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
/* Begin: the leave operation. */ /* Begin: the leave operation. */
/*---------------------------------------------------------------------*/ /*---------------------------------------------------------------------*/
/* If applicable, subtract movement cost. */ /* If applicable, subtract movement cost. */
if (GET_LEVEL(ch) < LVL_IMMORT && !IS_NPC(ch)) if (!ADM_FLAGGED(ch, ADM_WALKANYWHERE))
GET_MOVE(ch) -= need_movement; GET_MOVE(ch) -= need_movement;
/* Generate the leave message and display to others in the was_in room. */ /* Generate the leave message and display to others in the was_in room. */
@ -307,9 +307,9 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
look_at_room(ch, 0); look_at_room(ch, 0);
/* ... and Kill the player if the room is a death trap. */ /* ... and Kill the player if the room is a death trap. */
if (ROOM_FLAGGED(going_to, ROOM_DEATH) && GET_LEVEL(ch) < LVL_IMMORT) if (ROOM_FLAGGED(going_to, ROOM_DEATH) && (ADM_FLAGGED(ch, ADM_WALKANYWHERE)))
{ {
mudlog(BRF, LVL_IMMORT, TRUE, "%s hit death trap #%d (%s)", GET_NAME(ch), GET_ROOM_VNUM(going_to), world[going_to].name); mudlog(BRF, ADMLVL_IMMORT, TRUE, "%s hit death trap #%d (%s)", GET_NAME(ch), GET_ROOM_VNUM(going_to), world[going_to].name);
death_cry(ch); death_cry(ch);
extract_char(ch); extract_char(ch);
return (0); return (0);
@ -346,7 +346,7 @@ int perform_move(struct char_data *ch, int dir, int need_specials_check)
return (0); return (0);
else if ((!EXIT(ch, dir) && !buildwalk(ch, dir)) || EXIT(ch, dir)->to_room == NOWHERE) else if ((!EXIT(ch, dir) && !buildwalk(ch, dir)) || EXIT(ch, dir)->to_room == NOWHERE)
send_to_char(ch, "Alas, you cannot go that way...\r\n"); send_to_char(ch, "Alas, you cannot go that way...\r\n");
else if (EXIT_FLAGGED(EXIT(ch, dir), EX_CLOSED) && (GET_LEVEL(ch) < LVL_IMMORT || (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE)))) { else if (EXIT_FLAGGED(EXIT(ch, dir), EX_CLOSED) && (!ADM_FLAGGED(ch, ADM_WALKANYWHERE)) ) {
if (EXIT(ch, dir)->keyword) if (EXIT(ch, dir)->keyword)
send_to_char(ch, "The %s seems to be closed.\r\n", fname(EXIT(ch, dir)->keyword)); send_to_char(ch, "The %s seems to be closed.\r\n", fname(EXIT(ch, dir)->keyword));
else else
@ -457,6 +457,9 @@ int has_key(struct char_data *ch, obj_vnum key)
{ {
struct obj_data *o; struct obj_data *o;
if (!ch) return (0);
if (!IS_NPC(ch) && ADM_FLAGGED(ch, ADM_NOKEYS)) return (1);
for (o = ch->carrying; o; o = o->next_content) for (o = ch->carrying; o; o = o->next_content)
if (GET_OBJ_VNUM(o) == key) if (GET_OBJ_VNUM(o) == key)
return (1); return (1);
@ -662,11 +665,9 @@ ACMD(do_gen_door)
send_to_char(ch, "It is locked, and you do not have the key!\r\n"); send_to_char(ch, "It is locked, and you do not have the key!\r\n");
} }
else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) && else if (!(DOOR_IS_UNLOCKED(ch, obj, door)) &&
IS_SET(flags_door[subcmd], NEED_UNLOCKED) && IS_SET(flags_door[subcmd], NEED_UNLOCKED) && (!ADM_FLAGGED(ch, ADM_NOKEYS) && !PRF_FLAGGED(ch, PRF_NOHASSLE)))
(GET_LEVEL(ch) < LVL_IMMORT || (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE))))
send_to_char(ch, "It seems to be locked.\r\n"); send_to_char(ch, "It seems to be locked.\r\n");
else if (!has_key(ch, keynum) && (GET_LEVEL(ch) < LVL_GOD) && else if (!has_key(ch, keynum) && ((subcmd == SCMD_LOCK) || (subcmd == SCMD_UNLOCK)))
((subcmd == SCMD_LOCK) || (subcmd == SCMD_UNLOCK)))
send_to_char(ch, "You don't seem to have the proper key.\r\n"); send_to_char(ch, "You don't seem to have the proper key.\r\n");
else if (ok_pick(ch, keynum, DOOR_IS_PICKPROOF(ch, obj, door), subcmd)) else if (ok_pick(ch, keynum, DOOR_IS_PICKPROOF(ch, obj, door), subcmd))
do_doorcmd(ch, obj, door, subcmd); do_doorcmd(ch, obj, door, subcmd);

View file

@ -97,7 +97,7 @@ ACMD(do_kill)
char arg[MAX_INPUT_LENGTH]; char arg[MAX_INPUT_LENGTH];
struct char_data *vict; struct char_data *vict;
if (GET_LEVEL(ch) < LVL_IMMORT || IS_NPC(ch) || !PRF_FLAGGED(ch, PRF_NOHASSLE)) { if (!ADM_FLAGGED(ch, ADM_INSTANTKILL)) {
do_hit(ch, argument, cmd, subcmd); do_hit(ch, argument, cmd, subcmd);
return; return;
} }
@ -212,12 +212,13 @@ ACMD(do_order)
act(buf, FALSE, ch, 0, 0, TO_ROOM); act(buf, FALSE, ch, 0, 0, TO_ROOM);
for (k = ch->followers; k; k = k->next) { for (k = ch->followers; k; k = k->next) {
if (IN_ROOM(ch) == IN_ROOM(k->follower)) if (IN_ROOM(ch) == IN_ROOM(k->follower)) {
if (AFF_FLAGGED(k->follower, AFF_CHARM)) { if (AFF_FLAGGED(k->follower, AFF_CHARM)) {
found = TRUE; found = TRUE;
command_interpreter(k->follower, message); command_interpreter(k->follower, message);
} }
} }
}
if (found) if (found)
send_to_char(ch, "%s", CONFIG_OK); send_to_char(ch, "%s", CONFIG_OK);
else else

View file

@ -43,7 +43,7 @@ ACMD(do_quit)
if (IS_NPC(ch) || !ch->desc) if (IS_NPC(ch) || !ch->desc)
return; return;
if (subcmd != SCMD_QUIT && GET_LEVEL(ch) < LVL_IMMORT) if (subcmd != SCMD_QUIT && !IS_ADMIN(ch, ADMLVL_IMMORT))
send_to_char(ch, "You have to type quit--no less, to quit!\r\n"); send_to_char(ch, "You have to type quit--no less, to quit!\r\n");
else if (GET_POS(ch) == POS_FIGHTING) else if (GET_POS(ch) == POS_FIGHTING)
send_to_char(ch, "No way! You're fighting for your life!\r\n"); send_to_char(ch, "No way! You're fighting for your life!\r\n");
@ -52,7 +52,7 @@ ACMD(do_quit)
die(ch, NULL); die(ch, NULL);
} else { } else {
act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM); act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has quit the game.", GET_NAME(ch)); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has quit the game.", GET_NAME(ch));
if (GET_QUEST_TIME(ch) != -1) if (GET_QUEST_TIME(ch) != -1)
quest_timeout(ch); quest_timeout(ch);
@ -185,7 +185,7 @@ ACMD(do_steal)
percent -= 50; percent -= 50;
/* No stealing if not allowed. If it is no stealing from Imm's or Shopkeepers. */ /* No stealing if not allowed. If it is no stealing from Imm's or Shopkeepers. */
if (GET_LEVEL(vict) >= LVL_IMMORT || pcsteal || GET_MOB_SPEC(vict) == shop_keeper) if (IS_ADMIN(vict, ADMLVL_IMMORT) || pcsteal || GET_MOB_SPEC(vict) == shop_keeper)
percent = 101; /* Failure */ percent = 101; /* Failure */
if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "gold")) { if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "gold")) {
@ -286,7 +286,7 @@ ACMD(do_practice)
ACMD(do_visible) ACMD(do_visible)
{ {
if (GET_LEVEL(ch) >= LVL_IMMORT) { if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
perform_immort_vis(ch); perform_immort_vis(ch);
return; return;
} }
@ -801,16 +801,16 @@ ACMD(do_gen_tog)
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 (!ADM_FLAGGED(ch, ADM_BUILD)) {
send_to_char(ch, "Builders only, sorry.\r\n"); send_to_char(ch, "Builders only, sorry.\r\n");
return; return;
} }
result = PRF_TOG_CHK(ch, PRF_BUILDWALK); result = PRF_TOG_CHK(ch, PRF_BUILDWALK);
if (PRF_FLAGGED(ch, PRF_BUILDWALK)) if (PRF_FLAGGED(ch, PRF_BUILDWALK))
mudlog(CMP, GET_LEVEL(ch), TRUE, mudlog(CMP, GET_ADMLEVEL(ch), TRUE,
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch)); "OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
else else
mudlog(CMP, GET_LEVEL(ch), TRUE, mudlog(CMP, GET_ADMLEVEL(ch), TRUE,
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch)); "OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
break; break;
case SCMD_AFK: case SCMD_AFK:
@ -865,7 +865,7 @@ void show_happyhour(struct char_data *ch)
char happyexp[80], happygold[80], happyqp[80]; char happyexp[80], happygold[80], happyqp[80];
int secs_left; int secs_left;
if ((IS_HAPPYHOUR) || (GET_LEVEL(ch) >= LVL_GRGOD)) if ( (IS_HAPPYHOUR) || (IS_ADMIN(ch, ADMLVL_GRGOD)) )
{ {
if (HAPPY_TIME) if (HAPPY_TIME)
secs_left = ((HAPPY_TIME - 1) * SECS_PER_MUD_HOUR) + next_tick; secs_left = ((HAPPY_TIME - 1) * SECS_PER_MUD_HOUR) + next_tick;
@ -879,9 +879,9 @@ void show_happyhour(struct char_data *ch)
send_to_char(ch, "tbaMUD Happy Hour!\r\n" send_to_char(ch, "tbaMUD Happy Hour!\r\n"
"------------------\r\n" "------------------\r\n"
"%s%s%sTime Remaining: %s%d%s hours %s%d%s mins %s%d%s secs\r\n", "%s%s%sTime Remaining: %s%d%s hours %s%d%s mins %s%d%s secs\r\n",
(IS_HAPPYEXP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyexp : "", (IS_HAPPYEXP || IS_ADMIN(ch, ADMLVL_GOD)) ? happyexp : "",
(IS_HAPPYGOLD || (GET_LEVEL(ch) >= LVL_GOD)) ? happygold : "", (IS_HAPPYGOLD || IS_ADMIN(ch, ADMLVL_GOD)) ? happygold : "",
(IS_HAPPYQP || (GET_LEVEL(ch) >= LVL_GOD)) ? happyqp : "", (IS_HAPPYQP || IS_ADMIN(ch, ADMLVL_GOD)) ? happyqp : "",
CCYEL(ch, C_NRM), (secs_left / 3600), CCNRM(ch, C_NRM), CCYEL(ch, C_NRM), (secs_left / 3600), CCNRM(ch, C_NRM),
CCYEL(ch, C_NRM), (secs_left % 3600) / 60, CCNRM(ch, C_NRM), CCYEL(ch, C_NRM), (secs_left % 3600) / 60, CCNRM(ch, C_NRM),
CCYEL(ch, C_NRM), (secs_left % 60), CCNRM(ch, C_NRM) ); CCYEL(ch, C_NRM), (secs_left % 60), CCNRM(ch, C_NRM) );
@ -897,7 +897,7 @@ ACMD(do_happyhour)
char arg[MAX_INPUT_LENGTH], val[MAX_INPUT_LENGTH]; char arg[MAX_INPUT_LENGTH], val[MAX_INPUT_LENGTH];
int num; int num;
if (GET_LEVEL(ch) < LVL_GOD) if (IS_ADMIN(ch, ADMLVL_GOD))
{ {
show_happyhour(ch); show_happyhour(ch);
return; return;

View file

@ -40,6 +40,11 @@ ACMD(do_action)
action = &soc_mess_list[act_nr]; action = &soc_mess_list[act_nr];
if (!IS_ADMIN(ch, (action->min_level_char))) {
send_to_char(ch, "You are not powerful enough to do that.\r\n");
return;
}
if (!argument || !*argument) { if (!argument || !*argument) {
send_to_char(ch, "%s\r\n", action->char_no_arg); send_to_char(ch, "%s\r\n", action->char_no_arg);
act(action->others_no_arg, action->hide, ch, 0, 0, TO_ROOM); act(action->others_no_arg, action->hide, ch, 0, 0, TO_ROOM);
@ -147,7 +152,9 @@ void create_command_list(void)
complete_cmd_info[k].sort_as = soc_mess_list[j].sort_as; complete_cmd_info[k].sort_as = soc_mess_list[j].sort_as;
complete_cmd_info[k].minimum_position = soc_mess_list[j].min_char_position; complete_cmd_info[k].minimum_position = soc_mess_list[j].min_char_position;
complete_cmd_info[k].command_pointer = do_action; complete_cmd_info[k].command_pointer = do_action;
complete_cmd_info[k].minimum_level = soc_mess_list[j++].min_level_char; complete_cmd_info[k].minimum_level = 0;
complete_cmd_info[k].minimum_admlevel = MIN(MAX(soc_mess_list[j++].min_level_char, ADMLVL_MORTAL), ADMLVL_IMPL);
complete_cmd_info[k].admin_flag = ADM_NONE;
complete_cmd_info[k++].subcmd = 0; complete_cmd_info[k++].subcmd = 0;
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -68,7 +68,7 @@ ACMD(do_oasis_aedit)
d = ch->desc; d = ch->desc;
if (!str_cmp("save", arg)) { if (!str_cmp("save", arg)) {
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves socials.", GET_NAME(ch)); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves socials.", GET_NAME(ch));
send_to_char(ch, "Writing social file.\r\n"); send_to_char(ch, "Writing social file.\r\n");
aedit_save_to_disk(d); aedit_save_to_disk(d);
send_to_char(ch, "Done.\r\n"); send_to_char(ch, "Done.\r\n");
@ -77,7 +77,7 @@ ACMD(do_oasis_aedit)
/* Give descriptor an OLC structure. */ /* Give descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
CREATE(d->olc, struct oasis_olc_data, 1); CREATE(d->olc, struct oasis_olc_data, 1);
@ -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, ADMLVL_IMMORT, 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) {
@ -253,7 +253,7 @@ static void aedit_disp_menu(struct descriptor_data * d) {
"%s-- Action editor\r\n" "%s-- Action editor\r\n"
"%sn%s) Command : %s%-15.15s%s %s1%s) Sort as Command : %s%-15.15s%s\r\n" "%sn%s) Command : %s%-15.15s%s %s1%s) Sort as Command : %s%-15.15s%s\r\n"
"%s2%s) Min Position[CH]: %s%-8.8s %s3%s) Min Position [VT]: %s%-8.8s\r\n" "%s2%s) Min Position[CH]: %s%-8.8s %s3%s) Min Position [VT]: %s%-8.8s\r\n"
"%s4%s) Min Level [CH]: %s%-3d %s5%s) Show if Invisible: %s%s\r\n" "%s4%s) Min AdmLevel[CH]: %s%-3d %s5%s) Show if Invisible: %s%s\r\n"
"%sa%s) Char [NO ARG]: %s%s\r\n" "%sa%s) Char [NO ARG]: %s%s\r\n"
"%sb%s) Others [NO ARG]: %s%s\r\n" "%sb%s) Others [NO ARG]: %s%s\r\n"
"%sc%s) Char [NOT FOUND]: %s%s\r\n" "%sc%s) Char [NOT FOUND]: %s%s\r\n"
@ -321,7 +321,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, ADMLVL_IMPL, 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 */
@ -425,7 +425,7 @@ void aedit_parse(struct descriptor_data * d, char *arg) {
OLC_MODE(d) = AEDIT_MIN_VICT_POS; OLC_MODE(d) = AEDIT_MIN_VICT_POS;
return; return;
case '4': case '4':
write_to_output(d, "Enter new minimum level for social: "); write_to_output(d, "Enter new minimum admin level for social: ");
OLC_MODE(d) = AEDIT_MIN_CHAR_LEVEL; OLC_MODE(d) = AEDIT_MIN_CHAR_LEVEL;
return; return;
case '5': case '5':
@ -586,7 +586,7 @@ void aedit_parse(struct descriptor_data * d, char *arg) {
return; return;
} }
i = atoi(arg); i = atoi(arg);
if ((i < 0) && (i > LVL_IMPL)) { if ((i < ADMLVL_MORTAL) && (i > ADMLVL_IMPL)) {
aedit_disp_menu(d); aedit_disp_menu(d);
return; return;
} }

View file

@ -191,7 +191,7 @@ bool can_see_map(struct char_data *ch) {
/* Is the map funcionality disabled? */ /* Is the map funcionality disabled? */
if (CONFIG_MAP == MAP_OFF) if (CONFIG_MAP == MAP_OFF)
return FALSE; return FALSE;
else if ((CONFIG_MAP == MAP_IMM_ONLY) && (GET_LEVEL(ch) < LVL_IMMORT)) else if ((CONFIG_MAP == MAP_IMM_ONLY) && (!IS_ADMIN(ch, ADMLVL_IMMORT)))
return FALSE; return FALSE;
return TRUE; return TRUE;
@ -538,7 +538,7 @@ ACMD(do_map) {
if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) { if (IS_DARK(IN_ROOM(ch)) && !CAN_SEE_IN_DARK(ch)) {
send_to_char(ch, "It is too dark to see the map.\r\n"); send_to_char(ch, "It is too dark to see the map.\r\n");
return; return;
} else if (AFF_FLAGGED(ch, AFF_BLIND) && GET_LEVEL(ch) < LVL_IMMORT) { } else if (AFF_FLAGGED(ch, AFF_BLIND) && !IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "You can't see the map while blind!\r\n"); send_to_char(ch, "You can't see the map while blind!\r\n");
return; return;
} }

View file

@ -186,7 +186,7 @@ ACMD(do_ban)
ban_node->next = ban_list; ban_node->next = ban_list;
ban_list = ban_node; ban_list = ban_node;
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s has banned %s for %s players.", mudlog(NRM, MAX(ADMLVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s has banned %s for %s players.",
GET_NAME(ch), site, ban_types[ban_node->type]); GET_NAME(ch), site, ban_types[ban_node->type]);
send_to_char(ch, "Site banned.\r\n"); send_to_char(ch, "Site banned.\r\n");
write_ban_list(); write_ban_list();
@ -218,7 +218,7 @@ ACMD(do_unban)
} }
REMOVE_FROM_LIST(ban_node, ban_list, next); REMOVE_FROM_LIST(ban_node, ban_list, next);
send_to_char(ch, "Site unbanned.\r\n"); send_to_char(ch, "Site unbanned.\r\n");
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s removed the %s-player ban on %s.", mudlog(NRM, MAX(ADMLVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s removed the %s-player ban on %s.",
GET_NAME(ch), ban_types[ban_node->type], ban_node->site); GET_NAME(ch), ban_types[ban_node->type], ban_node->site);
free(ban_node); free(ban_node);

View file

@ -48,13 +48,14 @@
/* Format: vnum, read lvl, write lvl, remove lvl, filename, 0 at end. Be sure /* Format: vnum, read lvl, write lvl, remove lvl, filename, 0 at end. Be sure
* to also change NUM_OF_BOARDS in board.h*/ * to also change NUM_OF_BOARDS in board.h*/
struct board_info_type board_info[NUM_OF_BOARDS] = { struct board_info_type board_info[NUM_OF_BOARDS] = {
{3099, 0, 0, LVL_GOD, LIB_ETC "board.mortal", 0}, /* VNUM Read Level Write Level Remove Level Filename Zero */
{3098, LVL_IMMORT, LVL_IMMORT, LVL_GRGOD, LIB_ETC "board.immortal", 0}, {3099, ADMLVL_MORTAL, ADMLVL_MORTAL, ADMLVL_GOD, LIB_ETC "board.mortal", 0},
{3097, LVL_IMMORT, LVL_GRGOD, LVL_IMPL, LIB_ETC "board.freeze", 0}, {3098, ADMLVL_IMMORT, ADMLVL_IMMORT, ADMLVL_GRGOD, LIB_ETC "board.immortal", 0},
{3096, 0, 0, LVL_IMMORT, LIB_ETC "board.social", 0}, {3097, ADMLVL_IMMORT, ADMLVL_GRGOD, ADMLVL_IMPL, LIB_ETC "board.freeze", 0},
{1226, 0, 0, LVL_IMPL, LIB_ETC "board.builder", 0}, {3096, ADMLVL_MORTAL, ADMLVL_MORTAL, ADMLVL_IMMORT, LIB_ETC "board.social", 0},
{1227, 0, 0, LVL_IMPL, LIB_ETC "board.staff", 0}, {1226, ADMLVL_MORTAL, ADMLVL_MORTAL, ADMLVL_IMPL, LIB_ETC "board.builder", 0},
{1228, 0, 0, LVL_IMPL, LIB_ETC "board.advertising", 0}, {1227, ADMLVL_MORTAL, ADMLVL_MORTAL, ADMLVL_IMPL, LIB_ETC "board.staff", 0},
{1228, ADMLVL_MORTAL, ADMLVL_MORTAL, ADMLVL_IMPL, LIB_ETC "board.advertising", 0},
}; };
/* local (file scope) global variables */ /* local (file scope) global variables */
@ -93,7 +94,7 @@ static int find_board(struct char_data *ch)
if (BOARD_RNUM(i) == GET_OBJ_RNUM(obj)) if (BOARD_RNUM(i) == GET_OBJ_RNUM(obj))
return (i); return (i);
if (GET_LEVEL(ch) >= LVL_IMMORT) if (IS_ADMIN(ch, ADMLVL_IMMORT))
for (obj = ch->carrying; obj; obj = obj->next_content) for (obj = ch->carrying; obj; obj = obj->next_content)
for (i = 0; i < NUM_OF_BOARDS; i++) for (i = 0; i < NUM_OF_BOARDS; i++)
if (BOARD_RNUM(i) == GET_OBJ_RNUM(obj)) if (BOARD_RNUM(i) == GET_OBJ_RNUM(obj))
@ -176,7 +177,7 @@ int board_write_message(int board_type, struct char_data *ch, char *arg, struct
time_t ct; time_t ct;
char buf[MAX_INPUT_LENGTH], buf2[MAX_NAME_LENGTH + 3], tmstr[MAX_STRING_LENGTH]; char buf[MAX_INPUT_LENGTH], buf2[MAX_NAME_LENGTH + 3], tmstr[MAX_STRING_LENGTH];
if (GET_LEVEL(ch) < WRITE_LVL(board_type)) { if (!IS_ADMIN(ch, WRITE_LVL(board_type))) {
send_to_char(ch, "You are not holy enough to write on this board.\r\n"); send_to_char(ch, "You are not holy enough to write on this board.\r\n");
return (1); return (1);
} }
@ -232,7 +233,7 @@ int board_show_board(int board_type, struct char_data *ch, char *arg, struct obj
if (!*tmp || !isname(tmp, board->name)) if (!*tmp || !isname(tmp, board->name))
return (0); return (0);
if (GET_LEVEL(ch) < READ_LVL(board_type)) { if (!IS_ADMIN(ch, READ_LVL(board_type))) {
send_to_char(ch, "You try but fail to understand the holy words.\r\n"); send_to_char(ch, "You try but fail to understand the holy words.\r\n");
return (1); return (1);
} }
@ -295,7 +296,7 @@ int board_display_msg(int board_type, struct char_data *ch, char *arg, struct ob
if (!(msg = atoi(number))) if (!(msg = atoi(number)))
return (0); return (0);
if (GET_LEVEL(ch) < READ_LVL(board_type)) { if (!IS_ADMIN(ch, READ_LVL(board_type))) {
send_to_char(ch, "You try but fail to understand the holy words.\r\n"); send_to_char(ch, "You try but fail to understand the holy words.\r\n");
return (1); return (1);
} }
@ -366,7 +367,7 @@ int board_remove_msg(int board_type, struct char_data *ch, char *arg, struct obj
return (1); return (1);
} }
snprintf(buf, sizeof(buf), "(%s)", GET_NAME(ch)); snprintf(buf, sizeof(buf), "(%s)", GET_NAME(ch));
if (GET_LEVEL(ch) < REMOVE_LVL(board_type) && if (!IS_ADMIN(ch, REMOVE_LVL(board_type)) &&
!(strstr(MSG_HEADING(board_type, ind), buf))) { !(strstr(MSG_HEADING(board_type, ind), buf))) {
send_to_char(ch, "You are not holy enough to remove other people's messages.\r\n"); send_to_char(ch, "You are not holy enough to remove other people's messages.\r\n");
return (1); return (1);

View file

@ -31,9 +31,9 @@ struct board_msginfo {
struct board_info_type { struct board_info_type {
obj_vnum vnum; /* vnum of this board */ obj_vnum vnum; /* vnum of this board */
int read_lvl; /* min level to read messages on this board */ int read_lvl; /* min admin level to read messages on this board */
int write_lvl; /* min level to write messages on this board */ int write_lvl; /* min admin level to write messages on this board */
int remove_lvl; /* min level to remove messages from this board */ int remove_lvl; /* min admin level to remove messages from this board */
char filename[50]; /* file to save this board to */ char filename[50]; /* file to save this board to */
obj_rnum rnum; /* rnum of this board */ obj_rnum rnum; /* rnum of this board */
}; };

View file

@ -46,7 +46,7 @@ ACMD(do_oasis_cedit)
/* Parse any arguments. */ /* Parse any arguments. */
one_argument(argument, buf1); one_argument(argument, buf1);
if (GET_LEVEL(ch) < LVL_IMPL) { if (!ADM_FLAGGED(ch, ADM_CEDIT)) {
send_to_char(ch, "You can't modify the game configuration.\r\n"); send_to_char(ch, "You can't modify the game configuration.\r\n");
return; return;
} }
@ -61,7 +61,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, ADMLVL_IMMORT, 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) {
@ -70,7 +70,7 @@ ACMD(do_oasis_cedit)
} }
send_to_char(ch, "Saving the game configuration.\r\n"); send_to_char(ch, "Saving the game configuration.\r\n");
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves the game configuration.", GET_NAME(ch)); "OLC: %s saves the game configuration.", GET_NAME(ch));
cedit_save_to_disk(); cedit_save_to_disk();
@ -92,6 +92,7 @@ static void cedit_setup(struct descriptor_data *d)
OLC_CONFIG(d)->play.max_exp_loss = CONFIG_MAX_EXP_LOSS; OLC_CONFIG(d)->play.max_exp_loss = CONFIG_MAX_EXP_LOSS;
OLC_CONFIG(d)->play.max_npc_corpse_time = CONFIG_MAX_NPC_CORPSE_TIME; OLC_CONFIG(d)->play.max_npc_corpse_time = CONFIG_MAX_NPC_CORPSE_TIME;
OLC_CONFIG(d)->play.max_pc_corpse_time = CONFIG_MAX_PC_CORPSE_TIME; OLC_CONFIG(d)->play.max_pc_corpse_time = CONFIG_MAX_PC_CORPSE_TIME;
OLC_CONFIG(d)->play.max_mortal_level = CONFIG_MAX_LEVEL;
OLC_CONFIG(d)->play.idle_void = CONFIG_IDLE_VOID; OLC_CONFIG(d)->play.idle_void = CONFIG_IDLE_VOID;
OLC_CONFIG(d)->play.idle_rent_time = CONFIG_IDLE_RENT_TIME; OLC_CONFIG(d)->play.idle_rent_time = CONFIG_IDLE_RENT_TIME;
OLC_CONFIG(d)->play.idle_max_level = CONFIG_IDLE_MAX_LEVEL; OLC_CONFIG(d)->play.idle_max_level = CONFIG_IDLE_MAX_LEVEL;
@ -190,6 +191,7 @@ static void cedit_save_internally(struct descriptor_data *d)
CONFIG_MAX_EXP_LOSS = OLC_CONFIG(d)->play.max_exp_loss; CONFIG_MAX_EXP_LOSS = OLC_CONFIG(d)->play.max_exp_loss;
CONFIG_MAX_NPC_CORPSE_TIME = OLC_CONFIG(d)->play.max_npc_corpse_time; CONFIG_MAX_NPC_CORPSE_TIME = OLC_CONFIG(d)->play.max_npc_corpse_time;
CONFIG_MAX_PC_CORPSE_TIME = OLC_CONFIG(d)->play.max_pc_corpse_time; CONFIG_MAX_PC_CORPSE_TIME = OLC_CONFIG(d)->play.max_pc_corpse_time;
CONFIG_MAX_LEVEL = OLC_CONFIG(d)->play.max_mortal_level;
CONFIG_IDLE_VOID = OLC_CONFIG(d)->play.idle_void; CONFIG_IDLE_VOID = OLC_CONFIG(d)->play.idle_void;
CONFIG_IDLE_RENT_TIME = OLC_CONFIG(d)->play.idle_rent_time; CONFIG_IDLE_RENT_TIME = OLC_CONFIG(d)->play.idle_rent_time;
CONFIG_IDLE_MAX_LEVEL = OLC_CONFIG(d)->play.idle_max_level; CONFIG_IDLE_MAX_LEVEL = OLC_CONFIG(d)->play.idle_max_level;
@ -345,11 +347,13 @@ int save_config( IDXTYPE nowhere )
"max_npc_corpse_time = %d\n\n", CONFIG_MAX_NPC_CORPSE_TIME); "max_npc_corpse_time = %d\n\n", CONFIG_MAX_NPC_CORPSE_TIME);
fprintf(fl, "* Number of tics before PC corpses decompose.\n" fprintf(fl, "* Number of tics before PC corpses decompose.\n"
"max_pc_corpse_time = %d\n\n", CONFIG_MAX_PC_CORPSE_TIME); "max_pc_corpse_time = %d\n\n", CONFIG_MAX_PC_CORPSE_TIME);
fprintf(fl, "* The maximum mortal level.\n"
"max_mortal_level = %d\n\n", CONFIG_MAX_LEVEL);
fprintf(fl, "* Number of tics before a PC is sent to the void.\n" fprintf(fl, "* Number of tics before a PC is sent to the void.\n"
"idle_void = %d\n\n", CONFIG_IDLE_VOID); "idle_void = %d\n\n", CONFIG_IDLE_VOID);
fprintf(fl, "* Number of tics before a PC is autorented.\n" fprintf(fl, "* Number of tics before a PC is autorented.\n"
"idle_rent_time = %d\n\n", CONFIG_IDLE_RENT_TIME); "idle_rent_time = %d\n\n", CONFIG_IDLE_RENT_TIME);
fprintf(fl, "* Level and above of players whom are immune to idle penalties.\n" fprintf(fl, "* Admin Level and above of players whom are immune to idle penalties.\n"
"idle_max_level = %d\n\n", CONFIG_IDLE_MAX_LEVEL); "idle_max_level = %d\n\n", CONFIG_IDLE_MAX_LEVEL);
fprintf(fl, "* Should the items in death traps be junked automatically?\n" fprintf(fl, "* Should the items in death traps be junked automatically?\n"
"dts_are_dumps = %d\n\n", CONFIG_DTS_ARE_DUMPS); "dts_are_dumps = %d\n\n", CONFIG_DTS_ARE_DUMPS);
@ -530,7 +534,7 @@ int save_config( IDXTYPE nowhere )
"use_autowiz = %d\n\n", "use_autowiz = %d\n\n",
CONFIG_USE_AUTOWIZ); CONFIG_USE_AUTOWIZ);
fprintf(fl, "* If yes, what is the lowest level which should be on the wizlist?\n" fprintf(fl, "* If yes, what is the lowest admin level which should be on the wizlist?\n"
"min_wizlist_lev = %d\n\n", "min_wizlist_lev = %d\n\n",
CONFIG_MIN_WIZLIST_LEV); CONFIG_MIN_WIZLIST_LEV);
@ -591,14 +595,15 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
"%sG%s) Maximum Experience Loss : %s%d\r\n" "%sG%s) Maximum Experience Loss : %s%d\r\n"
"%sH%s) Max Time for NPC Corpse : %s%d\r\n" "%sH%s) Max Time for NPC Corpse : %s%d\r\n"
"%sI%s) Max Time for PC Corpse : %s%d\r\n" "%sI%s) Max Time for PC Corpse : %s%d\r\n"
"%sJ%s) Tics before PC sent to void : %s%d\r\n" "%sJ%s) Max Mortal Level : %s%d\r\n"
"%sK%s) Tics before PC is autosaved : %s%d\r\n" "%sK%s) Tics before PC sent to void : %s%d\r\n"
"%sL%s) Level Immune To IDLE : %s%d\r\n" "%sL%s) Tics before PC is autosaved : %s%d\r\n"
"%sM%s) Death Traps Junk Items : %s%s\r\n" "%sM%s) Imm Level Immune To IDLE : %s%d\r\n"
"%sN%s) Objects Load Into Inventory : %s%s\r\n" "%sN%s) Death Traps Junk Items : %s%s\r\n"
"%sO%s) Track Through Doors : %s%s\r\n" "%sO%s) Objects Load Into Inventory : %s%s\r\n"
"%sP%s) Display Closed Doors : %s%s\r\n" "%sP%s) Track Through Doors : %s%s\r\n"
"%sR%s) Mortals Level To Immortal : %s%s\r\n" "%sR%s) Display Closed Doors : %s%s\r\n"
"%sS%s) Mortals Level To Immortal : %s%s\r\n"
"%s1%s) OK Message Text : %s%s" "%s1%s) OK Message Text : %s%s"
"%s2%s) NOPERSON Message Text : %s%s" "%s2%s) NOPERSON Message Text : %s%s"
"%s3%s) NOEFFECT Message Text : %s%s" "%s3%s) NOEFFECT Message Text : %s%s"
@ -617,6 +622,7 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
grn, nrm, cyn, OLC_CONFIG(d)->play.max_exp_loss, grn, nrm, cyn, OLC_CONFIG(d)->play.max_exp_loss,
grn, nrm, cyn, OLC_CONFIG(d)->play.max_npc_corpse_time, grn, nrm, cyn, OLC_CONFIG(d)->play.max_npc_corpse_time,
grn, nrm, cyn, OLC_CONFIG(d)->play.max_pc_corpse_time, grn, nrm, cyn, OLC_CONFIG(d)->play.max_pc_corpse_time,
grn, nrm, cyn, OLC_CONFIG(d)->play.max_mortal_level,
grn, nrm, cyn, OLC_CONFIG(d)->play.idle_void, grn, nrm, cyn, OLC_CONFIG(d)->play.idle_void,
grn, nrm, cyn, OLC_CONFIG(d)->play.idle_rent_time, grn, nrm, cyn, OLC_CONFIG(d)->play.idle_rent_time,
@ -695,6 +701,18 @@ static void cedit_disp_room_numbers(struct descriptor_data *d)
OLC_MODE(d) = CEDIT_ROOM_NUMBERS_MENU; OLC_MODE(d) = CEDIT_ROOM_NUMBERS_MENU;
} }
static void cedit_disp_admin_levels(struct descriptor_data *d)
{
int i;
get_char_colors(d->character);
clear_screen(d);
write_to_output(d, "\r\n\r\n");
for (i=ADMLVL_IMMORT; i<=ADMLVL_IMPL; i++) {
write_to_output(d, "%sd%s) %s%s%s\r\n", grn, nrm, cyn, admin_level_names[i], nrm);
}
}
static void cedit_disp_operation_options(struct descriptor_data *d) static void cedit_disp_operation_options(struct descriptor_data *d)
{ {
get_char_colors(d->character); get_char_colors(d->character);
@ -768,7 +786,7 @@ void cedit_parse(struct descriptor_data *d, char *arg)
case 'y': case 'y':
case 'Y': case 'Y':
cedit_save_internally(d); cedit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE,
"OLC: %s modifies the game configuration.", GET_NAME(d->character)); "OLC: %s modifies the game configuration.", GET_NAME(d->character));
cleanup_olc(d, CLEANUP_CONFIG); cleanup_olc(d, CLEANUP_CONFIG);
if (CONFIG_AUTO_SAVE) { if (CONFIG_AUTO_SAVE) {
@ -889,44 +907,51 @@ void cedit_parse(struct descriptor_data *d, char *arg)
case 'j': case 'j':
case 'J': case 'J':
write_to_output(d, "Enter the number of tics before PC's are sent to the void (idle) : "); write_to_output(d, "Enter the highest possible mortal level (0-254) : ");
OLC_MODE(d) = CEDIT_IDLE_VOID; OLC_MODE(d) = CEDIT_MAX_LEVEL;
return; return;
case 'k': case 'k':
case 'K': case 'K':
write_to_output(d, "Enter the number of tics before PC's are automatically rented and forced to quit : "); write_to_output(d, "Enter the number of tics before PC's are sent to the void (idle) : ");
OLC_MODE(d) = CEDIT_IDLE_RENT_TIME; OLC_MODE(d) = CEDIT_IDLE_VOID;
return; return;
case 'l': case 'l':
case 'L': case 'L':
write_to_output(d, "Enter the level a player must be to become immune to IDLE : "); write_to_output(d, "Enter the number of tics before PC's are automatically rented and forced to quit : ");
OLC_MODE(d) = CEDIT_IDLE_MAX_LEVEL; OLC_MODE(d) = CEDIT_IDLE_RENT_TIME;
return; return;
case 'm': case 'm':
case 'M': case 'M':
TOGGLE_VAR(OLC_CONFIG(d)->play.dts_are_dumps); cedit_disp_admin_levels(d);
break; write_to_output(d, "Enter the admin level a player must be to become immune to IDLE : ");
OLC_MODE(d) = CEDIT_IDLE_MAX_LEVEL;
return;
case 'n': case 'n':
case 'N': case 'N':
TOGGLE_VAR(OLC_CONFIG(d)->play.load_into_inventory); TOGGLE_VAR(OLC_CONFIG(d)->play.dts_are_dumps);
break; break;
case 'o': case 'o':
case 'O': case 'O':
TOGGLE_VAR(OLC_CONFIG(d)->play.track_through_doors); TOGGLE_VAR(OLC_CONFIG(d)->play.load_into_inventory);
break; break;
case 'p': case 'p':
case 'P': case 'P':
TOGGLE_VAR(OLC_CONFIG(d)->play.disp_closed_doors); TOGGLE_VAR(OLC_CONFIG(d)->play.track_through_doors);
break; break;
case 'r': case 'r':
case 'R': case 'R':
TOGGLE_VAR(OLC_CONFIG(d)->play.disp_closed_doors);
break;
case 's':
case 'S':
TOGGLE_VAR(OLC_CONFIG(d)->play.no_mort_to_immort); TOGGLE_VAR(OLC_CONFIG(d)->play.no_mort_to_immort);
break; break;
@ -1217,7 +1242,8 @@ void cedit_parse(struct descriptor_data *d, char *arg)
case 'b': case 'b':
case 'B': case 'B':
write_to_output(d, "Enter the minimum level for players to appear on the wizlist : "); cedit_disp_admin_levels(d);
write_to_output(d, "\r\nEnter the minimum admin level for players to appear on the wizlist : ");
OLC_MODE(d) = CEDIT_MIN_WIZLIST_LEV; OLC_MODE(d) = CEDIT_MIN_WIZLIST_LEV;
return; return;
@ -1302,6 +1328,15 @@ void cedit_parse(struct descriptor_data *d, char *arg)
} }
break; break;
case CEDIT_MAX_LEVEL:
/* Note: Some things, such as spell_info, use (CONFIG_MAX_LEVEL + 1) */
/* Do not use the max possible for the variable type */
if (*arg)
OLC_CONFIG(d)->play.max_mortal_level = MIN(MAX(atoi(arg),0),254);
cedit_disp_game_play_options(d);
break;
case CEDIT_IDLE_VOID: case CEDIT_IDLE_VOID:
if (!*arg) { if (!*arg) {
write_to_output(d, write_to_output(d,
@ -1326,9 +1361,12 @@ void cedit_parse(struct descriptor_data *d, char *arg)
case CEDIT_IDLE_MAX_LEVEL: case CEDIT_IDLE_MAX_LEVEL:
if (!*arg) { if (!*arg) {
write_to_output(d, "Value not changed!\r\n");
cedit_disp_game_play_options(d);
} else if ((atoi(arg) < ADMLVL_MORTAL) || (atoi(arg) > ADMLVL_IMPL)) {
write_to_output(d, write_to_output(d,
"That is an invalid choice!\r\n" "That is an invalid choice!\r\n"
"Enter the level a player must be to become immune to IDLE : "); "Enter the admin level a player must be to become immune to IDLE : ");
} else { } else {
OLC_CONFIG(d)->play.idle_max_level = atoi(arg); OLC_CONFIG(d)->play.idle_max_level = atoi(arg);
cedit_disp_game_play_options(d); cedit_disp_game_play_options(d);
@ -1570,10 +1608,13 @@ void cedit_parse(struct descriptor_data *d, char *arg)
break; break;
case CEDIT_MIN_WIZLIST_LEV: case CEDIT_MIN_WIZLIST_LEV:
if (atoi(arg) > LVL_IMPL) { if (!*arg) {
write_to_output(d, "Value not changed.\r\n");
cedit_disp_autowiz_options(d);
} else if ((atoi(arg) < ADMLVL_IMMORT) || (atoi(arg) > ADMLVL_IMPL)) {
write_to_output(d, write_to_output(d,
"The minimum wizlist level can't be greater than %d.\r\n" "The minimum wizlist level can't be greater than %d.\r\n"
"Enter the minimum level for players to appear on the wizlist : ", LVL_IMPL); "Enter the minimum admin level for players to appear on the wizlist : ", ADMLVL_IMPL);
} else { } else {
OLC_CONFIG(d)->autowiz.min_wizlist_lev = atoi(arg); OLC_CONFIG(d)->autowiz.min_wizlist_lev = atoi(arg);
cedit_disp_autowiz_options(d); cedit_disp_autowiz_options(d);
@ -1616,7 +1657,7 @@ void cedit_parse(struct descriptor_data *d, char *arg)
default: /* We should never get here, but just in case... */ default: /* We should never get here, but just in case... */
cleanup_olc(d, CLEANUP_CONFIG); cleanup_olc(d, CLEANUP_CONFIG);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: cedit_parse(): Reached default case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: cedit_parse(): Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }

View file

@ -179,16 +179,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 32; case 28: return 32;
case 29: return 30; case 29: return 30;
case 30: return 28; case 30: return 28;
case 31: return 0; case 31: return 25;
case 32: return 0; case 32: return 23;
case 33: return 0; case 33: return 21;
case 34: return 0; case 34: return 18;
case 35: return 0; case 35: return 15;
case 36: return 0; case 36: return 12;
case 37: return 0; case 37: return 10;
case 38: return 0; case 38: return 7;
case 39: return 0; case 39: return 5;
case 40: return 0; case 40: return 3;
default: default:
log("SYSERR: Missing level for mage paralyzation saving throw."); log("SYSERR: Missing level for mage paralyzation saving throw.");
break; break;
@ -226,16 +226,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 11; case 28: return 11;
case 29: return 10; case 29: return 10;
case 30: return 9; case 30: return 9;
case 31: return 0; case 31: return 8;
case 32: return 0; case 32: return 8;
case 33: return 0; case 33: return 7;
case 34: return 0; case 34: return 6;
case 35: return 0; case 35: return 5;
case 36: return 0; case 36: return 5;
case 37: return 0; case 37: return 4;
case 38: return 0; case 38: return 3;
case 39: return 0; case 39: return 2;
case 40: return 0; case 40: return 1;
default: default:
log("SYSERR: Missing level for mage rod saving throw."); log("SYSERR: Missing level for mage rod saving throw.");
break; break;
@ -273,16 +273,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 17; case 28: return 17;
case 29: return 15; case 29: return 15;
case 30: return 13; case 30: return 13;
case 31: return 0; case 31: return 12;
case 32: return 0; case 32: return 11;
case 33: return 0; case 33: return 10;
case 34: return 0; case 34: return 9;
case 35: return 0; case 35: return 7;
case 36: return 0; case 36: return 6;
case 37: return 0; case 37: return 5;
case 38: return 0; case 38: return 4;
case 39: return 0; case 39: return 3;
case 40: return 0; case 40: return 3;
default: default:
log("SYSERR: Missing level for mage petrification saving throw."); log("SYSERR: Missing level for mage petrification saving throw.");
break; break;
@ -320,16 +320,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 27; case 28: return 27;
case 29: return 25; case 29: return 25;
case 30: return 23; case 30: return 23;
case 31: return 0; case 31: return 22;
case 32: return 0; case 32: return 20;
case 33: return 0; case 33: return 19;
case 34: return 0; case 34: return 18;
case 35: return 0; case 35: return 17;
case 36: return 0; case 36: return 16;
case 37: return 0; case 37: return 15;
case 38: return 0; case 38: return 14;
case 39: return 0; case 39: return 13;
case 40: return 0; case 40: return 12;
default: default:
log("SYSERR: Missing level for mage breath saving throw."); log("SYSERR: Missing level for mage breath saving throw.");
break; break;
@ -367,16 +367,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 12; case 28: return 12;
case 29: return 10; case 29: return 10;
case 30: return 8; case 30: return 8;
case 31: return 0; case 31: return 7;
case 32: return 0; case 32: return 6;
case 33: return 0; case 33: return 6;
case 34: return 0; case 34: return 5;
case 35: return 0; case 35: return 4;
case 36: return 0; case 36: return 4;
case 37: return 0; case 37: return 3;
case 38: return 0; case 38: return 2;
case 39: return 0; case 39: return 1;
case 40: return 0; case 40: return 1;
default: default:
log("SYSERR: Missing level for mage spell saving throw."); log("SYSERR: Missing level for mage spell saving throw.");
break; break;
@ -421,15 +421,15 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 9; case 28: return 9;
case 29: return 8; case 29: return 8;
case 30: return 7; case 30: return 7;
case 31: return 0; case 31: return 6;
case 32: return 0; case 32: return 6;
case 33: return 0; case 33: return 5;
case 34: return 0; case 34: return 4;
case 35: return 0; case 35: return 3;
case 36: return 0; case 36: return 3;
case 37: return 0; case 37: return 2;
case 38: return 0; case 38: return 2;
case 39: return 0; case 39: return 1;
case 40: return 0; case 40: return 0;
default: default:
log("SYSERR: Missing level for cleric paralyzation saving throw."); log("SYSERR: Missing level for cleric paralyzation saving throw.");
@ -468,16 +468,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 29; case 28: return 29;
case 29: return 28; case 29: return 28;
case 30: return 27; case 30: return 27;
case 31: return 0; case 31: return 26;
case 32: return 0; case 32: return 25;
case 33: return 0; case 33: return 24;
case 34: return 0; case 34: return 23;
case 35: return 0; case 35: return 22;
case 36: return 0; case 36: return 21;
case 37: return 0; case 37: return 20;
case 38: return 0; case 38: return 19;
case 39: return 0; case 39: return 18;
case 40: return 0; case 40: return 17;
default: default:
log("SYSERR: Missing level for cleric rod saving throw."); log("SYSERR: Missing level for cleric rod saving throw.");
break; break;
@ -515,16 +515,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 24; case 28: return 24;
case 29: return 23; case 29: return 23;
case 30: return 22; case 30: return 22;
case 31: return 0; case 31: return 21;
case 32: return 0; case 32: return 20;
case 33: return 0; case 33: return 19;
case 34: return 0; case 34: return 18;
case 35: return 0; case 35: return 17;
case 36: return 0; case 36: return 16;
case 37: return 0; case 37: return 15;
case 38: return 0; case 38: return 14;
case 39: return 0; case 39: return 13;
case 40: return 0; case 40: return 13;
default: default:
log("SYSERR: Missing level for cleric petrification saving throw."); log("SYSERR: Missing level for cleric petrification saving throw.");
break; break;
@ -562,16 +562,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 39; case 28: return 39;
case 29: return 38; case 29: return 38;
case 30: return 37; case 30: return 37;
case 31: return 0; case 31: return 35;
case 32: return 0; case 32: return 34;
case 33: return 0; case 33: return 33;
case 34: return 0; case 34: return 32;
case 35: return 0; case 35: return 31;
case 36: return 0; case 36: return 31;
case 37: return 0; case 37: return 30;
case 38: return 0; case 38: return 29;
case 39: return 0; case 39: return 29;
case 40: return 0; case 40: return 28;
default: default:
log("SYSERR: Missing level for cleric breath saving throw."); log("SYSERR: Missing level for cleric breath saving throw.");
break; break;
@ -609,16 +609,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 34; case 28: return 34;
case 29: return 33; case 29: return 33;
case 30: return 32; case 30: return 32;
case 31: return 0; case 31: return 31;
case 32: return 0; case 32: return 30;
case 33: return 0; case 33: return 29;
case 34: return 0; case 34: return 28;
case 35: return 0; case 35: return 27;
case 36: return 0; case 36: return 26;
case 37: return 0; case 37: return 26;
case 38: return 0; case 38: return 25;
case 39: return 0; case 39: return 24;
case 40: return 0; case 40: return 23;
default: default:
log("SYSERR: Missing level for cleric spell saving throw."); log("SYSERR: Missing level for cleric spell saving throw.");
break; break;
@ -663,16 +663,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 38; case 28: return 38;
case 29: return 37; case 29: return 37;
case 30: return 36; case 30: return 36;
case 31: return 0; case 31: return 35;
case 32: return 0; case 32: return 34;
case 33: return 0; case 33: return 33;
case 34: return 0; case 34: return 32;
case 35: return 0; case 35: return 31;
case 36: return 0; case 36: return 31;
case 37: return 0; case 37: return 30;
case 38: return 0; case 38: return 29;
case 39: return 0; case 39: return 29;
case 40: return 0; case 40: return 28;
default: default:
log("SYSERR: Missing level for thief paralyzation saving throw."); log("SYSERR: Missing level for thief paralyzation saving throw.");
break; break;
@ -710,16 +710,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 16; case 28: return 16;
case 29: return 14; case 29: return 14;
case 30: return 13; case 30: return 13;
case 31: return 0; case 31: return 12;
case 32: return 0; case 32: return 11;
case 33: return 0; case 33: return 10;
case 34: return 0; case 34: return 9;
case 35: return 0; case 35: return 8;
case 36: return 0; case 36: return 7;
case 37: return 0; case 37: return 6;
case 38: return 0; case 38: return 5;
case 39: return 0; case 39: return 4;
case 40: return 0; case 40: return 4;
default: default:
log("SYSERR: Missing level for thief rod saving throw."); log("SYSERR: Missing level for thief rod saving throw.");
break; break;
@ -757,16 +757,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 33; case 28: return 33;
case 29: return 32; case 29: return 32;
case 30: return 31; case 30: return 31;
case 31: return 0; case 31: return 30;
case 32: return 0; case 32: return 29;
case 33: return 0; case 33: return 28;
case 34: return 0; case 34: return 27;
case 35: return 0; case 35: return 26;
case 36: return 0; case 36: return 25;
case 37: return 0; case 37: return 24;
case 38: return 0; case 38: return 23;
case 39: return 0; case 39: return 23;
case 40: return 0; case 40: return 22;
default: default:
log("SYSERR: Missing level for thief petrification saving throw."); log("SYSERR: Missing level for thief petrification saving throw.");
break; break;
@ -804,16 +804,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 53; case 28: return 53;
case 29: return 52; case 29: return 52;
case 30: return 51; case 30: return 51;
case 31: return 0; case 31: return 50;
case 32: return 0; case 32: return 49;
case 33: return 0; case 33: return 48;
case 34: return 0; case 34: return 48;
case 35: return 0; case 35: return 47;
case 36: return 0; case 36: return 46;
case 37: return 0; case 37: return 45;
case 38: return 0; case 38: return 44;
case 39: return 0; case 39: return 43;
case 40: return 0; case 40: return 42;
default: default:
log("SYSERR: Missing level for thief breath saving throw."); log("SYSERR: Missing level for thief breath saving throw.");
break; break;
@ -851,16 +851,16 @@ byte saving_throws(int class_num, int type, int level)
case 28: return 21; case 28: return 21;
case 29: return 19; case 29: return 19;
case 30: return 17; case 30: return 17;
case 31: return 0; case 31: return 16;
case 32: return 0; case 32: return 15;
case 33: return 0; case 33: return 14;
case 34: return 0; case 34: return 13;
case 35: return 0; case 35: return 12;
case 36: return 0; case 36: return 11;
case 37: return 0; case 37: return 10;
case 38: return 0; case 38: return 9;
case 39: return 0; case 39: return 8;
case 40: return 0; case 40: return 7;
default: default:
log("SYSERR: Missing level for thief spell saving throw."); log("SYSERR: Missing level for thief spell saving throw.");
break; break;
@ -915,8 +915,8 @@ byte saving_throws(int class_num, int type, int level)
case 38: return 4; case 38: return 4;
case 39: return 3; case 39: return 3;
case 40: return 2; case 40: return 2;
case 41: return 1; /* Some mobiles. */ case 41: return 1;
case 42: return 0; case 42: return 1;
case 43: return 0; case 43: return 0;
case 44: return 0; case 44: return 0;
case 45: return 0; case 45: return 0;
@ -1211,6 +1211,12 @@ int thaco(int class_num, int level)
case 32: return 10; case 32: return 10;
case 33: return 10; case 33: return 10;
case 34: return 9; case 34: return 9;
case 35: return 9;
case 36: return 9;
case 37: return 8;
case 38: return 8;
case 39: return 8;
case 40: return 8;
default: default:
log("SYSERR: Missing level for mage thac0."); log("SYSERR: Missing level for mage thac0.");
} }
@ -1251,6 +1257,12 @@ int thaco(int class_num, int level)
case 32: return 1; case 32: return 1;
case 33: return 1; case 33: return 1;
case 34: return 1; case 34: return 1;
case 35: return 1;
case 36: return 0;
case 37: return 0;
case 38: return 0;
case 39: return 0;
case 40: return 0;
default: default:
log("SYSERR: Missing level for cleric thac0."); log("SYSERR: Missing level for cleric thac0.");
} }
@ -1291,6 +1303,12 @@ int thaco(int class_num, int level)
case 32: return 5; case 32: return 5;
case 33: return 4; case 33: return 4;
case 34: return 4; case 34: return 4;
case 35: return 4;
case 36: return 3;
case 37: return 3;
case 38: return 3;
case 39: return 2;
case 40: return 2;
default: default:
log("SYSERR: Missing level for thief thac0."); log("SYSERR: Missing level for thief thac0.");
} }
@ -1331,6 +1349,12 @@ int thaco(int class_num, int level)
case 32: return 1; case 32: return 1;
case 33: return 1; case 33: return 1;
case 34: return 1; case 34: return 1;
case 35: return 1;
case 36: return 0;
case 37: return 0;
case 38: return 0;
case 39: return 0;
case 40: return 0;
default: default:
log("SYSERR: Missing level for warrior thac0."); log("SYSERR: Missing level for warrior thac0.");
} }
@ -1510,7 +1534,9 @@ void advance_level(struct char_data *ch)
else else
GET_PRACTICES(ch) += MIN(2, MAX(1, wis_app[GET_WIS(ch)].bonus)); GET_PRACTICES(ch) += MIN(2, MAX(1, wis_app[GET_WIS(ch)].bonus));
if (GET_LEVEL(ch) >= LVL_IMMORT) { /* Auto-advance to immortality? */
if (!CONFIG_NO_MORT_TO_IMMORT && GET_LEVEL(ch) >= CONFIG_MAX_LEVEL && !IS_ADMIN(ch, ADMLVL_IMMORT)) {
set_admin_level(ch, ADMLVL_IMMORT); /* Increase admin level and set default admin flags */
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
GET_COND(ch, i) = (char) -1; GET_COND(ch, i) = (char) -1;
SET_BIT_AR(PRF_FLAGS(ch), PRF_HOLYLIGHT); SET_BIT_AR(PRF_FLAGS(ch), PRF_HOLYLIGHT);
@ -1534,10 +1560,8 @@ int backstab_mult(int level)
return 4; /* level 14 - 20 */ return 4; /* level 14 - 20 */
else if (level <= 28) else if (level <= 28)
return 5; /* level 21 - 28 */ return 5; /* level 21 - 28 */
else if (level < LVL_IMMORT)
return 6; /* all remaining mortal levels */
else else
return 20; /* immortals */ return 6; /* all remaining mortal levels */
} }
/* invalid_class is used by handler.c to determine if a piece of equipment is /* invalid_class is used by handler.c to determine if a piece of equipment is
@ -1645,17 +1669,11 @@ void init_spell_levels(void)
/* Function to return the exp required for each class/level */ /* Function to return the exp required for each class/level */
int level_exp(int chclass, int level) int level_exp(int chclass, int level)
{ {
if (level > LVL_IMPL || level < 0) { if (level > CONFIG_MAX_LEVEL || level < 0) {
log("SYSERR: Requesting exp for invalid level %d!", level); log("SYSERR: Requesting exp for invalid mortal level %d!", level);
return 0; return 0;
} }
/* Gods have exp close to EXP_MAX. This statement should never have to
* changed, regardless of how many mortal or immortal levels exist. */
if (level > LVL_IMMORT) {
return EXP_MAX - ((LVL_IMPL - level) * 1000);
}
/* Exp required for normal mortals is below */ /* Exp required for normal mortals is below */
switch (chclass) { switch (chclass) {
@ -1693,7 +1711,9 @@ int level_exp(int chclass, int level)
case 29: return 6850000; case 29: return 6850000;
case 30: return 7400000; case 30: return 7400000;
/* add new levels here */ /* add new levels here */
case LVL_IMMORT: return 8000000; default:
log("SYSERR: Magic User XP tables not set up correctly in level_exp in class.c!");
return 123456;
} }
break; break;
@ -1731,7 +1751,9 @@ int level_exp(int chclass, int level)
case 29: return 6000000; case 29: return 6000000;
case 30: return 6400000; case 30: return 6400000;
/* add new levels here */ /* add new levels here */
case LVL_IMMORT: return 7000000; default:
log("SYSERR: Cleric XP tables not set up correctly in level_exp in class.c!");
return 123456;
} }
break; break;
@ -1769,7 +1791,9 @@ int level_exp(int chclass, int level)
case 29: return 6300000; case 29: return 6300000;
case 30: return 6650000; case 30: return 6650000;
/* add new levels here */ /* add new levels here */
case LVL_IMMORT: return 7000000; default:
log("SYSERR: Thief XP tables not set up correctly in level_exp in class.c!");
return 123456;
} }
break; break;
@ -1807,7 +1831,9 @@ int level_exp(int chclass, int level)
case 29: return 6850000; case 29: return 6850000;
case 30: return 7400000; case 30: return 7400000;
/* add new levels here */ /* add new levels here */
case LVL_IMMORT: return 8000000; default:
log("SYSERR: Warrior XP tables not set up correctly in level_exp in class.c!");
return 123456;
} }
break; break;
} }
@ -1822,10 +1848,8 @@ int level_exp(int chclass, int level)
/* Default titles of male characters. */ /* Default titles of male characters. */
const char *title_male(int chclass, int level) const char *title_male(int chclass, int level)
{ {
if (level <= 0 || level > LVL_IMPL) if (level <= 0 || level > CONFIG_MAX_LEVEL)
return "the Man"; return "the Man";
if (level == LVL_IMPL)
return "the Implementor";
switch (chclass) { switch (chclass) {
@ -1861,9 +1885,6 @@ const char *title_male(int chclass, int level)
case 28: return "the Shaman"; case 28: return "the Shaman";
case 29: return "the Keeper of Talismans"; case 29: return "the Keeper of Talismans";
case 30: return "the Archmage"; case 30: return "the Archmage";
case LVL_IMMORT: return "the Immortal Warlock";
case LVL_GOD: return "the Avatar of Magic";
case LVL_GRGOD: return "the God of Magic";
default: return "the Mage"; default: return "the Mage";
} }
break; break;
@ -1891,9 +1912,6 @@ const char *title_male(int chclass, int level)
case 19: return "the Arch Bishop"; case 19: return "the Arch Bishop";
case 20: return "the Patriarch"; case 20: return "the Patriarch";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Cardinal";
case LVL_GOD: return "the Inquisitor";
case LVL_GRGOD: return "the God of Good and Evil";
default: return "the Cleric"; default: return "the Cleric";
} }
break; break;
@ -1921,9 +1939,6 @@ const char *title_male(int chclass, int level)
case 19: return "the Brigand"; case 19: return "the Brigand";
case 20: return "the Cut-Throat"; case 20: return "the Cut-Throat";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Assassin";
case LVL_GOD: return "the Demi God of Thieves";
case LVL_GRGOD: return "the God of Thieves and Tradesmen";
default: return "the Thief"; default: return "the Thief";
} }
break; break;
@ -1951,9 +1966,6 @@ const char *title_male(int chclass, int level)
case 19: return "the Cavalier"; case 19: return "the Cavalier";
case 20: return "the Knight"; case 20: return "the Knight";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Warlord";
case LVL_GOD: return "the Extirpator";
case LVL_GRGOD: return "the God of War";
default: return "the Warrior"; default: return "the Warrior";
} }
break; break;
@ -1966,10 +1978,8 @@ const char *title_male(int chclass, int level)
/* Default titles of female characters. */ /* Default titles of female characters. */
const char *title_female(int chclass, int level) const char *title_female(int chclass, int level)
{ {
if (level <= 0 || level > LVL_IMPL) if (level <= 0 || level > CONFIG_MAX_LEVEL)
return "the Woman"; return "the Woman";
if (level == LVL_IMPL)
return "the Implementress";
switch (chclass) { switch (chclass) {
@ -2005,9 +2015,6 @@ const char *title_female(int chclass, int level)
case 28: return "Shaman"; case 28: return "Shaman";
case 29: return "the Keeper of Talismans"; case 29: return "the Keeper of Talismans";
case 30: return "Archwitch"; case 30: return "Archwitch";
case LVL_IMMORT: return "the Immortal Enchantress";
case LVL_GOD: return "the Empress of Magic";
case LVL_GRGOD: return "the Goddess of Magic";
default: return "the Witch"; default: return "the Witch";
} }
break; break;
@ -2035,9 +2042,6 @@ const char *title_female(int chclass, int level)
case 19: return "the Arch Lady of the Church"; case 19: return "the Arch Lady of the Church";
case 20: return "the Matriarch"; case 20: return "the Matriarch";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Priestess";
case LVL_GOD: return "the Inquisitress";
case LVL_GRGOD: return "the Goddess of Good and Evil";
default: return "the Cleric"; default: return "the Cleric";
} }
break; break;
@ -2065,9 +2069,6 @@ const char *title_female(int chclass, int level)
case 19: return "the Brigand"; case 19: return "the Brigand";
case 20: return "the Cut-Throat"; case 20: return "the Cut-Throat";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Assassin";
case LVL_GOD: return "the Demi Goddess of Thieves";
case LVL_GRGOD: return "the Goddess of Thieves and Tradesmen";
default: return "the Thief"; default: return "the Thief";
} }
break; break;
@ -2095,9 +2096,6 @@ const char *title_female(int chclass, int level)
case 19: return "the Cavalier"; case 19: return "the Cavalier";
case 20: return "the Lady Knight"; case 20: return "the Lady Knight";
/* no one ever thought up these titles 21-30 */ /* no one ever thought up these titles 21-30 */
case LVL_IMMORT: return "the Immortal Lady of War";
case LVL_GOD: return "the Queen of Destruction";
case LVL_GRGOD: return "the Goddess of War";
default: return "the Warrior"; default: return "the Warrior";
} }
break; break;

View file

@ -466,7 +466,7 @@ void copyover_recover()
/* Add to the list of 'recent' players (since last reboot) with copyover flag */ /* Add to the list of 'recent' players (since last reboot) with copyover flag */
if (AddRecentPlayer(GET_NAME(d->character), d->host, FALSE, TRUE) == FALSE) if (AddRecentPlayer(GET_NAME(d->character), d->host, FALSE, TRUE) == FALSE)
{ {
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE)."); mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE).");
} }
} }
} }
@ -916,13 +916,13 @@ void game_loop(socket_t local_mother_desc)
/* Check for any signals we may have received. */ /* Check for any signals we may have received. */
if (reread_wizlist) { if (reread_wizlist) {
reread_wizlist = FALSE; reread_wizlist = FALSE;
mudlog(CMP, LVL_IMMORT, TRUE, "Signal received - rereading wizlists."); mudlog(CMP, ADMLVL_IMMORT, TRUE, "Signal received - rereading wizlists.");
reboot_wizlists(); reboot_wizlists();
} }
/* Orphaned right now as signal trapping is used for Webster lookup /* Orphaned right now as signal trapping is used for Webster lookup
if (emergency_unban) { if (emergency_unban) {
emergency_unban = FALSE; emergency_unban = FALSE;
mudlog(BRF, LVL_IMMORT, TRUE, "Received SIGUSR2 - completely unrestricting game (emergent)"); mudlog(BRF, ADMLVL_IMMORT, TRUE, "Received SIGUSR2 - completely unrestricting game (emergent)");
ban_list = NULL; ban_list = NULL;
circle_restrict = 0; circle_restrict = 0;
num_invalid = 0; num_invalid = 0;
@ -1557,7 +1557,7 @@ static int new_descriptor(socket_t s)
/* determine if the site is banned */ /* determine if the site is banned */
if (isbanned(newd->host) == BAN_ALL) { if (isbanned(newd->host) == BAN_ALL) {
CLOSE_SOCKET(desc); CLOSE_SOCKET(desc);
mudlog(CMP, LVL_GOD, TRUE, "Connection attempt denied from [%s]", newd->host); mudlog(CMP, ADMLVL_GOD, TRUE, "Connection attempt denied from [%s]", newd->host);
free(newd); free(newd);
return (0); return (0);
} }
@ -2096,13 +2096,13 @@ void close_socket(struct descriptor_data *d)
/* We are guaranteed to have a person. */ /* We are guaranteed to have a person. */
act("$n has lost $s link.", TRUE, link_challenged, 0, 0, TO_ROOM); act("$n has lost $s link.", TRUE, link_challenged, 0, 0, TO_ROOM);
save_char(link_challenged); save_char(link_challenged);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(link_challenged)), TRUE, "Closing link to: %s.", GET_NAME(link_challenged)); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(link_challenged)), TRUE, "Closing link to: %s.", GET_NAME(link_challenged));
} else { } else {
mudlog(CMP, LVL_IMMORT, TRUE, "Losing player: %s.", GET_NAME(d->character) ? GET_NAME(d->character) : "<null>"); mudlog(CMP, ADMLVL_IMMORT, TRUE, "Losing player: %s.", GET_NAME(d->character) ? GET_NAME(d->character) : "<null>");
free_char(d->character); free_char(d->character);
} }
} else } else
mudlog(CMP, LVL_IMMORT, TRUE, "Losing descriptor without char."); mudlog(CMP, ADMLVL_IMMORT, TRUE, "Losing descriptor without char.");
/* JE 2/22/95 -- part of my unending quest to make switch stable */ /* JE 2/22/95 -- part of my unending quest to make switch stable */
if (d->original && d->original->desc) if (d->original && d->original->desc)

View file

@ -69,12 +69,15 @@ int max_exp_loss = 500000; /* max losable per death */
int max_npc_corpse_time = 5; int max_npc_corpse_time = 5;
int max_pc_corpse_time = 10; int max_pc_corpse_time = 10;
/* The maximum mortal level that can be obtained */
int max_mortal_level = 30;
/* How many ticks before a player is sent to the void or idle-rented. */ /* How many ticks before a player is sent to the void or idle-rented. */
int idle_void = 8; int idle_void = 8;
int idle_rent_time = 48; int idle_rent_time = 48;
/* This level and up is immune to idling, LVL_IMPL+1 will disable it. */ /* This admin level and up is immune to idling, LVL_IMPL+1 will disable it. */
int idle_max_level = LVL_GOD; int idle_max_level = ADMLVL_GOD;
/* Should items in death traps automatically be junked? */ /* Should items in death traps automatically be junked? */
int dts_are_dumps = YES; int dts_are_dumps = YES;
@ -147,9 +150,8 @@ int auto_pwipe = NO;
* Element 3, level 4, days 7: Players level 2 through 4 are wiped if they * Element 3, level 4, days 7: Players level 2 through 4 are wiped if they
haven't logged on in the past 7 days. haven't logged on in the past 7 days.
* Element 4, level 10, days 30: Players level 5-10 get 30 days. * Element 4, level 10, days 30: Players level 5-10 get 30 days.
* Element 5, level LVL_IMMORT - 1, days 60: All other mortals get 60 days. * Element 5, level CONFIG_MAX_LEVEL, days 60: All other mortals get 60 days.
* Element 6, level LVL_IMPL, days 90: Immortals get 90 days. * Element 6: Because -2 is less than CONFIG_MAX_LEVEL, this is assumed to be the end
* Element 7: Because -2 is less than LVL_IMPL, this is assumed to be the end
of the criteria. The days entry is not used in this case. */ of the criteria. The days entry is not used in this case. */
struct pclean_criteria_data pclean_criteria[] = { struct pclean_criteria_data pclean_criteria[] = {
/* LEVEL DAYS */ /* LEVEL DAYS */
@ -157,8 +159,7 @@ struct pclean_criteria_data pclean_criteria[] = {
{ 1 ,4 }, { 1 ,4 },
{ 4 ,7 }, { 4 ,7 },
{ 10 ,30 }, { 10 ,30 },
{ LVL_IMMORT - 1 ,60 }, /* highest mortal */ { 30 ,60 }, /* highest mortal - NOTE: Should be CONFIG_MAX_LEVEL */
{ LVL_IMPL ,90 }, /* all immortals */
{ -1 ,0 } /* no more level checks */ { -1 ,0 } /* no more level checks */
}; };
@ -287,7 +288,7 @@ int use_autowiz = YES;
/* If yes, what is the lowest level which should be on the wizlist? (All immort /* If yes, what is the lowest level which should be on the wizlist? (All immort
* levels below the level you specify will go on the immlist instead.) */ * levels below the level you specify will go on the immlist instead.) */
int min_wizlist_lev = LVL_GOD; int min_wizlist_lev = ADMLVL_GOD;
/* To mimic stock behavior set to NO. To allow mortals to see doors in exits /* To mimic stock behavior set to NO. To allow mortals to see doors in exits
* set to YES. */ * set to YES. */

View file

@ -25,6 +25,7 @@ extern int max_exp_gain;
extern int max_exp_loss; extern int max_exp_loss;
extern int max_npc_corpse_time; extern int max_npc_corpse_time;
extern int max_pc_corpse_time; extern int max_pc_corpse_time;
extern int max_mortal_level;
extern int idle_void; extern int idle_void;
extern int idle_rent_time; extern int idle_rent_time;
extern int idle_max_level; extern int idle_max_level;

View file

@ -43,6 +43,82 @@ const char *dirs[] =
"\n" "\n"
}; };
/** Administrative level names
* @pre Must be in the same order as the ADMLVL_ defines.
* Must end array with a single newline. */
const char *admin_level_names[ADMLVL_IMPL + 2] = {
"Mortal", // ADMLVL_NONE
"Immortal", // ADMLVL_IMMORTAL
"God", // ADMLVL_GOD
"Great God", // ADMLVL_GRGOD
"Implementor", // ADMLVL_IMPL
"\n",
};
/** Administrative flag short names
* @pre Must be in the same order as the ADMIN_ defines.
* Must end array with a single newline. */
const char *admin_flag_names[] = {
"TellAll",
"SeeInventory",
"SeeSecret",
"KnowWeather",
"FullWhere",
"Money",
"EatAnything",
"NoPoison",
"WalkAnywhere",
"NoKeys",
"InstantKill",
"NoSteal",
"TransAll",
"SwitchMortal",
"ForceMass",
"AllHouses",
"NoDamage",
"AllShops",
"CEDIT",
"Build",
"AdvBuild",
"Poof",
"Admin",
"SetQP",
"AdvancedIBT",
"\n"
};
/** Administrative flag descriptions
* @pre Must be in the same order as the ADMIN_ defines.
* Must end array with a single newline. */
const char *admin_flags[] = {
"You may use 'page all'",
"You can see other players inventories",
"You may see secret doors",
"You may know weather data",
"You know fully where things are",
"You do not require money",
"You can eat anything",
"You cannot be poisoned",
"You can walk anywhere",
"You do not require keys",
"You have the touch of death",
"You cannot be stolen from",
"You may use 'trans all'",
"You can use 'switch'",
"You may use 'force all'",
"You may enter any house",
"You do not take damage",
"You may use any shop",
"You may use cedit",
"You may use basic OLC tools",
"You may use advanced OLC tools",
"You may use goto and set poofs",
"You may set admin privs",
"You can give and remove qp",
"You can use advanced IBT commands",
"\n"
};
/** Room flag descriptions. /** Room flag descriptions.
* @pre Must be in the same order as the defines. * @pre Must be in the same order as the defines.
* Must end array with a single newline. */ * Must end array with a single newline. */

View file

@ -14,6 +14,9 @@
extern const char *tbamud_version; extern const char *tbamud_version;
extern const char *dirs[]; extern const char *dirs[];
extern const char *admin_level_names[];
extern const char *admin_flag_names[];
extern const char *admin_flags[];
extern const char *room_bits[]; extern const char *room_bits[];
extern const char *zone_bits[]; extern const char *zone_bits[];
extern const char *exit_bits[]; extern const char *exit_bits[];

View file

@ -2455,7 +2455,7 @@ 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, ADMLVL_IMPL, 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);
/* dequeue */ /* dequeue */
if (update_u == reset_q.head) if (update_u == reset_q.head)
@ -2477,8 +2477,8 @@ void zone_update(void)
static void log_zone_error(zone_rnum zone, int cmd_no, const char *message) static void log_zone_error(zone_rnum zone, int cmd_no, const char *message)
{ {
mudlog(NRM, LVL_GOD, TRUE, "SYSERR: zone file: %s", message); mudlog(NRM, ADMLVL_GOD, TRUE, "SYSERR: zone file: %s", message);
mudlog(NRM, LVL_GOD, TRUE, "SYSERR: ...offending cmd: '%c' cmd in zone #%d, line %d", mudlog(NRM, ADMLVL_GOD, TRUE, "SYSERR: ...offending cmd: '%c' cmd in zone #%d, line %d",
ZCMD.command, zone_table[zone].number, ZCMD.line); ZCMD.command, zone_table[zone].number, ZCMD.line);
} }
@ -2732,7 +2732,7 @@ int is_empty(zone_rnum zone_nr)
continue; continue;
/* If an immortal has nohassle off, he counts as present. Added for testing /* If an immortal has nohassle off, he counts as present. Added for testing
* zone reset triggers -Welcor */ * zone reset triggers -Welcor */
if ((!IS_NPC(i->character)) && (GET_LEVEL(i->character) >= LVL_IMMORT) && (PRF_FLAGGED(i->character, PRF_NOHASSLE))) if ((!IS_NPC(i->character)) && (IS_ADMIN(i->character, ADMLVL_IMMORT)) && (PRF_FLAGGED(i->character, PRF_NOHASSLE)))
continue; continue;
return (0); return (0);
@ -3367,7 +3367,8 @@ void init_char(struct char_data *ch)
/* If this is our first player make him IMPL. */ /* If this is our first player make him IMPL. */
if (top_of_p_table == 0) { if (top_of_p_table == 0) {
GET_LEVEL(ch) = LVL_IMPL; GET_LEVEL(ch) = CONFIG_MAX_LEVEL;
set_admin_level(ch, ADMLVL_IMPL); /* Set IMP level and IMP flags */
GET_EXP(ch) = 7000000; GET_EXP(ch) = 7000000;
/* The implementor never goes through do_start(). */ /* The implementor never goes through do_start(). */
@ -3412,7 +3413,7 @@ void init_char(struct char_data *ch)
log("SYSERR: init_char: Character '%s' not found in player table.", GET_NAME(ch)); log("SYSERR: init_char: Character '%s' not found in player table.", GET_NAME(ch));
for (i = 1; i <= MAX_SKILLS; i++) { for (i = 1; i <= MAX_SKILLS; i++) {
if (GET_LEVEL(ch) < LVL_IMPL) if (!IS_ADMIN(ch, ADMLVL_IMPL))
SET_SKILL(ch, i, 0); SET_SKILL(ch, i, 0);
else else
SET_SKILL(ch, i, 100); SET_SKILL(ch, i, 100);
@ -3433,7 +3434,7 @@ void init_char(struct char_data *ch)
ch->real_abils.cha = 25; ch->real_abils.cha = 25;
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
GET_COND(ch, i) = (GET_LEVEL(ch) == LVL_IMPL ? -1 : 24); GET_COND(ch, i) = (IS_ADMIN(ch, ADMLVL_IMPL) ? -1 : 24);
GET_LOADROOM(ch) = NOWHERE; GET_LOADROOM(ch) = NOWHERE;
GET_SCREEN_WIDTH(ch) = PAGE_WIDTH; GET_SCREEN_WIDTH(ch) = PAGE_WIDTH;
@ -3658,7 +3659,7 @@ static int check_object_level(struct obj_data *obj, int val)
{ {
int error = FALSE; int error = FALSE;
if ((GET_OBJ_VAL(obj, val) < 0 || GET_OBJ_VAL(obj, val) > LVL_IMPL) && (error = TRUE)) if ((GET_OBJ_VAL(obj, val) < 0 || GET_OBJ_VAL(obj, val) > CONFIG_MAX_LEVEL) && (error = TRUE))
log("SYSERR: Object #%d (%s) has out of range level #%d.", log("SYSERR: Object #%d (%s) has out of range level #%d.",
GET_OBJ_VNUM(obj), obj->short_description, GET_OBJ_VAL(obj, val)); GET_OBJ_VNUM(obj), obj->short_description, GET_OBJ_VAL(obj, val));
@ -3697,6 +3698,7 @@ static void load_default_config( void )
CONFIG_MAX_EXP_LOSS = max_exp_loss; CONFIG_MAX_EXP_LOSS = max_exp_loss;
CONFIG_MAX_NPC_CORPSE_TIME = max_npc_corpse_time; CONFIG_MAX_NPC_CORPSE_TIME = max_npc_corpse_time;
CONFIG_MAX_PC_CORPSE_TIME = max_pc_corpse_time; CONFIG_MAX_PC_CORPSE_TIME = max_pc_corpse_time;
CONFIG_MAX_LEVEL = max_mortal_level;
CONFIG_IDLE_VOID = idle_void; CONFIG_IDLE_VOID = idle_void;
CONFIG_IDLE_RENT_TIME = idle_rent_time; CONFIG_IDLE_RENT_TIME = idle_rent_time;
CONFIG_IDLE_MAX_LEVEL = idle_max_level; CONFIG_IDLE_MAX_LEVEL = idle_max_level;

View file

@ -143,6 +143,7 @@
#define PINDEX_NODELETE (1 << 1) /* protected player */ #define PINDEX_NODELETE (1 << 1) /* protected player */
#define PINDEX_SELFDELETE (1 << 2) /* player is selfdeleting*/ #define PINDEX_SELFDELETE (1 << 2) /* player is selfdeleting*/
#define PINDEX_NOWIZLIST (1 << 3) /* Player shouldn't be on wizlist*/ #define PINDEX_NOWIZLIST (1 << 3) /* Player shouldn't be on wizlist*/
#define PINDEX_MORTAL (1 << 4) /* Player is currently mortal (shouldn't be on wizlist) */
#define REAL 0 #define REAL 0
#define VIRTUAL 1 #define VIRTUAL 1
@ -213,6 +214,7 @@ struct player_index_element {
char *name; char *name;
long id; long id;
int level; int level;
int admlevel;
int flags; int flags;
time_t last; time_t last;
}; };

View file

@ -142,7 +142,7 @@ void dg_read_trigger(FILE *fp, void *proto, int type)
count = sscanf(line,"%7s %d",junk,&vnum); count = sscanf(line,"%7s %d",junk,&vnum);
if (count != 2) { if (count != 2) {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: Error assigning trigger! - Line was\n %s", line); "SYSERR: Error assigning trigger! - Line was\n %s", line);
return; return;
} }
@ -151,17 +151,17 @@ void dg_read_trigger(FILE *fp, void *proto, int type)
if (rnum == NOTHING) { if (rnum == NOTHING) {
switch(type) { switch(type) {
case MOB_TRIGGER: case MOB_TRIGGER:
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (mob: %s - %d)", "SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (mob: %s - %d)",
vnum, GET_NAME((char_data *)proto), GET_MOB_VNUM((char_data *)proto)); vnum, GET_NAME((char_data *)proto), GET_MOB_VNUM((char_data *)proto));
break; break;
case WLD_TRIGGER: case WLD_TRIGGER:
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (room:%d)", "SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (room:%d)",
vnum, GET_ROOM_VNUM( ((room_data *)proto)->number )); vnum, GET_ROOM_VNUM( ((room_data *)proto)->number ));
break; break;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (?)", vnum); "SYSERR: dg_read_trigger: Trigger vnum #%d asked for but non-existant! (?)", vnum);
break; break;
} }
@ -203,13 +203,13 @@ void dg_read_trigger(FILE *fp, void *proto, int type)
CREATE(room->script, struct script_data, 1); CREATE(room->script, struct script_data, 1);
add_trigger(SCRIPT(room), read_trigger(rnum), -1); add_trigger(SCRIPT(room), read_trigger(rnum), -1);
} else { } else {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: non-existant trigger #%d assigned to room #%d", "SYSERR: non-existant trigger #%d assigned to room #%d",
vnum, room->number); vnum, room->number);
} }
break; break;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: Trigger vnum #%d assigned to non-mob/obj/room", vnum); "SYSERR: Trigger vnum #%d assigned to non-mob/obj/room", vnum);
} }
} }
@ -223,14 +223,14 @@ void dg_obj_trigger(char *line, struct obj_data *obj)
count = sscanf(line,"%s %d",junk,&vnum); count = sscanf(line,"%s %d",junk,&vnum);
if (count != 2) { if (count != 2) {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: dg_obj_trigger() : Error assigning trigger! - Line was:\n %s", line); "SYSERR: dg_obj_trigger() : Error assigning trigger! - Line was:\n %s", line);
return; return;
} }
rnum = real_trigger(vnum); rnum = real_trigger(vnum);
if (rnum==NOTHING) { if (rnum==NOTHING) {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: Trigger vnum #%d asked for but non-existant! (Object: %s - %d)", "SYSERR: Trigger vnum #%d asked for but non-existant! (Object: %s - %d)",
vnum, obj->short_description, GET_OBJ_VNUM(obj)); vnum, obj->short_description, GET_OBJ_VNUM(obj));
return; return;
@ -265,7 +265,7 @@ void assign_triggers(void *i, int type)
while (trg_proto) { while (trg_proto) {
rnum = real_trigger(trg_proto->vnum); rnum = real_trigger(trg_proto->vnum);
if (rnum==NOTHING) { if (rnum==NOTHING) {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: trigger #%d non-existant, for mob #%d", "SYSERR: trigger #%d non-existant, for mob #%d",
trg_proto->vnum, mob_index[mob->nr].vnum); trg_proto->vnum, mob_index[mob->nr].vnum);
} else { } else {
@ -298,7 +298,7 @@ void assign_triggers(void *i, int type)
while (trg_proto) { while (trg_proto) {
rnum = real_trigger(trg_proto->vnum); rnum = real_trigger(trg_proto->vnum);
if (rnum==NOTHING) { if (rnum==NOTHING) {
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: trigger #%d non-existant, for room #%d", "SYSERR: trigger #%d non-existant, for room #%d",
trg_proto->vnum, room->number); trg_proto->vnum, room->number);
} else { } else {
@ -310,7 +310,7 @@ void assign_triggers(void *i, int type)
} }
break; break;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: unknown type for assign_triggers()"); "SYSERR: unknown type for assign_triggers()");
break; break;
} }

View file

@ -278,10 +278,10 @@ int valid_dg_target(struct char_data *ch, int bitvector)
return TRUE; /* all npcs are allowed as targets */ return TRUE; /* all npcs are allowed as targets */
else if (ch->desc && (STATE(ch->desc) != CON_PLAYING)) else if (ch->desc && (STATE(ch->desc) != CON_PLAYING))
return FALSE; /* Only PC's who are playing can be targetted */ return FALSE; /* Only PC's who are playing can be targetted */
else if (GET_LEVEL(ch) < LVL_IMMORT) else if (!IS_ADMIN(ch, ADMLVL_IMMORT))
return TRUE; /* as well as all mortals */ return TRUE; /* as well as all mortals */
else if (!IS_SET(bitvector, DG_ALLOW_GODS) && else if (!IS_SET(bitvector, DG_ALLOW_GODS) &&
GET_LEVEL(ch) >= LVL_GRGOD) /* LVL_GOD has the advance command. Can't allow them to be forced. */ IS_ADMIN(ch, ADMLVL_GOD)) /* ADMLVL_GOD has the advance command. Can't allow them to be forced. */
return FALSE; /* but not always the highest gods */ return FALSE; /* but not always the highest gods */
else if (!PRF_FLAGGED(ch, PRF_NOHASSLE)) else if (!PRF_FLAGGED(ch, PRF_NOHASSLE))
return TRUE; /* the ones in between as allowed as long as they have no-hassle off. */ return TRUE; /* the ones in between as allowed as long as they have no-hassle off. */
@ -291,7 +291,7 @@ int valid_dg_target(struct char_data *ch, int bitvector)
void script_damage(struct char_data *vict, int dam) void script_damage(struct char_data *vict, int dam)
{ {
if (GET_LEVEL(vict)>=LVL_IMMORT && (dam > 0)) { if (IS_ADMIN(vict, ADMLVL_IMMORT) && (dam > 0)) {
send_to_char(vict, "Being the cool immortal you are, you sidestep a trap, " send_to_char(vict, "Being the cool immortal you are, you sidestep a trap, "
"obviously placed to kill you.\r\n"); "obviously placed to kill you.\r\n");
return; return;

View file

@ -44,7 +44,7 @@ static void mob_log(char_data *mob, const char *format, ...)
/* Macro to determine if a mob is permitted to use these commands. */ /* Macro to determine if a mob is permitted to use these commands. */
#define MOB_OR_IMPL(ch) \ #define MOB_OR_IMPL(ch) \
((IS_NPC(ch) && (!(ch)->desc || GET_LEVEL((ch)->desc->original) >= LVL_IMPL)) || (SCRIPT(ch) && TRIGGERS(SCRIPT(ch)))) ((IS_NPC(ch) && (!(ch)->desc || GET_ADMLEVEL((ch)->desc->original) >= ADMLVL_IMPL)) || (SCRIPT(ch) && TRIGGERS(SCRIPT(ch))))
#define MOB_OR_PLAYER(ch) (GET_LEVEL(ch) > 0) #define MOB_OR_PLAYER(ch) (GET_LEVEL(ch) > 0)
/* mob commands */ /* mob commands */
@ -329,7 +329,7 @@ ACMD(do_mload)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if( ch->desc && GET_LEVEL(ch->desc->original) < LVL_IMPL) if (ch->desc && (!IS_ADMIN(ch->desc->original, ADMLVL_IMPL)))
return; return;
target = two_arguments(argument, arg1, arg2); target = two_arguments(argument, arg1, arg2);
@ -430,7 +430,7 @@ ACMD(do_mpurge)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL)) if( ch->desc && !IS_ADMIN(ch->desc->original, ADMLVL_IMPL))
return; return;
one_argument(argument, arg); one_argument(argument, arg);
@ -667,7 +667,7 @@ ACMD(do_mforce)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL)) if (ch->desc && (!IS_ADMIN(ch->desc->original, ADMLVL_IMPL)))
return; return;
argument = one_argument(argument, arg); argument = one_argument(argument, arg);
@ -728,7 +728,7 @@ ACMD(do_mhunt)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL)) if (ch->desc && (!IS_ADMIN(ch->desc->original, ADMLVL_IMPL)))
return; return;
one_argument(argument, arg); one_argument(argument, arg);
@ -770,7 +770,7 @@ ACMD(do_mremember)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL)) if (ch->desc && (!IS_ADMIN(ch->desc->original, ADMLVL_IMPL)))
return; return;
argument = one_argument(argument, arg); argument = one_argument(argument, arg);
@ -821,7 +821,7 @@ ACMD(do_mforget)
if (AFF_FLAGGED(ch, AFF_CHARM)) if (AFF_FLAGGED(ch, AFF_CHARM))
return; return;
if (ch->desc && (GET_LEVEL(ch->desc->original) < LVL_IMPL)) if (ch->desc && (!IS_ADMIN(ch->desc->original, ADMLVL_IMPL)))
return; return;
one_argument(argument, arg); one_argument(argument, arg);

View file

@ -62,7 +62,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, ADMLVL_IMMORT, 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);
} }
@ -99,7 +99,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, ADMLVL_IMMORT, 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));
} }
@ -321,7 +321,7 @@ void trigedit_parse(struct descriptor_data *d, char *arg)
switch(tolower(*arg)) { switch(tolower(*arg)) {
case 'y': case 'y':
trigedit_save(d); trigedit_save(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE,
"OLC: %s edits trigger %d", GET_NAME(d->character), "OLC: %s edits trigger %d", GET_NAME(d->character),
OLC_NUM(d)); OLC_NUM(d));
/* fall through */ /* fall through */
@ -579,7 +579,7 @@ void trigedit_save(struct descriptor_data *d)
#endif #endif
if (!(trig_file = fopen(fname, "w"))) { if (!(trig_file = fopen(fname, "w"))) {
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(d->character)), TRUE, mudlog(BRF, MAX(ADMLVL_GOD, GET_INVIS_LEV(d->character)), TRUE,
"SYSERR: OLC: Can't open trig file \"%s\"", fname); "SYSERR: OLC: Can't open trig file \"%s\"", fname);
return; return;
} }
@ -589,7 +589,7 @@ void trigedit_save(struct descriptor_data *d)
trig = trig_index[rnum]->proto; trig = trig_index[rnum]->proto;
if (fprintf(trig_file, "#%d\n", i) < 0) { if (fprintf(trig_file, "#%d\n", i) < 0) {
mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(d->character)), TRUE, mudlog(BRF, MAX(ADMLVL_GOD, GET_INVIS_LEV(d->character)), TRUE,
"SYSERR: OLC: Can't write trig file!"); "SYSERR: OLC: Can't write trig file!");
fclose(trig_file); fclose(trig_file);
return; return;
@ -647,10 +647,10 @@ static void trigedit_create_index(int znum, char *type)
snprintf(new_name, sizeof(new_name), "%s/newindex", prefix); snprintf(new_name, sizeof(new_name), "%s/newindex", prefix);
if (!(oldfile = fopen(old_name, "r"))) { if (!(oldfile = fopen(old_name, "r"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: DG_OLC: Failed to open %s", old_name); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: DG_OLC: Failed to open %s", old_name);
return; return;
} else if (!(newfile = fopen(new_name, "w"))) { } else if (!(newfile = fopen(new_name, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: DG_OLC: Failed to open %s", new_name); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: DG_OLC: Failed to open %s", new_name);
return; return;
} }

View file

@ -1307,7 +1307,7 @@ void script_vlog(const char *format, va_list args)
for (i = descriptor_list; i; i = i->next) { for (i = descriptor_list; i; i = i->next) {
if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */ if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */
continue; continue;
if (GET_LEVEL(i->character) < LVL_BUILDER) if (!IS_ADMIN((i->character), ADMLVL_BUILDER))
continue; continue;
if (PLR_FLAGGED(i->character, PLR_WRITING)) if (PLR_FLAGGED(i->character, PLR_WRITING))
continue; continue;
@ -2866,7 +2866,7 @@ void save_char_vars(struct char_data *ch)
file = fopen(fn,"wt"); file = fopen(fn,"wt");
if (!file) { if (!file) {
mudlog( NRM, LVL_GOD, TRUE, mudlog( NRM, ADMLVL_GOD, TRUE,
"SYSERR: Could not open player variable file %s for writing.:%s", "SYSERR: Could not open player variable file %s for writing.:%s",
fn, strerror(errno)); fn, strerror(errno));
return; return;

View file

@ -310,7 +310,7 @@ int command_mtrigger(char_data *actor, char *cmd, char *argument)
continue; continue;
if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) { if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: Command Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: Command Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }
@ -350,7 +350,7 @@ void speech_mtrigger(char_data *actor, char *str)
continue; continue;
if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) { if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: Speech Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: Speech Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }
@ -380,7 +380,7 @@ void act_mtrigger(const char_data *ch, char *str, char_data *actor,
continue; continue;
if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) { if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: Act Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: Act Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }
@ -700,7 +700,7 @@ int cmd_otrig(obj_data *obj, char_data *actor, char *cmd,
if (IS_SET(GET_TRIG_NARG(t), type) && if (IS_SET(GET_TRIG_NARG(t), type) &&
(!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t))) { (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t))) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: O-Command Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: O-Command Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }
@ -1060,7 +1060,7 @@ int command_wtrigger(char_data *actor, char *cmd, char *argument)
continue; continue;
if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) { if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: W-Command Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: W-Command Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }
@ -1095,7 +1095,7 @@ void speech_wtrigger(char_data *actor, char *str)
continue; continue;
if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) { if (!GET_TRIG_ARG(t) || !*GET_TRIG_ARG(t)) {
mudlog(NRM, LVL_BUILDER, TRUE, "SYSERR: W-Speech Trigger #%d has no text argument!", mudlog(NRM, ADMLVL_BUILDER, TRUE, "SYSERR: W-Speech Trigger #%d has no text argument!",
GET_TRIG_VNUM(t)); GET_TRIG_VNUM(t));
continue; continue;
} }

View file

@ -574,7 +574,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
else if (!str_cmp(field, "cha")) { else if (!str_cmp(field, "cha")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_CHA(c) += addition; GET_CHA(c) += addition;
if (GET_CHA(c) > max) GET_CHA(c) = max; if (GET_CHA(c) > max) GET_CHA(c) = max;
if (GET_CHA(c) < 3) GET_CHA(c) = 3; if (GET_CHA(c) < 3) GET_CHA(c) = 3;
@ -596,7 +596,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
else if (!str_cmp(field, "con")) { else if (!str_cmp(field, "con")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_CON(c) += addition; GET_CON(c) += addition;
if (GET_CON(c) > max) GET_CON(c) = max; if (GET_CON(c) > max) GET_CON(c) = max;
if (GET_CON(c) < 3) GET_CON(c) = 3; if (GET_CON(c) < 3) GET_CON(c) = 3;
@ -608,7 +608,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
if (!str_cmp(field, "dex")) { if (!str_cmp(field, "dex")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_DEX(c) += addition; GET_DEX(c) += addition;
if (GET_DEX(c) > max) GET_DEX(c) = max; if (GET_DEX(c) > max) GET_DEX(c) = max;
if (GET_DEX(c) < 3) GET_DEX(c) = 3; if (GET_DEX(c) < 3) GET_DEX(c) = 3;
@ -725,7 +725,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
else if (!str_cmp(field, "int")) { else if (!str_cmp(field, "int")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_INT(c) += addition; GET_INT(c) += addition;
if (GET_INT(c) > max) GET_INT(c) = max; if (GET_INT(c) > max) GET_INT(c) = max;
if (GET_INT(c) < 3) GET_INT(c) = 3; if (GET_INT(c) < 3) GET_INT(c) = 3;
@ -779,7 +779,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
if (!str_cmp(field, "level")) { if (!str_cmp(field, "level")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int lev = atoi(subfield); int lev = atoi(subfield);
GET_LEVEL(c) = MIN(MAX(lev, 0), LVL_IMMORT-1); GET_LEVEL(c) = MIN(MAX(lev, 1), CONFIG_MAX_LEVEL);
} else } else
snprintf(str, slen, "%d", GET_LEVEL(c)); snprintf(str, slen, "%d", GET_LEVEL(c));
} }
@ -970,7 +970,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
else if (!str_cmp(field, "str")) { else if (!str_cmp(field, "str")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_STR(c) += addition; GET_STR(c) += addition;
if (GET_STR(c) > max) GET_STR(c) = max; if (GET_STR(c) > max) GET_STR(c) = max;
if (GET_STR(c) < 3) GET_STR(c) = 3; if (GET_STR(c) < 3) GET_STR(c) = 3;
@ -1038,7 +1038,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
else if (!str_cmp(field, "wis")) { else if (!str_cmp(field, "wis")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18; int max = (IS_NPC(c) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
GET_WIS(c) += addition; GET_WIS(c) += addition;
if (GET_WIS(c) > max) GET_WIS(c) = max; if (GET_WIS(c) > max) GET_WIS(c) = max;
if (GET_WIS(c) < 3) GET_WIS(c) = 3; if (GET_WIS(c) < 3) GET_WIS(c) = 3;

View file

@ -78,7 +78,7 @@ void appear(struct char_data *ch)
REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_INVISIBLE); REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_INVISIBLE);
REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE); REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_HIDE);
if (GET_LEVEL(ch) < LVL_IMMORT) if (!IS_ADMIN(ch, ADMLVL_IMMORT))
act("$n slowly fades into existence.", FALSE, ch, 0, 0, TO_ROOM); act("$n slowly fades into existence.", FALSE, ch, 0, 0, TO_ROOM);
else else
act("You feel a strange presence as $n appears, seemingly from nowhere.", act("You feel a strange presence as $n appears, seemingly from nowhere.",
@ -203,7 +203,7 @@ 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, ADMLVL_IMMORT, 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);
} }
@ -579,7 +579,7 @@ static void dam_message(int dam, struct char_data *ch, struct char_data *victim,
act(buf, FALSE, ch, NULL, victim, TO_NOTVICT); act(buf, FALSE, ch, NULL, victim, TO_NOTVICT);
/* damage message to damager */ /* damage message to damager */
if (GET_LEVEL(ch) >= LVL_IMMORT) if (IS_ADMIN(ch, ADMLVL_IMMORT))
send_to_char(ch, "(%d) ", dam); send_to_char(ch, "(%d) ", dam);
buf = replace_string(dam_weapons[msgnum].to_char, buf = replace_string(dam_weapons[msgnum].to_char,
attack_hit_text[w_type].singular, attack_hit_text[w_type].plural); attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
@ -587,7 +587,7 @@ static void dam_message(int dam, struct char_data *ch, struct char_data *victim,
send_to_char(ch, CCNRM(ch, C_CMP)); send_to_char(ch, CCNRM(ch, C_CMP));
/* damage message to damagee */ /* damage message to damagee */
if (GET_LEVEL(victim) >= LVL_IMMORT) if (IS_ADMIN(victim, ADMLVL_IMMORT))
send_to_char(victim, "@R(%d)", dam); send_to_char(victim, "@R(%d)", dam);
buf = replace_string(dam_weapons[msgnum].to_victim, buf = replace_string(dam_weapons[msgnum].to_victim,
attack_hit_text[w_type].singular, attack_hit_text[w_type].plural); attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
@ -611,7 +611,7 @@ int skill_message(int dam, struct char_data *ch, struct char_data *vict,
for (j = 1, msg = fight_messages[i].msg; (j < nr) && msg; j++) for (j = 1, msg = fight_messages[i].msg; (j < nr) && msg; j++)
msg = msg->next; msg = msg->next;
if (!IS_NPC(vict) && (GET_LEVEL(vict) >= LVL_IMPL)) { if (IS_ADMIN(vict, ADMLVL_IMPL)) {
act(msg->god_msg.attacker_msg, FALSE, ch, weap, vict, TO_CHAR); act(msg->god_msg.attacker_msg, FALSE, ch, weap, vict, TO_CHAR);
act(msg->god_msg.victim_msg, FALSE, ch, weap, vict, TO_VICT); act(msg->god_msg.victim_msg, FALSE, ch, weap, vict, TO_VICT);
act(msg->god_msg.room_msg, FALSE, ch, weap, vict, TO_NOTVICT); act(msg->god_msg.room_msg, FALSE, ch, weap, vict, TO_NOTVICT);
@ -700,7 +700,7 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
} }
/* You can't damage an immortal! */ /* You can't damage an immortal! */
if (!IS_NPC(victim) && ((GET_LEVEL(victim) >= LVL_IMMORT) && PRF_FLAGGED(victim, PRF_NOHASSLE))) if (!IS_NPC(victim) && (IS_ADMIN(victim, ADMLVL_IMPL) || ADM_FLAGGED(victim, ADM_NODAMAGE)) )
dam = 0; dam = 0;
if (victim != ch) { if (victim != ch) {
@ -827,7 +827,7 @@ 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, ADMLVL_IMMORT, 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);
} }

View file

@ -269,7 +269,7 @@ int save_mobiles(zone_rnum rznum)
vznum = zone_table[rznum].number; vznum = zone_table[rznum].number;
snprintf(mobfname, sizeof(mobfname), "%s%d.new", MOB_PREFIX, vznum); snprintf(mobfname, sizeof(mobfname), "%s%d.new", MOB_PREFIX, vznum);
if ((mobfd = fopen(mobfname, "w")) == NULL) { if ((mobfd = fopen(mobfname, "w")) == NULL) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: GenOLC: Cannot open mob file for writing."); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: GenOLC: Cannot open mob file for writing.");
return FALSE; return FALSE;
} }
@ -392,7 +392,7 @@ void check_mobile_string(mob_vnum i, char **string, const char *desc)
if (*string == NULL || **string == '\0') { if (*string == NULL || **string == '\0') {
char smbuf[128]; char smbuf[128];
sprintf(smbuf, "GenOLC: Mob #%d has an invalid %s.", i, desc); sprintf(smbuf, "GenOLC: Mob #%d has an invalid %s.", i, desc);
mudlog(BRF, LVL_GOD, TRUE, "%s", smbuf); mudlog(BRF, ADMLVL_GOD, TRUE, "%s", smbuf);
if (*string) if (*string)
free(*string); free(*string);
*string = strdup("An undefined string.\n"); *string = strdup("An undefined string.\n");

View file

@ -196,7 +196,7 @@ int save_objects(zone_rnum zone_num)
snprintf(filename, sizeof(filename), "%s/%d.new", OBJ_PREFIX, zone_table[zone_num].number); snprintf(filename, sizeof(filename), "%s/%d.new", OBJ_PREFIX, zone_table[zone_num].number);
if (!(fp = fopen(filename, "w+"))) { if (!(fp = fopen(filename, "w+"))) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: OLC: Cannot open objects file %s!", filename); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: OLC: Cannot open objects file %s!", filename);
return FALSE; return FALSE;
} }
/* Start running through all objects in this zone. */ /* Start running through all objects in this zone. */
@ -256,7 +256,7 @@ int save_objects(zone_rnum zone_num)
for (ex_desc = obj->ex_description; ex_desc; ex_desc = ex_desc->next) { for (ex_desc = obj->ex_description; ex_desc; ex_desc = ex_desc->next) {
/* Sanity check to prevent nasty protection faults. */ /* Sanity check to prevent nasty protection faults. */
if (!ex_desc->keyword || !ex_desc->description || !*ex_desc->keyword || !*ex_desc->description) { if (!ex_desc->keyword || !ex_desc->description || !*ex_desc->keyword || !*ex_desc->description) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: OLC: oedit_save_to_disk: Corrupt ex_desc!"); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: OLC: oedit_save_to_disk: Corrupt ex_desc!");
continue; continue;
} }
strncpy(buf, ex_desc->description, sizeof(buf) - 1); strncpy(buf, ex_desc->description, sizeof(buf) - 1);

View file

@ -318,7 +318,7 @@ ACMD(do_export_zone)
* folder, because we are*/ * folder, because we are*/
char *path = "../lib/world/export/"; char *path = "../lib/world/export/";
if (IS_NPC(ch) || GET_LEVEL(ch) < LVL_IMPL) if (!IS_ADMIN(ch, ADMLVL_IMPL))
return; return;
skip_spaces(&argument); skip_spaces(&argument);
@ -390,10 +390,10 @@ static int export_info_file(zone_rnum zrnum)
FILE *info_file; FILE *info_file;
if (!(info_file = fopen("world/export/qq.info", "w"))) { if (!(info_file = fopen("world/export/qq.info", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_info_file : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_info_file : Cannot open file!");
return FALSE; return FALSE;
} else if (fprintf(info_file, "tbaMUD Area file.\n") < 0) { } else if (fprintf(info_file, "tbaMUD Area file.\n") < 0) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_info_file: Cannot write to file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_info_file: Cannot write to file!");
fclose(info_file); fclose(info_file);
return FALSE; return FALSE;
} }
@ -463,10 +463,10 @@ static int export_save_shops(zone_rnum zrnum)
struct shop_data *shop; struct shop_data *shop;
if (!(shop_file = fopen("world/export/qq.shp", "w"))) { if (!(shop_file = fopen("world/export/qq.shp", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_shops : Cannot open shop file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_shops : Cannot open shop file!");
return FALSE; return FALSE;
} else if (fprintf(shop_file, "CircleMUD v3.0 Shop File~\n") < 0) { } else if (fprintf(shop_file, "CircleMUD v3.0 Shop File~\n") < 0) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_shops: Cannot write to shop file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_shops: Cannot write to shop file!");
fclose(shop_file); fclose(shop_file);
return FALSE; return FALSE;
} }
@ -553,7 +553,7 @@ static int export_save_mobiles(zone_rnum rznum)
mob_rnum rmob; mob_rnum rmob;
if (!(mob_file = fopen("world/export/qq.mob", "w"))) { if (!(mob_file = fopen("world/export/qq.mob", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_mobiles : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_mobiles : Cannot open file!");
return FALSE; return FALSE;
} }
@ -624,7 +624,7 @@ static int export_save_zone(zone_rnum zrnum)
FILE *zone_file; FILE *zone_file;
if (!(zone_file = fopen("world/export/qq.zon", "w"))) { if (!(zone_file = fopen("world/export/qq.zon", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_zone : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_zone : Cannot open file!");
return FALSE; return FALSE;
} }
@ -735,7 +735,7 @@ static int export_save_zone(zone_rnum zrnum)
/* Invalid commands are replaced with '*' - Ignore them. */ /* Invalid commands are replaced with '*' - Ignore them. */
continue; continue;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: export_save_zone(): Unknown cmd '%c' - NOT saving", ZCMD(zrnum, subcmd).command); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: export_save_zone(): Unknown cmd '%c' - NOT saving", ZCMD(zrnum, subcmd).command);
continue; continue;
} }
} }
@ -759,7 +759,7 @@ static int export_save_objects(zone_rnum zrnum)
struct extra_descr_data *ex_desc; struct extra_descr_data *ex_desc;
if (!(obj_file = fopen("world/export/qq.obj", "w"))) { if (!(obj_file = fopen("world/export/qq.obj", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_objects : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_objects : Cannot open file!");
return FALSE; return FALSE;
} }
/* Start running through all objects in this zone. */ /* Start running through all objects in this zone. */
@ -829,7 +829,7 @@ static int export_save_objects(zone_rnum zrnum)
for (ex_desc = obj->ex_description; ex_desc; ex_desc = ex_desc->next) { for (ex_desc = obj->ex_description; ex_desc; ex_desc = ex_desc->next) {
/* Sanity check to prevent nasty protection faults. */ /* Sanity check to prevent nasty protection faults. */
if (!ex_desc->keyword || !ex_desc->description || !*ex_desc->keyword || !*ex_desc->description) { if (!ex_desc->keyword || !ex_desc->description || !*ex_desc->keyword || !*ex_desc->description) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: OLC: export_save_objects: Corrupt ex_desc!"); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: OLC: export_save_objects: Corrupt ex_desc!");
continue; continue;
} }
strncpy(buf, ex_desc->description, sizeof(buf) - 1); strncpy(buf, ex_desc->description, sizeof(buf) - 1);
@ -865,7 +865,7 @@ static int export_save_rooms(zone_rnum zrnum)
char buf1[MAX_STRING_LENGTH]; char buf1[MAX_STRING_LENGTH];
if (!(room_file = fopen("world/export/qq.wld", "w"))) { if (!(room_file = fopen("world/export/qq.wld", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_rooms : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_rooms : Cannot open file!");
return FALSE; return FALSE;
} }
@ -1003,7 +1003,7 @@ static int export_save_triggers(zone_rnum zrnum)
char bitBuf[MAX_INPUT_LENGTH]; char bitBuf[MAX_INPUT_LENGTH];
if (!(trig_file = fopen("world/export/qq.trg", "w"))) { if (!(trig_file = fopen("world/export/qq.trg", "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: export_save_triggers : Cannot open file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: export_save_triggers : Cannot open file!");
return FALSE; return FALSE;
} }

View file

@ -118,7 +118,7 @@ int add_quest(struct aq_data *nqst)
if (rznum != NOWHERE) if (rznum != NOWHERE)
add_to_save_list(zone_table[rznum].number, SL_QST); add_to_save_list(zone_table[rznum].number, SL_QST);
else else
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: GenOLC: Cannot determine quest zone."); "SYSERR: GenOLC: Cannot determine quest zone.");
return rnum; return rnum;
@ -157,7 +157,7 @@ int delete_quest(qst_rnum rnum)
if (rznum != NOWHERE) if (rznum != NOWHERE)
add_to_save_list(zone_table[rznum].number, SL_QST); add_to_save_list(zone_table[rznum].number, SL_QST);
else else
mudlog(BRF, LVL_BUILDER, TRUE, mudlog(BRF, ADMLVL_BUILDER, TRUE,
"SYSERR: GenOLC: Cannot determine quest zone."); "SYSERR: GenOLC: Cannot determine quest zone.");
/* does the questmaster mob have any quests left? */ /* does the questmaster mob have any quests left? */
if (qm != NOBODY) { if (qm != NOBODY) {

View file

@ -302,7 +302,7 @@ int add_shop(struct shop_data *nshp)
if (rznum != NOWHERE) if (rznum != NOWHERE)
add_to_save_list(zone_table[rznum].number, SL_SHP); add_to_save_list(zone_table[rznum].number, SL_SHP);
else else
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: GenOLC: Cannot determine shop zone."); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: GenOLC: Cannot determine shop zone.");
return rshop; return rshop;
} }
@ -336,7 +336,7 @@ int add_shop(struct shop_data *nshp)
if (rznum != NOWHERE) if (rznum != NOWHERE)
add_to_save_list(zone_table[rznum].number, SL_SHP); add_to_save_list(zone_table[rznum].number, SL_SHP);
else else
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: GenOLC: Cannot determine shop zone."); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: GenOLC: Cannot determine shop zone.");
return rshop; return rshop;
} }
@ -359,10 +359,10 @@ int save_shops(zone_rnum zone_num)
snprintf(fname, sizeof(fname), "%s/%d.new", SHP_PREFIX, zone_table[zone_num].number); snprintf(fname, sizeof(fname), "%s/%d.new", SHP_PREFIX, zone_table[zone_num].number);
if (!(shop_file = fopen(fname, "w"))) { if (!(shop_file = fopen(fname, "w"))) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: OLC: Cannot open shop file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: OLC: Cannot open shop file!");
return FALSE; return FALSE;
} else if (fprintf(shop_file, "CircleMUD v3.0 Shop File~\n") < 0) { } else if (fprintf(shop_file, "CircleMUD v3.0 Shop File~\n") < 0) {
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: OLC: Cannot write to shop file!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: OLC: Cannot write to shop file!");
fclose(shop_file); fclose(shop_file);
return FALSE; return FALSE;
} }

View file

@ -95,7 +95,7 @@ room_rnum add_room(struct room_data *room)
/* Known zone entries we don't care about. */ /* Known zone entries we don't care about. */
break; break;
default: default:
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: GenOLC: add_room: Unknown zone entry found!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: GenOLC: add_room: Unknown zone entry found!");
} }
/* Update the loadroom table. Adds 1 or 0. */ /* Update the loadroom table. Adds 1 or 0. */
@ -221,7 +221,7 @@ int delete_room(room_rnum rnum)
/* Known zone entries we don't care about. */ /* Known zone entries we don't care about. */
break; break;
default: default:
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: GenOLC: delete_room: Unknown zone entry found!"); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: GenOLC: delete_room: Unknown zone entry found!");
} }
/* Remove this room from all shop lists. */ /* Remove this room from all shop lists. */

View file

@ -85,7 +85,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the zone file. */ /* Create the zone file. */
snprintf(buf, sizeof(buf), "%s/%d.zon", ZON_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.zon", ZON_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new zone file."); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new zone file.");
*error = "Could not write zone file.\r\n"; *error = "Could not write zone file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -95,7 +95,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the room file. */ /* Create the room file. */
snprintf(buf, sizeof(buf), "%s/%d.wld", WLD_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.wld", WLD_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new world file."); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new world file.");
*error = "Could not write world file.\r\n"; *error = "Could not write world file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -105,7 +105,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the mobile file. */ /* Create the mobile file. */
snprintf(buf, sizeof(buf), "%s/%d.mob", MOB_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.mob", MOB_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new mob file."); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new mob file.");
*error = "Could not write mobile file.\r\n"; *error = "Could not write mobile file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -115,7 +115,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the object file. */ /* Create the object file. */
snprintf(buf, sizeof(buf), "%s/%d.obj", OBJ_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.obj", OBJ_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new obj file."); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new obj file.");
*error = "Could not write object file.\r\n"; *error = "Could not write object file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -125,7 +125,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the shop file. */ /* Create the shop file. */
snprintf(buf, sizeof(buf), "%s/%d.shp", SHP_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.shp", SHP_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new shop file."); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new shop file.");
*error = "Could not write shop file.\r\n"; *error = "Could not write shop file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -135,7 +135,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the quests file */ /* Create the quests file */
snprintf(buf, sizeof(buf), "%s/%d.qst", QST_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.qst", QST_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new quest file"); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new quest file");
*error = "Could not write quest file.\r\n"; *error = "Could not write quest file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -145,7 +145,7 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
/* Create the trigger file. */ /* Create the trigger file. */
snprintf(buf, sizeof(buf), "%s/%d.trg", TRG_PREFIX, vzone_num); snprintf(buf, sizeof(buf), "%s/%d.trg", TRG_PREFIX, vzone_num);
if (!(fp = fopen(buf, "w"))) { if (!(fp = fopen(buf, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Can't write new trigger file"); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Can't write new trigger file");
*error = "Could not write trigger file.\r\n"; *error = "Could not write trigger file.\r\n";
return NOWHERE; return NOWHERE;
} }
@ -248,10 +248,10 @@ void create_world_index(int znum, const char *type)
snprintf(new_name, sizeof(new_name), "%s/newindex", prefix); snprintf(new_name, sizeof(new_name), "%s/newindex", prefix);
if (!(oldfile = fopen(old_name, "r"))) { if (!(oldfile = fopen(old_name, "r"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Failed to open %s.", old_name); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Failed to open %s.", old_name);
return; return;
} else if (!(newfile = fopen(new_name, "w"))) { } else if (!(newfile = fopen(new_name, "w"))) {
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: OLC: Failed to open %s.", new_name); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: OLC: Failed to open %s.", new_name);
fclose(oldfile); fclose(oldfile);
return; return;
} }
@ -338,7 +338,7 @@ int save_zone(zone_rnum zone_num)
snprintf(fname, sizeof(fname), "%s/%d.new", ZON_PREFIX, zone_table[zone_num].number); snprintf(fname, sizeof(fname), "%s/%d.new", ZON_PREFIX, zone_table[zone_num].number);
if (!(zfile = fopen(fname, "w"))) { if (!(zfile = fopen(fname, "w"))) {
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: save_zones: Can't write zone %d.", zone_table[zone_num].number); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: save_zones: Can't write zone %d.", zone_table[zone_num].number);
return FALSE; return FALSE;
} }
@ -463,7 +463,7 @@ int save_zone(zone_rnum zone_num)
/* Invalid commands are replaced with '*' - Ignore them. */ /* Invalid commands are replaced with '*' - Ignore them. */
continue; continue;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: z_save_to_disk(): Unknown cmd '%c' - NOT saving", ZCMD(zone_num, subcmd).command); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: z_save_to_disk(): Unknown cmd '%c' - NOT saving", ZCMD(zone_num, subcmd).command);
continue; continue;
} }
if (ZCMD(zone_num, subcmd).command != 'V') if (ZCMD(zone_num, subcmd).command != 'V')

View file

@ -254,7 +254,7 @@ void affect_total(struct char_data *ch)
affect_modify_ar(ch, af->location, af->modifier, af->bitvector, TRUE); affect_modify_ar(ch, af->location, af->modifier, af->bitvector, TRUE);
/* Make certain values are between 0..25, not < 0 and not > 25! */ /* Make certain values are between 0..25, not < 0 and not > 25! */
i = (IS_NPC(ch) || GET_LEVEL(ch) >= LVL_GRGOD) ? 25 : 18; i = (IS_NPC(ch) || IS_ADMIN(ch, ADMLVL_GRGOD)) ? 25 : 18;
GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), i)); GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), i));
GET_INT(ch) = MAX(0, MIN(GET_INT(ch), i)); GET_INT(ch) = MAX(0, MIN(GET_INT(ch), i));

View file

@ -64,7 +64,7 @@ ACMD(do_oasis_hedit)
d = ch->desc; d = ch->desc;
if (!str_cmp("save", argument)) { if (!str_cmp("save", argument)) {
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves help files.", mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves help files.",
GET_NAME(ch)); GET_NAME(ch));
hedit_save_to_disk(d); hedit_save_to_disk(d);
send_to_char(ch, "Saving help files.\r\n"); send_to_char(ch, "Saving help files.\r\n");
@ -73,14 +73,14 @@ ACMD(do_oasis_hedit)
/* Give descriptor an OLC structure. */ /* Give descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
CREATE(d->olc, struct oasis_olc_data, 1); CREATE(d->olc, struct oasis_olc_data, 1);
OLC_NUM(d) = 0; OLC_NUM(d) = 0;
OLC_STORAGE(d) = strdup(arg); OLC_STORAGE(d) = strdup(arg);
OLC_ZNUM(d) = search_help(OLC_STORAGE(d), LVL_IMPL); OLC_ZNUM(d) = search_help(OLC_STORAGE(d), ADMLVL_IMPL);
if (OLC_ZNUM(d) == NOWHERE) { if (OLC_ZNUM(d) == NOWHERE) {
send_to_char(ch, "Do you wish to add the '%s' help file? ", OLC_STORAGE(d)); send_to_char(ch, "Do you wish to add the '%s' help file? ", OLC_STORAGE(d));
@ -93,7 +93,7 @@ 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, ADMLVL_IMMORT, 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)
@ -206,7 +206,7 @@ void hedit_parse(struct descriptor_data *d, char *arg)
case 'Y': case 'Y':
snprintf(buf, sizeof(buf), "OLC: %s edits help for %s.", GET_NAME(d->character), snprintf(buf, sizeof(buf), "OLC: %s edits help for %s.", GET_NAME(d->character),
OLC_HELP(d)->keywords); OLC_HELP(d)->keywords);
mudlog(TRUE, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), CMP, "%s", buf); mudlog(TRUE, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), CMP, "%s", buf);
write_to_output(d, "Help saved to disk.\r\n"); write_to_output(d, "Help saved to disk.\r\n");
hedit_save_internally(d); hedit_save_internally(d);
@ -300,7 +300,7 @@ void hedit_parse(struct descriptor_data *d, char *arg)
OLC_VAL(d) = 1; OLC_VAL(d) = 1;
break; break;
case '2': case '2':
write_to_output(d, "Enter min level : "); write_to_output(d, "Enter min admin level : ");
OLC_MODE(d) = HEDIT_MIN_LEVEL; OLC_MODE(d) = HEDIT_MIN_LEVEL;
break; break;
default: default:
@ -321,13 +321,13 @@ void hedit_parse(struct descriptor_data *d, char *arg)
case HEDIT_ENTRY: case HEDIT_ENTRY:
/* We will NEVER get here, we hope. */ /* We will NEVER get here, we hope. */
mudlog(TRUE, LVL_BUILDER, BRF, "SYSERR: Reached HEDIT_ENTRY case in parse_hedit"); mudlog(TRUE, ADMLVL_BUILDER, BRF, "SYSERR: Reached HEDIT_ENTRY case in parse_hedit");
break; break;
case HEDIT_MIN_LEVEL: case HEDIT_MIN_LEVEL:
number = atoi(arg); number = atoi(arg);
if ((number < 0) || (number > LVL_IMPL)) if ((number < ADMLVL_MORTAL) || (number > ADMLVL_IMPL))
write_to_output(d, "That is not a valid choice!\r\nEnter min level:-\r\n] "); write_to_output(d, "That is not a valid choice!\r\nEnter min admin level:-\r\n] ");
else { else {
OLC_HELP(d)->min_level = number; OLC_HELP(d)->min_level = number;
break; break;
@ -336,7 +336,7 @@ void hedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here. */ /* We should never get here. */
mudlog(TRUE, LVL_BUILDER, BRF, "SYSERR: Reached default case in parse_hedit"); mudlog(TRUE, ADMLVL_BUILDER, BRF, "SYSERR: Reached default case in parse_hedit");
break; break;
} }
@ -365,7 +365,7 @@ ACMD(do_helpcheck)
for (i = 1; *(complete_cmd_info[i].command) != '\n'; i++) { for (i = 1; *(complete_cmd_info[i].command) != '\n'; i++) {
if (complete_cmd_info[i].command_pointer != do_action && complete_cmd_info[i].minimum_level >= 0) { if (complete_cmd_info[i].command_pointer != do_action && complete_cmd_info[i].minimum_level >= 0) {
if (search_help(complete_cmd_info[i].command, LVL_IMPL) == NOWHERE) { if (search_help(complete_cmd_info[i].command, ADMLVL_IMPL) == NOWHERE) {
nlen = snprintf(buf + len, sizeof(buf) - len, "%-20.20s%s", complete_cmd_info[i].command, nlen = snprintf(buf + len, sizeof(buf) - len, "%-20.20s%s", complete_cmd_info[i].command,
(++count % 3 ? "" : "\r\n")); (++count % 3 ? "" : "\r\n"));
if (len + nlen >= sizeof(buf)) if (len + nlen >= sizeof(buf))

View file

@ -480,7 +480,7 @@ static void hcontrol_pay_house(struct char_data *ch, char *arg)
else if ((i = find_house(atoi(arg))) == NOWHERE) else if ((i = find_house(atoi(arg))) == NOWHERE)
send_to_char(ch, "Unknown house.\r\n"); send_to_char(ch, "Unknown house.\r\n");
else { else {
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "Payment for house %s collected by %s.", arg, GET_NAME(ch)); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "Payment for house %s collected by %s.", arg, GET_NAME(ch));
house_control[i].last_payment = time(0); house_control[i].last_payment = time(0);
House_save_control(); House_save_control();
@ -570,7 +570,7 @@ int House_can_enter(struct char_data *ch, room_vnum house)
{ {
int i, j; int i, j;
if (GET_LEVEL(ch) >= LVL_GRGOD || (i = find_house(house)) == NOWHERE) if (ADM_FLAGGED(ch, ADM_ALLHOUSES) || (i = find_house(house)) == NOWHERE)
return (1); return (1);
switch (house_control[i].mode) { switch (house_control[i].mode) {
@ -628,7 +628,7 @@ static void hcontrol_convert_houses(struct char_data *ch)
{ {
int i; int i;
if (GET_LEVEL(ch) < LVL_IMPL) if (!IS_ADMIN(ch, ADMLVL_IMPL))
{ {
send_to_char(ch, "Sorry, but you are not powerful enough to do that.\r\n"); send_to_char(ch, "Sorry, but you are not powerful enough to do that.\r\n");
return; return;

View file

@ -454,7 +454,7 @@ ACMD(do_ibt)
last_ibt = get_last_ibt(subcmd); last_ibt = get_last_ibt(subcmd);
if ((!*arg)){ if ((!*arg)){
if (GET_LEVEL(ch) >= LVL_GRGOD){ if (ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "Usage: %s%s submit <header>%s\r\n" send_to_char(ch, "Usage: %s%s submit <header>%s\r\n"
" %s%s list%s\r\n" " %s%s list%s\r\n"
" %s%s show <num>%s\r\n" " %s%s show <num>%s\r\n"
@ -468,7 +468,7 @@ ACMD(do_ibt)
QYEL, CMD_NAME, QNRM, QYEL, CMD_NAME, QNRM,
QYEL, CMD_NAME, QNRM); QYEL, CMD_NAME, QNRM);
return; return;
} else if (GET_LEVEL(ch) >= LVL_IMMORT) { } else if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "Usage: %s%s submit <header>%s\r\n" send_to_char(ch, "Usage: %s%s submit <header>%s\r\n"
" %s%s list%s\r\n" " %s%s list%s\r\n"
" %s%s show <num>%s\r\n", " %s%s show <num>%s\r\n",
@ -499,12 +499,12 @@ ACMD(do_ibt)
send_to_char(ch, "That %s doesn't exist.\r\n", CMD_NAME); send_to_char(ch, "That %s doesn't exist.\r\n", CMD_NAME);
return; return;
} else { } else {
if ((GET_LEVEL(ch) < LVL_IMMORT) && (!is_ibt_logger(ibtData, ch))) { if ((!IS_ADMIN(ch, ADMLVL_IMMORT)) && (!is_ibt_logger(ibtData, ch))) {
send_to_char(ch, "Sorry but you may only view %ss you have posted yourself.\n\r", ibt_types[subcmd]); send_to_char(ch, "Sorry but you may only view %ss you have posted yourself.\n\r", ibt_types[subcmd]);
} else { } else {
send_to_char(ch, "%s%s by %s%s\r\n",QCYN, ibt_types[subcmd], QYEL, ibtData->name); send_to_char(ch, "%s%s by %s%s\r\n",QCYN, ibt_types[subcmd], QYEL, ibtData->name);
if (GET_LEVEL(ch) >= LVL_IMMORT) { if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "%sLevel: %s%d\r\n",QCYN, QYEL, ibtData->level); send_to_char(ch, "%sLevel: %s%d\r\n",QCYN, QYEL, ibtData->level);
send_to_char(ch, "%sRoom : %s%d\r\n",QCYN, QYEL, ibtData->room); send_to_char(ch, "%sRoom : %s%d\r\n",QCYN, QYEL, ibtData->room);
} }
@ -527,7 +527,7 @@ ACMD(do_ibt)
if (first_ibt) if (first_ibt)
{ {
if (GET_LEVEL(ch) < LVL_IMMORT) { if (!IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch,"%s No %s|%s Description\r\n", QCYN, QGRN, QCYN); send_to_char(ch,"%s No %s|%s Description\r\n", QCYN, QGRN, QCYN);
send_to_char(ch,"%s ---|--------------------------------------------------%s\r\n", QGRN, QNRM); send_to_char(ch,"%s ---|--------------------------------------------------%s\r\n", QGRN, QNRM);
} else { } else {
@ -539,7 +539,7 @@ ACMD(do_ibt)
i++; i++;
/* For mortals, skip IBT's that they didn't log */ /* For mortals, skip IBT's that they didn't log */
if ((GET_LEVEL(ch) < LVL_IMMORT) && !is_ibt_logger(ibtData,ch)) if ((!IS_ADMIN(ch, ADMLVL_IMMORT)) && !is_ibt_logger(ibtData,ch))
continue; continue;
/* Set up the 'important' flag */ /* Set up the 'important' flag */
@ -549,7 +549,7 @@ ACMD(do_ibt)
sprintf(imp, "%c", ' '); sprintf(imp, "%c", ' ');
if (IBT_FLAGGED(ibtData, IBT_RESOLVED)) { if (IBT_FLAGGED(ibtData, IBT_RESOLVED)) {
if (GET_LEVEL(ch) < LVL_IMMORT) { if (!IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "%s%s%3d|%s%s\r\n", send_to_char(ch, "%s%s%3d|%s%s\r\n",
imp, QGRN, i, ibtData->text, QNRM); imp, QGRN, i, ibtData->text, QNRM);
} else { } else {
@ -562,7 +562,7 @@ ACMD(do_ibt)
} }
num_res++; num_res++;
} else if (IBT_FLAGGED(ibtData, IBT_INPROGRESS)) { } else if (IBT_FLAGGED(ibtData, IBT_INPROGRESS)) {
if (GET_LEVEL(ch) < LVL_IMMORT) { if (!IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "%s%s%3d%s|%s%s%s\r\n", send_to_char(ch, "%s%s%3d%s|%s%s%s\r\n",
imp, QYEL, i, QGRN, imp, QYEL, i, QGRN,
QYEL, ibtData->text, QNRM); QYEL, ibtData->text, QNRM);
@ -576,7 +576,7 @@ ACMD(do_ibt)
} }
num_unres++; num_unres++;
} else { } else {
if (GET_LEVEL(ch) < LVL_IMMORT) { if (!IS_ADMIN(ch, ADMLVL_IMMORT)) {
send_to_char(ch, "%s%s%3d%s|%s%s%s\r\n", send_to_char(ch, "%s%s%3d%s|%s%s%s\r\n",
imp, QRED, i, QGRN, imp, QRED, i, QGRN,
QRED, ibtData->text, QNRM); QRED, ibtData->text, QNRM);
@ -599,7 +599,7 @@ ACMD(do_ibt)
} else { } else {
send_to_char(ch,"No %ss have been found that were reported by you!\r\n", CMD_NAME); send_to_char(ch,"No %ss have been found that were reported by you!\r\n", CMD_NAME);
} }
if (GET_LEVEL(ch) >= LVL_GRGOD) { if (ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch,"%sYou may use %s remove, resolve or edit to change the list..%s\r\n", QCYN, CMD_NAME, QNRM); send_to_char(ch,"%sYou may use %s remove, resolve or edit to change the list..%s\r\n", QCYN, CMD_NAME, QNRM);
} }
send_to_char(ch,"%sYou may use %s%s show <number>%s to see more indepth about the %s.%s\r\n", QCYN, QYEL, CMD_NAME, QCYN, CMD_NAME, QNRM); send_to_char(ch,"%sYou may use %s%s show <number>%s to see more indepth about the %s.%s\r\n", QCYN, QYEL, CMD_NAME, QCYN, CMD_NAME, QNRM);
@ -649,12 +649,12 @@ 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,ADMLVL_IMMORT, 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"))
{ {
if (GET_LEVEL(ch) < LVL_GRGOD){ if (!ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]); send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]);
return; return;
} }
@ -678,7 +678,7 @@ ACMD(do_ibt)
} }
return; return;
} else if (is_abbrev(arg,"remove")) { } else if (is_abbrev(arg,"remove")) {
if (GET_LEVEL(ch) < LVL_GRGOD){ if (!ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]); send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]);
return; return;
} }
@ -701,21 +701,21 @@ ACMD(do_ibt)
} }
return; return;
} else if (is_abbrev(arg,"save")) { } else if (is_abbrev(arg,"save")) {
if (GET_LEVEL(ch) < LVL_GRGOD){ if (!ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]); send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]);
return; return;
} }
save_ibt_file(subcmd); save_ibt_file(subcmd);
send_to_char(ch,"%s list saved.\r\n", ibt_types[subcmd]); send_to_char(ch,"%s list saved.\r\n", ibt_types[subcmd]);
} else if (is_abbrev(arg,"edit")) { } else if (is_abbrev(arg,"edit")) {
if (GET_LEVEL(ch) < LVL_GRGOD){ if (!ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]); send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]);
return; return;
} }
/* Pass control to the OLC without the 'edit' arg */ /* Pass control to the OLC without the 'edit' arg */
do_oasis_ibtedit(ch, arg_text, cmd, subcmd); do_oasis_ibtedit(ch, arg_text, cmd, subcmd);
} else { } else {
if (GET_LEVEL(ch) < LVL_GRGOD){ if (!ADM_FLAGGED(ch, ADM_ADVIBT)) {
send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]); send_to_char(ch, "%s what?\r\n", ibt_types[subcmd]);
send_to_char(ch, "Usage: %s submit <text>\r\n", ibt_types[subcmd]); send_to_char(ch, "Usage: %s submit <text>\r\n", ibt_types[subcmd]);
return; return;
@ -776,7 +776,7 @@ ACMD(do_oasis_ibtedit)
/* Give descriptor an OLC structure. */ /* Give descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_ibtedit: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis_ibtedit: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -799,7 +799,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, ADMLVL_IMMORT, TRUE,"OLC: %s starts editing %s %d",
GET_NAME(ch), IBT_TYPE, OLC_NUM(d)); GET_NAME(ch), IBT_TYPE, OLC_NUM(d));
} }
@ -942,7 +942,7 @@ void ibtedit_parse(struct descriptor_data *d, char *arg)
case 'Y': case 'Y':
/* Save the IBT in memory and to disk. */ /* Save the IBT in memory and to disk. */
ibtedit_save(d); ibtedit_save(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits %s %d", GET_NAME(d->character), IBT_TYPE, OLC_NUM(d)); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits %s %d", GET_NAME(d->character), IBT_TYPE, OLC_NUM(d));
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
return; return;
case 'n': case 'n':
@ -1057,21 +1057,21 @@ void ibtedit_parse(struct descriptor_data *d, char *arg)
case IBTEDIT_BODY: case IBTEDIT_BODY:
/* We should never get here, modify.c throws user through ibtedit_string_cleanup. */ /* We should never get here, modify.c throws user through ibtedit_string_cleanup. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached BODY case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached BODY case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
case IBTEDIT_NOTES: case IBTEDIT_NOTES:
/* We should never get here, modify.c throws user through ibtedit_string_cleanup. */ /* We should never get here, modify.c throws user through ibtedit_string_cleanup. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached NOTES case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached NOTES case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
default: default:
/* We should never get here. */ /* We should never get here. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached default case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: ibtedit_parse(): Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }

View file

@ -468,7 +468,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d)
break; break;
default: default:
write_to_output(d, "Invalid option.\r\n"); write_to_output(d, "Invalid option.\r\n");
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: invalid command passed to parse_edit_action"); mudlog(BRF, ADMLVL_IMPL, TRUE, "SYSERR: invalid command passed to parse_edit_action");
return; return;
} }
} }

View file

@ -60,298 +60,314 @@ struct command_info *complete_cmd_info;
* commands such as "at" should have high priority; infrequently used and * commands such as "at" should have high priority; infrequently used and
* dangerously destructive commands should have low priority. */ * dangerously destructive commands should have low priority. */
/* The new command list has 8 columns, which are:
* command - The full command typed by players
* sort by - Ensure a command is sorted before a similar social
* min pos - Minimum position for player to use the command
* ACMD func - The handler function called when commmand is used
* Min Level - The minimum mortal level for this command
* Min Admin - Min. Admin level - over-rides mortal level unless ADMLVL_MORTAL
* Admin Flag - Required admin flag - over-rides admin level unless ADM_NONE
* Subcommand - Subcommand passed to handler function
*
* If Admin flag is set, admin level should be what would normally be set for the command, even
* though it's not used. This then shows in wizhelp or commands.
*/
cpp_extern const struct command_info cmd_info[] = { cpp_extern const struct command_info cmd_info[] = {
{ "RESERVED", "", 0, 0, 0, 0 }, /* this must be first -- for specprocs */ { "RESERVED", "", 0, 0, 0, 0, 0, 0 }, /* this must be first -- for specprocs */
/* directions must come before other commands but after RESERVED */ /* directions must come before other commands but after RESERVED */
{ "north" , "n" , POS_STANDING, do_move , 0, SCMD_NORTH }, { "north" , "n" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NORTH },
{ "east" , "e" , POS_STANDING, do_move , 0, SCMD_EAST }, { "east" , "e" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_EAST },
{ "south" , "s" , POS_STANDING, do_move , 0, SCMD_SOUTH }, { "south" , "s" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_SOUTH },
{ "west" , "w" , POS_STANDING, do_move , 0, SCMD_WEST }, { "west" , "w" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_WEST },
{ "up" , "u" , POS_STANDING, do_move , 0, SCMD_UP }, { "up" , "u" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_UP },
{ "down" , "d" , POS_STANDING, do_move , 0, SCMD_DOWN }, { "down" , "d" , POS_STANDING, do_move , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_DOWN },
/* now, the main list */ /* now, the main list */
{ "at" , "at" , POS_DEAD , do_at , LVL_IMMORT, 0 }, { "at" , "at" , POS_DEAD , do_at , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "advance" , "adv" , POS_DEAD , do_advance , LVL_GOD, 0 }, { "admin" , "adm" , POS_DEAD , do_admin , 0, ADMLVL_IMPL, ADM_ADMIN, 0 },
{ "aedit" , "aed" , POS_DEAD , do_oasis_aedit, LVL_GOD, 0 }, { "advance" , "adv" , POS_DEAD , do_advance , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "alias" , "ali" , POS_DEAD , do_alias , 0, 0 }, { "aedit" , "aed" , POS_DEAD , do_oasis_aedit,0, ADMLVL_GOD, ADM_NONE, 0 },
{ "afk" , "afk" , POS_DEAD , do_gen_tog , 0, SCMD_AFK }, { "alias" , "ali" , POS_DEAD , do_alias , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "areas" , "are" , POS_DEAD , do_areas , 0, 0 }, { "afk" , "afk" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AFK },
{ "assist" , "as" , POS_FIGHTING, do_assist , 1, 0 }, { "areas" , "are" , POS_DEAD , do_areas , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "ask" , "ask" , POS_RESTING , do_spec_comm, 0, SCMD_ASK }, { "assist" , "as" , POS_FIGHTING, do_assist , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "astat" , "ast" , POS_DEAD , do_astat , 0, 0 }, { "ask" , "ask" , POS_RESTING , do_spec_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_ASK },
{ "attach" , "attach" , POS_DEAD , do_attach , LVL_BUILDER, 0 }, { "astat" , "ast" , POS_DEAD , do_astat , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "auction" , "auc" , POS_SLEEPING, do_gen_comm , 0, SCMD_AUCTION }, { "attach" , "attach" , POS_DEAD , do_attach , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "autoexits" , "autoex" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOEXIT }, { "auction" , "auc" , POS_SLEEPING, do_gen_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUCTION },
{ "autoassist","autoass" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOASSIST }, { "autoexits" , "autoex" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOEXIT },
{ "autodoor" , "autodoor", POS_DEAD , do_gen_tog , 0, SCMD_AUTODOOR }, { "autoassist","autoass" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOASSIST },
{ "autogold" , "autogold", POS_DEAD , do_gen_tog , 0, SCMD_AUTOGOLD }, { "autodoor" , "autodoor", POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTODOOR },
{ "autokey" , "autokey" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOKEY }, { "autogold" , "autogold", POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOGOLD },
{ "autoloot" , "autoloot", POS_DEAD , do_gen_tog , 0, SCMD_AUTOLOOT }, { "autokey" , "autokey" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOKEY },
{ "automap" , "automap" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOMAP }, { "autoloot" , "autoloot", POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOLOOT },
{ "autosac" , "autosac" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOSAC }, { "automap" , "automap" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOMAP },
{ "autosplit", "autospl" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOSPLIT }, { "autosac" , "autosac" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOSAC },
{ "autosplit", "autospl" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_AUTOSPLIT },
{ "backstab" , "ba" , POS_STANDING, do_backstab , 1, 0 }, { "backstab" , "ba" , POS_STANDING, do_backstab , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "ban" , "ban" , POS_DEAD , do_ban , LVL_GRGOD, 0 }, { "ban" , "ban" , POS_DEAD , do_ban , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "balance" , "bal" , POS_STANDING, do_not_here , 1, 0 }, { "balance" , "bal" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "bash" , "bas" , POS_FIGHTING, do_bash , 1, 0 }, { "bash" , "bas" , POS_FIGHTING, do_bash , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "brief" , "br" , POS_DEAD , do_gen_tog , 0, SCMD_BRIEF }, { "brief" , "br" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_BRIEF },
{ "buildwalk", "buildwalk", POS_STANDING, do_gen_tog , LVL_BUILDER, SCMD_BUILDWALK }, { "buildwalk", "buildwalk",POS_STANDING, do_gen_tog , 0, ADMLVL_BUILDER, ADM_NONE, SCMD_BUILDWALK },
{ "buy" , "bu" , POS_STANDING, do_not_here , 0, 0 }, { "buy" , "bu" , POS_STANDING, do_not_here , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "bug" , "bug" , POS_DEAD , do_ibt , 0, SCMD_BUG }, { "bug" , "bug" , POS_DEAD , do_ibt , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_BUG },
{ "cast" , "c" , POS_SITTING , do_cast , 1, 0 }, { "cast" , "c" , POS_SITTING , do_cast , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "cedit" , "cedit" , POS_DEAD , do_oasis_cedit, LVL_IMPL, 0 }, { "cedit" , "cedit" , POS_DEAD , do_oasis_cedit,0, ADMLVL_IMPL, ADM_CEDIT, 0 },
{ "changelog", "cha" , POS_DEAD , do_changelog, LVL_IMPL, 0 }, { "changelog", "cha" , POS_DEAD , do_changelog , 0, ADMLVL_IMPL, ADM_NONE, 0 },
{ "check" , "ch" , POS_STANDING, do_not_here , 1, 0 }, { "check" , "ch" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "checkload", "checkl" , POS_DEAD , do_checkloadstatus, LVL_GOD, 0 }, { "checkload", "checkl" , POS_DEAD , do_checkloadstatus,0, ADMLVL_GOD, ADM_ADVBUILD, 0 },
{ "close" , "cl" , POS_SITTING , do_gen_door , 0, SCMD_CLOSE }, { "close" , "cl" , POS_SITTING , do_gen_door , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_CLOSE },
{ "clear" , "cle" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR }, { "clear" , "cle" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_CLEAR },
{ "cls" , "cls" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR }, { "cls" , "cls" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_CLEAR },
{ "consider" , "con" , POS_RESTING , do_consider , 0, 0 }, { "cmdinfo" , "cmd" , POS_DEAD , do_cmdinfo , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "commands" , "com" , POS_DEAD , do_commands , 0, SCMD_COMMANDS }, { "consider" , "con" , POS_RESTING , do_consider , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "compact" , "comp" , POS_DEAD , do_gen_tog , 0, SCMD_COMPACT }, { "commands" , "com" , POS_DEAD , do_commands , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_COMMANDS },
{ "copyover" , "copyover", POS_DEAD , do_copyover , LVL_GRGOD, 0 }, { "compact" , "comp" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_COMPACT },
{ "credits" , "cred" , POS_DEAD , do_gen_ps , 0, SCMD_CREDITS }, { "copyover" , "copyover", POS_DEAD , do_copyover , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "credits" , "cred" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_CREDITS },
{ "date" , "da" , POS_DEAD , do_date , LVL_IMMORT, SCMD_DATE }, { "date" , "da" , POS_DEAD , do_date , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_DATE },
{ "dc" , "dc" , POS_DEAD , do_dc , LVL_GOD, 0 }, { "dc" , "dc" , POS_DEAD , do_dc , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "deposit" , "depo" , POS_STANDING, do_not_here , 1, 0 }, { "deposit" , "depo" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "detach" , "detach" , POS_DEAD , do_detach , LVL_BUILDER, 0 }, { "detach" , "detach" , POS_DEAD , do_detach , 0, ADMLVL_BUILDER, ADM_ADVBUILD, 0 },
{ "diagnose" , "diag" , POS_RESTING , do_diagnose , 0, 0 }, { "diagnose" , "diag" , POS_RESTING , do_diagnose , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "dig" , "dig" , POS_DEAD , do_dig , LVL_BUILDER, 0 }, { "dig" , "dig" , POS_DEAD , do_dig , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "display" , "disp" , POS_DEAD , do_display , 0, 0 }, { "display" , "disp" , POS_DEAD , do_display , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "donate" , "don" , POS_RESTING , do_drop , 0, SCMD_DONATE }, { "donate" , "don" , POS_RESTING , do_drop , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_DONATE },
{ "drink" , "dri" , POS_RESTING , do_drink , 0, SCMD_DRINK }, { "drink" , "dri" , POS_RESTING , do_drink , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_DRINK },
{ "drop" , "dro" , POS_RESTING , do_drop , 0, SCMD_DROP }, { "drop" , "dro" , POS_RESTING , do_drop , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_DROP },
{ "eat" , "ea" , POS_RESTING , do_eat , 0, SCMD_EAT }, { "eat" , "ea" , POS_RESTING , do_eat , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_EAT },
{ "echo" , "ec" , POS_SLEEPING, do_echo , LVL_IMMORT, SCMD_ECHO }, { "echo" , "ec" , POS_SLEEPING, do_echo , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_ECHO },
{ "emote" , "em" , POS_RESTING , do_echo , 0, SCMD_EMOTE }, { "emote" , "em" , POS_RESTING , do_echo , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_EMOTE },
{ ":" , ":" , POS_RESTING, do_echo , 1, SCMD_EMOTE }, { ":" , ":" , POS_RESTING, do_echo , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_EMOTE },
{ "enter" , "ent" , POS_STANDING, do_enter , 0, 0 }, { "enter" , "ent" , POS_STANDING, do_enter , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "equipment", "eq" , POS_SLEEPING, do_equipment, 0, 0 }, { "equipment", "eq" , POS_SLEEPING, do_equipment , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "exits" , "ex" , POS_RESTING , do_exits , 0, 0 }, { "exits" , "ex" , POS_RESTING , do_exits , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "examine" , "exa" , POS_SITTING , do_examine , 0, 0 }, { "examine" , "exa" , POS_SITTING , do_examine , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "export" , "export" , POS_DEAD , do_export_zone, LVL_IMPL, 0 }, { "export" , "export" , POS_DEAD , do_export_zone,0, ADMLVL_IMPL, ADM_NONE, 0 },
{ "force" , "force" , POS_SLEEPING, do_force , LVL_GOD, 0 }, { "force" , "force" , POS_SLEEPING, do_force , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "fill" , "fil" , POS_STANDING, do_pour , 0, SCMD_FILL }, { "fill" , "fil" , POS_STANDING, do_pour , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_FILL },
{ "file" , "file" , POS_SLEEPING, do_file , LVL_GOD, 0 }, { "file" , "file" , POS_SLEEPING, do_file , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "flee" , "fl" , POS_FIGHTING, do_flee , 1, 0 }, { "flee" , "fl" , POS_FIGHTING, do_flee , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "follow" , "fol" , POS_RESTING , do_follow , 0, 0 }, { "follow" , "fol" , POS_RESTING , do_follow , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "freeze" , "freeze" , POS_DEAD , do_wizutil , LVL_GRGOD, SCMD_FREEZE }, { "freeze" , "freeze" , POS_DEAD , do_wizutil , 0, ADMLVL_GRGOD, ADM_NONE, SCMD_FREEZE },
{ "get" , "g" , POS_RESTING , do_get , 0, 0 }, { "get" , "g" , POS_RESTING , do_get , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "gecho" , "gecho" , POS_DEAD , do_gecho , LVL_GOD, 0 }, { "gecho" , "gecho" , POS_DEAD , do_gecho , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "gemote" , "gem" , POS_SLEEPING, do_gen_comm , 0, SCMD_GEMOTE }, { "gemote" , "gem" , POS_SLEEPING, do_gen_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_GEMOTE },
{ "give" , "giv" , POS_RESTING , do_give , 0, 0 }, { "give" , "giv" , POS_RESTING , do_give , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "goto" , "go" , POS_SLEEPING, do_goto , LVL_IMMORT, 0 }, { "goto" , "go" , POS_SLEEPING, do_goto , 0, ADMLVL_MORTAL, ADM_POOF, 0 },
{ "gold" , "gol" , POS_RESTING , do_gold , 0, 0 }, { "gold" , "gol" , POS_RESTING , do_gold , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "gossip" , "gos" , POS_SLEEPING, do_gen_comm , 0, SCMD_GOSSIP }, { "gossip" , "gos" , POS_SLEEPING, do_gen_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_GOSSIP },
{ "group" , "gr" , POS_RESTING , do_group , 1, 0 }, { "group" , "gr" , POS_RESTING , do_group , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "grab" , "grab" , POS_RESTING , do_grab , 0, 0 }, { "grab" , "grab" , POS_RESTING , do_grab , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "grats" , "grat" , POS_SLEEPING, do_gen_comm , 0, SCMD_GRATZ }, { "grats" , "grat" , POS_SLEEPING, do_gen_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_GRATZ },
{ "gsay" , "gsay" , POS_SLEEPING, do_gsay , 0, 0 }, { "gsay" , "gsay" , POS_SLEEPING, do_gsay , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "gtell" , "gt" , POS_SLEEPING, do_gsay , 0, 0 }, { "gtell" , "gt" , POS_SLEEPING, do_gsay , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "help" , "h" , POS_DEAD , do_help , 0, 0 }, { "help" , "h" , POS_DEAD , do_help , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "happyhour", "ha" , POS_DEAD , do_happyhour, 0, 0 }, { "happyhour", "ha" , POS_DEAD , do_happyhour , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "hedit" , "hedit" , POS_DEAD , do_oasis_hedit, LVL_GOD , 0 }, { "hedit" , "hedit" , POS_DEAD , do_oasis_hedit,0, ADMLVL_GOD, ADM_ADVBUILD, 0 },
{ "helpcheck", "helpch" , POS_DEAD , do_helpcheck, LVL_GOD, 0 }, { "hindex" , "hind" , POS_DEAD , do_hindex , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "hide" , "hi" , POS_RESTING , do_hide , 1, 0 }, { "helpcheck", "helpch" , POS_DEAD , do_helpcheck , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "hindex" , "hind" , POS_DEAD , do_hindex , 0, 0 }, { "hide" , "hi" , POS_RESTING , do_hide , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "handbook" , "handb" , POS_DEAD , do_gen_ps , LVL_IMMORT, SCMD_HANDBOOK }, { "handbook" , "handb" , POS_DEAD , do_gen_ps , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_HANDBOOK },
{ "hcontrol" , "hcontrol", POS_DEAD , do_hcontrol , LVL_GRGOD, 0 }, { "hcontrol" , "hcontrol", POS_DEAD , do_hcontrol , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "history" , "history" , POS_DEAD , do_history, 0, 0}, { "history" , "history" , POS_DEAD , do_history , 0, ADMLVL_MORTAL, ADM_NONE, 0},
{ "hit" , "hit" , POS_FIGHTING, do_hit , 0, SCMD_HIT }, { "hit" , "hit" , POS_FIGHTING, do_hit , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_HIT },
{ "hold" , "hold" , POS_RESTING , do_grab , 1, 0 }, { "hold" , "hold" , POS_RESTING , do_grab , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "holler" , "holler" , POS_RESTING , do_gen_comm , 1, SCMD_HOLLER }, { "holler" , "holler" , POS_RESTING , do_gen_comm , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_HOLLER },
{ "holylight", "holy" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_HOLYLIGHT }, { "holylight", "holy" , POS_DEAD , do_gen_tog , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_HOLYLIGHT },
{ "house" , "house" , POS_RESTING , do_house , 0, 0 }, { "house" , "house" , POS_RESTING , do_house , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "inventory", "i" , POS_DEAD , do_inventory, 0, 0 }, { "inventory", "i" , POS_DEAD , do_inventory , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "identify" , "id" , POS_STANDING, do_not_here , 1, 0 }, { "identify" , "id" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "idea" , "ide" , POS_DEAD , do_ibt , 0, SCMD_IDEA }, { "idea" , "ide" , POS_DEAD , do_ibt , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_IDEA },
{ "imotd" , "imo" , POS_DEAD , do_gen_ps , LVL_IMMORT, SCMD_IMOTD }, { "imotd" , "imo" , POS_DEAD , do_gen_ps , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_IMOTD },
{ "immlist" , "imm" , POS_DEAD , do_gen_ps , 0, SCMD_IMMLIST }, { "immlist" , "imm" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_IMMLIST },
{ "info" , "info" , POS_SLEEPING, do_gen_ps , 0, SCMD_INFO }, { "info" , "info" , POS_SLEEPING, do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_INFO },
{ "invis" , "invi" , POS_DEAD , do_invis , LVL_IMMORT, 0 }, { "invis" , "invi" , POS_DEAD , do_invis , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "junk" , "j" , POS_RESTING , do_drop , 0, SCMD_JUNK }, { "junk" , "j" , POS_RESTING , do_drop , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_JUNK },
{ "kill" , "k" , POS_FIGHTING, do_kill , 0, 0 }, { "kill" , "k" , POS_FIGHTING, do_kill , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "kick" , "ki" , POS_FIGHTING, do_kick , 1, 0 }, { "kick" , "ki" , POS_FIGHTING, do_kick , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "look" , "l" , POS_RESTING , do_look , 0, SCMD_LOOK }, { "look" , "l" , POS_RESTING , do_look , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_LOOK },
{ "last" , "last" , POS_DEAD , do_last , LVL_GOD, 0 }, { "last" , "last" , POS_DEAD , do_last , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "leave" , "lea" , POS_STANDING, do_leave , 0, 0 }, { "leave" , "lea" , POS_STANDING, do_leave , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "levels" , "lev" , POS_DEAD , do_levels , 0, 0 }, { "levels" , "lev" , POS_DEAD , do_levels , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "list" , "lis" , POS_STANDING, do_not_here , 0, 0 }, { "list" , "lis" , POS_STANDING, do_not_here , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "links" , "lin" , POS_STANDING, do_links , LVL_GOD, 0 }, { "links" , "lin" , POS_STANDING, do_links , 0, ADMLVL_GOD, ADM_ADVBUILD, 0 },
{ "lock" , "loc" , POS_SITTING , do_gen_door , 0, SCMD_LOCK }, { "lock" , "loc" , POS_SITTING , do_gen_door , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_LOCK },
{ "load" , "load" , POS_DEAD , do_load , LVL_BUILDER, 0 }, { "load" , "load" , POS_DEAD , do_load , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "motd" , "motd" , POS_DEAD , do_gen_ps , 0, SCMD_MOTD }, { "motd" , "motd" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_MOTD },
{ "mail" , "mail" , POS_STANDING, do_not_here , 1, 0 }, { "mortal" , "mort" , POS_DEAD , do_mortal , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "map" , "map" , POS_STANDING, do_map , 1, 0 }, { "mail" , "mail" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "medit" , "med" , POS_DEAD , do_oasis_medit, LVL_BUILDER, 0 }, { "map" , "map" , POS_STANDING, do_map , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "mlist" , "mlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_MLIST }, { "medit" , "med" , POS_DEAD , do_oasis_medit,0, ADMLVL_BUILDER, ADM_NONE, 0 },
{ "mcopy" , "mcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_MEDIT }, { "mlist" , "mlist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_MLIST },
{ "mute" , "mute" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_MUTE }, { "mcopy" , "mcopy" , POS_DEAD , do_oasis_copy, 0, ADMLVL_GOD, ADM_ADVBUILD, CON_MEDIT },
{ "mute" , "mute" , POS_DEAD , do_wizutil , 0, ADMLVL_GOD, ADM_NONE, SCMD_MUTE },
{ "news" , "news" , POS_SLEEPING, do_gen_ps , 0, SCMD_NEWS }, { "news" , "news" , POS_SLEEPING, do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NEWS },
{ "noauction", "noauction",POS_DEAD , do_gen_tog , 0, SCMD_NOAUCTION }, { "noauction", "noauction",POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NOAUCTION },
{ "nogossip" , "nogossip", POS_DEAD , do_gen_tog , 0, SCMD_NOGOSSIP }, { "nogossip" , "nogossip", POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NOGOSSIP },
{ "nograts" , "nograts" , POS_DEAD , do_gen_tog , 0, SCMD_NOGRATZ }, { "nograts" , "nograts" , POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NOGRATZ },
{ "nohassle" , "nohassle", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_NOHASSLE }, { "nohassle" , "nohassle", POS_DEAD , do_gen_tog , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_NOHASSLE },
{ "norepeat" , "norepeat", POS_DEAD , do_gen_tog , 0, SCMD_NOREPEAT }, { "norepeat" , "norepeat", POS_DEAD , do_gen_tog , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_NOREPEAT },
{ "noshout" , "noshout" , POS_SLEEPING, do_gen_tog , 1, SCMD_NOSHOUT }, { "noshout" , "noshout" , POS_SLEEPING, do_gen_tog , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_NOSHOUT },
{ "nosummon" , "nosummon", POS_DEAD , do_gen_tog , 1, SCMD_NOSUMMON }, { "nosummon" , "nosummon", POS_DEAD , do_gen_tog , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_NOSUMMON },
{ "notell" , "notell" , POS_DEAD , do_gen_tog , 1, SCMD_NOTELL }, { "notell" , "notell" , POS_DEAD , do_gen_tog , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_NOTELL },
{ "notitle" , "notitle" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_NOTITLE }, { "notitle" , "notitle" , POS_DEAD , do_wizutil , 0, ADMLVL_GOD, ADM_NONE, SCMD_NOTITLE },
{ "nowiz" , "nowiz" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_NOWIZ }, { "nowiz" , "nowiz" , POS_DEAD , do_gen_tog , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_NOWIZ },
{ "open" , "o" , POS_SITTING , do_gen_door , 0, SCMD_OPEN }, { "open" , "o" , POS_SITTING , do_gen_door , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_OPEN },
{ "order" , "ord" , POS_RESTING , do_order , 1, 0 }, { "order" , "ord" , POS_RESTING , do_order , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "offer" , "off" , POS_STANDING, do_not_here , 1, 0 }, { "offer" , "off" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "olc" , "olc" , POS_DEAD , do_show_save_list, LVL_BUILDER, 0 }, { "olc" , "olc" , POS_DEAD , do_show_save_list,0,ADMLVL_BUILDER,ADM_BUILD,0 },
{ "olist" , "olist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_OLIST }, { "olist" , "olist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_OLIST },
{ "oedit" , "oedit" , POS_DEAD , do_oasis_oedit, LVL_BUILDER, 0 }, { "oedit" , "oedit" , POS_DEAD , do_oasis_oedit,0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "ocopy" , "ocopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_OEDIT }, { "ocopy" , "ocopy" , POS_DEAD , do_oasis_copy, 0, ADMLVL_GOD, ADM_ADVBUILD, CON_OEDIT },
{ "put" , "p" , POS_RESTING , do_put , 0, 0 }, { "put" , "p" , POS_RESTING , do_put , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "peace" , "pe" , POS_DEAD , do_peace , LVL_BUILDER, 0 }, { "peace" , "pe" , POS_DEAD , do_peace , 0, ADMLVL_BUILDER, ADM_NONE, 0 },
{ "pick" , "pi" , POS_STANDING, do_gen_door , 1, SCMD_PICK }, { "pick" , "pi" , POS_STANDING, do_gen_door , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_PICK },
{ "practice" , "pr" , POS_RESTING , do_practice , 1, 0 }, { "practice" , "pr" , POS_RESTING , do_practice , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "page" , "pag" , POS_DEAD , do_page , 1, 0 }, { "page" , "pag" , POS_DEAD , do_page , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "pardon" , "pardon" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_PARDON }, { "pardon" , "pardon" , POS_DEAD , do_wizutil , 0, ADMLVL_GOD, ADM_NONE, SCMD_PARDON },
{ "plist" , "plist" , POS_DEAD , do_plist , LVL_GOD, 0 }, { "plist" , "plist" , POS_DEAD , do_plist , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "policy" , "pol" , POS_DEAD , do_gen_ps , 0, SCMD_POLICIES }, { "policy" , "pol" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_POLICIES },
{ "pour" , "pour" , POS_STANDING, do_pour , 0, SCMD_POUR }, { "pour" , "pour" , POS_STANDING, do_pour , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_POUR },
{ "prompt" , "pro" , POS_DEAD , do_display , 0, 0 }, { "prompt" , "pro" , POS_DEAD , do_display , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "prefedit" , "pre" , POS_DEAD , do_oasis_prefedit , 0, 0 }, { "prefedit" , "pre" , POS_DEAD , do_oasis_prefedit,0,ADMLVL_MORTAL,ADM_NONE, 0 },
{ "purge" , "purge" , POS_DEAD , do_purge , LVL_BUILDER, 0 }, { "purge" , "purge" , POS_DEAD , do_purge , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "qedit" , "qedit" , POS_DEAD , do_oasis_qedit, LVL_BUILDER, 0 }, { "qedit" , "qedit" , POS_DEAD , do_oasis_qedit,0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "qlist" , "qlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_QLIST }, { "qlist" , "qlist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_QLIST },
{ "quaff" , "qua" , POS_RESTING , do_use , 0, SCMD_QUAFF }, { "quaff" , "qua" , POS_RESTING , do_use , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_QUAFF },
{ "qecho" , "qec" , POS_DEAD , do_qcomm , LVL_GOD, SCMD_QECHO }, { "qecho" , "qec" , POS_DEAD , do_qcomm , 0, ADMLVL_GOD, ADM_NONE, SCMD_QECHO },
{ "quest" , "que" , POS_DEAD , do_quest , 0, 0 }, { "quest" , "que" , POS_DEAD , do_quest , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "qui" , "qui" , POS_DEAD , do_quit , 0, 0 }, { "qui" , "qui" , POS_DEAD , do_quit , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "quit" , "quit" , POS_DEAD , do_quit , 0, SCMD_QUIT }, { "quit" , "quit" , POS_DEAD , do_quit , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_QUIT },
{ "qsay" , "qsay" , POS_RESTING , do_qcomm , 0, SCMD_QSAY }, { "qsay" , "qsay" , POS_RESTING , do_qcomm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_QSAY },
{ "reply" , "r" , POS_SLEEPING, do_reply , 0, 0 }, { "reply" , "r" , POS_SLEEPING, do_reply , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "rest" , "res" , POS_RESTING , do_rest , 0, 0 }, { "rest" , "res" , POS_RESTING , do_rest , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "read" , "rea" , POS_RESTING , do_look , 0, SCMD_READ }, { "read" , "rea" , POS_RESTING , do_look , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_READ },
{ "reload" , "reload" , POS_DEAD , do_reboot , LVL_IMPL, 0 }, { "reload" , "reload" , POS_DEAD , do_reboot , 0, ADMLVL_IMPL, ADM_NONE, 0 },
{ "recite" , "reci" , POS_RESTING , do_use , 0, SCMD_RECITE }, { "recite" , "reci" , POS_RESTING , do_use , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_RECITE },
{ "receive" , "rece" , POS_STANDING, do_not_here , 1, 0 }, { "receive" , "rece" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "recent" , "recent" , POS_DEAD , do_recent , LVL_IMMORT, 0 }, { "recent" , "recent" , POS_DEAD , do_recent , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "remove" , "rem" , POS_RESTING , do_remove , 0, 0 }, { "remove" , "rem" , POS_RESTING , do_remove , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "rent" , "rent" , POS_STANDING, do_not_here , 1, 0 }, { "rent" , "rent" , POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "report" , "repo" , POS_RESTING , do_report , 0, 0 }, { "report" , "repo" , POS_RESTING , do_report , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "reroll" , "rero" , POS_DEAD , do_wizutil , LVL_GRGOD, SCMD_REROLL }, { "reroll" , "rero" , POS_DEAD , do_wizutil , 0, ADMLVL_GRGOD, ADM_NONE, SCMD_REROLL },
{ "rescue" , "resc" , POS_FIGHTING, do_rescue , 1, 0 }, { "rescue" , "resc" , POS_FIGHTING, do_rescue , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "restore" , "resto" , POS_DEAD , do_restore , LVL_GOD, 0 }, { "restore" , "resto" , POS_DEAD , do_restore , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "return" , "retu" , POS_DEAD , do_return , 0, 0 }, { "return" , "retu" , POS_DEAD , do_return , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "redit" , "redit" , POS_DEAD , do_oasis_redit, LVL_BUILDER, 0 }, { "redit" , "redit" , POS_DEAD , do_oasis_redit,0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "rlist" , "rlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_RLIST }, { "rlist" , "rlist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_RLIST },
{ "rcopy" , "rcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_REDIT }, { "rcopy" , "rcopy" , POS_DEAD , do_oasis_copy, 0, ADMLVL_GOD, ADM_ADVBUILD, CON_REDIT },
{ "roomflags", "roomflags", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_SHOWVNUMS }, { "roomflags", "roomflags", POS_DEAD , do_gen_tog , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_SHOWVNUMS },
{ "sacrifice", "sac" , POS_RESTING , do_sac , 0, 0 }, { "say" , "s" , POS_RESTING , do_say , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "say" , "s" , POS_RESTING , do_say , 0, 0 }, { "sacrifice", "sac" , POS_RESTING , do_sac , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "score" , "sc" , POS_DEAD , do_score , 0, 0 }, { "score" , "sc" , POS_DEAD , do_score , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "scan" , "sca" , POS_RESTING , do_scan , 0, 0 }, { "scan" , "sca" , POS_RESTING , do_scan , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "scopy" , "scopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_SEDIT }, { "scopy" , "scopy" , POS_DEAD , do_oasis_copy, 0, ADMLVL_GOD, ADM_ADVBUILD, CON_SEDIT },
{ "sit" , "si" , POS_RESTING , do_sit , 0, 0 }, { "sit" , "si" , POS_RESTING , do_sit , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "'" , "'" , POS_RESTING , do_say , 0, 0 }, { "'" , "'" , POS_RESTING , do_say , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "save" , "sav" , POS_SLEEPING, do_save , 0, 0 }, { "save" , "sav" , POS_SLEEPING, do_save , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "saveall" , "saveall" , POS_DEAD , do_saveall , LVL_BUILDER, 0}, { "saveall" , "saveall" , POS_DEAD , do_saveall , 0, ADMLVL_BUILDER, ADM_BUILD, 0},
{ "sell" , "sell" , POS_STANDING, do_not_here , 0, 0 }, { "sell" , "sell" , POS_STANDING, do_not_here , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "sedit" , "sedit" , POS_DEAD , do_oasis_sedit, LVL_BUILDER, 0 }, { "sedit" , "sedit" , POS_DEAD , do_oasis_sedit,0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "send" , "send" , POS_SLEEPING, do_send , LVL_GOD, 0 }, { "send" , "send" , POS_SLEEPING, do_send , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "set" , "set" , POS_DEAD , do_set , LVL_IMMORT, 0 }, { "set" , "set" , POS_DEAD , do_set , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "shout" , "sho" , POS_RESTING , do_gen_comm , 0, SCMD_SHOUT }, { "shout" , "sho" , POS_RESTING , do_gen_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_SHOUT },
{ "show" , "show" , POS_DEAD , do_show , LVL_IMMORT, 0 }, { "show" , "show" , POS_DEAD , do_show , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "shutdow" , "shutdow" , POS_DEAD , do_shutdown , LVL_IMPL, 0 }, { "shutdow" , "shutdow" , POS_DEAD , do_shutdown , 0, ADMLVL_IMPL, ADM_NONE, 0 },
{ "shutdown" , "shutdown", POS_DEAD , do_shutdown , LVL_IMPL, SCMD_SHUTDOWN }, { "shutdown" , "shutdown", POS_DEAD , do_shutdown , 0, ADMLVL_IMPL, ADM_NONE, SCMD_SHUTDOWN },
{ "sip" , "sip" , POS_RESTING , do_drink , 0, SCMD_SIP }, { "sip" , "sip" , POS_RESTING , do_drink , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_SIP },
{ "skillset" , "skillset", POS_SLEEPING, do_skillset , LVL_GRGOD, 0 }, { "skillset" , "skillset", POS_SLEEPING, do_skillset , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "sleep" , "sl" , POS_SLEEPING, do_sleep , 0, 0 }, { "sleep" , "sl" , POS_SLEEPING, do_sleep , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "slist" , "slist" , POS_SLEEPING, do_oasis_list, LVL_BUILDER, SCMD_OASIS_SLIST }, { "slist" , "slist" , POS_SLEEPING, do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_SLIST },
{ "sneak" , "sneak" , POS_STANDING, do_sneak , 1, 0 }, { "sneak" , "sneak" , POS_STANDING, do_sneak , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "snoop" , "snoop" , POS_DEAD , do_snoop , LVL_GOD, 0 }, { "snoop" , "snoop" , POS_DEAD , do_snoop , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "socials" , "socials" , POS_DEAD , do_commands , 0, SCMD_SOCIALS }, { "socials" , "socials" , POS_DEAD , do_commands , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_SOCIALS },
{ "split" , "split" , POS_SITTING , do_split , 1, 0 }, { "split" , "split" , POS_SITTING , do_split , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "stand" , "st" , POS_RESTING , do_stand , 0, 0 }, { "stand" , "st" , POS_RESTING , do_stand , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "stat" , "stat" , POS_DEAD , do_stat , LVL_IMMORT, 0 }, { "stat" , "stat" , POS_DEAD , do_stat , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "steal" , "ste" , POS_STANDING, do_steal , 1, 0 }, { "steal" , "ste" , POS_STANDING, do_steal , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "switch" , "switch" , POS_DEAD , do_switch , LVL_GOD, 0 }, { "switch" , "switch" , POS_DEAD , do_switch , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "tell" , "t" , POS_DEAD , do_tell , 0, 0 }, { "tell" , "t" , POS_DEAD , do_tell , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "take" , "ta" , POS_RESTING , do_get , 0, 0 }, { "take" , "ta" , POS_RESTING , do_get , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "taste" , "tas" , POS_RESTING , do_eat , 0, SCMD_TASTE }, { "taste" , "tas" , POS_RESTING , do_eat , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_TASTE },
{ "teleport" , "tele" , POS_DEAD , do_teleport , LVL_BUILDER, 0 }, { "teleport" , "tele" , POS_DEAD , do_teleport , 0, ADMLVL_BUILDER, ADM_POOF, 0 },
{ "tedit" , "tedit" , POS_DEAD , do_tedit , LVL_GOD, 0 }, /* XXX: Oasisify */ { "tedit" , "tedit" , POS_DEAD , do_tedit , 0, ADMLVL_GOD, ADM_ADVBUILD, 0 }, /* XXX: Oasisify */
{ "thaw" , "thaw" , POS_DEAD , do_wizutil , LVL_GRGOD, SCMD_THAW }, { "thaw" , "thaw" , POS_DEAD , do_wizutil , 0, ADMLVL_GRGOD, ADM_NONE, SCMD_THAW },
{ "title" , "title" , POS_DEAD , do_title , 0, 0 }, { "title" , "title" , POS_DEAD , do_title , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "time" , "time" , POS_DEAD , do_time , 0, 0 }, { "time" , "time" , POS_DEAD , do_time , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "toggle" , "toggle" , POS_DEAD , do_toggle , 0, 0 }, { "toggle" , "toggle" , POS_DEAD , do_toggle , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "track" , "track" , POS_STANDING, do_track , 0, 0 }, { "track" , "track" , POS_STANDING, do_track , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "transfer" , "transfer", POS_SLEEPING, do_trans , LVL_GOD, 0 }, { "transfer" , "transfer", POS_SLEEPING, do_trans , 0, ADMLVL_GOD, ADM_POOF, 0 },
{ "trigedit" , "trigedit", POS_DEAD , do_oasis_trigedit, LVL_BUILDER, 0 }, { "trigedit" , "trigedit", POS_DEAD , do_oasis_trigedit,0,ADMLVL_BUILDER,ADM_BUILD,0 },
{ "typo" , "typo" , POS_DEAD , do_ibt , 0, SCMD_TYPO }, { "typo" , "typo" , POS_DEAD , do_ibt , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_TYPO },
{ "tlist" , "tlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_TLIST }, { "tlist" , "tlist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_TLIST },
{ "tcopy" , "tcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_TRIGEDIT }, { "tcopy" , "tcopy" , POS_DEAD , do_oasis_copy, 0, ADMLVL_GOD, ADM_ADVBUILD, CON_TRIGEDIT },
{ "tstat" , "tstat" , POS_DEAD , do_tstat , LVL_BUILDER, 0 }, { "tstat" , "tstat" , POS_DEAD , do_tstat , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, SCMD_UNLOCK }, { "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_UNLOCK },
{ "ungroup" , "ungroup" , POS_DEAD , do_ungroup , 0, 0 }, { "ungroup" , "ungroup" , POS_DEAD , do_ungroup , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "unban" , "unban" , POS_DEAD , do_unban , LVL_GRGOD, 0 }, { "unban" , "unban" , POS_DEAD , do_unban , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "unaffect" , "unaffect", POS_DEAD , do_wizutil , LVL_GOD, SCMD_UNAFFECT }, { "unaffect" , "unaffect", POS_DEAD , do_wizutil , 0, ADMLVL_GOD, ADM_NONE, SCMD_UNAFFECT },
{ "uptime" , "uptime" , POS_DEAD , do_date , LVL_GOD, SCMD_UPTIME }, { "uptime" , "uptime" , POS_DEAD , do_date , 0, ADMLVL_GOD, ADM_NONE, SCMD_UPTIME },
{ "use" , "use" , POS_SITTING , do_use , 1, SCMD_USE }, { "use" , "use" , POS_SITTING , do_use , 1, ADMLVL_MORTAL, ADM_NONE, SCMD_USE },
{ "users" , "users" , POS_DEAD , do_users , LVL_GOD, 0 }, { "users" , "users" , POS_DEAD , do_users , 0, ADMLVL_GOD, ADM_NONE, 0 },
{ "value" , "val" , POS_STANDING, do_not_here , 0, 0 }, { "value" , "val" , POS_STANDING, do_not_here , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "version" , "ver" , POS_DEAD , do_gen_ps , 0, SCMD_VERSION }, { "version" , "ver" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_VERSION },
{ "visible" , "vis" , POS_RESTING , do_visible , 1, 0 }, { "visible" , "vis" , POS_RESTING , do_visible , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "vnum" , "vnum" , POS_DEAD , do_vnum , LVL_IMMORT, 0 }, { "vnum" , "vnum" , POS_DEAD , do_vnum , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "vstat" , "vstat" , POS_DEAD , do_vstat , LVL_IMMORT, 0 }, { "vstat" , "vstat" , POS_DEAD , do_vstat , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "vdelete" , "vdelete" , POS_DEAD , do_vdelete , LVL_BUILDER, 0 }, { "vdelete" , "vdelete" , POS_DEAD , do_vdelete , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "wake" , "wake" , POS_SLEEPING, do_wake , 0, 0 }, { "wake" , "wake" , POS_SLEEPING, do_wake , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "wear" , "wea" , POS_RESTING , do_wear , 0, 0 }, { "wear" , "wea" , POS_RESTING , do_wear , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "weather" , "weather" , POS_RESTING , do_weather , 0, 0 }, { "weather" , "weather" , POS_RESTING , do_weather , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "who" , "wh" , POS_DEAD , do_who , 0, 0 }, { "who" , "wh" , POS_DEAD , do_who , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "whois" , "whoi" , POS_DEAD , do_whois , 0, 0 }, { "whois" , "whoi" , POS_DEAD , do_whois , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "whoami" , "whoami" , POS_DEAD , do_gen_ps , 0, SCMD_WHOAMI }, { "whoami" , "whoami" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_WHOAMI },
{ "where" , "where" , POS_RESTING , do_where , 1, 0 }, { "where" , "where" , POS_RESTING , do_where , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "whisper" , "whisper" , POS_RESTING , do_spec_comm, 0, SCMD_WHISPER }, { "whisper" , "whisper" , POS_RESTING , do_spec_comm , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_WHISPER },
{ "wield" , "wie" , POS_RESTING , do_wield , 0, 0 }, { "wield" , "wie" , POS_RESTING , do_wield , 0, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "withdraw" , "withdraw", POS_STANDING, do_not_here , 1, 0 }, { "withdraw" , "withdraw", POS_STANDING, do_not_here , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "wiznet" , "wiz" , POS_DEAD , do_wiznet , LVL_IMMORT, 0 }, { "wiznet" , "wiz" , POS_DEAD , do_wiznet , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ ";" , ";" , POS_DEAD , do_wiznet , LVL_IMMORT, 0 }, { ";" , ";" , POS_DEAD , do_wiznet , 0, ADMLVL_IMMORT, ADM_NONE, 0 },
{ "wizhelp" , "wizhelp" , POS_SLEEPING, do_commands , LVL_IMMORT, SCMD_WIZHELP }, { "wizhelp" , "wizhelp" , POS_SLEEPING, do_commands , 0, ADMLVL_IMMORT, ADM_NONE, SCMD_WIZHELP },
{ "wizlist" , "wizlist" , POS_DEAD , do_gen_ps , 0, SCMD_WIZLIST }, { "wizlist" , "wizlist" , POS_DEAD , do_gen_ps , 0, ADMLVL_MORTAL, ADM_NONE, SCMD_WIZLIST },
{ "wizupdate", "wizupde" , POS_DEAD , do_wizupdate, LVL_GRGOD, 0 }, { "wizupdate", "wizupde" , POS_DEAD , do_wizupdate , 0, ADMLVL_GRGOD, ADM_NONE, 0 },
{ "wizlock" , "wizlock" , POS_DEAD , do_wizlock , LVL_IMPL, 0 }, { "wizlock" , "wizlock" , POS_DEAD , do_wizlock , 0, ADMLVL_IMPL, ADM_NONE, 0 },
{ "write" , "write" , POS_STANDING, do_write , 1, 0 }, { "write" , "write" , POS_STANDING, do_write , 1, ADMLVL_MORTAL, ADM_NONE, 0 },
{ "zreset" , "zreset" , POS_DEAD , do_zreset , LVL_BUILDER, 0 }, { "zreset" , "zreset" , POS_DEAD , do_zreset , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "zedit" , "zedit" , POS_DEAD , do_oasis_zedit, LVL_BUILDER, 0 }, { "zedit" , "zedit" , POS_DEAD , do_oasis_zedit,0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "zlist" , "zlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_ZLIST }, { "zlist" , "zlist" , POS_DEAD , do_oasis_list, 0, ADMLVL_BUILDER, ADM_BUILD, SCMD_OASIS_ZLIST },
{ "zlock" , "zlock" , POS_DEAD , do_zlock , LVL_GOD, 0 }, { "zlock" , "zlock" , POS_DEAD , do_zlock , 0, ADMLVL_GOD, ADM_ADVBUILD, 0 },
{ "zunlock" , "zunlock" , POS_DEAD , do_zunlock , LVL_GOD, 0 }, { "zunlock" , "zunlock" , POS_DEAD , do_zunlock , 0, ADMLVL_GOD, ADM_ADVBUILD, 0 },
{ "zcheck" , "zcheck" , POS_DEAD , do_zcheck , LVL_BUILDER, 0 }, { "zcheck" , "zcheck" , POS_DEAD , do_zcheck , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "zpurge" , "zpurge" , POS_DEAD , do_zpurge , LVL_BUILDER, 0 }, { "zpurge" , "zpurge" , POS_DEAD , do_zpurge , 0, ADMLVL_BUILDER, ADM_BUILD, 0 },
{ "\n", "zzzzzzz", 0, 0, 0, 0 } }; /* this must be last */ { "\n", "zzzzzzz", 0, 0, 0, 0, 0, 0 } }; /* this must be last */
/* Thanks to Melzaren for this change to allow DG Scripts to be attachable /* Thanks to Melzaren for this change to allow DG Scripts to be attachable
@ -494,25 +510,39 @@ void command_interpreter(struct char_data *ch, char *argument)
} }
/* Allow IMPLs to switch into mobs to test the commands. */ /* Allow IMPLs to switch into mobs to test the commands. */
if (IS_NPC(ch) && ch->desc && GET_LEVEL(ch->desc->original) >= LVL_IMPL) { if (IS_NPC(ch) && ch->desc && IS_ADMIN(ch->desc->original, ADMLVL_IMPL)) {
if (script_command_interpreter(ch, argument)) if (script_command_interpreter(ch, argument))
return; return;
} }
for (length = strlen(arg), cmd = 0; *complete_cmd_info[cmd].command != '\n'; cmd++) for (length = strlen(arg), cmd = 0; *complete_cmd_info[cmd].command != '\n'; cmd++)
if(complete_cmd_info[cmd].command_pointer != do_action && if(complete_cmd_info[cmd].command_pointer != do_action &&
!strncmp(complete_cmd_info[cmd].command, arg, length)) !strncmp(complete_cmd_info[cmd].command, arg, length)) {
if (GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level) if (complete_cmd_info[cmd].admin_flag == ADM_NONE &&
complete_cmd_info[cmd].minimum_admlevel == ADMLVL_MORTAL &&
GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level)
break; break;
if (complete_cmd_info[cmd].admin_flag == ADM_NONE && GET_ADMLEVEL(ch) >= complete_cmd_info[cmd].minimum_admlevel)
break;
if (complete_cmd_info[cmd].admin_flag != ADM_NONE && ADM_FLAGGED(ch, complete_cmd_info[cmd].admin_flag))
break;
}
/* it's not a 'real' command, so it's a social */ /* it's not a 'real' command, so it's a social */
if(*complete_cmd_info[cmd].command == '\n') if(*complete_cmd_info[cmd].command == '\n')
for (length = strlen(arg), cmd = 0; *complete_cmd_info[cmd].command != '\n'; cmd++) for (length = strlen(arg), cmd = 0; *complete_cmd_info[cmd].command != '\n'; cmd++)
if (complete_cmd_info[cmd].command_pointer == do_action && if (complete_cmd_info[cmd].command_pointer == do_action &&
!strncmp(complete_cmd_info[cmd].command, arg, length)) !strncmp(complete_cmd_info[cmd].command, arg, length)) {
if (GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level) if (complete_cmd_info[cmd].admin_flag == ADM_NONE &&
complete_cmd_info[cmd].minimum_admlevel == ADMLVL_MORTAL &&
GET_LEVEL(ch) >= complete_cmd_info[cmd].minimum_level)
break; break;
if (complete_cmd_info[cmd].admin_flag == ADM_NONE && GET_ADMLEVEL(ch) >= complete_cmd_info[cmd].minimum_admlevel)
break;
if (complete_cmd_info[cmd].admin_flag != ADM_NONE && ADM_FLAGGED(ch, complete_cmd_info[cmd].admin_flag))
break;
}
if (*complete_cmd_info[cmd].command == '\n') { if (*complete_cmd_info[cmd].command == '\n') {
int found = 0; int found = 0;
@ -536,11 +566,11 @@ void command_interpreter(struct char_data *ch, char *argument)
} }
} }
} }
else if (!IS_NPC(ch) && PLR_FLAGGED(ch, PLR_FROZEN) && GET_LEVEL(ch) < LVL_IMPL) else if (!IS_NPC(ch) && PLR_FLAGGED(ch, PLR_FROZEN) && !IS_ADMIN(ch, ADMLVL_IMPL))
send_to_char(ch, "You try, but the mind-numbing cold prevents you...\r\n"); send_to_char(ch, "You try, but the mind-numbing cold prevents you...\r\n");
else if (complete_cmd_info[cmd].command_pointer == NULL) else if (complete_cmd_info[cmd].command_pointer == NULL)
send_to_char(ch, "Sorry, that command hasn't been implemented yet.\r\n"); send_to_char(ch, "Sorry, that command hasn't been implemented yet.\r\n");
else if (IS_NPC(ch) && complete_cmd_info[cmd].minimum_level >= LVL_IMMORT) else if (IS_NPC(ch) && complete_cmd_info[cmd].minimum_admlevel >= ADMLVL_IMMORT)
send_to_char(ch, "You can't use immortal commands while switched.\r\n"); send_to_char(ch, "You can't use immortal commands while switched.\r\n");
else if (GET_POS(ch) < complete_cmd_info[cmd].minimum_position) else if (GET_POS(ch) < complete_cmd_info[cmd].minimum_position)
switch (GET_POS(ch)) { switch (GET_POS(ch)) {
@ -1134,7 +1164,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(ADMLVL_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;
@ -1143,12 +1173,12 @@ static int perform_dupe_check(struct descriptor_data *d)
act("$n suddenly keels over in pain, surrounded by a white aura...\r\n" act("$n suddenly keels over in pain, surrounded by a white aura...\r\n"
"$n's body has been taken over by a new spirit!", "$n's body has been taken over by a new spirit!",
TRUE, d->character, 0, 0, TO_ROOM); TRUE, d->character, 0, 0, TO_ROOM);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE,
"%s has re-logged in ... disconnecting old socket.", GET_NAME(d->character)); "%s has re-logged in ... disconnecting old socket.", GET_NAME(d->character));
break; break;
case UNSWITCH: case UNSWITCH:
write_to_output(d, "Reconnecting to unswitched char."); write_to_output(d, "Reconnecting to unswitched char.");
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s [%s] has reconnected.", GET_NAME(d->character), d->host); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s [%s] has reconnected.", GET_NAME(d->character), d->host);
break; break;
} }
@ -1164,7 +1194,7 @@ int enter_player_game (struct descriptor_data *d)
reset_char(d->character); reset_char(d->character);
if (PLR_FLAGGED(d->character, PLR_INVSTART)) if (PLR_FLAGGED(d->character, PLR_INVSTART))
GET_INVIS_LEV(d->character) = GET_LEVEL(d->character); GET_INVIS_LEV(d->character) = GET_ADMLEVEL(d->character);
/* We have to place the character in a room before equipping them /* We have to place the character in a room before equipping them
* or equip_char() will gripe about the person in NOWHERE. */ * or equip_char() will gripe about the person in NOWHERE. */
@ -1173,7 +1203,7 @@ int enter_player_game (struct descriptor_data *d)
/* If char was saved with NOWHERE, or real_room above failed... */ /* If char was saved with NOWHERE, or real_room above failed... */
if (load_room == NOWHERE) { if (load_room == NOWHERE) {
if (GET_LEVEL(d->character) >= LVL_IMMORT) if (IS_ADMIN(d->character, ADMLVL_IMMORT))
load_room = r_immort_start_room; load_room = r_immort_start_room;
else else
load_room = r_mortal_start_room; load_room = r_mortal_start_room;
@ -1324,14 +1354,14 @@ void nanny(struct descriptor_data *d, char *arg)
case CON_NAME_CNFRM: /* wait for conf. of new name */ case CON_NAME_CNFRM: /* wait for conf. of new name */
if (UPPER(*arg) == 'Y') { if (UPPER(*arg) == 'Y') {
if (isbanned(d->host) >= BAN_NEW) { if (isbanned(d->host) >= BAN_NEW) {
mudlog(NRM, LVL_GOD, TRUE, "Request for new char %s denied from [%s] (siteban)", GET_PC_NAME(d->character), d->host); mudlog(NRM, ADMLVL_GOD, TRUE, "Request for new char %s denied from [%s] (siteban)", GET_PC_NAME(d->character), d->host);
write_to_output(d, "Sorry, new characters are not allowed from your site!\r\n"); write_to_output(d, "Sorry, new characters are not allowed from your site!\r\n");
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
return; return;
} }
if (circle_restrict) { if (circle_restrict) {
write_to_output(d, "Sorry, new players can't be created at the moment.\r\n"); write_to_output(d, "Sorry, new players can't be created at the moment.\r\n");
mudlog(NRM, LVL_GOD, TRUE, "Request for new char %s denied from [%s] (wizlock)", GET_PC_NAME(d->character), d->host); mudlog(NRM, ADMLVL_GOD, TRUE, "Request for new char %s denied from [%s] (wizlock)", GET_PC_NAME(d->character), d->host);
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
return; return;
} }
@ -1365,7 +1395,7 @@ void nanny(struct descriptor_data *d, char *arg)
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
else { else {
if (strncmp(CRYPT(arg, GET_PASSWD(d->character)), GET_PASSWD(d->character), MAX_PWD_LENGTH)) { if (strncmp(CRYPT(arg, GET_PASSWD(d->character)), GET_PASSWD(d->character), MAX_PWD_LENGTH)) {
mudlog(BRF, LVL_GOD, TRUE, "Bad PW: %s [%s]", GET_NAME(d->character), d->host); mudlog(BRF, ADMLVL_GOD, TRUE, "Bad PW: %s [%s]", GET_NAME(d->character), d->host);
GET_BAD_PWS(d->character)++; GET_BAD_PWS(d->character)++;
save_char(d->character); save_char(d->character);
if (++(d->bad_pws) >= CONFIG_MAX_BAD_PWS) { /* 3 strikes and you're out. */ if (++(d->bad_pws) >= CONFIG_MAX_BAD_PWS) { /* 3 strikes and you're out. */
@ -1387,33 +1417,33 @@ void nanny(struct descriptor_data *d, char *arg)
!PLR_FLAGGED(d->character, PLR_SITEOK)) { !PLR_FLAGGED(d->character, PLR_SITEOK)) {
write_to_output(d, "Sorry, this char has not been cleared for login from your site!\r\n"); write_to_output(d, "Sorry, this char has not been cleared for login from your site!\r\n");
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
mudlog(NRM, LVL_GOD, TRUE, "Connection attempt for %s denied from %s", GET_NAME(d->character), d->host); mudlog(NRM, ADMLVL_GOD, TRUE, "Connection attempt for %s denied from %s", GET_NAME(d->character), d->host);
return; return;
} }
if (GET_LEVEL(d->character) < circle_restrict) { if (GET_LEVEL(d->character) < circle_restrict) {
write_to_output(d, "The game is temporarily restricted.. try again later.\r\n"); write_to_output(d, "The game is temporarily restricted.. try again later.\r\n");
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
mudlog(NRM, LVL_GOD, TRUE, "Request for login denied for %s [%s] (wizlock)", GET_NAME(d->character), d->host); mudlog(NRM, ADMLVL_GOD, TRUE, "Request for login denied for %s [%s] (wizlock)", GET_NAME(d->character), d->host);
return; return;
} }
/* check and make sure no other copies of this player are logged in */ /* check and make sure no other copies of this player are logged in */
if (perform_dupe_check(d)) if (perform_dupe_check(d))
return; return;
if (GET_LEVEL(d->character) >= LVL_IMMORT) if (IS_ADMIN(d->character, ADMLVL_IMMORT))
write_to_output(d, "%s", imotd); write_to_output(d, "%s", imotd);
else else
write_to_output(d, "%s", motd); write_to_output(d, "%s", motd);
if (GET_INVIS_LEV(d->character)) if (GET_INVIS_LEV(d->character))
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s has connected. (invis %d)", GET_NAME(d->character), GET_INVIS_LEV(d->character)); mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s has connected. (invis %d)", GET_NAME(d->character), GET_INVIS_LEV(d->character));
else else
mudlog(BRF, LVL_IMMORT, TRUE, "%s has connected.", GET_NAME(d->character)); mudlog(BRF, ADMLVL_IMMORT, TRUE, "%s has connected.", GET_NAME(d->character));
/* Add to the list of 'recent' players (since last reboot) */ /* Add to the list of 'recent' players (since last reboot) */
if (AddRecentPlayer(GET_NAME(d->character), d->host, FALSE, FALSE) == FALSE) if (AddRecentPlayer(GET_NAME(d->character), d->host, FALSE, FALSE) == FALSE)
{ {
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE)."); mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE).");
} }
if (load_result) { if (load_result) {
@ -1512,12 +1542,12 @@ void nanny(struct descriptor_data *d, char *arg)
GET_PREF(d->character)= rand_number(1, 128000); GET_PREF(d->character)= rand_number(1, 128000);
GET_HOST(d->character)= strdup(d->host); GET_HOST(d->character)= strdup(d->host);
mudlog(NRM, LVL_GOD, TRUE, "%s [%s] new player.", GET_NAME(d->character), d->host); mudlog(NRM, ADMLVL_GOD, TRUE, "%s [%s] new player.", GET_NAME(d->character), d->host);
/* Add to the list of 'recent' players (since last reboot) */ /* Add to the list of 'recent' players (since last reboot) */
if (AddRecentPlayer(GET_NAME(d->character), d->host, TRUE, FALSE) == FALSE) if (AddRecentPlayer(GET_NAME(d->character), d->host, TRUE, FALSE) == FALSE)
{ {
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE)."); mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "Failure to AddRecentPlayer (returned FALSE).");
} }
break; break;
@ -1642,7 +1672,7 @@ void nanny(struct descriptor_data *d, char *arg)
STATE(d) = CON_CLOSE; STATE(d) = CON_CLOSE;
return; return;
} }
if (GET_LEVEL(d->character) < LVL_GRGOD) if (!IS_ADMIN(d->character, ADMLVL_GRGOD))
SET_BIT_AR(PLR_FLAGS(d->character), PLR_DELETED); SET_BIT_AR(PLR_FLAGS(d->character), PLR_DELETED);
save_char(d->character); save_char(d->character);
Crash_delete_file(GET_NAME(d->character)); Crash_delete_file(GET_NAME(d->character));
@ -1656,7 +1686,7 @@ 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, ADMLVL_GOD, 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 {
@ -1677,3 +1707,68 @@ void nanny(struct descriptor_data *d, char *arg)
break; break;
} }
} }
/* Command Info (here for convenience with command list) */
ACMD(do_cmdinfo)
{
char arg[MAX_INPUT_LENGTH];
int i, c, length;
bool first=TRUE;
one_argument(argument, arg);
for (length = strlen(arg), c = 0; *complete_cmd_info[c].command != '\n'; c++) {
if(!strncmp(complete_cmd_info[c].command, arg, length))
break;
}
if ( *complete_cmd_info[c].command == '\n' ) {
send_to_char(ch, "Unrecognised command: %s\r\n", arg);
return;
}
/* Found a match */
send_to_char(ch, "Full Command : %s%s%s\r\n", QCYN, complete_cmd_info[c].command, QNRM);
if (complete_cmd_info[c].command_pointer == do_action) {
if (complete_cmd_info[c].minimum_admlevel >= ADMLVL_MORTAL) {
send_to_char(ch, "Command Type : %sAdmin-only Social%s\r\n", QRED, QNRM);
} else {
send_to_char(ch, "Command Type : %sSocial%s\r\n", QYEL, QNRM);
}
} else if (complete_cmd_info[c].admin_flag != ADM_NONE) {
if (complete_cmd_info[c].minimum_admlevel >= ADMLVL_MORTAL) {
send_to_char(ch, "Command Type : %sAdmin Permission Required (not for mortals)%s\r\n", QYEL, QNRM);
} else {
send_to_char(ch, "Command Type : %sAdmin Permission Required%s\r\n", QYEL, QNRM);
}
} else if (complete_cmd_info[c].minimum_admlevel != ADMLVL_MORTAL) {
send_to_char(ch, "Command Type : %sAdmin/Imm-Only%s\r\n", QYEL, QNRM);
} else {
send_to_char(ch, "Command Type : %sPlayer Command%s\r\n", QYEL, QNRM);
}
if (complete_cmd_info[c].admin_flag != ADM_NONE) {
send_to_char(ch, "Permission Required: %s%s%s\r\n", QCYN, admin_flag_names[(complete_cmd_info[c].admin_flag)], QNRM);
}
send_to_char(ch, "Admin Level : %s%d%s (%s%s%s)\r\n",
((complete_cmd_info[c].admin_flag == ADM_NONE) ? QYEL : QBLK),
complete_cmd_info[c].minimum_admlevel, QNRM,
((complete_cmd_info[c].admin_flag == ADM_NONE) ? QCYN : QBLK),
admin_level_names[(complete_cmd_info[c].minimum_admlevel)], QNRM);
if (complete_cmd_info[c].minimum_level == 0) {
send_to_char(ch, "Min Level : %s<Any>%s\r\n", QYEL, QNRM);
} else {
send_to_char(ch, "Min Level : %s%d%s\r\n", QYEL, complete_cmd_info[c].minimum_level, QNRM);
}
send_to_char(ch, "Allowed Positions : %s", QCYN );
for (i=complete_cmd_info[c].minimum_position; i<NUM_POSITIONS; i++) {
if (!first) send_to_char(ch, "%s, %s", QNRM, QCYN);
send_to_char(ch, "%s", position_types[(i)]);
first = FALSE;
}
send_to_char(ch, "%s\r\n", QNRM);
}

View file

@ -42,7 +42,7 @@ int perform_alias(struct descriptor_data *d, char *orig, size_t maxlen);
int enter_player_game (struct descriptor_data *d); int enter_player_game (struct descriptor_data *d);
/* ACMDs available through interpreter.c */ /* ACMDs available through interpreter.c */
ACMD(do_alias); ACMD(do_alias);
ACMD(do_cmdinfo);
/* for compatibility with 2.20: */ /* for compatibility with 2.20: */
#define argument_interpreter(a, b, c) two_arguments(a, b, c) #define argument_interpreter(a, b, c) two_arguments(a, b, c)
@ -60,6 +60,8 @@ struct command_info {
void (*command_pointer) void (*command_pointer)
(struct char_data *ch, char *argument, int cmd, int subcmd); (struct char_data *ch, char *argument, int cmd, int subcmd);
sh_int minimum_level; sh_int minimum_level;
sh_int minimum_admlevel;
int admin_flag;
int subcmd; int subcmd;
}; };

View file

@ -200,15 +200,15 @@ void run_autowiz(void)
#if defined(CIRCLE_UNIX) #if defined(CIRCLE_UNIX)
res = snprintf(buf, sizeof(buf), "nice ../bin/autowiz %d %s %d %s %d &", res = snprintf(buf, sizeof(buf), "nice ../bin/autowiz %d %s %d %s %d &",
CONFIG_MIN_WIZLIST_LEV, WIZLIST_FILE, LVL_IMMORT, IMMLIST_FILE, (int) getpid()); CONFIG_MIN_WIZLIST_LEV, WIZLIST_FILE, ADMLVL_IMMORT, IMMLIST_FILE, (int) getpid());
#elif defined(CIRCLE_WINDOWS) #elif defined(CIRCLE_WINDOWS)
res = snprintf(buf, sizeof(buf), "autowiz %d %s %d %s", res = snprintf(buf, sizeof(buf), "autowiz %d %s %d %s",
CONFIG_MIN_WIZLIST_LEV, WIZLIST_FILE, LVL_IMMORT, IMMLIST_FILE); CONFIG_MIN_WIZLIST_LEV, WIZLIST_FILE, ADMLVL_IMMORT, IMMLIST_FILE);
#endif /* CIRCLE_WINDOWS */ #endif /* CIRCLE_WINDOWS */
/* Abusing signed -> unsigned conversion to avoid '-1' check. */ /* Abusing signed -> unsigned conversion to avoid '-1' check. */
if (res < sizeof(buf)) { if (res < sizeof(buf)) {
mudlog(CMP, LVL_IMMORT, FALSE, "Initiating autowiz."); mudlog(CMP, ADMLVL_IMMORT, FALSE, "Initiating autowiz.");
i = system(buf); i = system(buf);
reboot_wizlists(); reboot_wizlists();
} else } else
@ -222,7 +222,7 @@ void gain_exp(struct char_data *ch, int gain)
int is_altered = FALSE; int is_altered = FALSE;
int num_levels = 0; int num_levels = 0;
if (!IS_NPC(ch) && ((GET_LEVEL(ch) < 1 || GET_LEVEL(ch) >= LVL_IMMORT))) if (!IS_NPC(ch) && ((GET_LEVEL(ch) < 1 || GET_LEVEL(ch) >= CONFIG_MAX_LEVEL)))
return; return;
if (IS_NPC(ch)) { if (IS_NPC(ch)) {
@ -235,7 +235,7 @@ void gain_exp(struct char_data *ch, int gain)
gain = MIN(CONFIG_MAX_EXP_GAIN, gain); /* put a cap on the max gain per kill */ gain = MIN(CONFIG_MAX_EXP_GAIN, gain); /* put a cap on the max gain per kill */
GET_EXP(ch) += gain; GET_EXP(ch) += gain;
while (GET_LEVEL(ch) < LVL_IMMORT - CONFIG_NO_MORT_TO_IMMORT && while (GET_LEVEL(ch) < CONFIG_MAX_LEVEL &&
GET_EXP(ch) >= level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1)) { GET_EXP(ch) >= level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1)) {
GET_LEVEL(ch) += 1; GET_LEVEL(ch) += 1;
num_levels++; num_levels++;
@ -244,15 +244,20 @@ void gain_exp(struct char_data *ch, int gain)
} }
if (is_altered) { if (is_altered) {
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s advanced %d level%s to level %d.", mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s advanced %d level%s to level %d.",
GET_NAME(ch), num_levels, num_levels == 1 ? "" : "s", GET_LEVEL(ch)); GET_NAME(ch), num_levels, num_levels == 1 ? "" : "s", GET_LEVEL(ch));
if (num_levels == 1) if (num_levels == 1)
send_to_char(ch, "You rise a level!\r\n"); send_to_char(ch, "You rise a level!\r\n");
else else
send_to_char(ch, "You rise %d levels!\r\n", num_levels); send_to_char(ch, "You rise %d levels!\r\n", num_levels);
set_title(ch, NULL); set_title(ch, NULL);
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST)) if (GET_LEVEL(ch) >= CONFIG_MAX_LEVEL) {
run_autowiz(); if (!IS_ADMIN(ch, ADMLVL_IMMORT) && !CONFIG_NO_MORT_TO_IMMORT) {
set_admin_level(ch, ADMLVL_IMMORT);
send_to_char(ch, "You have reached the maximum level and become immortal!\r\n");
mudlog(NRM, ADMLVL_GOD, TRUE, "%s advanced to Immortal!", GET_NAME(ch));
}
}
} }
} else if (gain < 0) { } else if (gain < 0) {
gain = MAX(-CONFIG_MAX_EXP_LOSS, gain); /* Cap max exp lost per death */ gain = MAX(-CONFIG_MAX_EXP_LOSS, gain); /* Cap max exp lost per death */
@ -260,9 +265,7 @@ void gain_exp(struct char_data *ch, int gain)
if (GET_EXP(ch) < 0) if (GET_EXP(ch) < 0)
GET_EXP(ch) = 0; GET_EXP(ch) = 0;
} }
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST)) }
run_autowiz();
}
void gain_exp_regardless(struct char_data *ch, int gain) void gain_exp_regardless(struct char_data *ch, int gain)
{ {
@ -277,7 +280,7 @@ void gain_exp_regardless(struct char_data *ch, int gain)
GET_EXP(ch) = 0; GET_EXP(ch) = 0;
if (!IS_NPC(ch)) { if (!IS_NPC(ch)) {
while (GET_LEVEL(ch) < LVL_IMPL && while (!IS_ADMIN(ch, ADMLVL_IMPL) &&
GET_EXP(ch) >= level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1)) { GET_EXP(ch) >= level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1)) {
GET_LEVEL(ch) += 1; GET_LEVEL(ch) += 1;
num_levels++; num_levels++;
@ -286,17 +289,22 @@ void gain_exp_regardless(struct char_data *ch, int gain)
} }
if (is_altered) { if (is_altered) {
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s advanced %d level%s to level %d.", mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s advanced %d level%s to level %d.",
GET_NAME(ch), num_levels, num_levels == 1 ? "" : "s", GET_LEVEL(ch)); GET_NAME(ch), num_levels, num_levels == 1 ? "" : "s", GET_LEVEL(ch));
if (num_levels == 1) if (num_levels == 1)
send_to_char(ch, "You rise a level!\r\n"); send_to_char(ch, "You rise a level!\r\n");
else else
send_to_char(ch, "You rise %d levels!\r\n", num_levels); send_to_char(ch, "You rise %d levels!\r\n", num_levels);
set_title(ch, NULL); set_title(ch, NULL);
if (GET_LEVEL(ch) >= CONFIG_MAX_LEVEL) {
if (!IS_ADMIN(ch, ADMLVL_IMMORT) && !CONFIG_NO_MORT_TO_IMMORT) {
set_admin_level(ch, ADMLVL_IMMORT);
send_to_char(ch, "You have reached the maximum level and become immortal!\r\n");
mudlog(NRM, ADMLVL_GOD, TRUE, "%s advanced to Immortal!", GET_NAME(ch));
}
}
} }
} }
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
run_autowiz();
} }
void gain_condition(struct char_data *ch, int condition, int value) void gain_condition(struct char_data *ch, int condition, int value)
@ -365,7 +373,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, ADMLVL_GOD, 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);
} }
@ -405,7 +413,7 @@ void point_update(void)
if (!IS_NPC(i)) { if (!IS_NPC(i)) {
update_char_objects(i); update_char_objects(i);
(i->char_specials.timer)++; (i->char_specials.timer)++;
if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL) if (GET_ADMLEVEL(i) < CONFIG_IDLE_MAX_LEVEL)
check_idling(i); check_idling(i);
} }
} }

View file

@ -199,6 +199,11 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim,
if (victim == NULL || ch == NULL) if (victim == NULL || ch == NULL)
return (0); return (0);
if (ADM_FLAGGED(victim, ADM_NODAMAGE)) {
send_to_char(ch, "Your spell is harmless to %s.\r\n", GET_NAME(victim));
return 0;
}
switch (spellnum) { switch (spellnum) {
/* Mostly mages */ /* Mostly mages */
case SPELL_MAGIC_MISSILE: case SPELL_MAGIC_MISSILE:
@ -351,7 +356,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
break; break;
case SPELL_BLINDNESS: case SPELL_BLINDNESS:
if (MOB_FLAGGED(victim, MOB_NOBLIND) || GET_LEVEL(victim) >= LVL_IMMORT || mag_savingthrow(victim, savetype, 0)) { if (MOB_FLAGGED(victim, MOB_NOBLIND) || IS_ADMIN(victim, ADMLVL_IMMORT) || mag_savingthrow(victim, savetype, 0)) {
send_to_char(ch, "You fail.\r\n"); send_to_char(ch, "You fail.\r\n");
return; return;
} }
@ -442,7 +447,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
break; break;
case SPELL_POISON: case SPELL_POISON:
if (mag_savingthrow(victim, savetype, 0)) { if (mag_savingthrow(victim, savetype, 0) || ADM_FLAGGED(victim, ADM_NOPOISON)) {
send_to_char(ch, "%s", CONFIG_NOEFFECT); send_to_char(ch, "%s", CONFIG_NOEFFECT);
return; return;
} }
@ -656,7 +661,9 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype)
* 5: other players in the same group (if the spell is 'violent') */ * 5: other players in the same group (if the spell is 'violent') */
if (tch == ch) if (tch == ch)
continue; continue;
if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT) if (IS_ADMIN(tch, ADMLVL_IMMORT))
continue;
if (ADM_FLAGGED(tch, ADM_NODAMAGE))
continue; continue;
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch)) if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch))
continue; continue;

View file

@ -288,7 +288,7 @@ static void postmaster_send_mail(struct char_data *ch, struct char_data *mailman
FALSE, mailman, 0, ch, TO_VICT); FALSE, mailman, 0, ch, TO_VICT);
return; return;
} }
if (GET_GOLD(ch) < STAMP_PRICE && GET_LEVEL(ch) < LVL_IMMORT) { if (GET_GOLD(ch) < STAMP_PRICE && !ADM_FLAGGED(ch, ADM_MONEY)) {
snprintf(buf, sizeof(buf), "$n tells you, 'A stamp costs %d coin%s.'\r\n" snprintf(buf, sizeof(buf), "$n tells you, 'A stamp costs %d coin%s.'\r\n"
"$n tells you, '...which I see you can't afford.'", STAMP_PRICE, "$n tells you, '...which I see you can't afford.'", STAMP_PRICE,
STAMP_PRICE == 1 ? "" : "s"); STAMP_PRICE == 1 ? "" : "s");
@ -301,13 +301,18 @@ static void postmaster_send_mail(struct char_data *ch, struct char_data *mailman
return; return;
} }
act("$n starts to write some mail.", TRUE, ch, 0, 0, TO_ROOM); act("$n starts to write some mail.", TRUE, ch, 0, 0, TO_ROOM);
if (ADM_FLAGGED(ch, ADM_MONEY))
snprintf(buf, sizeof(buf), "$n tells you, 'Your mail is free.'\r\n"
"$n tells you, 'Write your message. (/s saves /h for help).'");
else
snprintf(buf, sizeof(buf), "$n tells you, 'I'll take %d coins for the stamp.'\r\n" snprintf(buf, sizeof(buf), "$n tells you, 'I'll take %d coins for the stamp.'\r\n"
"$n tells you, 'Write your message. (/s saves /h for help).'", "$n tells you, 'Write your message. (/s saves /h for help).'",
STAMP_PRICE); STAMP_PRICE);
act(buf, FALSE, mailman, 0, ch, TO_VICT); act(buf, FALSE, mailman, 0, ch, TO_VICT);
if (GET_LEVEL(ch) < LVL_IMMORT) if (!ADM_FLAGGED(ch, ADM_MONEY))
GET_GOLD(ch) -= STAMP_PRICE; GET_GOLD(ch) -= STAMP_PRICE;
SET_BIT_AR(PLR_FLAGS(ch), PLR_MAILING); /* string_write() sets writing. */ SET_BIT_AR(PLR_FLAGS(ch), PLR_MAILING); /* string_write() sets writing. */

View file

@ -103,7 +103,7 @@ ACMD(do_oasis_medit)
/* Give descriptor an OLC structure. */ /* Give descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, ADMLVL_IMMORT, TRUE,
"SYSERR: do_oasis_medit: Player already had olc structure."); "SYSERR: do_oasis_medit: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -132,7 +132,7 @@ ACMD(do_oasis_medit)
if (save) { if (save) {
send_to_char(ch, "Saving all mobiles in zone %d.\r\n", send_to_char(ch, "Saving all mobiles in zone %d.\r\n",
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves mobile info for zone %d.", "OLC: %s saves mobile info for zone %d.",
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number); GET_NAME(ch), zone_table[OLC_ZNUM(d)].number);
@ -162,7 +162,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, ADMLVL_IMMORT, 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));
} }
@ -545,7 +545,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
case 'Y': case 'Y':
/* Save the mob in memory and to disk. */ /* Save the mob in memory and to disk. */
medit_save_internally(d); medit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits mob %d", GET_NAME(d->character), OLC_NUM(d)); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits mob %d", GET_NAME(d->character), OLC_NUM(d));
if (CONFIG_OLC_SAVE) { if (CONFIG_OLC_SAVE) {
medit_save_to_disk(zone_table[real_zone_by_thing(OLC_NUM(d))].number); medit_save_to_disk(zone_table[real_zone_by_thing(OLC_NUM(d))].number);
write_to_output(d, "Mobile saved to disk.\r\n"); write_to_output(d, "Mobile saved to disk.\r\n");
@ -875,7 +875,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
* We should never get here. * We should never get here.
*/ */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached D_DESC case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached D_DESC case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
@ -1051,7 +1051,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
break; break;
case MEDIT_LEVEL: case MEDIT_LEVEL:
GET_LEVEL(OLC_MOB(d)) = LIMIT(i, 1, LVL_IMPL); GET_LEVEL(OLC_MOB(d)) = LIMIT(i, 1, CONFIG_MAX_LEVEL);
OLC_VAL(d) = TRUE; OLC_VAL(d) = TRUE;
medit_disp_stats_menu(d); medit_disp_stats_menu(d);
return; return;
@ -1088,7 +1088,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here. */ /* We should never get here. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached default case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: medit_parse(): Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }
@ -1116,7 +1116,7 @@ void medit_autoroll_stats(struct descriptor_data *d)
int mob_lev; int mob_lev;
mob_lev = GET_LEVEL(OLC_MOB(d)); mob_lev = GET_LEVEL(OLC_MOB(d));
mob_lev = GET_LEVEL(OLC_MOB(d)) = LIMIT(mob_lev, 1, LVL_IMPL); mob_lev = GET_LEVEL(OLC_MOB(d)) = LIMIT(mob_lev, 1, CONFIG_MAX_LEVEL);
GET_MOVE(OLC_MOB(d)) = mob_lev*10; /* hit point bonus (mobs don't use movement points */ GET_MOVE(OLC_MOB(d)) = mob_lev*10; /* hit point bonus (mobs don't use movement points */
GET_HIT(OLC_MOB(d)) = mob_lev/5; /* number of hitpoint dice */ GET_HIT(OLC_MOB(d)) = mob_lev/5; /* number of hitpoint dice */

View file

@ -350,7 +350,7 @@ ACMD(do_skillset)
send_to_char(ch, "You can't set NPC skills.\r\n"); send_to_char(ch, "You can't set NPC skills.\r\n");
return; return;
} }
if ((spell_info[skill].min_level[(pc)] >= LVL_IMMORT) && (pl < LVL_IMMORT)) { if ((spell_info[skill].min_level[(pc)] > CONFIG_MAX_LEVEL) && (!IS_ADMIN(vict, ADMLVL_IMMORT))) {
send_to_char(ch, "%s cannot be learned by mortals.\r\n", spell_info[skill].name); send_to_char(ch, "%s cannot be learned by mortals.\r\n", spell_info[skill].name);
return; return;
} else if (spell_info[skill].min_level[(pc)] > pl) { } else if (spell_info[skill].min_level[(pc)] > pl) {
@ -361,7 +361,7 @@ ACMD(do_skillset)
/* find_skill_num() guarantees a valid spell_info[] index, or -1, and we /* find_skill_num() guarantees a valid spell_info[] index, or -1, and we
* checked for the -1 above so we are safe here. */ * checked for the -1 above so we are safe here. */
SET_SKILL(vict, skill, value); SET_SKILL(vict, skill, value);
mudlog(BRF, LVL_IMMORT, TRUE, "%s changed %s's %s to %d.", GET_NAME(ch), GET_NAME(vict), spell_info[skill].name, value); mudlog(BRF, ADMLVL_IMMORT, TRUE, "%s changed %s's %s to %d.", GET_NAME(ch), GET_NAME(vict), spell_info[skill].name, value);
send_to_char(ch, "You change %s's %s to %d.\r\n", GET_NAME(vict), spell_info[skill].name, value); send_to_char(ch, "You change %s's %s to %d.\r\n", GET_NAME(vict), spell_info[skill].name, value);
} }

View file

@ -205,13 +205,13 @@ 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, ADMLVL_IMMORT, 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, ADMLVL_IMMORT, 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, ADMLVL_IMMORT, 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, ADMLVL_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));
STATE(d) = CON_PLAYING; STATE(d) = CON_PLAYING;
} }
@ -275,8 +275,8 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum)
if (GET_OLC_ZONE(ch) == AEDIT_PERMISSION && rnum == AEDIT_PERMISSION) if (GET_OLC_ZONE(ch) == AEDIT_PERMISSION && rnum == AEDIT_PERMISSION)
return TRUE; return TRUE;
/* always access if ch is high enough level */ /* always access if ch is high enough level (Imps don't need ADM_BUILD) */
if (GET_LEVEL(ch) >= LVL_GRGOD) if (IS_ADMIN(ch, ADMLVL_IMPL))
return (TRUE); return (TRUE);
/* always access if a player helped build the zone in the first place */ /* always access if a player helped build the zone in the first place */
@ -289,9 +289,11 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum)
return FALSE; return FALSE;
} }
/* no access if you're not at least LVL_BUILDER */ /* no access if you're not at least LVL_BUILDER, or don't have any builder privs */
if (GET_LEVEL(ch) < LVL_BUILDER) if (GET_ADMLEVEL(ch) < ADMLVL_BUILDER) {
if (!ADM_FLAGGED(ch, ADM_BUILD) && !ADM_FLAGGED(ch, ADM_ADVBUILD))
return FALSE; return FALSE;
}
/* always access if you're assigned to this zone */ /* always access if you're assigned to this zone */
if (real_zone(GET_OLC_ZONE(ch)) == rnum) if (real_zone(GET_OLC_ZONE(ch)) == rnum)
@ -311,6 +313,6 @@ void send_cannot_edit(struct char_data *ch, zone_vnum zone)
send_to_char(ch, "You do not have permission to edit zone %d.\r\n", zone); send_to_char(ch, "You do not have permission to edit zone %d.\r\n", zone);
sprintf(buf, "OLC: %s tried to edit zone %d.", GET_NAME(ch), zone); sprintf(buf, "OLC: %s tried to edit zone %d.", GET_NAME(ch), zone);
} }
mudlog(BRF, LVL_IMPL, TRUE, "%s", buf); mudlog(BRF, ADMLVL_IMPL, TRUE, "%s", buf);
} }

View file

@ -341,35 +341,36 @@ extern const char *nrm, *grn, *cyn, *yel;
#define CEDIT_MAX_EXP_LOSS 25 #define CEDIT_MAX_EXP_LOSS 25
#define CEDIT_MAX_NPC_CORPSE_TIME 26 #define CEDIT_MAX_NPC_CORPSE_TIME 26
#define CEDIT_MAX_PC_CORPSE_TIME 27 #define CEDIT_MAX_PC_CORPSE_TIME 27
#define CEDIT_IDLE_VOID 28 #define CEDIT_MAX_LEVEL 28
#define CEDIT_IDLE_RENT_TIME 29 #define CEDIT_IDLE_VOID 29
#define CEDIT_IDLE_MAX_LEVEL 30 #define CEDIT_IDLE_RENT_TIME 30
#define CEDIT_DTS_ARE_DUMPS 31 #define CEDIT_IDLE_MAX_LEVEL 31
#define CEDIT_LOAD_INTO_INVENTORY 32 #define CEDIT_DTS_ARE_DUMPS 32
#define CEDIT_TRACK_THROUGH_DOORS 33 #define CEDIT_LOAD_INTO_INVENTORY 33
#define CEDIT_NO_MORT_TO_IMMORT 34 #define CEDIT_TRACK_THROUGH_DOORS 34
#define CEDIT_MAX_OBJ_SAVE 35 #define CEDIT_NO_MORT_TO_IMMORT 35
#define CEDIT_MIN_RENT_COST 36 #define CEDIT_MAX_OBJ_SAVE 36
#define CEDIT_AUTOSAVE_TIME 37 #define CEDIT_MIN_RENT_COST 37
#define CEDIT_CRASH_FILE_TIMEOUT 38 #define CEDIT_AUTOSAVE_TIME 38
#define CEDIT_RENT_FILE_TIMEOUT 39 #define CEDIT_CRASH_FILE_TIMEOUT 39
#define CEDIT_MORTAL_START_ROOM 40 #define CEDIT_RENT_FILE_TIMEOUT 40
#define CEDIT_IMMORT_START_ROOM 41 #define CEDIT_MORTAL_START_ROOM 41
#define CEDIT_FROZEN_START_ROOM 42 #define CEDIT_IMMORT_START_ROOM 42
#define CEDIT_DONATION_ROOM_1 43 #define CEDIT_FROZEN_START_ROOM 43
#define CEDIT_DONATION_ROOM_2 44 #define CEDIT_DONATION_ROOM_1 44
#define CEDIT_DONATION_ROOM_3 45 #define CEDIT_DONATION_ROOM_2 45
#define CEDIT_DFLT_PORT 46 #define CEDIT_DONATION_ROOM_3 46
#define CEDIT_MAX_PLAYING 47 #define CEDIT_DFLT_PORT 47
#define CEDIT_MAX_FILESIZE 48 #define CEDIT_MAX_PLAYING 48
#define CEDIT_MAX_BAD_PWS 49 #define CEDIT_MAX_FILESIZE 49
#define CEDIT_SITEOK_EVERYONE 50 #define CEDIT_MAX_BAD_PWS 50
#define CEDIT_NAMESERVER_IS_SLOW 51 #define CEDIT_SITEOK_EVERYONE 51
#define CEDIT_USE_AUTOWIZ 52 #define CEDIT_NAMESERVER_IS_SLOW 52
#define CEDIT_MIN_WIZLIST_LEV 53 #define CEDIT_USE_AUTOWIZ 53
#define CEDIT_MAP_OPTION 54 #define CEDIT_MIN_WIZLIST_LEV 54
#define CEDIT_MAP_SIZE 55 #define CEDIT_MAP_OPTION 55
#define CEDIT_MINIMAP_SIZE 56 #define CEDIT_MAP_SIZE 56
#define CEDIT_MINIMAP_SIZE 57
/* Hedit Submodes of connectedness. */ /* Hedit Submodes of connectedness. */
#define HEDIT_CONFIRM_SAVESTRING 0 #define HEDIT_CONFIRM_SAVESTRING 0

View file

@ -112,7 +112,7 @@ ACMD(do_oasis_copy)
/* Give the descriptor an OLC structure. */ /* Give the descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_copy: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis_copy: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -233,7 +233,7 @@ ACMD(do_dig)
/* Give the descriptor an olc struct. This way we can let /* Give the descriptor an olc struct. This way we can let
* redit_save_internally handle the room adding. */ * redit_save_internally handle the room adding. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_dig: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_dig: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
CREATE(d->olc, struct oasis_olc_data, 1); CREATE(d->olc, struct oasis_olc_data, 1);
@ -315,7 +315,7 @@ int buildwalk(struct char_data *ch, int dir)
room_rnum rnum; room_rnum rnum;
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_BUILDWALK) && if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_BUILDWALK) &&
GET_LEVEL(ch) >= LVL_BUILDER) { ADM_FLAGGED(ch, ADM_BUILD)) {
get_char_colors(ch); get_char_colors(ch);
@ -328,7 +328,7 @@ int buildwalk(struct char_data *ch, int dir)
/* Give the descriptor an olc struct. This way we can let /* Give the descriptor an olc struct. This way we can let
* redit_save_internally handle the room adding. */ * redit_save_internally handle the room adding. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: buildwalk(): Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: buildwalk(): Player already had olc structure.");
free(d->olc); free(d->olc);
} }
CREATE(d->olc, struct oasis_olc_data, 1); CREATE(d->olc, struct oasis_olc_data, 1);

View file

@ -101,7 +101,7 @@ int free_strings(void *data, int type)
return (TRUE); return (TRUE);
default: default:
mudlog(BRF, LVL_GOD, TRUE, "SYSERR: oasis_delete.c: free_strings: Invalid type handled (Type %d).", type); mudlog(BRF, ADMLVL_GOD, TRUE, "SYSERR: oasis_delete.c: free_strings: Invalid type handled (Type %d).", type);
return (FALSE); return (FALSE);
} }
} }

View file

@ -167,7 +167,7 @@ ACMD(do_oasis_list)
break; break;
default: default:
send_to_char(ch, "You can't list that!\r\n"); send_to_char(ch, "You can't list that!\r\n");
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, ADMLVL_IMMORT, TRUE,
"SYSERR: do_oasis_list: Unknown list option: %d", subcmd); "SYSERR: do_oasis_list: Unknown list option: %d", subcmd);
} }
} }

View file

@ -22,6 +22,7 @@
#include "config.h" #include "config.h"
#include "modify.h" #include "modify.h"
#include "genolc.h" /* for strip_cr and sprintascii */ #include "genolc.h" /* for strip_cr and sprintascii */
#include "constants.h"
/* these factors should be unique integers */ /* these factors should be unique integers */
#define RENT_FACTOR 1 #define RENT_FACTOR 1
@ -248,7 +249,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, ADMLVL_IMMORT, 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;
} }
@ -927,7 +928,7 @@ static int gen_receptionist(struct char_data *ch, struct char_data *recep, int c
if (mode == RENT_FACTOR) { if (mode == RENT_FACTOR) {
act("$n stores your belongings and helps you into your private chamber.", FALSE, recep, 0, ch, TO_VICT); act("$n stores your belongings and helps you into your private chamber.", FALSE, recep, 0, ch, TO_VICT);
Crash_rentsave(ch, cost); Crash_rentsave(ch, cost);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has rented (%d/day, %d tot.)", mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has rented (%d/day, %d tot.)",
GET_NAME(ch), cost, GET_GOLD(ch) + GET_BANK_GOLD(ch)); GET_NAME(ch), cost, GET_GOLD(ch) + GET_BANK_GOLD(ch));
} else { /* cryo */ } else { /* cryo */
act("$n stores your belongings and helps you into your private chamber.\r\n" act("$n stores your belongings and helps you into your private chamber.\r\n"
@ -935,7 +936,7 @@ static int gen_receptionist(struct char_data *ch, struct char_data *recep, int c
"You begin to lose consciousness...", "You begin to lose consciousness...",
FALSE, recep, 0, ch, TO_VICT); FALSE, recep, 0, ch, TO_VICT);
Crash_cryosave(ch, cost); Crash_cryosave(ch, cost);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has cryo-rented.", GET_NAME(ch)); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has cryo-rented.", GET_NAME(ch));
SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO); SET_BIT_AR(PLR_FLAGS(ch), PLR_CRYO);
} }
@ -1189,7 +1190,7 @@ static int Crash_load_objs(struct char_data *ch) {
"There was a problem loading your objects from disk.\r\n" "There was a problem loading your objects from disk.\r\n"
"Contact a God for assistance.\r\n"); "Contact a God for assistance.\r\n");
} }
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s entering game with no equipment.", GET_NAME(ch)); mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s entering game with no equipment.", GET_NAME(ch));
return 1; return 1;
} }
if (get_line(fl, line)) if (get_line(fl, line))
@ -1202,7 +1203,7 @@ static int Crash_load_objs(struct char_data *ch) {
cost = (unsigned int) (netcost * num_of_days); cost = (unsigned int) (netcost * num_of_days);
if (cost > (unsigned int)GET_GOLD(ch) + (unsigned int)GET_BANK_GOLD(ch)) { if (cost > (unsigned int)GET_GOLD(ch) + (unsigned int)GET_BANK_GOLD(ch)) {
fclose(fl); fclose(fl);
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(BRF, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"%s entering game, rented equipment lost (no $).", GET_NAME(ch)); "%s entering game, rented equipment lost (no $).", GET_NAME(ch));
Crash_crashsave(ch); Crash_crashsave(ch);
return 2; return 2;
@ -1214,25 +1215,25 @@ static int Crash_load_objs(struct char_data *ch) {
} }
switch (orig_rent_code = rentcode) { switch (orig_rent_code = rentcode) {
case RENT_RENTED: case RENT_RENTED:
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"%s un-renting and entering game.", GET_NAME(ch)); "%s un-renting and entering game.", GET_NAME(ch));
break; break;
case RENT_CRASH: case RENT_CRASH:
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"%s retrieving crash-saved items and entering game.", GET_NAME(ch)); "%s retrieving crash-saved items and entering game.", GET_NAME(ch));
break; break;
case RENT_CRYO: case RENT_CRYO:
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"%s un-cryo'ing and entering game.", GET_NAME(ch)); "%s un-cryo'ing and entering game.", GET_NAME(ch));
break; break;
case RENT_FORCED: case RENT_FORCED:
case RENT_TIMEDOUT: case RENT_TIMEDOUT:
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"%s retrieving force-saved items and entering game.", GET_NAME(ch)); "%s retrieving force-saved items and entering game.", GET_NAME(ch));
break; break;
default: default:
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, mudlog(NRM, MAX(ADMLVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
"WARNING: %s entering game with undefined rent code.", GET_NAME(ch)); "WARNING: %s entering game with undefined rent code.", GET_NAME(ch));
break; break;
} }
@ -1250,8 +1251,8 @@ static int Crash_load_objs(struct char_data *ch) {
} }
/* Little hoarding check. -gg 3/1/98 */ /* Little hoarding check. -gg 3/1/98 */
mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s (level %d) has %d %s (max %d).", mudlog(NRM, MAX(ADMLVL_GOD, GET_INVIS_LEV(ch)), TRUE, "%s (level %d %s) has %d %s (max %d).",
GET_NAME(ch), GET_LEVEL(ch), num_objs, num_objs > 1 ? "objects" : "object", CONFIG_MAX_OBJ_SAVE); GET_NAME(ch), GET_LEVEL(ch), admin_level_names[(GET_ADMLEVEL(ch))], num_objs, num_objs > 1 ? "objects" : "object", CONFIG_MAX_OBJ_SAVE);
fclose(fl); fclose(fl);

View file

@ -113,7 +113,7 @@ ACMD(do_oasis_oedit)
/* Give the descriptor an OLC structure. */ /* Give the descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, ADMLVL_IMMORT, TRUE,
"SYSERR: do_oasis: Player already had olc structure."); "SYSERR: do_oasis: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -144,7 +144,7 @@ ACMD(do_oasis_oedit)
if (save) { if (save) {
send_to_char(ch, "Saving all objects in zone %d.\r\n", send_to_char(ch, "Saving all objects in zone %d.\r\n",
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves object info for zone %d.", GET_NAME(ch), "OLC: %s saves object info for zone %d.", GET_NAME(ch),
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
@ -173,7 +173,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, ADMLVL_IMMORT, 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));
} }
@ -448,7 +448,7 @@ static void oedit_disp_val1_menu(struct descriptor_data *d)
oedit_disp_menu(d); oedit_disp_menu(d);
break; break;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: Reached default case in oedit_disp_val1_menu()!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: Reached default case in oedit_disp_val1_menu()!");
break; break;
} }
} }
@ -695,7 +695,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
case 'y': case 'y':
case 'Y': case 'Y':
oedit_save_internally(d); oedit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE,
"OLC: %s edits obj %d", GET_NAME(d->character), OLC_NUM(d)); "OLC: %s edits obj %d", GET_NAME(d->character), OLC_NUM(d));
if (CONFIG_OLC_SAVE) { if (CONFIG_OLC_SAVE) {
oedit_save_to_disk(real_zone_by_thing(OLC_NUM(d))); oedit_save_to_disk(real_zone_by_thing(OLC_NUM(d)));
@ -924,7 +924,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
break; break;
case OEDIT_LEVEL: case OEDIT_LEVEL:
GET_OBJ_LEVEL(OLC_OBJ(d)) = LIMIT(atoi(arg), 0, LVL_IMPL); GET_OBJ_LEVEL(OLC_OBJ(d)) = LIMIT(atoi(arg), 0, CONFIG_MAX_LEVEL);
break; break;
case OEDIT_PERM: case OEDIT_PERM:
@ -1091,7 +1091,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
int counter; int counter;
/* add in check here if already applied.. deny builders another */ /* add in check here if already applied.. deny builders another */
if (GET_LEVEL(d->character) < LVL_IMPL) { if (!IS_ADMIN(d->character, ADMLVL_IMPL)) {
for (counter = 0; counter < MAX_OBJ_AFFECT; counter++) { for (counter = 0; counter < MAX_OBJ_AFFECT; counter++) {
if (OLC_OBJ(d)->affected[counter].location == number) { if (OLC_OBJ(d)->affected[counter].location == number) {
write_to_output(d, "Object already has that apply."); write_to_output(d, "Object already has that apply.");
@ -1197,7 +1197,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
write_to_output(d, "Please answer 'Y' or 'N': "); write_to_output(d, "Please answer 'Y' or 'N': ");
return; return;
default: default:
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: Reached default case in oedit_parse()!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: Reached default case in oedit_parse()!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }

View file

@ -16,6 +16,7 @@
#define PFDEF_SEX 0 #define PFDEF_SEX 0
#define PFDEF_CLASS 0 #define PFDEF_CLASS 0
#define PFDEF_LEVEL 0 #define PFDEF_LEVEL 0
#define PFDEF_ADMLEVEL ADMLVL_MORTAL
#define PFDEF_HEIGHT 0 #define PFDEF_HEIGHT 0
#define PFDEF_WEIGHT 0 #define PFDEF_WEIGHT 0
#define PFDEF_ALIGNMENT 0 #define PFDEF_ALIGNMENT 0

View file

@ -31,6 +31,7 @@
#define PT_PNAME(i) (player_table[(i)].name) #define PT_PNAME(i) (player_table[(i)].name)
#define PT_IDNUM(i) (player_table[(i)].id) #define PT_IDNUM(i) (player_table[(i)].id)
#define PT_LEVEL(i) (player_table[(i)].level) #define PT_LEVEL(i) (player_table[(i)].level)
#define PT_ADMLEVEL(i) (player_table[(i)].admlevel)
#define PT_FLAGS(i) (player_table[(i)].flags) #define PT_FLAGS(i) (player_table[(i)].flags)
#define PT_LLAST(i) (player_table[(i)].last) #define PT_LLAST(i) (player_table[(i)].last)
@ -83,11 +84,20 @@ void build_player_index(void)
CREATE(player_table, struct player_index_element, rec_count); CREATE(player_table, struct player_index_element, rec_count);
for (i = 0; i < rec_count; i++) { for (i = 0; i < rec_count; i++) {
get_line(plr_index, line); get_line(plr_index, line);
sscanf(line, "%ld %s %d %s %ld", &player_table[i].id, arg2, /* Load both old-style (5 vars) or new style with admin level (6 vars) */
&player_table[i].level, bits, (long *)&player_table[i].last); if (sscanf(line, "%ld %s %d %d %s %ld", &PT_IDNUM(i), arg2,
&PT_LEVEL(i), &PT_ADMLEVEL(i), bits, (long *)&PT_LLAST(i)) != 6) {
if (sscanf(line, "%ld %s %d %s %ld", &PT_IDNUM(i), arg2,
&PT_LEVEL(i), bits, (long *)&PT_LLAST(i)) != 5) {
log("SYSERR: Invalid line in player index (%s, line %d)", index_name, (i+1));
}
/* Convert old level to new seperate admin and mortal levels */
PT_ADMLEVEL(i) = (PT_LEVEL(i) > CONFIG_MAX_LEVEL) ? MIN((PT_LEVEL(i) - CONFIG_MAX_LEVEL), ADMLVL_IMPL) : ADMLVL_MORTAL;
PT_LEVEL(i) = MIN(PT_LEVEL(i), CONFIG_MAX_LEVEL);
}
CREATE(player_table[i].name, char, strlen(arg2) + 1); CREATE(player_table[i].name, char, strlen(arg2) + 1);
strcpy(player_table[i].name, arg2); strcpy(player_table[i].name, arg2);
player_table[i].flags = asciiflag_conv(bits); PT_FLAGS(i) = asciiflag_conv(bits);
top_idnum = MAX(top_idnum, player_table[i].id); top_idnum = MAX(top_idnum, player_table[i].id);
} }
@ -119,7 +129,7 @@ int create_entry(char *name)
/* Nothing */; /* Nothing */;
/* clear the bitflag in case we have garbage data */ /* clear the bitflag in case we have garbage data */
player_table[pos].flags = 0; PT_FLAGS(pos) = 0;
return (pos); return (pos);
} }
@ -142,6 +152,7 @@ void remove_player_from_index(int pos)
PT_PNAME(i-1) = PT_PNAME(i); PT_PNAME(i-1) = PT_PNAME(i);
PT_IDNUM(i-1) = PT_IDNUM(i); PT_IDNUM(i-1) = PT_IDNUM(i);
PT_LEVEL(i-1) = PT_LEVEL(i); PT_LEVEL(i-1) = PT_LEVEL(i);
PT_ADMLEVEL(i-1) = PT_ADMLEVEL(i);
PT_FLAGS(i-1) = PT_FLAGS(i); PT_FLAGS(i-1) = PT_FLAGS(i);
PT_LLAST(i-1) = PT_LLAST(i); PT_LLAST(i-1) = PT_LLAST(i);
} }
@ -174,10 +185,9 @@ void save_player_index(void)
for (i = 0; i <= top_of_p_table; i++) for (i = 0; i <= top_of_p_table; i++)
if (*player_table[i].name) { if (*player_table[i].name) {
sprintascii(bits, player_table[i].flags); sprintascii(bits, PT_FLAGS(i));
fprintf(index_file, "%ld %s %d %s %ld\n", player_table[i].id, fprintf(index_file, "%ld %s %d %d %s %ld\n", PT_IDNUM(i), PT_PNAME(i),
player_table[i].name, player_table[i].level, *bits ? bits : "0", PT_LEVEL(i), PT_ADMLEVEL(i), *bits ? bits : "0", (long)PT_LLAST(i));
(long)player_table[i].last);
} }
fprintf(index_file, "~\n"); fprintf(index_file, "~\n");
@ -192,8 +202,8 @@ void free_player_index(void)
return; return;
for (tp = 0; tp <= top_of_p_table; tp++) for (tp = 0; tp <= top_of_p_table; tp++)
if (player_table[tp].name) if (PT_PNAME(tp))
free(player_table[tp].name); free(PT_PNAME(tp));
free(player_table); free(player_table);
player_table = NULL; player_table = NULL;
@ -249,10 +259,10 @@ int load_char(const char *name, struct char_data *ch)
if ((id = get_ptable_by_name(name)) < 0) if ((id = get_ptable_by_name(name)) < 0)
return (-1); return (-1);
else { else {
if (!get_filename(filename, sizeof(filename), PLR_FILE, player_table[id].name)) if (!get_filename(filename, sizeof(filename), PLR_FILE, PT_PNAME(id)))
return (-1); return (-1);
if (!(fl = fopen(filename, "r"))) { if (!(fl = fopen(filename, "r"))) {
mudlog(NRM, LVL_GOD, TRUE, "SYSERR: Couldn't open player file %s", filename); mudlog(NRM, ADMLVL_GOD, TRUE, "SYSERR: Couldn't open player file %s", filename);
return (-1); return (-1);
} }
@ -263,6 +273,7 @@ int load_char(const char *name, struct char_data *ch)
GET_SEX(ch) = PFDEF_SEX; GET_SEX(ch) = PFDEF_SEX;
GET_CLASS(ch) = PFDEF_CLASS; GET_CLASS(ch) = PFDEF_CLASS;
GET_LEVEL(ch) = PFDEF_LEVEL; GET_LEVEL(ch) = PFDEF_LEVEL;
GET_ADMLEVEL(ch) = PFDEF_ADMLEVEL;
GET_HEIGHT(ch) = PFDEF_HEIGHT; GET_HEIGHT(ch) = PFDEF_HEIGHT;
GET_WEIGHT(ch) = PFDEF_WEIGHT; GET_WEIGHT(ch) = PFDEF_WEIGHT;
GET_ALIGNMENT(ch) = PFDEF_ALIGNMENT; GET_ALIGNMENT(ch) = PFDEF_ALIGNMENT;
@ -330,7 +341,8 @@ int load_char(const char *name, struct char_data *ch)
PLR_FLAGS(ch)[3] = asciiflag_conv(f4); PLR_FLAGS(ch)[3] = asciiflag_conv(f4);
} else } else
PLR_FLAGS(ch)[0] = asciiflag_conv(line); PLR_FLAGS(ch)[0] = asciiflag_conv(line);
} else if (!strcmp(tag, "Aff ")) { }
else if (!strcmp(tag, "Aff ")) {
if (sscanf(line, "%s %s %s %s", f1, f2, f3, f4) == 4) { if (sscanf(line, "%s %s %s %s", f1, f2, f3, f4) == 4) {
AFF_FLAGS(ch)[0] = asciiflag_conv(f1); AFF_FLAGS(ch)[0] = asciiflag_conv(f1);
AFF_FLAGS(ch)[1] = asciiflag_conv(f2); AFF_FLAGS(ch)[1] = asciiflag_conv(f2);
@ -339,9 +351,19 @@ int load_char(const char *name, struct char_data *ch)
} else } else
AFF_FLAGS(ch)[0] = asciiflag_conv(line); AFF_FLAGS(ch)[0] = asciiflag_conv(line);
} }
if (!strcmp(tag, "Affs")) load_affects(fl, ch); else if (!strcmp(tag, "Affs")) load_affects(fl, ch);
else if (!strcmp(tag, "Alin")) GET_ALIGNMENT(ch) = atoi(line); else if (!strcmp(tag, "Alin")) GET_ALIGNMENT(ch) = atoi(line);
else if (!strcmp(tag, "Alis")) read_aliases_ascii(fl, ch, atoi(line)); else if (!strcmp(tag, "Alis")) read_aliases_ascii(fl, ch, atoi(line));
else if (!strcmp(tag, "Admn")) GET_ADMLEVEL(ch) = atoi(line);
else if (!strcmp(tag, "Admf")) {
if (sscanf(line, "%s %s %s %s", f1, f2, f3, f4) == 4) {
ADM_FLAGS(ch)[0] = asciiflag_conv(f1);
ADM_FLAGS(ch)[1] = asciiflag_conv(f2);
ADM_FLAGS(ch)[2] = asciiflag_conv(f3);
ADM_FLAGS(ch)[3] = asciiflag_conv(f4);
} else
ADM_FLAGS(ch)[0] = asciiflag_conv(f1);
}
break; break;
case 'B': case 'B':
@ -486,8 +508,15 @@ int load_char(const char *name, struct char_data *ch)
affect_total(ch); affect_total(ch);
/* Sort old-style admin levels (one-time only code for codebase upgrades to tbaMUD 4.0) */
if (GET_LEVEL(ch) > CONFIG_MAX_LEVEL) {
/* For no converson to new admin levels, skip next line */
GET_ADMLEVEL(ch) = MIN((GET_LEVEL(ch) - CONFIG_MAX_LEVEL), ADMLVL_IMPL);
GET_LEVEL(ch) = CONFIG_MAX_LEVEL;
}
/* initialization for imms */ /* initialization for imms */
if (GET_LEVEL(ch) >= LVL_IMMORT) { if (IS_ADMIN(ch, ADMLVL_IMMORT)) {
for (i = 1; i <= MAX_SKILLS; i++) for (i = 1; i <= MAX_SKILLS; i++)
GET_SKILL(ch, i) = 100; GET_SKILL(ch, i) = 100;
GET_COND(ch, HUNGER) = -1; GET_COND(ch, HUNGER) = -1;
@ -533,7 +562,7 @@ void save_char(struct char_data * ch)
if (!get_filename(filename, sizeof(filename), PLR_FILE, GET_NAME(ch))) if (!get_filename(filename, sizeof(filename), PLR_FILE, GET_NAME(ch)))
return; return;
if (!(fl = fopen(filename, "w"))) { if (!(fl = fopen(filename, "w"))) {
mudlog(NRM, LVL_GOD, TRUE, "SYSERR: Couldn't open player file %s for write", filename); mudlog(NRM, ADMLVL_GOD, TRUE, "SYSERR: Couldn't open player file %s for write", filename);
return; return;
} }
@ -587,6 +616,7 @@ void save_char(struct char_data * ch)
if (GET_SEX(ch) != PFDEF_SEX) fprintf(fl, "Sex : %d\n", GET_SEX(ch)); if (GET_SEX(ch) != PFDEF_SEX) fprintf(fl, "Sex : %d\n", GET_SEX(ch));
if (GET_CLASS(ch) != PFDEF_CLASS) fprintf(fl, "Clas: %d\n", GET_CLASS(ch)); if (GET_CLASS(ch) != PFDEF_CLASS) fprintf(fl, "Clas: %d\n", GET_CLASS(ch));
if (GET_LEVEL(ch) != PFDEF_LEVEL) fprintf(fl, "Levl: %d\n", GET_LEVEL(ch)); if (GET_LEVEL(ch) != PFDEF_LEVEL) fprintf(fl, "Levl: %d\n", GET_LEVEL(ch));
if (GET_ADMLEVEL(ch) != PFDEF_ADMLEVEL) fprintf(fl, "Admn: %d\n", GET_ADMLEVEL(ch));
fprintf(fl, "Id : %ld\n", GET_IDNUM(ch)); fprintf(fl, "Id : %ld\n", GET_IDNUM(ch));
fprintf(fl, "Brth: %ld\n", (long)ch->player.time.birth); fprintf(fl, "Brth: %ld\n", (long)ch->player.time.birth);
@ -622,6 +652,12 @@ void save_char(struct char_data * ch)
sprintascii(bits4, PRF_FLAGS(ch)[3]); sprintascii(bits4, PRF_FLAGS(ch)[3]);
fprintf(fl, "Pref: %s %s %s %s\n", bits, bits2, bits3, bits4); fprintf(fl, "Pref: %s %s %s %s\n", bits, bits2, bits3, bits4);
sprintascii(bits, ADM_FLAGS(ch)[0]);
sprintascii(bits2, ADM_FLAGS(ch)[1]);
sprintascii(bits3, ADM_FLAGS(ch)[2]);
sprintascii(bits4, ADM_FLAGS(ch)[3]);
fprintf(fl, "Admf: %s %s %s %s\n", bits, bits2, bits3, bits4);
if (GET_SAVE(ch, 0) != PFDEF_SAVETHROW) fprintf(fl, "Thr1: %d\n", GET_SAVE(ch, 0)); if (GET_SAVE(ch, 0) != PFDEF_SAVETHROW) fprintf(fl, "Thr1: %d\n", GET_SAVE(ch, 0));
if (GET_SAVE(ch, 1) != PFDEF_SAVETHROW) fprintf(fl, "Thr2: %d\n", GET_SAVE(ch, 1)); if (GET_SAVE(ch, 1) != PFDEF_SAVETHROW) fprintf(fl, "Thr2: %d\n", GET_SAVE(ch, 1));
if (GET_SAVE(ch, 2) != PFDEF_SAVETHROW) fprintf(fl, "Thr3: %d\n", GET_SAVE(ch, 2)); if (GET_SAVE(ch, 2) != PFDEF_SAVETHROW) fprintf(fl, "Thr3: %d\n", GET_SAVE(ch, 2));
@ -636,9 +672,9 @@ void save_char(struct char_data * ch)
if (GET_BAD_PWS(ch) != PFDEF_BADPWS) fprintf(fl, "Badp: %d\n", GET_BAD_PWS(ch)); if (GET_BAD_PWS(ch) != PFDEF_BADPWS) fprintf(fl, "Badp: %d\n", GET_BAD_PWS(ch));
if (GET_PRACTICES(ch) != PFDEF_PRACTICES) fprintf(fl, "Lern: %d\n", GET_PRACTICES(ch)); if (GET_PRACTICES(ch) != PFDEF_PRACTICES) fprintf(fl, "Lern: %d\n", GET_PRACTICES(ch));
if (GET_COND(ch, HUNGER) != PFDEF_HUNGER && GET_LEVEL(ch) < LVL_IMMORT) fprintf(fl, "Hung: %d\n", GET_COND(ch, HUNGER)); if (GET_COND(ch, HUNGER) != PFDEF_HUNGER && !IS_ADMIN(ch, ADMLVL_IMMORT)) fprintf(fl, "Hung: %d\n", GET_COND(ch, HUNGER));
if (GET_COND(ch, THIRST) != PFDEF_THIRST && GET_LEVEL(ch) < LVL_IMMORT) fprintf(fl, "Thir: %d\n", GET_COND(ch, THIRST)); if (GET_COND(ch, THIRST) != PFDEF_THIRST && !IS_ADMIN(ch, ADMLVL_IMMORT)) fprintf(fl, "Thir: %d\n", GET_COND(ch, THIRST));
if (GET_COND(ch, DRUNK) != PFDEF_DRUNK && GET_LEVEL(ch) < LVL_IMMORT) fprintf(fl, "Drnk: %d\n", GET_COND(ch, DRUNK)); if (GET_COND(ch, DRUNK) != PFDEF_DRUNK && !IS_ADMIN(ch, ADMLVL_IMMORT)) fprintf(fl, "Drnk: %d\n", GET_COND(ch, DRUNK));
if (GET_HIT(ch) != PFDEF_HIT || GET_MAX_HIT(ch) != PFDEF_MAXHIT) fprintf(fl, "Hit : %d/%d\n", GET_HIT(ch), GET_MAX_HIT(ch)); if (GET_HIT(ch) != PFDEF_HIT || GET_MAX_HIT(ch) != PFDEF_MAXHIT) fprintf(fl, "Hit : %d/%d\n", GET_HIT(ch), GET_MAX_HIT(ch));
if (GET_MANA(ch) != PFDEF_MANA || GET_MAX_MANA(ch) != PFDEF_MAXMANA) fprintf(fl, "Mana: %d/%d\n", GET_MANA(ch), GET_MAX_MANA(ch)); if (GET_MANA(ch) != PFDEF_MANA || GET_MAX_MANA(ch) != PFDEF_MAXMANA) fprintf(fl, "Mana: %d/%d\n", GET_MANA(ch), GET_MAX_MANA(ch));
@ -678,7 +714,7 @@ void save_char(struct char_data * ch)
} }
/* Save skills */ /* Save skills */
if (GET_LEVEL(ch) < LVL_IMMORT) { if (!IS_ADMIN(ch, ADMLVL_IMMORT)) {
fprintf(fl, "Skil:\n"); fprintf(fl, "Skil:\n");
for (i = 1; i <= MAX_SKILLS; i++) { for (i = 1; i <= MAX_SKILLS; i++) {
if (GET_SKILL(ch, i)) if (GET_SKILL(ch, i))
@ -731,6 +767,10 @@ void save_char(struct char_data * ch)
save_index = TRUE; save_index = TRUE;
player_table[id].level = GET_LEVEL(ch); player_table[id].level = GET_LEVEL(ch);
} }
if (player_table[id].admlevel != GET_ADMLEVEL(ch)) {
save_index = TRUE;
player_table[id].admlevel = GET_ADMLEVEL(ch);
}
if (player_table[id].last != ch->player.time.logon) { if (player_table[id].last != ch->player.time.logon) {
save_index = TRUE; save_index = TRUE;
player_table[id].last = ch->player.time.logon; player_table[id].last = ch->player.time.logon;
@ -740,6 +780,7 @@ void save_char(struct char_data * ch)
SET_BIT(player_table[id].flags, PINDEX_DELETED); SET_BIT(player_table[id].flags, PINDEX_DELETED);
else else
REMOVE_BIT(player_table[id].flags, PINDEX_DELETED); REMOVE_BIT(player_table[id].flags, PINDEX_DELETED);
if (PLR_FLAGGED(ch, PLR_NODELETE) || PLR_FLAGGED(ch, PLR_CRYO)) if (PLR_FLAGGED(ch, PLR_NODELETE) || PLR_FLAGGED(ch, PLR_CRYO))
SET_BIT(player_table[id].flags, PINDEX_NODELETE); SET_BIT(player_table[id].flags, PINDEX_NODELETE);
else else
@ -750,6 +791,11 @@ void save_char(struct char_data * ch)
else else
REMOVE_BIT(player_table[id].flags, PINDEX_NOWIZLIST); REMOVE_BIT(player_table[id].flags, PINDEX_NOWIZLIST);
if (PRF_FLAGGED(ch, PRF_MORTAL))
SET_BIT(player_table[id].flags, PINDEX_MORTAL);
else
REMOVE_BIT(player_table[id].flags, PINDEX_MORTAL);
if (player_table[id].flags != i || save_index) if (player_table[id].flags != i || save_index)
save_player_index(); save_player_index();
} }
@ -790,8 +836,9 @@ void remove_player(int pfilepos)
unlink(filename); unlink(filename);
} }
log("PCLEAN: %s Lev: %d Last: %s", log("PCLEAN: %s Lev: %d AdmLev: %d Last: %s",
player_table[pfilepos].name, player_table[pfilepos].level, player_table[pfilepos].name, player_table[pfilepos].level,
player_table[pfilepos].admlevel,
asctime(localtime(&player_table[pfilepos].last))); asctime(localtime(&player_table[pfilepos].last)));
player_table[pfilepos].name[0] = '\0'; player_table[pfilepos].name[0] = '\0';
@ -806,6 +853,10 @@ void clean_pfiles(void)
int i, ci; int i, ci;
for (i = 0; i <= top_of_p_table; i++) { for (i = 0; i <= top_of_p_table; i++) {
/* Skip Imms */
if (PT_ADMLEVEL(i) > ADMLVL_IMMORT)
continue;
/* We only want to go further if the player isn't protected from deletion /* We only want to go further if the player isn't protected from deletion
* and hasn't already been deleted. */ * and hasn't already been deleted. */
if (!IS_SET(player_table[i].flags, PINDEX_NODELETE) && if (!IS_SET(player_table[i].flags, PINDEX_NODELETE) &&

View file

@ -79,16 +79,16 @@ static void prefedit_save_to_char(struct descriptor_data *d)
else else
{ {
if (!vict) { if (!vict) {
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (no vict)"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (no vict)");
send_to_char(d->character, "Unable to save toggles (no vict)"); send_to_char(d->character, "Unable to save toggles (no vict)");
} else if (!vict->desc) { } else if (!vict->desc) {
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (no vict descriptor)"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (no vict descriptor)");
send_to_char(d->character, "Unable to save toggles (no vict descriptor)"); send_to_char(d->character, "Unable to save toggles (no vict descriptor)");
} else if (!IS_PLAYING(vict->desc)) { } else if (!IS_PLAYING(vict->desc)) {
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (vict not playing)"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (vict not playing)");
send_to_char(d->character, "Unable to save toggles (vict not playing)"); send_to_char(d->character, "Unable to save toggles (vict not playing)");
} else { } else {
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (unknown reason)"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Unable to save toggles (unknown reason)");
send_to_char(d->character, "Unable to save toggles (unknown reason)"); send_to_char(d->character, "Unable to save toggles (unknown reason)");
} }
} }
@ -138,7 +138,7 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM) ); CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM) );
/* Imm Prefs */ /* Imm Prefs */
if (GET_LEVEL(PREFEDIT_GET_CHAR) >= LVL_IMMORT) if (IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
sprintf(syslog_string, "%s", multi_types[((PREFEDIT_FLAGGED(PRF_LOG1) ? 1 : 0)+ (PREFEDIT_FLAGGED(PRF_LOG2) ? 2 : 0))] ); sprintf(syslog_string, "%s", multi_types[((PREFEDIT_FLAGGED(PRF_LOG1) ? 1 : 0)+ (PREFEDIT_FLAGGED(PRF_LOG2) ? 2 : 0))] );
@ -334,7 +334,7 @@ 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, ADMLVL_BUILDER, 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;
@ -402,7 +402,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
/* Below this point are Imm-only toggles */ /* Below this point are Imm-only toggles */
case '1': case '1':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -415,7 +415,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
break; break;
case '2': case '2':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -427,7 +427,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
break; break;
case '3': case '3':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -439,7 +439,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
break; break;
case '4': case '4':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -451,7 +451,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
break; break;
case '5': case '5':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -463,7 +463,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
break; break;
case '6': case '6':
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT) if (!IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_IMMORT))
{ {
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);
@ -671,7 +671,7 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
default: default:
/* we should never get here */ /* we should never get here */
mudlog(BRF,LVL_BUILDER,TRUE,"SYSERR: Reached default case in parse_prefedit"); mudlog(BRF,ADMLVL_BUILDER,TRUE,"SYSERR: Reached default case in parse_prefedit");
break; break;
} }
/*. If we get this far, something has be changed .*/ /*. If we get this far, something has be changed .*/
@ -715,7 +715,7 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOEXIT); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOEXIT);
/* PRF_NOHASSLE - On for Imms */ /* PRF_NOHASSLE - On for Imms */
if (!PREFEDIT_FLAGGED(PRF_NOHASSLE) && GET_LEVEL(PREFEDIT_GET_CHAR) > LVL_IMMORT) if (!PREFEDIT_FLAGGED(PRF_NOHASSLE) && IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_BUILDER))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOHASSLE); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOHASSLE);
else else
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOHASSLE); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOHASSLE);
@ -733,7 +733,7 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOREPEAT); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOREPEAT);
/* PRF_HOLYLIGHT - On for Imms */ /* PRF_HOLYLIGHT - On for Imms */
if (!PREFEDIT_FLAGGED(PRF_HOLYLIGHT) && GET_LEVEL(PREFEDIT_GET_CHAR) > LVL_IMMORT) if (!PREFEDIT_FLAGGED(PRF_HOLYLIGHT) && IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_BUILDER))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_HOLYLIGHT); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_HOLYLIGHT);
else else
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_HOLYLIGHT); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_HOLYLIGHT);
@ -769,7 +769,7 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOGRATZ); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOGRATZ);
/* PRF_SHOWVNUMS - On for Imms */ /* PRF_SHOWVNUMS - On for Imms */
if (!PREFEDIT_FLAGGED(PRF_SHOWVNUMS) && GET_LEVEL(PREFEDIT_GET_CHAR) > LVL_IMMORT) if (!PREFEDIT_FLAGGED(PRF_SHOWVNUMS) && IS_ADMIN(PREFEDIT_GET_CHAR, ADMLVL_BUILDER))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_SHOWVNUMS); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_SHOWVNUMS);
else else
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_SHOWVNUMS); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_SHOWVNUMS);
@ -807,15 +807,15 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOASSIST); REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOASSIST);
/* PRF_AUTOMAP - On */ /* PRF_AUTOMAP - On */
if (PREFEDIT_FLAGGED(PRF_AUTOMAP)) if (!PREFEDIT_FLAGGED(PRF_AUTOMAP))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOMAP); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOMAP);
/* PRF_AUTOKEY - On */ /* PRF_AUTOKEY - On */
if (PREFEDIT_FLAGGED(PRF_AUTOKEY)) if (!PREFEDIT_FLAGGED(PRF_AUTOKEY))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOKEY); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOKEY);
/* PRF_AUTODOOR - On */ /* PRF_AUTODOOR - On */
if (PREFEDIT_FLAGGED(PRF_AUTODOOR)) if (!PREFEDIT_FLAGGED(PRF_AUTODOOR))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTODOOR); SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTODOOR);
/* Other (non-toggle) options */ /* Other (non-toggle) options */
@ -844,7 +844,7 @@ ACMD(do_oasis_prefedit)
if (!*buf1) { if (!*buf1) {
vict = ch; vict = ch;
} }
else if (GET_LEVEL(ch) >= LVL_IMPL) else if (IS_ADMIN(ch, ADMLVL_IMPL))
{ {
if ((vict = get_player_vis(ch, buf1, NULL, FIND_CHAR_WORLD)) == NULL) if ((vict = get_player_vis(ch, buf1, NULL, FIND_CHAR_WORLD)) == NULL)
{ {
@ -888,7 +888,7 @@ ACMD(do_oasis_prefedit)
/** Give the descriptor an OLC structure. **/ /** Give the descriptor an OLC structure. **/
/****************************************************************************/ /****************************************************************************/
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_prefedit: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis_prefedit: Player already had olc structure.");
free(d->olc); free(d->olc);
} }

View file

@ -121,7 +121,7 @@ ACMD(do_oasis_qedit)
/** Give the descriptor an OLC structure. **/ /** Give the descriptor an OLC structure. **/
/****************************************************************************/ /****************************************************************************/
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, ADMLVL_IMMORT, TRUE,
"SYSERR: do_oasis_quest: Player already had olc structure."); "SYSERR: do_oasis_quest: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -155,7 +155,7 @@ ACMD(do_oasis_qedit)
if (save) { if (save) {
send_to_char(ch, "Saving all quests in zone %d.\r\n", send_to_char(ch, "Saving all quests in zone %d.\r\n",
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves quest info for zone %d.", "OLC: %s saves quest info for zone %d.",
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number); GET_NAME(ch), zone_table[OLC_ZNUM(d)].number);
@ -184,7 +184,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, ADMLVL_IMMORT, 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));
} }
@ -205,7 +205,7 @@ static void qedit_setup_new(struct descriptor_data *d)
quest->value[0] = 0; /* Points for completing */ quest->value[0] = 0; /* Points for completing */
quest->value[1] = 0; /* Points for abandoning */ quest->value[1] = 0; /* Points for abandoning */
quest->value[2] = 0; /* Minimum level */ quest->value[2] = 0; /* Minimum level */
quest->value[3] = LVL_IMPL; /* Maximim level */ quest->value[3] = CONFIG_MAX_LEVEL;/*Maximim level */
quest->value[4] = -1; /* Time limit */ quest->value[4] = -1; /* Time limit */
quest->value[5] = NOBODY; /* Mob to return object */ quest->value[5] = NOBODY; /* Mob to return object */
quest->value[6] = 1; /* Quantity of targets */ quest->value[6] = 1; /* Quantity of targets */
@ -385,7 +385,7 @@ void qedit_parse(struct descriptor_data *d, char *arg)
case 'Y': case 'Y':
send_to_char(d->character, "Saving Quest to memory.\r\n"); send_to_char(d->character, "Saving Quest to memory.\r\n");
qedit_save_internally(d); qedit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE,
"OLC: %s edits quest %d", GET_NAME(d->character), OLC_NUM(d)); "OLC: %s edits quest %d", GET_NAME(d->character), OLC_NUM(d));
if (CONFIG_OLC_SAVE) { if (CONFIG_OLC_SAVE) {
qedit_save_to_disk(real_zone_by_thing(OLC_NUM(d))); qedit_save_to_disk(real_zone_by_thing(OLC_NUM(d)));
@ -645,8 +645,8 @@ void qedit_parse(struct descriptor_data *d, char *arg)
OLC_QUEST(d)->prereq = number; OLC_QUEST(d)->prereq = number;
break; break;
case QEDIT_LEVELMIN: case QEDIT_LEVELMIN:
if (number < 0 || number > LVL_IMPL) { if (number < 0 || number > CONFIG_MAX_LEVEL) {
write_to_output(d, "Level must be between 0 and %d!\r\n", LVL_IMPL); write_to_output(d, "Level must be between 0 and %d!\r\n", CONFIG_MAX_LEVEL);
write_to_output(d, "Enter minimum level to accept the quest : " ); write_to_output(d, "Enter minimum level to accept the quest : " );
return; return;
} else if (number > OLC_QUEST(d)->value[3]) { } else if (number > OLC_QUEST(d)->value[3]) {
@ -658,8 +658,8 @@ void qedit_parse(struct descriptor_data *d, char *arg)
break; break;
} }
case QEDIT_LEVELMAX: case QEDIT_LEVELMAX:
if (number < 0 || number > LVL_IMPL) { if (number < 0 || number > CONFIG_MAX_LEVEL) {
write_to_output(d, "Level must be between 0 and %d!\r\n", LVL_IMPL); write_to_output(d, "Level must be between 0 and %d!\r\n", CONFIG_MAX_LEVEL);
write_to_output(d, "Enter maximum level to accept the quest : " ); write_to_output(d, "Enter maximum level to accept the quest : " );
return; return;
} else if (number < OLC_QUEST(d)->value[2]) { } else if (number < OLC_QUEST(d)->value[2]) {
@ -719,7 +719,7 @@ void qedit_parse(struct descriptor_data *d, char *arg)
default: default:
/*. We should never get here . */ /*. We should never get here . */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: qedit_parse(): " mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: qedit_parse(): "
"Reached default case!"); "Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;

View file

@ -658,7 +658,7 @@ void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
char buf[MAX_STRING_LENGTH]; char buf[MAX_STRING_LENGTH];
char targetname[MAX_STRING_LENGTH]; char targetname[MAX_STRING_LENGTH];
if (GET_LEVEL(ch) < LVL_IMMORT) if (!ADM_FLAGGED(ch, ADM_BUILD))
send_to_char(ch, "Huh!?!\r\n"); send_to_char(ch, "Huh!?!\r\n");
else if (!*argument) else if (!*argument)
send_to_char(ch, "%s\r\n", quest_imm_usage); send_to_char(ch, "%s\r\n", quest_imm_usage);
@ -710,9 +710,7 @@ void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
(qmrnum == NOBODY) ? "(Invalid vnum)" : GET_NAME(&mob_proto[(qmrnum)]), (qmrnum == NOBODY) ? "(Invalid vnum)" : GET_NAME(&mob_proto[(qmrnum)]),
QST_NAME(rnum), QST_DESC(rnum), QST_NAME(rnum), QST_DESC(rnum),
QST_INFO(rnum), QST_DONE(rnum), QST_INFO(rnum), QST_DONE(rnum),
(QST_QUIT(rnum) && (QST_QUIT(rnum) && (str_cmp(QST_QUIT(rnum), "undefined") != 0) ? QST_QUIT(rnum) : "Nothing\r\n"),
(str_cmp(QST_QUIT(rnum), "undefined") != 0)
? QST_QUIT(rnum) : "Nothing\r\n"),
quest_types[QST_TYPE(rnum)], quest_types[QST_TYPE(rnum)],
QST_TARGET(rnum) == NOBODY ? -1 : QST_TARGET(rnum), QST_TARGET(rnum) == NOBODY ? -1 : QST_TARGET(rnum),
targetname, targetname,
@ -762,11 +760,11 @@ ACMD(do_quest)
two_arguments(argument, arg1, arg2); two_arguments(argument, arg1, arg2);
if (!*arg1) if (!*arg1)
send_to_char(ch, "%s\r\n", GET_LEVEL(ch) < LVL_IMMORT ? send_to_char(ch, "%s\r\n", IS_ADMIN(ch, ADMLVL_IMMORT) ?
quest_mort_usage : quest_imm_usage); quest_imm_usage : quest_mort_usage);
else if (((tp = search_block(arg1, quest_cmd, FALSE)) == -1)) else if (((tp = search_block(arg1, quest_cmd, FALSE)) == -1))
send_to_char(ch, "%s\r\n", GET_LEVEL(ch) < LVL_IMMORT ? send_to_char(ch, "%s\r\n", IS_ADMIN(ch, ADMLVL_IMMORT) ?
quest_mort_usage : quest_imm_usage); quest_imm_usage : quest_mort_usage);
else { else {
switch (tp) { switch (tp) {
case SCMD_QUEST_LIST: case SCMD_QUEST_LIST:
@ -784,14 +782,14 @@ ACMD(do_quest)
quest_progress(ch); quest_progress(ch);
break; break;
case SCMD_QUEST_STATUS: case SCMD_QUEST_STATUS:
if (GET_LEVEL(ch) < LVL_IMMORT) if (!IS_ADMIN(ch, ADMLVL_IMMORT))
send_to_char(ch, "%s\r\n", quest_mort_usage); send_to_char(ch, "%s\r\n", quest_mort_usage);
else else
quest_stat(ch, arg2); quest_stat(ch, arg2);
break; break;
default: /* Whe should never get here, but... */ default: /* Whe should never get here, but... */
send_to_char(ch, "%s\r\n", GET_LEVEL(ch) < LVL_IMMORT ? send_to_char(ch, "%s\r\n", IS_ADMIN(ch, ADMLVL_IMMORT) ?
quest_mort_usage : quest_imm_usage); quest_imm_usage : quest_mort_usage);
break; break;
} /* switch on subcmd number */ } /* switch on subcmd number */
} }

View file

@ -94,7 +94,7 @@ ACMD(do_oasis_redit)
/* Give the descriptor an OLC structure. */ /* Give the descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_redit: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis_redit: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -121,7 +121,7 @@ ACMD(do_oasis_redit)
if (save) { if (save) {
send_to_char(ch, "Saving all rooms in zone %d.\r\n", zone_table[OLC_ZNUM(d)].number); send_to_char(ch, "Saving all rooms in zone %d.\r\n", zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves room info for zone %d.", GET_NAME(ch), zone_table[OLC_ZNUM(d)].number); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves room info for zone %d.", GET_NAME(ch), zone_table[OLC_ZNUM(d)].number);
/* Save the rooms. */ /* Save the rooms. */
save_rooms(OLC_ZNUM(d)); save_rooms(OLC_ZNUM(d));
@ -144,7 +144,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, ADMLVL_IMMORT, 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));
} }
@ -476,7 +476,7 @@ void redit_parse(struct descriptor_data *d, char *arg)
case 'y': case 'y':
case 'Y': case 'Y':
redit_save_internally(d); redit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits room %d.", GET_NAME(d->character), OLC_NUM(d)); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits room %d.", GET_NAME(d->character), OLC_NUM(d));
if (CONFIG_OLC_SAVE) { if (CONFIG_OLC_SAVE) {
redit_save_to_disk(real_zone_by_thing(OLC_NUM(d))); redit_save_to_disk(real_zone_by_thing(OLC_NUM(d)));
write_to_output(d, "Room saved to disk.\r\n"); write_to_output(d, "Room saved to disk.\r\n");
@ -605,7 +605,7 @@ void redit_parse(struct descriptor_data *d, char *arg)
case REDIT_DESC: case REDIT_DESC:
/* We will NEVER get here, we hope. */ /* We will NEVER get here, we hope. */
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached REDIT_DESC case in parse_redit()."); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Reached REDIT_DESC case in parse_redit().");
write_to_output(d, "Oops, in REDIT_DESC.\r\n"); write_to_output(d, "Oops, in REDIT_DESC.\r\n");
break; break;
@ -693,7 +693,7 @@ void redit_parse(struct descriptor_data *d, char *arg)
case REDIT_EXIT_DESCRIPTION: case REDIT_EXIT_DESCRIPTION:
/* We should NEVER get here, hopefully. */ /* We should NEVER get here, hopefully. */
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached REDIT_EXIT_DESC case in parse_redit"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Reached REDIT_EXIT_DESC case in parse_redit");
write_to_output(d, "Oops, in REDIT_EXIT_DESCRIPTION.\r\n"); write_to_output(d, "Oops, in REDIT_EXIT_DESCRIPTION.\r\n");
break; break;
@ -816,7 +816,7 @@ void redit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here. */ /* We should never get here. */
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: Reached default case in parse_redit"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: Reached default case in parse_redit");
break; break;
} }
/* If we get this far, something has been changed. */ /* If we get this far, something has been changed. */

View file

@ -109,7 +109,7 @@ ACMD(do_oasis_sedit)
/* Give the descriptor an OLC structure. */ /* Give the descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, mudlog(BRF, ADMLVL_IMMORT, TRUE,
"SYSERR: do_oasis_sedit: Player already had olc structure."); "SYSERR: do_oasis_sedit: Player already had olc structure.");
free(d->olc); free(d->olc);
} }
@ -137,7 +137,7 @@ ACMD(do_oasis_sedit)
if (save) { if (save) {
send_to_char(ch, "Saving all shops in zone %d.\r\n", send_to_char(ch, "Saving all shops in zone %d.\r\n",
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves shop info for zone %d.", "OLC: %s saves shop info for zone %d.",
GET_NAME(ch), zone_table[OLC_ZNUM(d)].number); GET_NAME(ch), zone_table[OLC_ZNUM(d)].number);
@ -163,7 +163,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, ADMLVL_IMMORT, 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));
} }
@ -445,7 +445,7 @@ void sedit_parse(struct descriptor_data *d, char *arg)
case 'y': case 'y':
case 'Y': case 'Y':
sedit_save_internally(d); sedit_save_internally(d);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE,
"OLC: %s edits shop %d", GET_NAME(d->character), "OLC: %s edits shop %d", GET_NAME(d->character),
OLC_NUM(d)); OLC_NUM(d));
if (CONFIG_OLC_SAVE) { if (CONFIG_OLC_SAVE) {
@ -772,7 +772,7 @@ void sedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here. */ /* We should never get here. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: sedit_parse(): Reached default case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: sedit_parse(): Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }

View file

@ -513,7 +513,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
return; return;
} }
} else { /*has the player got enough gold? */ } else { /*has the player got enough gold? */
if (buy_price(obj, shop_nr, keeper, ch) > GET_GOLD(ch) && !IS_GOD(ch)) { if (buy_price(obj, shop_nr, keeper, ch) > GET_GOLD(ch) && !ADM_FLAGGED(ch, ADM_MONEY)) {
char actbuf[MAX_INPUT_LENGTH]; char actbuf[MAX_INPUT_LENGTH];
snprintf(actbuf, sizeof(actbuf), shop_index[shop_nr].missing_cash2, GET_NAME(ch)); snprintf(actbuf, sizeof(actbuf), shop_index[shop_nr].missing_cash2, GET_NAME(ch));
@ -565,7 +565,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
break; break;
} }
} else { } else {
while (obj && (GET_GOLD(ch) >= buy_price(obj, shop_nr, keeper, ch) || IS_GOD(ch)) while (obj && (GET_GOLD(ch) >= buy_price(obj, shop_nr, keeper, ch) || ADM_FLAGGED(ch, ADM_MONEY))
&& IS_CARRYING_N(ch) < CAN_CARRY_N(ch) && bought < buynum && IS_CARRYING_N(ch) < CAN_CARRY_N(ch) && bought < buynum
&& IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj) <= CAN_CARRY_W(ch)) { && IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj) <= CAN_CARRY_W(ch)) {
int charged; int charged;
@ -582,7 +582,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
charged = buy_price(obj, shop_nr, keeper, ch); charged = buy_price(obj, shop_nr, keeper, ch);
goldamt += charged; goldamt += charged;
if (!IS_GOD(ch)) if (!ADM_FLAGGED(ch, ADM_MONEY))
GET_GOLD(ch) -= charged; GET_GOLD(ch) -= charged;
last_obj = obj; last_obj = obj;

View file

@ -59,7 +59,7 @@ struct shop_data {
#define MAX_SHOP_OBJ 100 /* "Soft" maximum for list maximums */ #define MAX_SHOP_OBJ 100 /* "Soft" maximum for list maximums */
/* Pretty general macros that could be used elsewhere */ /* Pretty general macros that could be used elsewhere */
#define IS_GOD(ch) (!IS_NPC(ch) && (GET_LEVEL(ch) >= LVL_GOD)) #define IS_GOD(ch) (IS_ADMIN(ch, ADMLVL_GOD))
#define END_OF(buffer) ((buffer) + strlen((buffer))) #define END_OF(buffer) ((buffer) + strlen((buffer)))
/* Possible states for objects trying to be sold */ /* Possible states for objects trying to be sold */

View file

@ -299,7 +299,7 @@ static void npc_steal(struct char_data *ch, struct char_data *victim)
if (IS_NPC(victim)) if (IS_NPC(victim))
return; return;
if (GET_LEVEL(victim) >= LVL_IMMORT) if (ADM_FLAGGED(victim, ADM_NOSTEAL))
return; return;
if (!CAN_SEE(ch, victim)) if (!CAN_SEE(ch, victim))
return; return;
@ -340,7 +340,7 @@ SPECIAL(thief)
return (FALSE); return (FALSE);
for (cons = world[IN_ROOM(ch)].people; cons; cons = cons->next_in_room) for (cons = world[IN_ROOM(ch)].people; cons; cons = cons->next_in_room)
if (!IS_NPC(cons) && GET_LEVEL(cons) < LVL_IMMORT && !rand_number(0, 4)) { if (!ADM_FLAGGED(cons, ADM_NOSTEAL) && !rand_number(0, 4)) {
npc_steal(ch, cons); npc_steal(ch, cons);
return (TRUE); return (TRUE);
} }
@ -429,7 +429,7 @@ SPECIAL(guild_guard)
if (!IS_MOVE(cmd) || AFF_FLAGGED(guard, AFF_BLIND)) if (!IS_MOVE(cmd) || AFF_FLAGGED(guard, AFF_BLIND))
return (FALSE); return (FALSE);
if (GET_LEVEL(ch) >= LVL_IMMORT) if (ADM_FLAGGED(ch, ADM_WALKANYWHERE))
return (FALSE); return (FALSE);
/* find out what direction they are trying to go */ /* find out what direction they are trying to go */
@ -542,12 +542,14 @@ SPECIAL(cityguard)
continue; continue;
if (!IS_NPC(tch) && PLR_FLAGGED(tch, PLR_KILLER)) { if (!IS_NPC(tch) && PLR_FLAGGED(tch, PLR_KILLER)) {
act("$n screams 'HEY!!! You're one of those PLAYER KILLERS!!!!!!'", FALSE, ch, 0, 0, TO_ROOM); act("$n screams 'HEY!!! You're one of those PLAYER KILLERS!!!!!!'", FALSE, ch, 0, 0, TO_ROOM);
if (!ADM_FLAGGED(tch, ADM_NODAMAGE))
hit(ch, tch, TYPE_UNDEFINED); hit(ch, tch, TYPE_UNDEFINED);
return (TRUE); return (TRUE);
} }
if (!IS_NPC(tch) && PLR_FLAGGED(tch, PLR_THIEF)) { if (!IS_NPC(tch) && PLR_FLAGGED(tch, PLR_THIEF)) {
act("$n screams 'HEY!!! You're one of those PLAYER THIEVES!!!!!!'", FALSE, ch, 0, 0, TO_ROOM); act("$n screams 'HEY!!! You're one of those PLAYER THIEVES!!!!!!'", FALSE, ch, 0, 0, TO_ROOM);
if (!ADM_FLAGGED(tch, ADM_NODAMAGE))
hit(ch, tch, TYPE_UNDEFINED); hit(ch, tch, TYPE_UNDEFINED);
return (TRUE); return (TRUE);
} }

View file

@ -604,7 +604,7 @@ ACMD(do_cast)
return; return;
} }
mana = mag_manacost(ch, spellnum); mana = mag_manacost(ch, spellnum);
if ((mana > 0) && (GET_MANA(ch) < mana) && (GET_LEVEL(ch) < LVL_IMMORT)) { if ((mana > 0) && (GET_MANA(ch) < mana) && (!IS_ADMIN(ch, ADMLVL_IMMORT))) {
send_to_char(ch, "You haven't the energy to cast that spell!\r\n"); send_to_char(ch, "You haven't the energy to cast that spell!\r\n");
return; return;
} }
@ -642,9 +642,9 @@ void spell_level(int spell, int chclass, int level)
bad = 1; bad = 1;
} }
if (level < 1 || level > LVL_IMPL) { if (level < 1 || level > CONFIG_MAX_LEVEL) {
log("SYSERR: assigning '%s' to illegal level %d/%d.", skill_name(spell), log("SYSERR: assigning '%s' to illegal level %d/%d.", skill_name(spell),
level, LVL_IMPL); level, CONFIG_MAX_LEVEL);
bad = 1; bad = 1;
} }
@ -660,7 +660,7 @@ static void spello(int spl, const char *name, int max_mana, int min_mana,
int i; int i;
for (i = 0; i < NUM_CLASSES; i++) for (i = 0; i < NUM_CLASSES; i++)
spell_info[spl].min_level[i] = LVL_IMMORT; spell_info[spl].min_level[i] = (CONFIG_MAX_LEVEL + 1);
spell_info[spl].mana_max = max_mana; spell_info[spl].mana_max = max_mana;
spell_info[spl].mana_min = min_mana; spell_info[spl].mana_min = min_mana;
spell_info[spl].mana_change = mana_change; spell_info[spl].mana_change = mana_change;
@ -677,7 +677,7 @@ void unused_spell(int spl)
int i; int i;
for (i = 0; i < NUM_CLASSES; i++) for (i = 0; i < NUM_CLASSES; i++)
spell_info[spl].min_level[i] = LVL_IMPL + 1; spell_info[spl].min_level[i] = (CONFIG_MAX_LEVEL + 1);
spell_info[spl].mana_max = 0; spell_info[spl].mana_max = 0;
spell_info[spl].mana_min = 0; spell_info[spl].mana_min = 0;
spell_info[spl].mana_change = 0; spell_info[spl].mana_change = 0;

View file

@ -109,7 +109,7 @@ ASPELL(spell_summon)
if (ch == NULL || victim == NULL) if (ch == NULL || victim == NULL)
return; return;
if (GET_LEVEL(victim) > MIN(LVL_IMMORT - 1, level + 3)) { if (GET_LEVEL(victim) > MIN(CONFIG_MAX_LEVEL, level + 3)) {
send_to_char(ch, "%s", SUMMON_FAIL); send_to_char(ch, "%s", SUMMON_FAIL);
return; return;
} }
@ -137,7 +137,7 @@ ASPELL(spell_summon)
(ch->player.sex == SEX_MALE) ? "He" : "She"); (ch->player.sex == SEX_MALE) ? "He" : "She");
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, ADMLVL_IMMORT, TRUE, "%s failed summoning %s to %s.", GET_NAME(ch), GET_NAME(victim), world[IN_ROOM(ch)].name);
return; return;
} }
} }

View file

@ -106,6 +106,7 @@
#define EX_CLOSED (1 << 1) /**< The door is closed */ #define EX_CLOSED (1 << 1) /**< The door is closed */
#define EX_LOCKED (1 << 2) /**< The door is locked */ #define EX_LOCKED (1 << 2) /**< The door is locked */
#define EX_PICKPROOF (1 << 3) /**< Lock can't be picked */ #define EX_PICKPROOF (1 << 3) /**< Lock can't be picked */
#define EX_HIDDEN (1 << 4) /**< Exit is hidden */
/* Sector types: used in room_data.sector_type */ /* Sector types: used in room_data.sector_type */
#define SECT_INSIDE 0 /**< Indoors, connected to SECT macro. */ #define SECT_INSIDE 0 /**< Indoors, connected to SECT macro. */
@ -256,8 +257,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_MORTAL 34 /**< Mortal flag turns off all imm powers */
/** 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") */
@ -287,6 +289,38 @@
/** Total number of affect flags not including the don't use flag. */ /** Total number of affect flags not including the don't use flag. */
#define NUM_AFF_FLAGS 22 #define NUM_AFF_FLAGS 22
/*
* ADM flags - define admin privs for chars. Comments show default admin level.
*/
#define ADM_NONE -1 /* Special case used in command list MORTAL */
#define ADM_TELLALL 0 /* Can use 'tell all' to broadcast GOD */
#define ADM_SEEINV 1 /* Sees other chars inventory IMM */
#define ADM_SEESECRET 2 /* Sees secret objects, mobs and doors IMM */
#define ADM_KNOWWEATHER 3 /* Knows details of weather GOD */
#define ADM_FULLWHERE 4 /* Full output of 'where' command IMM */
#define ADM_MONEY 5 /* Char has a bottomless wallet GOD */
#define ADM_EATANYTHING 6 /* Char can eat anything GOD */
#define ADM_NOPOISON 7 /* Char can't be poisoned IMM */
#define ADM_WALKANYWHERE 8 /* Char has unrestricted walking IMM */
#define ADM_NOKEYS 9 /* Char needs no keys for locks GOD */
#define ADM_INSTANTKILL 10 /* "kill" command is instant IMPL */
#define ADM_NOSTEAL 11 /* Char cannot be stolen from IMM */
#define ADM_TRANSALL 12 /* Can use 'trans all' GRGOD */
#define ADM_SWITCHMORTAL 13 /* Can 'switch' to a PC's linkless body IMPL */
#define ADM_FORCEMASS 14 /* Can force rooms or all GRGOD */
#define ADM_ALLHOUSES 15 /* Can enter any house GRGOD */
#define ADM_NODAMAGE 16 /* Cannot be damaged IMM */
#define ADM_ALLSHOPS 17 /* Can use all shops GOD */
#define ADM_CEDIT 18 /* Can use cedit IMPL */
#define ADM_BUILD 19 /* Can use basic building tools BUILDER */
#define ADM_ADVBUILD 20 /* Can use advanced building tools BUILDER */
#define ADM_POOF 21 /* Can use goto and set poof messages IMM */
#define ADM_ADMIN 22 /* Can use the admin command to set privs IMPL */
#define ADM_SETQP 23 /* Can 'set' a player's questpoints GRGOD */
#define ADM_ADVIBT 24 /* Advanced IBT (ideas, bugs, typos) control GRGOD */
#define NUM_ADMFLAGS 25
/* Modes of connectedness: used by descriptor_data.state */ /* Modes of connectedness: used by descriptor_data.state */
#define CON_PLAYING 0 /**< Playing - Nominal state */ #define CON_PLAYING 0 /**< Playing - Nominal state */
#define CON_CLOSE 1 /**< User disconnect, remove character. */ #define CON_CLOSE 1 /**< User disconnect, remove character. */
@ -512,6 +546,7 @@
#define TW_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Wear Locations */ #define TW_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Wear Locations */
#define EF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Extra Flags */ #define EF_ARRAY_MAX 4 /**< # Bytes in Bit vector - Obj Extra Flags */
#define ZN_ARRAY_MAX 4 /**< # Bytes in Bit vector - Zone Flags */ #define ZN_ARRAY_MAX 4 /**< # Bytes in Bit vector - Zone Flags */
#define AD_ARRAY_MAX 4 /**< # Bytes in Bit vector - Admin Priv Flags */
/* other #defined constants */ /* other #defined constants */
/* **DO**NOT** blindly change the number of levels in your MUD merely by /* **DO**NOT** blindly change the number of levels in your MUD merely by
@ -519,15 +554,16 @@
* Other changes throughout the code are required. See coding.doc for details. * Other changes throughout the code are required. See coding.doc for details.
* *
* LVL_IMPL should always be the HIGHEST possible immortal level, and * LVL_IMPL should always be the HIGHEST possible immortal level, and
* LVL_IMMORT should always be the LOWEST immortal level. The number of * LVL_IMMORT should always be the LOWEST immortal level. The only
* mortal levels will always be LVL_IMMORT - 1. */ * mortal level will always be zero, or LVL_IMMORT - 1. */
#define LVL_IMPL 34 /**< Level of Implementors */ #define ADMLVL_IMPL 4 /**< Level of Implementors */
#define LVL_GRGOD 33 /**< Level of Greater Gods */ #define ADMLVL_GRGOD 3 /**< Level of Greater Gods */
#define LVL_GOD 32 /**< Level of Gods */ #define ADMLVL_GOD 2 /**< Level of Gods */
#define LVL_IMMORT 31 /**< Level of Immortals */ #define ADMLVL_IMMORT 1 /**< Level of Immortals */
#define ADMLVL_MORTAL 0 /**< Level of Mortals */
/** Minimum level to build and to run the saveall command */ /** Minimum level to build and to run the saveall command */
#define LVL_BUILDER LVL_IMMORT #define ADMLVL_BUILDER ADMLVL_IMMORT
/** Arbitrary number that won't be in a string */ /** Arbitrary number that won't be in a string */
#define MAGIC_NUMBER (0x06) #define MAGIC_NUMBER (0x06)
@ -841,7 +877,7 @@ struct char_player_data
char *title; /**< PC / NPC title */ char *title; /**< PC / NPC title */
byte sex; /**< PC / NPC sex */ byte sex; /**< PC / NPC sex */
byte chclass; /**< PC / NPC class */ byte chclass; /**< PC / NPC class */
byte level; /**< PC / NPC level */ ubyte level; /**< PC / NPC level */
struct time_data time; /**< PC AGE in days */ struct time_data time; /**< PC AGE in days */
ubyte weight; /**< PC / NPC weight */ ubyte weight; /**< PC / NPC weight */
ubyte height; /**< PC / NPC height */ ubyte height; /**< PC / NPC height */
@ -916,6 +952,8 @@ struct char_special_data
/** Data only needed by PCs, and needs to be saved to disk. */ /** Data only needed by PCs, and needs to be saved to disk. */
struct player_special_data_saved struct player_special_data_saved
{ {
byte adm_level; /**< PC Admin level */
int admflags[AD_ARRAY_MAX]; /**< Admin Priv flags */
byte skills[MAX_SKILLS+1]; /**< Character skills. */ byte skills[MAX_SKILLS+1]; /**< Character skills. */
int wimp_level; /**< Below this # of hit points, flee! */ int wimp_level; /**< Below this # of hit points, flee! */
byte freeze_level; /**< Level of god who froze char, if any */ byte freeze_level; /**< Level of god who froze char, if any */
@ -1267,6 +1305,7 @@ struct game_data
int max_exp_loss; /**< Maximum experience losable per death.*/ int max_exp_loss; /**< Maximum experience losable per death.*/
int max_npc_corpse_time; /**< Num tics before NPC corpses decompose*/ int max_npc_corpse_time; /**< Num tics before NPC corpses decompose*/
int max_pc_corpse_time; /**< Num tics before PC corpse decomposes.*/ int max_pc_corpse_time; /**< Num tics before PC corpse decomposes.*/
int max_mortal_level; /**< Maximum level that a mortal can obtain.*/
int idle_void; /**< Num tics before PC sent to void(idle)*/ int idle_void; /**< Num tics before PC sent to void(idle)*/
int idle_rent_time; /**< Num tics before PC is autorented. */ int idle_rent_time; /**< Num tics before PC is autorented. */
int idle_max_level; /**< Level of players immune to idle. */ int idle_max_level; /**< Level of players immune to idle. */

View file

@ -31,14 +31,14 @@ void tedit_string_cleanup(struct descriptor_data *d, int terminator)
switch (terminator) { switch (terminator) {
case STRINGADD_SAVE: case STRINGADD_SAVE:
if (!(fl = fopen(storage, "w"))) if (!(fl = fopen(storage, "w")))
mudlog(CMP, LVL_IMPL, TRUE, "SYSERR: Can't write file '%s'.", storage); mudlog(CMP, ADMLVL_IMPL, TRUE, "SYSERR: Can't write file '%s'.", storage);
else { else {
if (*d->str) { if (*d->str) {
strip_cr(*d->str); strip_cr(*d->str);
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, ADMLVL_GOD, 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);
@ -74,20 +74,20 @@ ACMD(do_tedit)
char *filename; char *filename;
} fields[] = { } fields[] = {
/* edit the lvls to your own needs */ /* edit the lvls to your own needs */
{ "credits", LVL_IMPL, &credits, 2400, CREDITS_FILE}, { "credits", ADMLVL_IMPL, &credits, 2400, CREDITS_FILE},
{ "news", LVL_GRGOD, &news, 8192, NEWS_FILE}, { "news", ADMLVL_GRGOD, &news, 8192, NEWS_FILE},
{ "motd", LVL_GRGOD, &motd, 2400, MOTD_FILE}, { "motd", ADMLVL_GRGOD, &motd, 2400, MOTD_FILE},
{ "imotd", LVL_IMPL, &imotd, 2400, IMOTD_FILE}, { "imotd", ADMLVL_IMPL, &imotd, 2400, IMOTD_FILE},
{ "greetings", LVL_IMPL, &GREETINGS, 2400, GREETINGS_FILE}, { "greetings", ADMLVL_IMPL, &GREETINGS, 2400, GREETINGS_FILE},
{ "help", LVL_GRGOD, &help, 2400, HELP_PAGE_FILE}, { "help", ADMLVL_GRGOD, &help, 2400, HELP_PAGE_FILE},
{ "ihelp", LVL_GRGOD, &ihelp, 2400, IHELP_PAGE_FILE}, { "ihelp", ADMLVL_GRGOD, &ihelp, 2400, IHELP_PAGE_FILE},
{ "info", LVL_GRGOD, &info, 8192, INFO_FILE}, { "info", ADMLVL_GRGOD, &info, 8192, INFO_FILE},
{ "background", LVL_IMPL, &background, 8192, BACKGROUND_FILE}, { "background", ADMLVL_IMPL, &background, 8192, BACKGROUND_FILE},
{ "handbook", LVL_IMPL, &handbook, 8192, HANDBOOK_FILE}, { "handbook", ADMLVL_IMPL, &handbook, 8192, HANDBOOK_FILE},
{ "policies", LVL_IMPL, &policies, 8192, POLICIES_FILE}, { "policies", ADMLVL_IMPL, &policies, 8192, POLICIES_FILE},
{ "wizlist", LVL_IMPL, &wizlist, 2400, WIZLIST_FILE}, { "wizlist", ADMLVL_IMPL, &wizlist, 2400, WIZLIST_FILE},
{ "immlist", LVL_GRGOD, &immlist, 2400, IMMLIST_FILE}, { "immlist", ADMLVL_GRGOD, &immlist, 2400, IMMLIST_FILE},
{ "\n", 0, NULL, 0, NULL } { "\n", ADMLVL_MORTAL, NULL, 0, NULL }
}; };
if (ch->desc == NULL) if (ch->desc == NULL)
@ -98,7 +98,7 @@ ACMD(do_tedit)
if (!*field) { if (!*field) {
send_to_char(ch, "Files available to be edited:\r\n"); send_to_char(ch, "Files available to be edited:\r\n");
for (l = 0; *fields[l].cmd != '\n'; l++) { for (l = 0; *fields[l].cmd != '\n'; l++) {
if (GET_LEVEL(ch) >= fields[l].level) { if (GET_ADMLEVEL(ch) >= fields[l].level) {
send_to_char(ch, "%-11.11s ", fields[l].cmd); send_to_char(ch, "%-11.11s ", fields[l].cmd);
if (!(++i % 7)) if (!(++i % 7))
send_to_char(ch, "\r\n"); send_to_char(ch, "\r\n");
@ -119,7 +119,7 @@ ACMD(do_tedit)
return; return;
} }
if (GET_LEVEL(ch) < fields[l].level) { if (GET_ADMLEVEL(ch) < fields[l].level) {
send_to_char(ch, "You are not godly enough for that!\r\n"); send_to_char(ch, "You are not godly enough for that!\r\n");
return; return;
} }
@ -130,7 +130,7 @@ ACMD(do_tedit)
send_to_char(ch, "Edit file below:\r\n\r\n"); send_to_char(ch, "Edit file below:\r\n\r\n");
if (ch->desc->olc) { if (ch->desc->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_tedit: Player already had olc structure."); mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_tedit: Player already had olc structure.");
free(ch->desc->olc); free(ch->desc->olc);
} }
CREATE(ch->desc->olc, struct oasis_olc_data, 1); CREATE(ch->desc->olc, struct oasis_olc_data, 1);

View file

@ -16,10 +16,10 @@
#define IMM_LMARG " " #define IMM_LMARG " "
#define IMM_NSIZE 16 #define IMM_NSIZE 16
#define LINE_LEN 64 #define LINE_LEN 64
#define MIN_LEVEL LVL_IMMORT #define MIN_LEVEL ADMLVL_IMMORT
/* max level that should be in columns instead of centered */ /* max level that should be in columns instead of centered */
#define COL_LEVEL LVL_IMMORT #define COL_LEVEL ADMLVL_IMMORT
struct name_rec { struct name_rec {
char name[25]; char name[25];
@ -39,10 +39,10 @@ struct level_rec {
struct control_rec level_params[] = struct control_rec level_params[] =
{ {
{LVL_IMMORT, "Immortals"}, {ADMLVL_IMMORT, "Immortals"},
{LVL_GOD, "Gods"}, {ADMLVL_GOD , "Gods"},
{LVL_GRGOD, "Greater Gods"}, {ADMLVL_GRGOD , "Greater Gods"},
{LVL_IMPL, "Implementors"}, {ADMLVL_IMPL , "Implementors"},
{0, ""} {0, ""}
}; };
@ -70,7 +70,7 @@ void read_file(void)
bitvector_t asciiflag_conv(char *flag); bitvector_t asciiflag_conv(char *flag);
FILE *fl; FILE *fl;
int recs, i, last = 0, level = 0, flags = 0; int recs, i, last = 0, level = 0, flags = 0, admlevel = 0;
char index_name[40], line[256], bits[64]; char index_name[40], line[256], bits[64];
char name[MAX_NAME_LENGTH]; char name[MAX_NAME_LENGTH];
long id = 0; long id = 0;
@ -89,13 +89,14 @@ void read_file(void)
for (i = 0; i < recs; i++) { for (i = 0; i < recs; i++) {
get_line(fl, line); get_line(fl, line);
sscanf(line, "%ld %s %d %s %d", &id, name, &level, bits, &last); sscanf(line, "%ld %s %d %d %s %d", &id, name, &level, &admlevel, bits, &last);
CAP(name); CAP(name);
flags = asciiflag_conv(bits); flags = asciiflag_conv(bits);
if (level >= MIN_LEVEL && if (level >= MIN_LEVEL &&
!(IS_SET(flags, PINDEX_NOWIZLIST)) && !(IS_SET(flags, PINDEX_NOWIZLIST)) &&
!(IS_SET(flags, PINDEX_DELETED))) !(IS_SET(flags, PINDEX_DELETED)) &&
add_name(level, name); !(IS_SET(flags, PINDEX_MORTAL)) )
add_name(admlevel, name);
} }
fclose(fl); fclose(fl);
} }
@ -232,7 +233,7 @@ int main(int argc, char **argv)
sort_names(); sort_names();
fl = fopen(argv[2], "w"); fl = fopen(argv[2], "w");
write_wizlist(fl, wizlevel, LVL_IMPL); write_wizlist(fl, wizlevel, ADMLVL_IMPL);
fclose(fl); fclose(fl);
fl = fopen(argv[4], "w"); fl = fopen(argv[4], "w");

View file

@ -23,6 +23,8 @@
#define MAX_SKILLS 200 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_SKILLS 200 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_AFFECT 32 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_AFFECT 32 /* Used in char_file_u *DO*NOT*CHANGE* */
#define MAX_LEVEL 30 /* Same as CONFIG_MAX_LEVEL */
/* Char's abilities. Used in char_file_u *DO*NOT*CHANGE* */ /* Char's abilities. Used in char_file_u *DO*NOT*CHANGE* */
struct char_ability_data_plrtoascii { struct char_ability_data_plrtoascii {
sbyte str; sbyte str;
@ -210,6 +212,8 @@ void convert(char *filename)
fprintf(outfile, "Clas: %d\n", (int)player.chclass); fprintf(outfile, "Clas: %d\n", (int)player.chclass);
if (player.level != PFDEF_LEVEL) if (player.level != PFDEF_LEVEL)
fprintf(outfile, "Levl: %d\n", (int)player.level); fprintf(outfile, "Levl: %d\n", (int)player.level);
if (player.level > MAX_LEVEL)
fprintf(outfile, "Admn: %d\n", (int)(player.level-MAX_LEVEL));
fprintf(outfile, "Brth: %d\n", (int)player.birth); fprintf(outfile, "Brth: %d\n", (int)player.birth);
fprintf(outfile, "Plyd: %d\n", (int)player.played); fprintf(outfile, "Plyd: %d\n", (int)player.played);
fprintf(outfile, "Last: %d\n", (int)player.last_logon); fprintf(outfile, "Last: %d\n", (int)player.last_logon);
@ -243,7 +247,7 @@ void convert(char *filename)
/* player_special_data_saved */ /* player_special_data_saved */
psds = &(player.player_specials_saved); psds = &(player.player_specials_saved);
if (player.level < LVL_IMMORT) { if (player.level < (ADMLVL_IMMORT+MAX_LEVEL)) {
fprintf(outfile, "Skil:\n"); fprintf(outfile, "Skil:\n");
for (i = 1; i <= MAX_SKILLS; i++) { for (i = 1; i <= MAX_SKILLS; i++) {
if (psds->skills[i]) if (psds->skills[i])
@ -263,13 +267,13 @@ void convert(char *filename)
sprintascii(bits, psds->pref); sprintascii(bits, psds->pref);
fprintf(outfile, "Pref: %s\n", bits); fprintf(outfile, "Pref: %s\n", bits);
} }
if (psds->conditions[HUNGER] && player.level < LVL_IMMORT && if (psds->conditions[HUNGER] && player.level < (ADMLVL_IMMORT+MAX_LEVEL) &&
psds->conditions[HUNGER] != PFDEF_HUNGER) psds->conditions[HUNGER] != PFDEF_HUNGER)
fprintf(outfile, "Hung: %d\n", (int)psds->conditions[0]); fprintf(outfile, "Hung: %d\n", (int)psds->conditions[0]);
if (psds->conditions[THIRST] && player.level < LVL_IMMORT && if (psds->conditions[THIRST] && player.level < (ADMLVL_IMMORT+MAX_LEVEL) &&
psds->conditions[THIRST] != PFDEF_THIRST) psds->conditions[THIRST] != PFDEF_THIRST)
fprintf(outfile, "Thir: %d\n", (int)psds->conditions[1]); fprintf(outfile, "Thir: %d\n", (int)psds->conditions[1]);
if (psds->conditions[2] && player.level < LVL_IMMORT && if (psds->conditions[2] && player.level < (ADMLVL_IMMORT+MAX_LEVEL) &&
psds->conditions[DRUNK] != PFDEF_DRUNK) psds->conditions[DRUNK] != PFDEF_DRUNK)
fprintf(outfile, "Drnk: %d\n", (int)psds->conditions[2]); fprintf(outfile, "Drnk: %d\n", (int)psds->conditions[2]);
if (psds->spells_to_learn != PFDEF_PRACTICES) if (psds->spells_to_learn != PFDEF_PRACTICES)

View file

@ -22,7 +22,7 @@
#include "handler.h" #include "handler.h"
#include "interpreter.h" #include "interpreter.h"
#include "class.h" #include "class.h"
#include "act.h"
/** Aportable random number function. /** Aportable random number function.
* @param from The lower bounds of the random number. * @param from The lower bounds of the random number.
@ -286,7 +286,7 @@ void mudlog(int type, int level, int file, const char *str, ...)
for (i = descriptor_list; i; i = i->next) { for (i = descriptor_list; i; i = i->next) {
if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */ if (STATE(i) != CON_PLAYING || IS_NPC(i->character)) /* switch */
continue; continue;
if (GET_LEVEL(i->character) < level) if (GET_ADMLEVEL(i->character) < level)
continue; continue;
if (PLR_FLAGGED(i->character, PLR_WRITING)) if (PLR_FLAGGED(i->character, PLR_WRITING))
continue; continue;
@ -1481,3 +1481,38 @@ int get_class_by_name(char *classname)
return (-1); return (-1);
} }
bool set_admin_level(struct char_data *ch, int admlvl)
{
int old_lvl, i;
/* Validate the data */
if (!ch || IS_NPC(ch)) return FALSE;
if ((admlvl < ADMLVL_MORTAL) || (admlvl > ADMLVL_IMPL)) return FALSE;
/* Grab the old level */
old_lvl = GET_ADMLEVEL(ch);
/* Set player data */
ch->player_specials->saved.adm_level = admlvl;
/* Set default privs for the new level */
set_default_admin_privs(ch, FALSE);
/* Set player index */
for (i = 0; i <= top_of_p_table; i++) {
if (player_table[i].id == GET_IDNUM(ch)) {
player_table[i].admlevel = admlvl;
}
}
/* Save all the data */
save_char(ch);
save_player_index();
if (!PLR_FLAGGED(ch, PLR_NOWIZLIST) && old_lvl != admlvl) {
run_autowiz();
}
return TRUE;
}

View file

@ -68,6 +68,7 @@ char *strfrmt(char *str, int w, int h, int justify, int hpad, int vpad);
char *strpaste(char *str1, char *str2, char *joiner); char *strpaste(char *str1, char *str2, char *joiner);
void new_affect(struct affected_type *af); void new_affect(struct affected_type *af);
int get_class_by_name(char *classname); int get_class_by_name(char *classname);
bool set_admin_level(struct char_data *ch, int admlvl);
/* Public functions made available form weather.c */ /* Public functions made available form weather.c */
void weather_and_time(int mode); void weather_and_time(int mode);
@ -362,6 +363,8 @@ do \
#define PRF_FLAGS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.pref)) #define PRF_FLAGS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.pref))
/** Affect flags on the NPC or PC. */ /** Affect flags on the NPC or PC. */
#define AFF_FLAGS(ch) ((ch)->char_specials.saved.affected_by) #define AFF_FLAGS(ch) ((ch)->char_specials.saved.affected_by)
/** Admin Priv flags on a player (not to be used on mobs). */
#define ADM_FLAGS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.admflags))
/** Room flags. /** Room flags.
* @param loc The real room number. */ * @param loc The real room number. */
#define ROOM_FLAGS(loc) (world[(loc)].room_flags) #define ROOM_FLAGS(loc) (world[(loc)].room_flags)
@ -396,6 +399,9 @@ do \
#define AFF_FLAGGED(ch, flag) (IS_SET_AR(AFF_FLAGS(ch), (flag))) #define AFF_FLAGGED(ch, flag) (IS_SET_AR(AFF_FLAGS(ch), (flag)))
/** 1 if flag is set in the preferences bitarray, 0 if not. */ /** 1 if flag is set in the preferences bitarray, 0 if not. */
#define PRF_FLAGGED(ch, flag) (IS_SET_AR(PRF_FLAGS(ch), (flag))) #define PRF_FLAGGED(ch, flag) (IS_SET_AR(PRF_FLAGS(ch), (flag)))
/** 1 if flag is set in the admin privs bitarray, 0 if not. */
#define ADM_FLAGGED(ch, flag) (!IS_NPC(ch) && (!PRF_FLAGGED((ch), PRF_MORTAL)) && \
(IS_SET_AR(ADM_FLAGS(ch), (flag))) )
/** 1 if flag is set in the room of loc, 0 if not. */ /** 1 if flag is set in the room of loc, 0 if not. */
#define ROOM_FLAGGED(loc, flag) (IS_SET_AR(ROOM_FLAGS(loc), (flag))) #define ROOM_FLAGGED(loc, flag) (IS_SET_AR(ROOM_FLAGS(loc), (flag)))
/** 1 if flag is set in the zone of rnum, 0 if not. */ /** 1 if flag is set in the zone of rnum, 0 if not. */
@ -417,6 +423,10 @@ do \
/** IS_AFFECTED for backwards compatibility */ /** IS_AFFECTED for backwards compatibility */
#define IS_AFFECTED(ch, skill) (AFF_FLAGGED((ch), (skill))) #define IS_AFFECTED(ch, skill) (AFF_FLAGGED((ch), (skill)))
/** IS_ADMIN checks admin level and mortal flag */
#define IS_ADMIN(ch, lvl) (!IS_NPC(ch) && (!PRF_FLAGGED((ch), PRF_MORTAL)) && \
(GET_ADMLEVEL(ch) >= (lvl)))
/** Toggle flag in ch PLR_FLAGS' turns on if off, or off if on. */ /** Toggle flag in ch PLR_FLAGS' turns on if off, or off if on. */
#define PLR_TOG_CHK(ch,flag) ((TOGGLE_BIT_AR(PLR_FLAGS(ch), (flag))) & Q_BIT(flag)) #define PLR_TOG_CHK(ch,flag) ((TOGGLE_BIT_AR(PLR_FLAGS(ch), (flag))) & Q_BIT(flag))
/** Toggle flag in ch PRF_FLAGS; turns on if off, or off if on. */ /** Toggle flag in ch PRF_FLAGS; turns on if off, or off if on. */
@ -464,19 +474,27 @@ do \
(ch)->player.short_descr : GET_PC_NAME(ch)) (ch)->player.short_descr : GET_PC_NAME(ch))
/** Title of PC */ /** Title of PC */
#define GET_TITLE(ch) ((ch)->player.title) #define GET_TITLE(ch) ((ch)->player.title)
/** Level of PC or NPC. */ /** Mortal Level of PC or NPC. */
#define GET_LEVEL(ch) ((ch)->player.level) #define GET_LEVEL(ch) ((ch)->player.level)
/** Admin Level of PC. */
#define GET_ADMLEVEL(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.adm_level))
/** Password of PC. */ /** Password of PC. */
#define GET_PASSWD(ch) ((ch)->player.passwd) #define GET_PASSWD(ch) ((ch)->player.passwd)
/** The player file position of PC. */ /** The player file position of PC. */
#define GET_PFILEPOS(ch)((ch)->pfilepos) #define GET_PFILEPOS(ch)((ch)->pfilepos)
/** Gets the level of a player even if the player is switched. /** Gets the mortal level of a player even if the player is switched.
* @todo Make this the definition of GET_LEVEL. */ * @todo Make this the definition of GET_LEVEL. */
#define GET_REAL_LEVEL(ch) \ #define GET_REAL_LEVEL(ch) \
(ch->desc && ch->desc->original ? GET_LEVEL(ch->desc->original) : \ (ch->desc && ch->desc->original ? GET_LEVEL(ch->desc->original) : \
GET_LEVEL(ch)) GET_LEVEL(ch))
/** Gets the admin level of a player even if the player is switched.
* @todo Make this the definition of GET_LEVEL. */
#define GET_REAL_ADMLEVEL(ch) \
(ch->desc && ch->desc->original ? GET_ADMLEVEL(ch->desc->original) : \
(IS_NPC(ch) ? ADMLVL_MORTAL : GET_ADMLEVEL(ch)))
/** Class of ch. */ /** Class of ch. */
#define GET_CLASS(ch) ((ch)->player.chclass) #define GET_CLASS(ch) ((ch)->player.chclass)
/** Height of ch. */ /** Height of ch. */
@ -753,7 +771,7 @@ do \
/** Defines if there is enough light for sub to see in. */ /** Defines if there is enough light for sub to see in. */
#define LIGHT_OK(sub) (!AFF_FLAGGED(sub, AFF_BLIND) && \ #define LIGHT_OK(sub) (!AFF_FLAGGED(sub, AFF_BLIND) && \
(IS_LIGHT(IN_ROOM(sub)) || AFF_FLAGGED((sub), AFF_INFRAVISION) || \ (IS_LIGHT(IN_ROOM(sub)) || AFF_FLAGGED((sub), AFF_INFRAVISION) || \
GET_LEVEL(sub) >= LVL_IMMORT)) IS_ADMIN(sub, ADMLVL_IMMORT)))
/** Defines if sub character can see the invisible obj character. */ /** Defines if sub character can see the invisible obj character. */
#define INVIS_OK(sub, obj) \ #define INVIS_OK(sub, obj) \
@ -774,7 +792,7 @@ do \
/** Can sub character see obj character? */ /** Can sub character see obj character? */
#define CAN_SEE(sub, obj) (SELF(sub, obj) || \ #define CAN_SEE(sub, obj) (SELF(sub, obj) || \
((GET_REAL_LEVEL(sub) >= (IS_NPC(obj) ? 0 : GET_INVIS_LEV(obj))) && \ ((GET_REAL_ADMLEVEL(sub) >= (IS_NPC(obj) ? 0 : GET_INVIS_LEV(obj))) && \
IMM_CAN_SEE(sub, obj))) IMM_CAN_SEE(sub, obj)))
/* End of CAN_SEE */ /* End of CAN_SEE */
@ -806,7 +824,7 @@ do \
CAN_SEE_OBJ((ch),(obj))) CAN_SEE_OBJ((ch),(obj)))
/** If vict can see ch, return ch name, else return "someone". */ /** If vict can see ch, return ch name, else return "someone". */
#define PERS(ch, vict) (CAN_SEE(vict, ch) ? GET_NAME(ch) : (GET_LEVEL(ch) > LVL_IMMORT ? "an immortal" : "someone")) #define PERS(ch, vict) (CAN_SEE(vict, ch) ? GET_NAME(ch) : (GET_ADMLEVEL(ch) > ADMLVL_IMMORT ? "an immortal" : "someone"))
/** If vict can see obj, return obj short description, else return /** If vict can see obj, return obj short description, else return
* "something". */ * "something". */
@ -934,6 +952,8 @@ do \
#define CONFIG_MAX_NPC_CORPSE_TIME config_info.play.max_npc_corpse_time #define CONFIG_MAX_NPC_CORPSE_TIME config_info.play.max_npc_corpse_time
/** How long will pc corpses last before decomposing? */ /** How long will pc corpses last before decomposing? */
#define CONFIG_MAX_PC_CORPSE_TIME config_info.play.max_pc_corpse_time #define CONFIG_MAX_PC_CORPSE_TIME config_info.play.max_pc_corpse_time
/** What is the highest level a mortal can obtain? */
#define CONFIG_MAX_LEVEL config_info.play.max_mortal_level
/** How long can a pc be idled before being pulled into the void? */ /** How long can a pc be idled before being pulled into the void? */
#define CONFIG_IDLE_VOID config_info.play.idle_void #define CONFIG_IDLE_VOID config_info.play.idle_void
/** How long until the idle pc is force rented? */ /** How long until the idle pc is force rented? */

View file

@ -74,7 +74,7 @@ ACMD(do_oasis_zedit)
send_to_char(ch, "Save which zone?\r\n"); send_to_char(ch, "Save which zone?\r\n");
return; return;
} }
} else if (GET_LEVEL(ch) >= LVL_IMPL) { } else if (IS_ADMIN(ch, ADMLVL_IMPL)) {
if (str_cmp("new", buf1) || !stop || !*stop) if (str_cmp("new", buf1) || !stop || !*stop)
send_to_char(ch, "Format: zedit new <zone number> <bottom-room> " send_to_char(ch, "Format: zedit new <zone number> <bottom-room> "
"<upper-room>\r\n"); "<upper-room>\r\n");
@ -122,7 +122,7 @@ ACMD(do_oasis_zedit)
/* Give the builder's descriptor an OLC structure. */ /* Give the builder's descriptor an OLC structure. */
if (d->olc) { if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_zedit: Player already " mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_oasis_zedit: Player already "
"had olc structure."); "had olc structure.");
free(d->olc); free(d->olc);
} }
@ -153,7 +153,7 @@ ACMD(do_oasis_zedit)
if (save) { if (save) {
send_to_char(ch, "Saving all zone information for zone %d.\r\n", send_to_char(ch, "Saving all zone information for zone %d.\r\n",
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE,
"OLC: %s saves zone information for zone %d.", GET_NAME(ch), "OLC: %s saves zone information for zone %d.", GET_NAME(ch),
zone_table[OLC_ZNUM(d)].number); zone_table[OLC_ZNUM(d)].number);
@ -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, ADMLVL_IMMORT, 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));
} }
@ -279,7 +279,7 @@ static void zedit_new_zone(struct char_data *ch, zone_vnum vzone_num, room_vnum
zedit_save_to_disk(result); /* save to disk .. */ zedit_save_to_disk(result); /* save to disk .. */
mudlog(BRF, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s creates new zone #%d", GET_NAME(ch), vzone_num); mudlog(BRF, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s creates new zone #%d", GET_NAME(ch), vzone_num);
write_to_output(ch->desc, "Zone created successfully.\r\n"); write_to_output(ch->desc, "Zone created successfully.\r\n");
} }
@ -601,7 +601,7 @@ static void zedit_disp_arg1(struct descriptor_data *d)
default: default:
/* We should never get here. */ /* We should never get here. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg1(): Help!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg1(): Help!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
return; return;
} }
@ -641,7 +641,7 @@ static void zedit_disp_arg2(struct descriptor_data *d)
default: default:
/* We should never get here, but just in case. */ /* We should never get here, but just in case. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg2(): Help!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg2(): Help!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
return; return;
} }
@ -678,7 +678,7 @@ static void zedit_disp_arg3(struct descriptor_data *d)
default: default:
/* We should never get here, just in case. */ /* We should never get here, just in case. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg3(): Help!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_disp_arg3(): Help!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
return; return;
} }
@ -728,7 +728,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
} else } else
write_to_output(d, "Saving zone info in memory.\r\n"); write_to_output(d, "Saving zone info in memory.\r\n");
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits zone info for room %d.", GET_NAME(d->character), OLC_NUM(d)); mudlog(CMP, MAX(ADMLVL_BUILDER, GET_INVIS_LEV(d->character)), TRUE, "OLC: %s edits zone info for room %d.", GET_NAME(d->character), OLC_NUM(d));
/* FALL THROUGH */ /* FALL THROUGH */
case 'n': case 'n':
case 'N': case 'N':
@ -794,7 +794,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
case 'b': case 'b':
case 'B': case 'B':
/* Edit bottom of zone. */ /* Edit bottom of zone. */
if (GET_LEVEL(d->character) < LVL_IMPL) if (!IS_ADMIN(d->character, ADMLVL_IMPL))
zedit_disp_menu(d); zedit_disp_menu(d);
else { else {
write_to_output(d, "Enter new bottom of zone : "); write_to_output(d, "Enter new bottom of zone : ");
@ -804,7 +804,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
case 't': case 't':
case 'T': case 'T':
/* Edit top of zone. */ /* Edit top of zone. */
if (GET_LEVEL(d->character) < LVL_IMPL) if (!IS_ADMIN(d->character, ADMLVL_IMPL))
zedit_disp_menu(d); zedit_disp_menu(d);
else { else {
write_to_output(d, "Enter new top of zone : "); write_to_output(d, "Enter new top of zone : ");
@ -846,11 +846,11 @@ void zedit_parse(struct descriptor_data *d, char *arg)
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
case ZEDIT_LEVELS: case ZEDIT_LEVELS:
switch (*arg) { switch (*arg) {
case '1': write_to_output(d, "Enter the min level for this zone (0-%d, -1 = none): ", (LVL_IMMORT-1)); case '1': write_to_output(d, "Enter the min level for this zone (0-%d, -1 = none): ", (CONFIG_MAX_LEVEL));
OLC_MODE(d) = ZEDIT_LEV_MIN; OLC_MODE(d) = ZEDIT_LEV_MIN;
break; break;
case '2': write_to_output(d, "Enter the max level for this zone (0-%d, -1 = none): ", (LVL_IMMORT-1)); case '2': write_to_output(d, "Enter the max level for this zone (0-%d, -1 = none): ", (CONFIG_MAX_LEVEL));
OLC_MODE(d) = ZEDIT_LEV_MAX; OLC_MODE(d) = ZEDIT_LEV_MAX;
break; break;
@ -1009,7 +1009,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here. */ /* We should never get here. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG1: Ack!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG1: Ack!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }
@ -1072,7 +1072,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here, but just in case. */ /* We should never get here, but just in case. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG2: Ack!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG2: Ack!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }
@ -1121,7 +1121,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here, but just in case. */ /* We should never get here, but just in case. */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG3: Ack!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): case ARG3: Ack!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }
@ -1245,7 +1245,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
default: default:
/* We should never get here, but just in case... */ /* We should never get here, but just in case... */
cleanup_olc(d, CLEANUP_ALL); cleanup_olc(d, CLEANUP_ALL);
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): Reached default case!"); mudlog(BRF, ADMLVL_BUILDER, TRUE, "SYSERR: OLC: zedit_parse(): Reached default case!");
write_to_output(d, "Oops...\r\n"); write_to_output(d, "Oops...\r\n");
break; break;
} }