Wand of decoys
From NWNWiki
Contents |
[edit] Wand of Decoys
[edit] What it does
Creates an decoy to distract the enemies
[edit] Notes
If you ever played diablo 2 and used an amazon you'll know what I'm talking about. There's a few steps you need to do before you past in the script.
First you need to create a "decoy" blue print. It's really easy, just create a new monster and set its appearence to the combat dummy and make sure its blue print reference is called "decoy", the faction is set to commoner, and the mobility is set to immobile.
Second you need to create the wand and give it the tag "WandOfDecoy" and give it the property of "unique power - 3 use/day"
[edit] The Script
Add it to your module's OnActivateItem event
void main()
{
object oItem = GetItemActivated();
object oActivator = GetItemActivator();
location lTarget = GetItemActivatedTargetLocation();
if (GetTag(oItem) == "WandOfDecoy")
{
object decoy = CreateObject( OBJECT_TYPE_CREATURE , "decoy" , lTarget);
// some special fx to go with it
ApplyEffectAtLocation( DURATION_TYPE_INSTANT , EffectVisualEffect( VFX_FNF_SUMMON_MONSTER_1 ) , lTarget);
// destroy it after 60 seconds
DestroyObject( decoy , 60.0);
}
}
[edit] Footnote
As you can see, the script itself it's not difficult. I just thought this is an interesting idea that I wanted to share with the community. On my server I actually have making decoys implemented as a sub-class skill for my ninja guild. My server's name is called " ! Kelahar's Seal" Under Action, server vault catagory.
