
Basically I'm looking to create a library of spells that can just be called. With something simple like; !spell Fireball
or
!spell Black Tentacles Then, the !spell API looks up the values of the spell fireball and spits it into the PC2 script. The only thing I can think of is the function built into the PC2 script, but the rolls have to be resolved before that point if I remember right. Anyone know a good way to handle this, or if it's already been handled by a better spell library? And example entry in the library would more or less go like this; if (spellName == "Fireball") {
if (CL > 10) CL = 10;
var spellText = "--name|~C @@ <a href="http://www.dandwiki.com/wiki/SRD:Fireball||" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Fireball||</a> Fireball@@ ~C --School|Evocation [Fire] --Level|Sor/Wiz 3 --Components|V, S, M --Casting Time|1 Standard Action --Range|Long [[400 + (40 * "+CL+")]]ft. --Area|20 ft. Radius Spread --Duration|Instantaneous --Saving Throw|Reflex DC[[10+3+@{CasterAttr}]] Half --Spell Resistance|Yes --Damage|[["+CL+"d6]]";
}; I figure this may be the best way to cut down on the 800 macros clutter for some offensive spellcasters. Because the entire spell list macro jumble can get summed down into; !spell ?{Spell Name?} Then in the !spell API you just make some "if" checkers to make sure the token/character has all the right attributes or if the spell name is listed. And voilla, easy spells.