<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fspell_levels</id>
	<title>Manual:DIL Manual/spell levels - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fspell_levels"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_levels&amp;action=history"/>
	<updated>2026-11-22T18:01:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_levels&amp;diff=2898&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_levels&amp;diff=2898&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:43Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= spell_levels =&lt;br /&gt;
'''Field''' (integer, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.spell_levels[i] : integer&lt;br /&gt;
&lt;br /&gt;
How many times the player has practised spell &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; (an &amp;lt;code&amp;gt;SPL_*&amp;lt;/code&amp;gt; number, 0 to &amp;lt;code&amp;gt;SPL_TREE_MAX&amp;lt;/code&amp;gt; - 1) since the last level gained. A guild teacher raises it at each practice (and raises a group's when the group goes up with it), and uses it in the price of the next practice: each practice at the same level costs more, and how many are allowed per level depends on the race and profession. Every level gained sets it back to 0 for all spells.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null, or with an index out of range, the field fails.&lt;br /&gt;
* Only a program whose first template is in a zone with access level 0 (fourth column of &amp;lt;code&amp;gt;vme/etc/zonelist&amp;lt;/code&amp;gt;) can assign it. Elsewhere vmc accepts the assignment, but at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in lvalue assignemt&amp;quot; and stops. Reading works in every zone.&lt;br /&gt;
* Stored as 0 to 255: other values wrap around.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer trained_now(pc : unitptr, spl : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   return (pc.spell_levels[spl] &amp;gt; 0);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells whether a player has practised a spell since the last level.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/spells|spells]]&lt;br /&gt;
* [[Manual:DIL Manual/spell costs|spell_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/skill levels|skill_levels]]&lt;br /&gt;
* [[Manual:DIL Manual/ability levels|ability_levels]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>