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

@ -8,7 +8,7 @@
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
**************************************************************************/
/* For more examples:
/* For more examples:
* ftp://ftp.circlemud.org/pub/CircleMUD/contrib/snippets/specials */
#include "conf.h"
@ -299,7 +299,7 @@ static void npc_steal(struct char_data *ch, struct char_data *victim)
if (IS_NPC(victim))
return;
if (GET_LEVEL(victim) >= LVL_IMMORT)
if (ADM_FLAGGED(victim, ADM_NOSTEAL))
return;
if (!CAN_SEE(ch, victim))
return;
@ -340,7 +340,7 @@ SPECIAL(thief)
return (FALSE);
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);
return (TRUE);
}
@ -419,43 +419,43 @@ SPECIAL(magic_user)
}
/* Special procedures for mobiles. */
SPECIAL(guild_guard)
{
int i, direction;
struct char_data *guard = (struct char_data *)me;
const char *buf = "The guard humiliates you, and blocks your way.\r\n";
const char *buf2 = "The guard humiliates $n, and blocks $s way.";
SPECIAL(guild_guard)
{
int i, direction;
struct char_data *guard = (struct char_data *)me;
const char *buf = "The guard humiliates you, and blocks your way.\r\n";
const char *buf2 = "The guard humiliates $n, and blocks $s way.";
if (!IS_MOVE(cmd) || AFF_FLAGGED(guard, AFF_BLIND))
return (FALSE);
if (GET_LEVEL(ch) >= LVL_IMMORT)
return (FALSE);
/* find out what direction they are trying to go */
for (direction = 0; direction < NUM_OF_DIRS; direction++)
if (!strcmp(cmd_info[cmd].command, dirs[direction]))
break;
if (!IS_MOVE(cmd) || AFF_FLAGGED(guard, AFF_BLIND))
return (FALSE);
for (i = 0; guild_info[i].guild_room != NOWHERE; i++) {
/* Wrong guild. */
if (GET_ROOM_VNUM(IN_ROOM(ch)) != guild_info[i].guild_room)
continue;
if (ADM_FLAGGED(ch, ADM_WALKANYWHERE))
return (FALSE);
/* Wrong direction. */
if (direction != guild_info[i].direction)
continue;
/* find out what direction they are trying to go */
for (direction = 0; direction < NUM_OF_DIRS; direction++)
if (!strcmp(cmd_info[cmd].command, dirs[direction]))
break;
/* Allow the people of the guild through. */
if (!IS_NPC(ch) && GET_CLASS(ch) == guild_info[i].pc_class)
continue;
send_to_char(ch, "%s", buf);
act(buf2, FALSE, ch, 0, 0, TO_ROOM);
return (TRUE);
}
return (FALSE);
}
for (i = 0; guild_info[i].guild_room != NOWHERE; i++) {
/* Wrong guild. */
if (GET_ROOM_VNUM(IN_ROOM(ch)) != guild_info[i].guild_room)
continue;
/* Wrong direction. */
if (direction != guild_info[i].direction)
continue;
/* Allow the people of the guild through. */
if (!IS_NPC(ch) && GET_CLASS(ch) == guild_info[i].pc_class)
continue;
send_to_char(ch, "%s", buf);
act(buf2, FALSE, ch, 0, 0, TO_ROOM);
return (TRUE);
}
return (FALSE);
}
SPECIAL(puff)
{
@ -542,13 +542,15 @@ SPECIAL(cityguard)
continue;
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);
hit(ch, tch, TYPE_UNDEFINED);
if (!ADM_FLAGGED(tch, ADM_NODAMAGE))
hit(ch, tch, TYPE_UNDEFINED);
return (TRUE);
}
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);
hit(ch, tch, TYPE_UNDEFINED);
if (!ADM_FLAGGED(tch, ADM_NODAMAGE))
hit(ch, tch, TYPE_UNDEFINED);
return (TRUE);
}