GPDL $GET_SPELLBOOK

DungeonCraft Help Home

$GET_SPELLBOOK(actor, delimiters);



Returns a string containing the names of all spells in the character's spellbook. The spells are sorted by school, level, and name. The string is divided on four levels and the 'delimiters' define the characters that are used to divide the string. The default delimiters are “!@#$' if none (or too few) are specified.

In the examples below we assume that you wrote:

$GET_SPELLBOOK($CharacterContext(),”*$#@”);

The resulting string is a 'delimited string'. It contains a sub-string for each spell 'school'. And, in the example, the strings will be delimited by the character '*'. So the resulting string will be:

*school0string*school1String

Each of the 'school' strings contains a sub-string naming the school followed by a sub-string for each spell level. In our example, the sub-strings will be delimited by the character '$'. So, the sub-string for a single school will look like this:

$schoolname$level1string$level2string$level3string$level4string$level5string

and so on for each possible spell level.

Each of the 'level' strings contains a sub-string containing the level followed by a sub-string for each spell within that particular school and level. In our example, these sub-strings will be separated by the character '#'. Example of a level sub-string:

#3#spell1#spell2#spell3

And so on for each spell.

The 'Spell' substrings themselves contain sub-strings, separated in our example by the character '@'. Each spell sub-string has three sub-strings: The name of the spell, the selected count for the spell, and the memorized count for the spell. For example:

@Fireball@1@0

Here is an example of a complete string:


*$Cleric$#1#@Fire@1@0$#2#@Heal@0@0*$MU$#1#@Death Ray@2@1

What fun!