mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
do_toggle does everything now. Removed color, syslog, wimpy, pagelength, and do_gen_tog
This commit is contained in:
parent
f33141db5b
commit
7b195232f5
5 changed files with 109 additions and 353 deletions
|
@ -1749,40 +1749,11 @@ ACMD(do_diagnose)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const char *ctypes[] = {
|
||||
"off", "sparse", "normal", "complete", "\n"
|
||||
};
|
||||
|
||||
ACMD(do_color)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
int tp;
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "Your current color level is %s.\r\n", ctypes[COLOR_LEV(ch)]);
|
||||
return;
|
||||
}
|
||||
if (((tp = search_block(arg, ctypes, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: color { Off | Sparse | Normal | Complete }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT(PRF_FLAGS(ch), PRF_COLOR_1 | PRF_COLOR_2);
|
||||
SET_BIT(PRF_FLAGS(ch), (PRF_COLOR_1 * (tp & 1)) | (PRF_COLOR_2 * (tp & 2) >> 1));
|
||||
|
||||
send_to_char(ch, "Your %scolor%s is now %s.\r\n", CCRED(ch, C_SPR), CCNRM(ch, C_OFF), ctypes[tp]);
|
||||
}
|
||||
|
||||
|
||||
ACMD(do_toggle)
|
||||
{
|
||||
char buf2[4], arg[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH];
|
||||
int toggle, result = 0;
|
||||
int toggle, tp, wimp_lev, result = 0;
|
||||
const char *types[] = { "off", "brief", "normal", "on", "\n" };
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
@ -1795,70 +1766,84 @@ ACMD(do_toggle)
|
|||
strcpy(buf2, "OFF"); /* strcpy: OK */
|
||||
else
|
||||
sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */
|
||||
|
||||
if (GET_LEVEL(ch) == LVL_IMPL) {
|
||||
send_to_char(ch,
|
||||
" SlowNameserver: %-3s "
|
||||
" "
|
||||
" Trackthru Doors: %-3s\r\n",
|
||||
|
||||
ONOFF(CONFIG_NS_IS_SLOW),
|
||||
ONOFF(CONFIG_TRACK_T_DOORS));
|
||||
}
|
||||
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT) {
|
||||
send_to_char(ch,
|
||||
" Buildwalk: %-3s "
|
||||
" "
|
||||
" ClsOLC: %-3s\r\n"
|
||||
" No Hassle: %-3s "
|
||||
" NoWiz: %-3s "
|
||||
" ClsOLC: %-3s\r\n"
|
||||
" NoHassle: %-3s "
|
||||
" Holylight: %-3s "
|
||||
" Show Vnums: %-3s\r\n",
|
||||
" ShowVnums: %-3s\r\n"
|
||||
" Syslog: %-3s\r\n",
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_CLS)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOHASSLE)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||
);
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
||||
}
|
||||
|
||||
send_to_char(ch,
|
||||
"Hit Pnt Display: %-3s "
|
||||
" Brief Mode: %-3s "
|
||||
" Summon Protect: %-3s\r\n"
|
||||
" Brief: %-3s "
|
||||
" Summonable: %-3s\r\n"
|
||||
|
||||
" Move Display: %-3s "
|
||||
" Compact Mode: %-3s "
|
||||
" On Quest: %-3s\r\n"
|
||||
" Compact: %-3s "
|
||||
" Quest: %-3s\r\n"
|
||||
|
||||
" Mana Display: %-3s "
|
||||
" NoTell: %-3s "
|
||||
" Repeat Comm.: %-3s\r\n"
|
||||
" NoRepeat: %-3s\r\n"
|
||||
|
||||
" Auto Show Exit: %-3s "
|
||||
" AutoExits: %-3s "
|
||||
" NoShout: %-3s "
|
||||
" Wimp Level: %-3s\r\n"
|
||||
" Wimpy: %-3s\r\n"
|
||||
|
||||
" Gossip Channel: %-3s "
|
||||
"Auction Channel: %-3s "
|
||||
" Grats Channel: %-3s\r\n"
|
||||
" NoGossip: %-3s "
|
||||
" NoAuction: %-3s "
|
||||
" NoGrats: %-3s\r\n"
|
||||
|
||||
" AFK flag: %-3s "
|
||||
" Color Level: %s \r\n ",
|
||||
" AFK: %-3s "
|
||||
" Pagelength: %-3d "
|
||||
" Color: %s \r\n ",
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_DISPHP)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_BRIEF)),
|
||||
ONOFF(!PRF_FLAGGED(ch, PRF_SUMMONABLE)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_SUMMONABLE)),
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_DISPMOVE)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_COMPACT)),
|
||||
YESNO(PRF_FLAGGED(ch, PRF_QUEST)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_QUEST)),
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_DISPMANA)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOTELL)),
|
||||
YESNO(!PRF_FLAGGED(ch, PRF_NOREPEAT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOREPEAT)),
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AUTOEXIT)),
|
||||
YESNO(PRF_FLAGGED(ch, PRF_NOSHOUT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOSHOUT)),
|
||||
buf2,
|
||||
|
||||
ONOFF(!PRF_FLAGGED(ch, PRF_NOGOSS)),
|
||||
ONOFF(!PRF_FLAGGED(ch, PRF_NOAUCT)),
|
||||
ONOFF(!PRF_FLAGGED(ch, PRF_NOGRATZ)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOGOSS)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOAUCT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOGRATZ)),
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AFK)),
|
||||
ctypes[COLOR_LEV(ch)]);
|
||||
GET_PAGE_LENGTH(ch),
|
||||
types[COLOR_LEV(ch)]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1893,12 +1878,15 @@ ACMD(do_toggle)
|
|||
{"nogossip", PRF_NOGOSS, 0,
|
||||
"You can now hear gossip.\r\n",
|
||||
"You are now deaf to gossip.\r\n"},
|
||||
{"wiznet", PRF_NOWIZ, 0,
|
||||
{"nograts", PRF_NOGRATZ, 0,
|
||||
"You can now hear gratz.\r\n",
|
||||
"You are now deaf to gratz.\r\n"},
|
||||
{"nowiz", PRF_NOWIZ, LVL_IMMORT,
|
||||
"You can now hear the Wiz-channel.\r\n",
|
||||
"You are now deaf to the Wiz-channel.\r\n"},
|
||||
{"noquest", PRF_QUEST, 0,
|
||||
"You are no longer part of the Quest.\r\n",
|
||||
"Okay, you are part of the Quest!\r\n"},
|
||||
{"quest", PRF_QUEST, 0,
|
||||
"Okay, you are part of the Quest.\r\n",
|
||||
"You are no longer part of the Quest.\r\n"},
|
||||
{"showvnums", PRF_SHOWVNUMS, LVL_IMMORT,
|
||||
"You will no longer see the vnums.\r\n",
|
||||
"You will now see the vnums.\r\n"},
|
||||
|
@ -1908,23 +1896,28 @@ ACMD(do_toggle)
|
|||
{"holylight", PRF_HOLYLIGHT, LVL_IMMORT,
|
||||
"HolyLight mode off.\r\n",
|
||||
"HolyLight mode on.\r\n"},
|
||||
{"slowns", -1, LVL_IMPL,
|
||||
"Nameserver_is_slow changed to NO; IP addresses will now be resolved.\r\n",
|
||||
"Nameserver_is_slow changed to YES; sitenames will no longer be resolved.\r\n"},
|
||||
{"slownameserver", -1, LVL_IMPL,
|
||||
"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"},
|
||||
{"autoexits", PRF_AUTOEXIT, 0,
|
||||
"Autoexits disabled.\r\n",
|
||||
"Autoexits enabled.\r\n"},
|
||||
{"track", -1, LVL_IMPL,
|
||||
"Will no longer track through doors.\r\n",
|
||||
"Will now track through doors.\r\n"},
|
||||
{"clearolc", PRF_CLS, LVL_BUILDER,
|
||||
"Will no longer clear screen in OLC.\r\n",
|
||||
"Will now clear screen in OLC.\r\n"},
|
||||
{"trackthru", -1, LVL_IMPL,
|
||||
"Players can no longer track through doors.\r\n",
|
||||
"Players can now track through doors.\r\n"},
|
||||
{"clsolc", PRF_CLS, LVL_BUILDER,
|
||||
"You will no longer clear screen in OLC.\r\n",
|
||||
"You will now clear screen in OLC.\r\n"},
|
||||
{"buildwalk", PRF_BUILDWALK, LVL_BUILDER,
|
||||
"Buildwalk Off.\r\n",
|
||||
"Buildwalk On.\r\n"},
|
||||
"Buildwalk is now Off.\r\n",
|
||||
"Buildwalk is now On.\r\n"},
|
||||
{"afk", PRF_AFK, 0,
|
||||
"AFK is now Off.\r\n",
|
||||
"AFK is now On.\r\n"},
|
||||
{"color", -1, 0, "\n", "\n"},
|
||||
{"syslog", -1, LVL_IMMORT, "\n", "\n"},
|
||||
{"wimpy", -1, 0, "\n", "\n"},
|
||||
{"pagelength", -1, 0, "\n", "\n"},
|
||||
{"\n", -1, -1, "\n", "\n"} /* must be last */
|
||||
};
|
||||
|
||||
|
@ -1937,10 +1930,6 @@ ACMD(do_toggle)
|
|||
return;
|
||||
}
|
||||
|
||||
/* for color and syslog */
|
||||
int tp;
|
||||
const char *types[] = { "off", "brief", "normal", "complete", "\n" };
|
||||
|
||||
switch (toggle) {
|
||||
case SCMD_COLOR:
|
||||
if (!*arg2) {
|
||||
|
@ -1949,7 +1938,7 @@ ACMD(do_toggle)
|
|||
}
|
||||
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: color { Off | Sparse | Normal | Complete }\r\n");
|
||||
send_to_char(ch, "Usage: color { Off | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT(PRF_FLAGS(ch), PRF_COLOR_1 | PRF_COLOR_2);
|
||||
|
@ -1962,8 +1951,8 @@ ACMD(do_toggle)
|
|||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
||||
return;
|
||||
}
|
||||
if (((tp = search_block(arg, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: syslog { Off | Brief | Normal | Complete }\r\n");
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: syslog { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT(PRF_FLAGS(ch), PRF_LOG1 | PRF_LOG2);
|
||||
|
@ -1995,6 +1984,44 @@ ACMD(do_toggle)
|
|||
else
|
||||
act("$n has return to $s keyboard.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
break;
|
||||
case SCMD_WIMPY:
|
||||
if (!*arg2) {
|
||||
if (GET_WIMP_LEV(ch)) {
|
||||
send_to_char(ch, "Your current wimp level is %d hit points.\r\n", GET_WIMP_LEV(ch));
|
||||
return;
|
||||
} else {
|
||||
send_to_char(ch, "At the moment, you're not a wimp. (sure, sure...)\r\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (isdigit(*arg2)) {
|
||||
if ((wimp_lev = atoi(arg2)) != 0) {
|
||||
if (wimp_lev < 0)
|
||||
send_to_char(ch, "Heh, heh, heh.. we are jolly funny today, eh?\r\n");
|
||||
else if (wimp_lev > GET_MAX_HIT(ch))
|
||||
send_to_char(ch, "That doesn't make much sense, now does it?\r\n");
|
||||
else if (wimp_lev > (GET_MAX_HIT(ch) / 2))
|
||||
send_to_char(ch, "You can't set your wimp level above half your hit points.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "Okay, you'll wimp out if you drop below %d hit points.\r\n", wimp_lev);
|
||||
GET_WIMP_LEV(ch) = wimp_lev;
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "Okay, you'll now tough out fights to the bitter end.\r\n");
|
||||
GET_WIMP_LEV(ch) = 0;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Specify at how many hit points you want to wimp out at. (0 to disable)\r\n");
|
||||
break;
|
||||
case SCMD_PAGELENGTH:
|
||||
if (!*arg2)
|
||||
send_to_char(ch, "You current page length is set to %d lines.\r\n", GET_PAGE_LENGTH(ch));
|
||||
else if (is_number(arg2)) {
|
||||
GET_PAGE_LENGTH(ch) = MIN(MAX(atoi(arg2), 5), 255);
|
||||
send_to_char(ch, "Okay, your page length is now set to %d lines.\r\n", GET_PAGE_LENGTH(ch));
|
||||
} else
|
||||
send_to_char(ch, "Please specify a number of lines (5 - 255).\r\n");
|
||||
break;
|
||||
default:
|
||||
if (!*arg2) {
|
||||
send_to_char(ch, "Value must either be 'on' or 'off'.\r\n");
|
||||
|
|
216
src/act.other.c
216
src/act.other.c
|
@ -55,12 +55,9 @@ ACMD(do_ungroup);
|
|||
ACMD(do_report);
|
||||
ACMD(do_split);
|
||||
ACMD(do_use);
|
||||
ACMD(do_wimpy);
|
||||
ACMD(do_display);
|
||||
ACMD(do_gen_write);
|
||||
ACMD(do_gen_tog);
|
||||
ACMD(do_file);
|
||||
ACMD(do_pagelength);
|
||||
|
||||
ACMD(do_quit)
|
||||
{
|
||||
|
@ -676,49 +673,6 @@ ACMD(do_use)
|
|||
mag_objectmagic(ch, mag_item, buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ACMD(do_wimpy)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
int wimp_lev;
|
||||
|
||||
/* 'wimp_level' is a player_special. -gg 2/25/98 */
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
if (!*arg) {
|
||||
if (GET_WIMP_LEV(ch)) {
|
||||
send_to_char(ch, "Your current wimp level is %d hit points.\r\n", GET_WIMP_LEV(ch));
|
||||
return;
|
||||
} else {
|
||||
send_to_char(ch, "At the moment, you're not a wimp. (sure, sure...)\r\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (isdigit(*arg)) {
|
||||
if ((wimp_lev = atoi(arg)) != 0) {
|
||||
if (wimp_lev < 0)
|
||||
send_to_char(ch, "Heh, heh, heh.. we are jolly funny today, eh?\r\n");
|
||||
else if (wimp_lev > GET_MAX_HIT(ch))
|
||||
send_to_char(ch, "That doesn't make much sense, now does it?\r\n");
|
||||
else if (wimp_lev > (GET_MAX_HIT(ch) / 2))
|
||||
send_to_char(ch, "You can't set your wimp level above half your hit points.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "Okay, you'll wimp out if you drop below %d hit points.\r\n", wimp_lev);
|
||||
GET_WIMP_LEV(ch) = wimp_lev;
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "Okay, you'll now tough out fights to the bitter end.\r\n");
|
||||
GET_WIMP_LEV(ch) = 0;
|
||||
}
|
||||
} else
|
||||
send_to_char(ch, "Specify at how many hit points you want to wimp out at. (0 to disable)\r\n");
|
||||
}
|
||||
|
||||
|
||||
ACMD(do_display)
|
||||
{
|
||||
size_t i;
|
||||
|
@ -839,157 +793,6 @@ ACMD(do_gen_write)
|
|||
send_to_char(ch, "Okay. Thanks!\r\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define TOG_OFF 0
|
||||
#define TOG_ON 1
|
||||
|
||||
#define PRF_TOG_CHK(ch,flag) ((TOGGLE_BIT(PRF_FLAGS(ch), (flag))) & (flag))
|
||||
|
||||
ACMD(do_gen_tog)
|
||||
{
|
||||
long result;
|
||||
|
||||
const char *tog_messages[][2] = {
|
||||
{"You are now safe from summoning by other players.\r\n",
|
||||
"You may now be summoned by other players.\r\n"},
|
||||
{"Nohassle disabled.\r\n",
|
||||
"Nohassle enabled.\r\n"},
|
||||
{"Brief mode off.\r\n",
|
||||
"Brief mode on.\r\n"},
|
||||
{"Compact mode off.\r\n",
|
||||
"Compact mode on.\r\n"},
|
||||
{"You can now hear tells.\r\n",
|
||||
"You are now deaf to tells.\r\n"},
|
||||
{"You can now hear auctions.\r\n",
|
||||
"You are now deaf to auctions.\r\n"},
|
||||
{"You can now hear shouts.\r\n",
|
||||
"You are now deaf to shouts.\r\n"},
|
||||
{"You can now hear gossip.\r\n",
|
||||
"You are now deaf to gossip.\r\n"},
|
||||
{"You can now hear the congratulation messages.\r\n",
|
||||
"You are now deaf to the congratulation messages.\r\n"},
|
||||
{"You can now hear the Wiz-channel.\r\n",
|
||||
"You are now deaf to the Wiz-channel.\r\n"},
|
||||
{"You are no longer part of the Quest.\r\n",
|
||||
"Okay, you are part of the Quest!\r\n"},
|
||||
{"You will no longer see the room flags.\r\n",
|
||||
"You will now see the room flags.\r\n"},
|
||||
{"You will now have your communication repeated.\r\n",
|
||||
"You will no longer have your communication repeated.\r\n"},
|
||||
{"HolyLight mode off.\r\n",
|
||||
"HolyLight mode on.\r\n"},
|
||||
{"Nameserver_is_slow changed to NO; IP addresses will now be resolved.\r\n",
|
||||
"Nameserver_is_slow changed to YES; sitenames will no longer be resolved.\r\n"},
|
||||
{"Autoexits disabled.\r\n",
|
||||
"Autoexits enabled.\r\n"},
|
||||
{"Will no longer track through doors.\r\n",
|
||||
"Will now track through doors.\r\n"},
|
||||
{"Will no longer clear screen in OLC.\r\n",
|
||||
"Will now clear screen in OLC.\r\n"},
|
||||
{"Buildwalk Off.\r\n",
|
||||
"Buildwalk On.\r\n"},
|
||||
{"AFK flag is now off.\r\n",
|
||||
"AFK flag is now on.\r\n"}
|
||||
};
|
||||
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
switch (subcmd) {
|
||||
case SCMD_NOSUMMON:
|
||||
result = PRF_TOG_CHK(ch, PRF_SUMMONABLE);
|
||||
break;
|
||||
case SCMD_NOHASSLE:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOHASSLE);
|
||||
break;
|
||||
case SCMD_BRIEF:
|
||||
result = PRF_TOG_CHK(ch, PRF_BRIEF);
|
||||
break;
|
||||
case SCMD_COMPACT:
|
||||
result = PRF_TOG_CHK(ch, PRF_COMPACT);
|
||||
break;
|
||||
case SCMD_NOTELL:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOTELL);
|
||||
break;
|
||||
case SCMD_NOAUCTION:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOAUCT);
|
||||
break;
|
||||
case SCMD_NOSHOUT:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOSHOUT);
|
||||
break;
|
||||
case SCMD_NOGOSSIP:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOGOSS);
|
||||
break;
|
||||
case SCMD_NOGRATZ:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOGRATZ);
|
||||
break;
|
||||
case SCMD_NOWIZ:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOWIZ);
|
||||
break;
|
||||
case SCMD_QUEST:
|
||||
result = PRF_TOG_CHK(ch, PRF_QUEST);
|
||||
break;
|
||||
case SCMD_ROOMFLAGS:
|
||||
result = PRF_TOG_CHK(ch, PRF_SHOWVNUMS);
|
||||
break;
|
||||
case SCMD_NOREPEAT:
|
||||
result = PRF_TOG_CHK(ch, PRF_NOREPEAT);
|
||||
break;
|
||||
case SCMD_HOLYLIGHT:
|
||||
result = PRF_TOG_CHK(ch, PRF_HOLYLIGHT);
|
||||
break;
|
||||
case SCMD_SLOWNS:
|
||||
result = (CONFIG_NS_IS_SLOW = !CONFIG_NS_IS_SLOW);
|
||||
break;
|
||||
case SCMD_AUTOEXIT:
|
||||
result = PRF_TOG_CHK(ch, PRF_AUTOEXIT);
|
||||
break;
|
||||
case SCMD_TRACK:
|
||||
result = (CONFIG_TRACK_T_DOORS = !CONFIG_TRACK_T_DOORS);
|
||||
break;
|
||||
case SCMD_CLS:
|
||||
result = PRF_TOG_CHK(ch, PRF_CLS);
|
||||
break;
|
||||
case SCMD_BUILDWALK:
|
||||
if (GET_LEVEL(ch) < LVL_BUILDER) {
|
||||
send_to_char(ch, "Builders only, sorry.\r\n");
|
||||
return;
|
||||
}
|
||||
result = PRF_TOG_CHK(ch, PRF_BUILDWALK);
|
||||
if (PRF_FLAGGED(ch, PRF_BUILDWALK))
|
||||
mudlog(CMP, GET_LEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
else
|
||||
mudlog(CMP, GET_LEVEL(ch), TRUE,
|
||||
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
|
||||
break;
|
||||
case SCMD_AFK:
|
||||
result = PRF_TOG_CHK(ch, PRF_AFK);
|
||||
if (PRF_FLAGGED(ch, PRF_AFK))
|
||||
act("$n has gone AFK.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
else
|
||||
act("$n has come back from AFK.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
break;
|
||||
default:
|
||||
log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd);
|
||||
/* SYSERR_DESC:
|
||||
* This is the same as the unhandled case in do_gen_ps(), but in the
|
||||
* function which handles 'compact', 'brief', and so forth.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (result)
|
||||
send_to_char(ch, "%s", tog_messages[subcmd][TOG_ON]);
|
||||
else
|
||||
send_to_char(ch, "%s", tog_messages[subcmd][TOG_OFF]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ACMD(do_file)
|
||||
{
|
||||
FILE *req_file;
|
||||
|
@ -1088,22 +891,3 @@ ACMD(do_file)
|
|||
page_string(ch->desc, buf, 1);
|
||||
|
||||
}
|
||||
|
||||
ACMD(do_pagelength)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "You current page length is set to %d lines.\r\n", GET_PAGE_LENGTH(ch));
|
||||
} else if (is_number(arg)) {
|
||||
GET_PAGE_LENGTH(ch) = MIN(MAX(atoi(arg), 5), 255);
|
||||
send_to_char(ch, "Okay, your page length is now set to %d lines.\r\n", GET_PAGE_LENGTH(ch));
|
||||
} else {
|
||||
send_to_char(ch, "Please specify a number of lines (5 - 255).\r\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1487,35 +1487,6 @@ ACMD(do_purge)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char *logtypes[] = {
|
||||
"off", "brief", "normal", "complete", "\n"
|
||||
};
|
||||
|
||||
ACMD(do_syslog)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
int tp;
|
||||
|
||||
one_argument(argument, arg);
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "Your syslog is currently %s.\r\n",
|
||||
logtypes[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)]);
|
||||
return;
|
||||
}
|
||||
if (((tp = search_block(arg, logtypes, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: syslog { Off | Brief | Normal | Complete }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT(PRF_FLAGS(ch), PRF_LOG1 | PRF_LOG2);
|
||||
SET_BIT(PRF_FLAGS(ch), (PRF_LOG1 * (tp & 1)) | (PRF_LOG2 * (tp & 2) >> 1));
|
||||
|
||||
send_to_char(ch, "Your syslog is now %s.\r\n", logtypes[tp]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ACMD(do_advance)
|
||||
{
|
||||
struct char_data *victim;
|
||||
|
|
|
@ -77,7 +77,6 @@ ACMD(do_backstab);
|
|||
ACMD(do_ban);
|
||||
ACMD(do_bash);
|
||||
ACMD(do_cast);
|
||||
ACMD(do_color);
|
||||
ACMD(do_commands);
|
||||
ACMD(do_consider);
|
||||
ACMD(do_copyover);
|
||||
|
@ -133,7 +132,6 @@ ACMD(do_look);
|
|||
ACMD(do_not_here);
|
||||
ACMD(do_order);
|
||||
ACMD(do_page);
|
||||
ACMD(do_pagelength);
|
||||
ACMD(do_peace);
|
||||
ACMD(do_pour);
|
||||
ACMD(do_practice);
|
||||
|
@ -169,7 +167,6 @@ ACMD(do_stand);
|
|||
ACMD(do_stat);
|
||||
ACMD(do_steal);
|
||||
ACMD(do_switch);
|
||||
ACMD(do_syslog);
|
||||
ACMD(do_teleport);
|
||||
ACMD(do_tell);
|
||||
ACMD(do_time);
|
||||
|
@ -190,7 +187,6 @@ ACMD(do_weather);
|
|||
ACMD(do_where);
|
||||
ACMD(do_who);
|
||||
ACMD(do_wield);
|
||||
ACMD(do_wimpy);
|
||||
ACMD(do_wizlock);
|
||||
ACMD(do_wiznet);
|
||||
ACMD(do_wizutil);
|
||||
|
@ -266,19 +262,15 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "advance" , "adv" , POS_DEAD , do_advance , LVL_GOD, 0 },
|
||||
{ "aedit" , "aed" , POS_DEAD , do_oasis , LVL_GOD, SCMD_OASIS_AEDIT },
|
||||
{ "alias" , "ali" , POS_DEAD , do_alias , 0, 0 },
|
||||
{ "afk" , "afk" , POS_DEAD , do_gen_tog , 0, SCMD_AFK },
|
||||
{ "assist" , "as" , POS_FIGHTING, do_assist , 1, 0 },
|
||||
{ "ask" , "ask" , POS_RESTING , do_spec_comm, 0, SCMD_ASK },
|
||||
{ "astat" , "ast" , POS_DEAD , do_astat , 0, 0 },
|
||||
{ "auction" , "auc" , POS_SLEEPING, do_gen_comm , 0, SCMD_AUCTION },
|
||||
{ "autoexits" , "autoex" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOEXIT },
|
||||
|
||||
{ "backstab" , "ba" , POS_STANDING, do_backstab , 1, 0 },
|
||||
{ "ban" , "ban" , POS_DEAD , do_ban , LVL_GRGOD, 0 },
|
||||
{ "balance" , "bal" , POS_STANDING, do_not_here , 1, 0 },
|
||||
{ "bash" , "bas" , POS_FIGHTING, do_bash , 1, 0 },
|
||||
{ "brief" , "br" , POS_DEAD , do_gen_tog , 0, SCMD_BRIEF },
|
||||
{ "buildwalk", "buildwalk", POS_STANDING, do_gen_tog, LVL_BUILDER, SCMD_BUILDWALK },
|
||||
{ "buy" , "bu" , POS_STANDING, do_not_here , 0, 0 },
|
||||
{ "bug" , "bug" , POS_DEAD , do_gen_write, 0, SCMD_BUG },
|
||||
|
||||
|
@ -289,11 +281,8 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "close" , "cl" , POS_SITTING , do_gen_door , 0, SCMD_CLOSE },
|
||||
{ "clear" , "cle" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "cls" , "cls" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "clsolc" , "clsolc" , POS_DEAD , do_gen_tog , 0, SCMD_CLS },
|
||||
{ "consider" , "con" , POS_RESTING , do_consider , 0, 0 },
|
||||
{ "color" , "col" , POS_DEAD , do_color , 0, 0 },
|
||||
{ "commands" , "com" , POS_DEAD , do_commands , 0, SCMD_COMMANDS },
|
||||
{ "compact" , "comp" , POS_DEAD , do_gen_tog , 0, SCMD_COMPACT },
|
||||
{ "copyover" , "copyover", POS_DEAD , do_copyover , LVL_GRGOD, 0 },
|
||||
{ "credits" , "cred" , POS_DEAD , do_gen_ps , 0, SCMD_CREDITS },
|
||||
|
||||
|
@ -348,7 +337,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "hit" , "hit" , POS_FIGHTING, do_hit , 0, SCMD_HIT },
|
||||
{ "hold" , "hold" , POS_RESTING , do_grab , 1, 0 },
|
||||
{ "holler" , "holler" , POS_RESTING , do_gen_comm , 1, SCMD_HOLLER },
|
||||
{ "holylight", "holy" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_HOLYLIGHT },
|
||||
{ "house" , "house" , POS_RESTING , do_house , 0, 0 },
|
||||
|
||||
{ "inventory", "i" , POS_DEAD , do_inventory, 0, 0 },
|
||||
|
@ -380,16 +368,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "mute" , "mute" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_SQUELCH },
|
||||
|
||||
{ "news" , "news" , POS_SLEEPING, do_gen_ps , 0, SCMD_NEWS },
|
||||
{ "noauction", "noauction",POS_DEAD , do_gen_tog , 0, SCMD_NOAUCTION },
|
||||
{ "nogossip" , "nogossip", POS_DEAD , do_gen_tog , 0, SCMD_NOGOSSIP },
|
||||
{ "nograts" , "nograts" , POS_DEAD , do_gen_tog , 0, SCMD_NOGRATZ },
|
||||
{ "nohassle" , "nohassle", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_NOHASSLE },
|
||||
{ "norepeat" , "norepeat", POS_DEAD , do_gen_tog , 0, SCMD_NOREPEAT },
|
||||
{ "noshout" , "noshout" , POS_SLEEPING, do_gen_tog , 1, SCMD_NOSHOUT },
|
||||
{ "nosummon" , "nosummon", POS_DEAD , do_gen_tog , 1, SCMD_NOSUMMON },
|
||||
{ "notell" , "notell" , POS_DEAD , do_gen_tog , 1, SCMD_NOTELL },
|
||||
{ "notitle" , "notitle" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_NOTITLE },
|
||||
{ "nowiz" , "nowiz" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_NOWIZ },
|
||||
|
||||
{ "open" , "o" , POS_SITTING , do_gen_door , 0, SCMD_OPEN },
|
||||
{ "order" , "ord" , POS_RESTING , do_order , 1, 0 },
|
||||
|
@ -403,7 +382,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "pick" , "pi" , POS_STANDING, do_gen_door , 1, SCMD_PICK },
|
||||
{ "practice" , "pr" , POS_RESTING , do_practice , 1, 0 },
|
||||
{ "page" , "pag" , POS_DEAD , do_page , LVL_IMMORT, 0 },
|
||||
{ "pagelength", "pagel" , POS_DEAD , do_pagelength, 0, 0 },
|
||||
{ "pardon" , "pardon" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_PARDON },
|
||||
{ "policy" , "pol" , POS_DEAD , do_gen_ps , 0, SCMD_POLICIES },
|
||||
{ "pour" , "pour" , POS_STANDING, do_pour , 0, SCMD_POUR },
|
||||
|
@ -412,7 +390,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
|
||||
{ "quaff" , "qua" , POS_RESTING , do_use , 0, SCMD_QUAFF },
|
||||
{ "qecho" , "qec" , POS_DEAD , do_qcomm , LVL_GOD, SCMD_QECHO },
|
||||
{ "quest" , "que" , POS_DEAD , do_gen_tog , 0, SCMD_QUEST },
|
||||
{ "qui" , "qui" , POS_DEAD , do_quit , 0, 0 },
|
||||
{ "quit" , "quit" , POS_DEAD , do_quit , 0, SCMD_QUIT },
|
||||
{ "qsay" , "qsay" , POS_RESTING , do_qcomm , 0, SCMD_QSAY },
|
||||
|
@ -433,7 +410,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "redit" , "redit" , POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OASIS_REDIT },
|
||||
{ "rlist" , "rlist" , POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OASIS_RLIST },
|
||||
{ "rclone" , "rclone" , POS_DEAD , do_room_copy, LVL_BUILDER, 0 },
|
||||
{ "roomflags", "roomflags", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_ROOMFLAGS },
|
||||
|
||||
{ "say" , "s" , POS_RESTING , do_say , 0, 0 },
|
||||
{ "score" , "sc" , POS_DEAD , do_score , 0, 0 },
|
||||
|
@ -453,7 +429,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "skillset" , "skillset", POS_SLEEPING, do_skillset , LVL_GRGOD, 0 },
|
||||
{ "sleep" , "sl" , POS_SLEEPING, do_sleep , 0, 0 },
|
||||
{ "slist" , "slist" , POS_SLEEPING, do_oasis , LVL_BUILDER, SCMD_OASIS_SLIST },
|
||||
{ "slowns" , "slowns" , POS_DEAD , do_gen_tog , LVL_IMPL, SCMD_SLOWNS },
|
||||
{ "sneak" , "sneak" , POS_STANDING, do_sneak , 1, 0 },
|
||||
{ "snoop" , "snoop" , POS_DEAD , do_snoop , LVL_GOD, 0 },
|
||||
{ "socials" , "socials" , POS_DEAD , do_commands , 0, SCMD_SOCIALS },
|
||||
|
@ -462,7 +437,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "stat" , "stat" , POS_DEAD , do_stat , LVL_IMMORT, 0 },
|
||||
{ "steal" , "ste" , POS_STANDING, do_steal , 1, 0 },
|
||||
{ "switch" , "switch" , POS_DEAD , do_switch , LVL_GOD, 0 },
|
||||
{ "syslog" , "syslog" , POS_DEAD , do_syslog , LVL_IMMORT, 0 },
|
||||
|
||||
{ "tell" , "t" , POS_DEAD , do_tell , 0, 0 },
|
||||
{ "take" , "ta" , POS_RESTING , do_get , 0, 0 },
|
||||
|
@ -474,7 +448,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "time" , "time" , POS_DEAD , do_time , 0, 0 },
|
||||
{ "toggle" , "toggle" , POS_DEAD , do_toggle , 0, 0 },
|
||||
{ "track" , "track" , POS_STANDING, do_track , 0, 0 },
|
||||
{ "trackthru", "trackthru",POS_DEAD , do_gen_tog , LVL_IMPL, SCMD_TRACK },
|
||||
{ "transfer" , "transfer", POS_SLEEPING, do_trans , LVL_GOD, 0 },
|
||||
{ "trigedit" , "trigedit", POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OASIS_TRIGEDIT},
|
||||
{ "typo" , "typo" , POS_DEAD , do_gen_write, 0, SCMD_TYPO },
|
||||
|
@ -501,7 +474,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "where" , "where" , POS_RESTING , do_where , 1, 0 },
|
||||
{ "whisper" , "whisper" , POS_RESTING , do_spec_comm, 0, SCMD_WHISPER },
|
||||
{ "wield" , "wie" , POS_RESTING , do_wield , 0, 0 },
|
||||
{ "wimpy" , "wimpy" , POS_DEAD , do_wimpy , 0, 0 },
|
||||
{ "withdraw" , "withdraw", POS_STANDING, do_not_here , 1, 0 },
|
||||
{ "wiznet" , "wiz" , POS_DEAD , do_wiznet , LVL_IMMORT, 0 },
|
||||
{ ";" , ";" , POS_DEAD , do_wiznet , LVL_IMMORT, 0 },
|
||||
|
|
|
@ -119,7 +119,7 @@ struct alias_data {
|
|||
#define SCMD_NOGRATZ 8
|
||||
#define SCMD_NOWIZ 9
|
||||
#define SCMD_QUEST 10
|
||||
#define SCMD_ROOMFLAGS 11
|
||||
#define SCMD_SHOWVNUMS 11
|
||||
#define SCMD_NOREPEAT 12
|
||||
#define SCMD_HOLYLIGHT 13
|
||||
#define SCMD_SLOWNS 14
|
||||
|
@ -130,6 +130,8 @@ struct alias_data {
|
|||
#define SCMD_AFK 19
|
||||
#define SCMD_COLOR 20
|
||||
#define SCMD_SYSLOG 21
|
||||
#define SCMD_WIMPY 22
|
||||
#define SCMD_PAGELENGTH 23
|
||||
|
||||
/* do_wizutil */
|
||||
#define SCMD_REROLL 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue