bits.help

bits.help · 1.4 KB

From the archive QuestBits.zip

Download the archive   « Back to the archive contents

To create a new abit or qbit, use the setabit and setqbit commands:
setabit <number> <description>
setqbit <number> <description>

The range for numbers is from 0 to 32000, and is defined as MAX_xBITS
just above the struct in mud.h. To raise or lower it, change the #define
and recompile your mud.

To see what bits exist, use the showabit and showqbit commands.
showabit <number>   /* Show the abit at <number> */
showqbit <number>   /* Show the qbit at <number> */
showabit all        /* List all abits */
showqbit all        /* List all qbits */

To set abits or qbits on characters manually, or see which ones characters have
on
them, use the abit and qbit commands:
abit <victim> [number]
qbit <victim> [number]

Without an argument, they'll list the bits, with an argument, they'll toggle the
bit
on or off.

Mob progs can use mpaset and mpqset to toggle bits on or off:
mpaset <victim> <number>
mpqset <victim> <number>

Mob progs can also use the hasabit and hasqbit ifchecks to check the
state of a bit on a character. Example:

if hasabit($n) == 3100
say Welcome back, $n.
else
say You're new around here, aren't you, $n?
mpaset $n 3100
endif

They can also check for a bit being turned off. Example:

if hasqbit($n) != 8546
say Haven't you completed your quest yet, $n?
else
say Congratulations, $n! You've completed the quest!
endif

Site Stats

Snippets: 1791
Codebases: 571