Kuraybin Posted July 2, 2006 Share Posted July 2, 2006 Does anyone know how to write a script for a weapon that has, say a 15 percent chance to cast Demoralize 150pt for 5 seconds on strike? The script I have is something like this... scn eDragonFear short randomshort randomAttackref Actor begin ScriptEffectStart set random to GetRandomPercent if ( random <= 15 ) set Actor to getSelf if ( Actor != player ) Cast 00SDragonFear Player pme DEMO 5 pms effectEnchantIllusion 5 endif endif end where 00SDragonFear is the name of the spell that casts the demoralize effect. However it isnt working how I had hoped. What I'm really looking for is something that doesnt have to use a spell to cast, and instead just modify the actor (i.e. what I'm hitting) to just run away. And please, no posts saying to just enchant something with an effect....im trying to make a weapon with a CHANCE to do it, just to keep things...interesting :D Thanks,-Kuraybin Link to comment Share on other sites More sharing options...
GBHis Posted July 2, 2006 Share Posted July 2, 2006 Create an enchantment :) A "foo" enchanment with a script-effect attached..? Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 2, 2006 Share Posted July 2, 2006 All scripts have to be attached to an object, spell, or quest. So the problem is in how to apply that script without using a spell. While you could make a single npc with a "onhitwith", followed by the random chance, you would need to apply that block to any and all actors you want the script to run on. The problem of course is that would end up creating script problems everywhere and be a hell of alot of work just to get around the magic effect. However, as a scripted magic effect enchanted on an item the effect can be applied to virtually anyone. If you set the enchantment cost to 0, the effect won't drain the charges on the weapon. I don't think there is any other way. Link to comment Share on other sites More sharing options...
GBHis Posted July 3, 2006 Share Posted July 3, 2006 All scripts have to be attached to an object, spell, or quest. So the problem is in how to apply that script without using a spell. While you could make a single npc with a "onhitwith", followed by the random chance, you would need to apply that block to any and all actors you want the script to run on. The problem of course is that would end up creating script problems everywhere and be a hell of alot of work just to get around the magic effect. However, as a scripted magic effect enchanted on an item the effect can be applied to virtually anyone. If you set the enchantment cost to 0, the effect won't drain the charges on the weapon. I don't think there is any other way.That was what I meant, but you wrote it much better. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.