Manual:DIL Manual/pcflags
Jump to navigation
Jump to search
Contents
pcflags
Field (integer, read/write; units: PC).
pc.pcflags : integer
A player's option and status bits. Test them with isset() and change them with set() and unset(). The bits are defined in vme/include/vme.h:
| Constant | Meaning |
|---|---|
| PC_BRIEF | Brief room descriptions |
| PC_PK_RELAXED | Has chosen player killing |
| PC_INFORM | Is told when players enter the game |
| PC_COMPACT | Compact display |
| PC_NOWIZ | Doesn't hear the wiz channel |
| PC_SPIRIT | Is a dead player's spirit |
| PC_EXPERT | Gets details about the point system |
| PC_PROMPT | Prompt on |
| PC_ECHO | Sees its own communication echoed |
| PC_EXITS | Sees the exits of rooms |
| PC_NOSHOUTING | May not shout (a god's punishment) |
| PC_NOTELLING | May not tell (a god's punishment) |
| PC_NOSHOUT | Doesn't hear shouts |
| PC_NOTELL | Doesn't hear tells |
Notes
- Players only. On an NPC, an object, a room or null the field fails.
- Any zone can assign it.
- Stored as an unsigned 16-bit number: bits above
0x8000are lost.
Example
dilbegin toggle_nowiz(pc : unitptr);
code
{
if (pc.type != UNIT_ST_PC)
return;
if (isset(pc.pcflags, PC_NOWIZ))
{
unset(pc.pcflags, PC_NOWIZ);
sendtext("You now hear the wiz channel.<br/>", pc);
}
else
{
set(pc.pcflags, PC_NOWIZ);
sendtext("You no longer hear the wiz channel.<br/>", pc);
}
}
dilend
Turns the wiz channel off or on for a player, as wiz - and wiz + do in commands.zon.