> ie a newbie logs on and types
> help freeze, and instead of getting
> instructions on how immortals can freeze
> someone from playing, he gets
> no help available ?
i included help min levels in my hedit patches..this snippet
was posted originally by akuma/doomer, so credit him..
siv
1) add and 'int min_level;' to the help_index_element struct in db.h
2) change load_help to do something like this:
.
.
while (*line != '#') {
strcat(entry, strcat(line, "\r\n"));
get_one_line(fl, line);
}
el.min_level = 0;
if ((*line == '#') && (*(line + 1) != 0))
el.min_level = atoi((line + 1));
el.min_level = MAX(0, MIN(el.min_level, LVL_IMPL));
/* now, add the entry to the index with each keyword on the keyword line */
el.duplicate = 0;
.
.
3) change do_help like so:
.
.
if (found < 0) {
send_to_char("There is no help on that word.\r\n", ch);
sprintf(buf, "HELP: %s tried to get help on %s.", GET_NAME(ch),
argument);
mudlog(buf, NRM, LVL_IMPL, TRUE);
return;
} else {
if (GET_LEVEL(ch) < help_table[found].min_level)
send_to_char("There is no help on that word.\r\n", ch);
else
page_string(ch->desc, help_table[found].entry, 0);
return;
}
}
now you can set the min level by ending help entries with a '#<level>'
instead of a '#' like this:
ADVANCE
Usage: advance <victim> <level>
ADVANCE moves a player to a new level. If used to promote a player to an
immortal level, and if you have the autowiz program installed, the wizlist and
immlist will automatically be recreated.
Example:
> advance rasmussen 34
See also: SET
#30
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST