mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Added numerous NPC checks to PRF checks and fixed nogos/nowiz in who. --Rumble
This commit is contained in:
parent
f89d806fc2
commit
76d1d89597
5 changed files with 13 additions and 13 deletions
|
@ -99,7 +99,7 @@ ACMD(do_gsay)
|
|||
if (AFF_FLAGGED(f->follower, AFF_GROUP) && (f->follower != ch))
|
||||
act(buf, FALSE, ch, 0, f->follower, TO_VICT | TO_SLEEP);
|
||||
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else
|
||||
send_to_char(ch, "You tell the group, '%s@n'\r\n", argument);
|
||||
|
@ -263,7 +263,7 @@ ACMD(do_spec_comm)
|
|||
snprintf(buf1, sizeof(buf1), "$n %s you, '%s'", action_plur, buf2);
|
||||
act(buf1, FALSE, ch, 0, vict, TO_VICT);
|
||||
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if ((!IS_NPC(ch)) && (PRF_FLAGGED(ch, PRF_NOREPEAT)))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else
|
||||
send_to_char(ch, "You %s %s, '%s'\r\n", action_sing, GET_NAME(vict), buf2);
|
||||
|
@ -375,7 +375,7 @@ ACMD(do_page)
|
|||
}
|
||||
if ((vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD)) != NULL) {
|
||||
act(buf, FALSE, ch, 0, vict, TO_VICT);
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else
|
||||
act(buf, FALSE, ch, 0, vict, TO_CHAR);
|
||||
|
@ -502,7 +502,7 @@ ACMD(do_gen_comm)
|
|||
strlcpy(color_on, com_msgs[subcmd][3], sizeof(color_on));
|
||||
|
||||
/* first, set up strings to be given to the communicator */
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else {
|
||||
snprintf(buf1, sizeof(buf1), "%sYou %s, '%s'%s", COLOR_LEV(ch) >= C_CMP ? color_on : "", com_msgs[subcmd][1], argument, CCNRM(ch, C_CMP));
|
||||
|
@ -516,10 +516,10 @@ ACMD(do_gen_comm)
|
|||
for (i = descriptor_list; i; i = i->next) {
|
||||
if (STATE(i) != CON_PLAYING || i == ch->desc || !i->character )
|
||||
continue;
|
||||
if(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;
|
||||
|
||||
if(ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD))
|
||||
if (ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF) && (GET_LEVEL(ch) < LVL_GOD))
|
||||
continue;
|
||||
|
||||
if (subcmd == SCMD_SHOUT &&
|
||||
|
@ -547,7 +547,7 @@ ACMD(do_qcomm)
|
|||
char buf[MAX_STRING_LENGTH];
|
||||
struct descriptor_data *i;
|
||||
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else if (subcmd == SCMD_QSAY) {
|
||||
snprintf(buf, sizeof(buf), "You quest-say, '%s'", argument);
|
||||
|
|
|
@ -456,7 +456,7 @@ ACMD(do_exits)
|
|||
|
||||
len++;
|
||||
|
||||
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room),
|
||||
world[EXIT(ch, door)->to_room].name);
|
||||
else
|
||||
|
@ -1280,9 +1280,9 @@ ACMD(do_who)
|
|||
send_to_char(ch, " (Buildwalking)");
|
||||
if (PRF_FLAGGED(tch, PRF_AFK))
|
||||
send_to_char(ch, " (AFK)");
|
||||
if (PRF_FLAGGED(ch, PRF_NOGOSS))
|
||||
if (PRF_FLAGGED(tch, PRF_NOGOSS))
|
||||
send_to_char(ch, " (nogos)");
|
||||
if (PRF_FLAGGED(ch, PRF_NOWIZ))
|
||||
if (PRF_FLAGGED(tch, PRF_NOWIZ))
|
||||
send_to_char(ch, " (nowiz)");
|
||||
if (PRF_FLAGGED(tch, PRF_NOSHOUT))
|
||||
send_to_char(ch, " (noshout)");
|
||||
|
|
|
@ -191,7 +191,7 @@ ACMD(do_send)
|
|||
send_to_char(vict, "%s\r\n", buf);
|
||||
mudlog(CMP, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s sent %s: %s", GET_NAME(ch), GET_NAME(vict), buf);
|
||||
|
||||
if (PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "Sent.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You send '%s' to %s.\r\n", buf, GET_NAME(vict));
|
||||
|
|
|
@ -2573,7 +2573,7 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
char buf[MAX_STRING_LENGTH];
|
||||
|
||||
for (i = descriptor_list; i; i = i->next) {
|
||||
if (!i->connected && i->character &&
|
||||
if (!IS_NPC(i->character) && !i->connected && i->character &&
|
||||
!PRF_FLAGGED(i->character, PRF_NOGOSS) &&
|
||||
!PLR_FLAGGED(i->character, PLR_WRITING) &&
|
||||
!ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF)) {
|
||||
|
|
2
src/db.c
2
src/db.c
|
@ -2568,7 +2568,7 @@ int is_empty(zone_rnum zone_nr)
|
|||
continue;
|
||||
/* If an immortal has nohassle off, he counts as present. Added for testing
|
||||
* zone reset triggers -Welcor */
|
||||
if ((GET_LEVEL(i->character) >= LVL_IMMORT) && (PRF_FLAGGED(i->character, PRF_NOHASSLE)))
|
||||
if ((!IS_NPC(i->character)) && (GET_LEVEL(i->character) >= LVL_IMMORT) && (PRF_FLAGGED(i->character, PRF_NOHASSLE)))
|
||||
continue;
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue