mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
Edited Show Zones and MOB_OR_IMPL macro
This commit is contained in:
parent
47c79784c2
commit
1004af6a7d
3 changed files with 14 additions and 3 deletions
|
|
@ -36,6 +36,8 @@ Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||||
(lots of major bugfixes too)
|
(lots of major bugfixes too)
|
||||||
@
|
@
|
||||||
tbaMUD 3.61
|
tbaMUD 3.61
|
||||||
|
[Nov 01 2009] - Fizban
|
||||||
|
Changed MOB_OR_IMPL macro to allow player-attachable scripts to work properly and edited the output of 'show zones'.
|
||||||
[Oct 27 2009] - Rumble
|
[Oct 27 2009] - Rumble
|
||||||
Added zone 555/556 qst files.
|
Added zone 555/556 qst files.
|
||||||
PLR_BUG/IDEA/TYPO flag cleanup.
|
PLR_BUG/IDEA/TYPO flag cleanup.
|
||||||
|
|
|
||||||
|
|
@ -2419,7 +2419,7 @@ static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int l
|
||||||
|
|
||||||
ACMD(do_show)
|
ACMD(do_show)
|
||||||
{
|
{
|
||||||
int i, j, k, l, con; /* i, j, k to specifics? */
|
int i, j, k, l, con, builder =0; /* i, j, k to specifics? */
|
||||||
size_t len, nlen;
|
size_t len, nlen;
|
||||||
zone_rnum zrn;
|
zone_rnum zrn;
|
||||||
zone_vnum zvn;
|
zone_vnum zvn;
|
||||||
|
|
@ -2489,11 +2489,16 @@ ACMD(do_show)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char *buf2;
|
char *buf2;
|
||||||
|
if (*value)
|
||||||
|
builder = 1;
|
||||||
for (len = zrn = 0; zrn <= top_of_zone_table; zrn++) {
|
for (len = zrn = 0; zrn <= top_of_zone_table; zrn++) {
|
||||||
if (*value) {
|
if (*value) {
|
||||||
buf2 = strtok(strdup(zone_table[zrn].builders), " ");
|
buf2 = strtok(strdup(zone_table[zrn].builders), " ");
|
||||||
while (buf2) {
|
while (buf2) {
|
||||||
if (!str_cmp(buf2, value))
|
if (!str_cmp(buf2, value)) {
|
||||||
|
if (builder == 1)
|
||||||
|
builder++;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
buf2 = strtok(NULL, " ");
|
buf2 = strtok(NULL, " ");
|
||||||
}
|
}
|
||||||
|
|
@ -2506,6 +2511,10 @@ ACMD(do_show)
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (builder == 1)
|
||||||
|
send_to_char(ch, "%s has not built any zones here.\r\n", CAP(value));
|
||||||
|
else if (builder == 2)
|
||||||
|
send_to_char(ch, "The following zones have been built by: %s\r\n", CAP(value));
|
||||||
page_string(ch->desc, buf, TRUE);
|
page_string(ch->desc, buf, TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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))
|
((IS_NPC(ch) && (!(ch)->desc || GET_LEVEL((ch)->desc->original) >= LVL_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 */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue