Full Version : Casting Spells With XML
xmlspawner >>Q&A >>Casting Spells With XML
<< Prev | Next >>
Keshok- 06-04-2006
Ok I need to cast a spell with an XML spawner. Is that possible?
ArteGordon- 06-05-2006
you can use the CAST keyword to cast on triggering players.

QUOTE
- added the CAST keyword to allow the spawner to cast spells on triggering players. The syntax is "CAST,spellname[,arg]" or "CAST,spellnumber[,arg]" where spellname and spellnumber are the registered spell names and numbers found in Scripts/Spells/Initializer.cs.
This is used with triggering to allow the triggering mob/player to cause the spell to be cast with the triggering mob/player as the target. Both harmful and beneficial spells can be cast.
Casting normal circle spells does not use mana or reagents, Necro/Paladin spells use mana/tithing points of the caster, and both paladin and necro spells check for skill requirements on casting.
Karma effects will also be applied.
There are no casting delays, so multiple spells may be cast simultaneously. Some spells are are location targeted and can take an additional argument [,arg] which is a range value used to determine a random target location (+-range) relative to the caster. The default and mininum range value is 1. The Polymorph spell uses the 2nd argument as the bodyvalue.
For example, to set up a spawner to autoheal the triggering mob use the spawn spec "CAST,greaterhealspell".
To polymorph the triggering player into a bear use "CAST,polymorphspell,212".
To cast lightning on the triggering player "CAST,lightningspell", or to summon a creature "CAST,summoncreaturespell", or bladespirits "CAST,bladespiritsspell", and to cast it with a random target within +-5 squares of the player use "CAST,bladespiritspell,5".
Note, not all spells will work automatically. Item targeted spells such as mark, recall, and sacredjourney will cast and bring up a targeting cursor.

There are some limitations, and the way the spell system works, the spells must have a caster, and that is the triggering player.