Originally posted by DeathWalker:
Is it possible to cause an NPC to cast a spell when i hit it with one of my own?
No. There is no "hit by spell" event on an NPC. Furthermore, the event objects all default to the player. Calling a "Spell wizard" to launch a spell will make the player cast it, not the NPC that was just targetted.
Can NPCs cast offensive spells on one another if i mark them as defensive?
Yes, but not in this way. Offensive/defensive only matters in regards to whether the NPC will cast it in order to attack or defend. You will want to make the target "allies" to get the NPC to cast it on other aggressive NPCs. Passive NPCs can never cast spells, nor can they be targetted.
i.e. a defensive fire ball spell. could such a spell be cast from one NPC on another?
Im trying to make a confuse spell that causes an NPC to cast negetive spells at allies on a set interval and duration.
There is one problem with this, in that you can't alter an existing NPC. You can't add a spell to its spell list, nor tell it to cast a spell. You can't switch its mode from aggressive to defensive caster.
You can only replace an NPC with a different one, which would have the same result as what you want. HOWEVER(here's the infamous "but"), you can not do this externally of the NPC. Ie, you can't cast a spell at an NPC and have it switch the NPC out. The reason is that you can't get the coordinates of the NPC unless the NPCs events are run, which does not happen with a player-initiated spell.
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)