Manual:DIL Manual/delcolor()
Jump to navigation
Jump to search
delcolor()
Function (integer). Removes one of a player's own colours.
delcolor(pc : unitptr, key : string)
Removes key from the player's personal colours. Text in that colour then shows in
the game's default for the key (from vme/etc/color.def), if it has one.
Parameters
| Name | Type | Meaning |
|---|---|---|
| pc | unitptr | The player. Must be a PC. |
| key | string | The colour's name: 1 to 20 letters, digits or _.
|
Returns
Integer: TRUE when the colour was removed, FALSE when the player
didn't have it. It fails, and writes a line to the zone's log, when pc is null or
not a PC, or when the key is empty, too long or has other characters.
Notes
- A key is matched by abbreviation:
delcolor(pc, "cl")removes the player's first
key that begins with cl. Give the whole key.
Example
dilbegin left_clan(pc : unitptr);
var
i : integer;
code
{
i := delcolor(pc, "clan_who");
if (i)
sendtext("Your clan colour is gone.<br/>", pc);
quit;
}
dilend
Removes the colour a clan gave its member, for instance when they leave the clan.