Updated token documentation is here, and will be available through the sentience help system when it's in the main game.
Sorry for the lack of spaces. Formatting will be better when it's nice and released.
–---
-----------------------[Token Summary]–----------------------
Tokens are data structures that function as game defined flags
They are attached to characters, and can then be checked and
modified by scripts. Players cannot see tokens directly. They
exist in their own vnum space alongside everything else.
TEDIT commands:
create vnum> - creates a new token
type
- sets the type
flag - toggles flags
timer - how long will this token last, 0 = no timer
ed - extra descriptions (identical to redit and oedit ED)
***NOT COMPLETELY IMPLEMENTED***
value - sets the token's default values. These values can
be later changed (and checked) by scripts. Each is an
integer in the range 0-2000000000.
valuename - sets names for the token's values. Mostly to help
immortals in remembering which value represents what,
since value0-value3 isn't very descriptive.
-------------------------[Token Types]–----------------------
These don't have a whole lot of use now; they are mainly for documentation.
As the system is expanded, they will get more use (i.e. people will be able
view their ongoing quests and completed quests using a command like "score
quests".)
general - general purpose tokens
quest - given after quests, inherently singular
affect - gives a pseudo affect to the target
skill - gives a scripted skill to the target
-------------------------[Token Flags]–----------------------
These describe qualities of the token, mainly how long it sticks around.
purge_death Purge when the player dies
purge_idle Purge when the player idles (enters the void)
purge_quit Purge when the player quits
purge_reboot Purge when the game has rebooted since last login
purge_rift Purge when the player enters the rift
----------------[Token Related Commands]–-------------
tshow - Shows you TEDIT info for a particular vnum.
tlist [name] - Displays all tokens in your current area;
a name keyword argument can be added.
token - Gives a token to a player, or removes it from
them.
–--------------[Token Related Script Commands]–-------------
These commands can be used in any script. They cannot currently
be abreviated.
token give Example: token give $n 1201
Creates the token of specified vnum and attaches it to a
character (either PC or NPC). Currently, only one token
of each vnum can be loaded on a character at one time.
token junk Example: token junk $n 1201
Removes token of specified vnum from a character.
token adjust Example: token adjust $n 1201 4 + 30
Adjusts one of the token's values (or its timer) using
simple integer arithmetic.
Operators:
= set to value
+ add value
- subtract value
* multiply by value
/ divide by value
% modulus
-------------------[Token Related If-Checks]–----------------
These ifchecks can be used in any script.
hastoken $* vnum
Example:
if hastoken $n 1201
Checks if token of vnum has been assigned to a character.
tokenvalue $* vnum v# operator testnumber
Example:
if valuetoken $n 1201 2 == 9000
if valuetoken $n 1201 2 >= 9000
if valuetoken $n 1201 2 <= 9000
if valuetoken $n 1201 2 > 9000
if valuetoken $n 1201 2 < 9000
if valuetoken $n 1201 2 != 9000
Performs checks on the token's values.