<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Token Documentation]]></title><description><![CDATA[<p dir="auto">This is mostly just a placeholder for token discussion. God knows there's enough of it to fill a thread, so I figure I'll just get this posted, so I can replace it with real ideas when I get back to it.</p>
]]></description><link>https://forum.v2.sentiencemud.net/topic/347/token-documentation</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 01:39:29 GMT</lastBuildDate><atom:link href="https://forum.v2.sentiencemud.net/topic/347.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Apr 2006 03:00:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Token Documentation on Sat, 29 Jul 2006 06:40:05 GMT]]></title><description><![CDATA[<p dir="auto">Updated token documentation is here, and will be available through the sentience help system when it's in the main game.</p>
<p dir="auto">Sorry for the lack of spaces. Formatting will be better when it's nice and released.</p>
<p dir="auto">–---</p>
<p dir="auto">-----------------------[Token Summary]–----------------------</p>
<p dir="auto">Tokens are data structures that function as game defined flags</p>
<p dir="auto">They are attached to characters, and can then be checked and</p>
<p dir="auto">modified by scripts. Players cannot see tokens directly. They</p>
<p dir="auto">exist in their own vnum space alongside everything else.</p>
<p dir="auto">TEDIT commands:</p>
<p dir="auto">create vnum&gt; - creates a new token</p>
<p dir="auto">type &lt;type&gt;- sets the type</p>
<p dir="auto">flag &lt;flags&gt;- toggles flags</p>
<p dir="auto">timer &lt;ticks&gt;- how long will this token last, 0 = no timer</p>
<p dir="auto">ed &lt;command&gt;&lt;/command&gt;- extra descriptions (identical to redit and oedit ED)</p>
<p dir="auto"><em><strong>NOT COMPLETELY IMPLEMENTED</strong></em></p>
<p dir="auto">value &lt;v#&gt;&lt;value&gt;- sets the token's default values. These values can</p>
<p dir="auto">be later changed (and checked) by scripts. Each is an</p>
<p dir="auto">integer in the range 0-2000000000.</p>
<p dir="auto">valuename &lt;v#&gt;&lt;string&gt;- sets names for the token's values. Mostly to help</p>
<p dir="auto">immortals in remembering which value represents what,</p>
<p dir="auto">since value0-value3 isn't very descriptive.</p>
<p dir="auto">-------------------------[Token Types]–----------------------</p>
<p dir="auto">These don't have a whole lot of use now; they are mainly for documentation.</p>
<p dir="auto">As the system is expanded, they will get more use (i.e. people will be able</p>
<p dir="auto">view their ongoing quests and completed quests using a command like "score</p>
<p dir="auto">quests".)</p>
<p dir="auto">general - general purpose tokens</p>
<p dir="auto">quest - given after quests, inherently singular</p>
<p dir="auto">affect - gives a pseudo affect to the target</p>
<p dir="auto">skill - gives a scripted skill to the target</p>
<p dir="auto">-------------------------[Token Flags]–----------------------</p>
<p dir="auto">These describe qualities of the token, mainly how long it sticks around.</p>
<p dir="auto">purge_death Purge when the player dies</p>
<p dir="auto">purge_idle Purge when the player idles (enters the void)</p>
<p dir="auto">purge_quit Purge when the player quits</p>
<p dir="auto">purge_reboot Purge when the game has rebooted since last login</p>
<p dir="auto">purge_rift Purge when the player enters the rift</p>
<p dir="auto">----------------[Token Related Commands]–-------------</p>
<p dir="auto">tshow &lt;vnum&gt;- Shows you TEDIT info for a particular vnum.</p>
<p dir="auto">tlist [name] - Displays all tokens in your current area;</p>
<p dir="auto">a name keyword argument can be added.</p>
<p dir="auto">token &lt;give|junk&gt;&lt;player&gt;&lt;vnum&gt;- Gives a token to a player, or removes it from</p>
<p dir="auto">them.</p>
<p dir="auto">–--------------[Token Related Script Commands]–-------------</p>
<p dir="auto">These commands can be used in any script. They cannot currently</p>
<p dir="auto">be abreviated.</p>
<p dir="auto">token give &lt;victim&gt;&lt;vnum&gt;Example: token give $n 1201</p>
<p dir="auto">Creates the token of specified vnum and attaches it to a</p>
<p dir="auto">character (either PC or NPC). Currently, only one token</p>
<p dir="auto">of each vnum can be loaded on a character at one time.</p>
<p dir="auto">token junk &lt;victim&gt;&lt;vnum&gt;Example: token junk $n 1201</p>
<p dir="auto">Removes token of specified vnum from a character.</p>
<p dir="auto">token adjust &lt;victim&gt;&lt;vnum&gt;&lt;v#|timer&gt;&lt;operatior&gt;&lt;value&gt;Example: token adjust $n 1201 4 + 30</p>
<p dir="auto">Adjusts one of the token's values (or its timer) using</p>
<p dir="auto">simple integer arithmetic.</p>
<p dir="auto">Operators:</p>
<p dir="auto">= set to value</p>
<ul>
<li>add value</li>
</ul>
<ul>
<li>subtract value</li>
</ul>
<ul>
<li>multiply by value</li>
</ul>
<p dir="auto">/ divide by value</p>
<p dir="auto">% modulus</p>
<p dir="auto">-------------------[Token Related If-Checks]–----------------</p>
<p dir="auto">These ifchecks can be used in any script.</p>
<p dir="auto">hastoken $* vnum</p>
<p dir="auto">Example:</p>
<p dir="auto">if hastoken $n 1201</p>
<p dir="auto">Checks if token of vnum has been assigned to a character.</p>
<p dir="auto">tokenvalue $* vnum v# operator testnumber</p>
<p dir="auto">Example:</p>
<p dir="auto">if valuetoken $n 1201 2 == 9000</p>
<p dir="auto">if valuetoken $n 1201 2 &gt;= 9000</p>
<p dir="auto">if valuetoken $n 1201 2 &lt;= 9000</p>
<p dir="auto">if valuetoken $n 1201 2 &gt; 9000</p>
<p dir="auto">if valuetoken $n 1201 2 &lt; 9000</p>
<p dir="auto">if valuetoken $n 1201 2 != 9000</p>
<p dir="auto">Performs checks on the token's values.&lt;/value&gt;&lt;/operatior&gt;&lt;/v#|timer&gt;&lt;/vnum&gt;&lt;/victim&gt;&lt;/vnum&gt;&lt;/victim&gt;&lt;/vnum&gt;&lt;/victim&gt;&lt;/vnum&gt;&lt;/player&gt;&lt;/give|junk&gt;&lt;/vnum&gt;&lt;/string&gt;&lt;/v#&gt;&lt;/value&gt;&lt;/v#&gt;&lt;/ticks&gt;&lt;/flags&gt;&lt;/type&gt;</p>
]]></description><link>https://forum.v2.sentiencemud.net/post/3674</link><guid isPermaLink="true">https://forum.v2.sentiencemud.net/post/3674</guid><dc:creator><![CDATA[Syn]]></dc:creator><pubDate>Sat, 29 Jul 2006 06:40:05 GMT</pubDate></item></channel></rss>