Author Sticky: Post Working Scripts Here
Faustt D'Arcaanin Posted: Tuesday, 16 July 03:39AM
Name: Scimitar of Dancing
Author: Faustt D`Arcaanin

This is a series of small scripts that . . when combined with a few custom made items will make a Fabled Scimitar of Dancing. . .

Step1. Create a custom scimitar
I called mine "FD_ScimDancWep". . it is a simple scimitar +3 enhanced. . .but in properties you must give it the ability cast spell: unique power . . this allows you to right click it and cast a spell at a location. . i put it to be used 1/day. Worked well for me. . .
ok this step done. . .

Step2. Create the wielder
I called mine "FD_ScimDancMob". . . it is a human modeled lvl 5 fighter that when i went to pick a head and other body parts i made them all the first one on list (effectively making him invis) the only problem is you cannot get rid of all polygons. . so i left the hand wielding the scimitar and made it dark black to blend in.

Step3. Equip the wielder/make him invincible
ok that scimitar you made equip him with it and make it not droppable. also if youd like to make it more like a real flying magic sword. . .i made a custom ring with a bunch of immunities and resistances. . .i mean the only real things that could hurt a magic sword would be ultra hot fire, acid, sonic, cold, and bludgeon in my opinion . . so i gave it 90% immune to those types and 100 to all rest. . .also gave it freedom of movement. now this seems uber. . but the fact that it is only a lvl 5 fighter means it has very low hp and really doesnt do much damage. . but it sure can be a diversion if you need to run . . .all these can be tweaked to your taste also.

Step4. Scripts

NWScript:
void main()

{

    object oPlayer = GetItemActivator();

    object oItem = GetItemActivated();

    location lLoc = GetItemActivatedTargetLocation();

    if(GetIsObjectValid(oItem))

    {

        if(GetIsObjectValid(oPlayer))

        {

            if(GetTag(oItem) == "FD_ScimDancWep")

            {

                ApplyEffectAtLocation(DURATION_TYPE_INSTANT,

                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), lLoc);

                ApplyEffectAtLocation(DURATION_TYPE_INSTANT,

                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), lLoc);

                object oMob = CreateObject(OBJECT_TYPE_CREATURE, "fd_scimdancmob",

                  lLoc, TRUE);

                AddHenchman(oPlayer,oMob);

                DestroyObject(oItem,0.0);

            }

        }

    }

}


this goes in the Modules 'OnActivateItem' event. It checks to make sure the item was the scim and then does some effects. . summons the wielder. . and takes it out of your inv. . .

NWScript:
if( GetCurrentAction(OBJECT_SELF)== ACTION_REST)

    {

        ClearAllActions();

        object oMaster = GetMaster(OBJECT_SELF);

        location lLoc = GetLocation(OBJECT_SELF);

        RemoveHenchman(oMaster,OBJECT_SELF);

        ApplyEffectAtLocation(DURATION_TYPE_INSTANT,

                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), lLoc);

        effect eDie = EffectDeath(TRUE,FALSE);

        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDie, OBJECT_SELF, 1.0);

        CreateItemOnObject("fd_scimdancwep", oMaster, 1);

    }


put this one anywhere in the main routine or the heartbeat of the "FD_ScimDancMob" to check if you are resting. . if so unsummon and give you your sword back. . .i know HB is 6 secs. . but rest is 30 so it will unsummon no prob.

NWScript:
if( GetCurrentHitPoints(GetMaster(OBJECT_SELF)) <= 0)

    {

        ClearAllActions();

        object oMaster = GetMaster(OBJECT_SELF);

        location lLoc = GetLocation(OBJECT_SELF);

        RemoveHenchman(oMaster,OBJECT_SELF);

        ApplyEffectAtLocation(DURATION_TYPE_INSTANT,

                  EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), lLoc);

        effect eDie = EffectDeath(TRUE,FALSE);

        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDie, OBJECT_SELF, 1.0);

        CreateItemOnObject("fd_scimdancwep", oMaster, 1);

    }


I put this one in the OnCombatEnd event of "FD_ScimDancMob" to check if the player is dead. . if so the sword unsummons and goes back in your pouch.

NWScript:
void main()

{

    ClearAllActions();

        object oMaster = GetMaster(OBJECT_SELF);

        location lLoc = GetLocation(OBJECT_SELF);

        RemoveHenchman(oMaster,OBJECT_SELF);

        ApplyEffectAtLocation(DURATION_TYPE_INSTANT,

            EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), lLoc);

        CreateItemOnObject("fd_scimdancwep", oMaster, 1);

}


this one is the entire OnDeath event of the mob. . .if of course goes back into your pouch when it dies. . .(which usually isnt that often)

the rest of the mobs scripts i use standard hencman scripts

OPTIONS: you can tweak any of the item settings you make or the wielder (or his uberfying ring). . .you can also make it more interesting by commenting out the createitem lines in each script . . and instead make the scim the mob wields droppable. . .this means when the spell wears off OR you die. .OR it dies instead of going back in your backpack . . it drops to the ground . .makes for neat roleplaying. . .

BUGS:
1.well if it dies. . .it comes back into your pouch with a charge rdy to summon again . .
2.the stinkin black hand . . looks good enough but i will update it as i find out how to do true invis. . .
3. if archers shoot at you . . you end up with a million little arrows sticking out of your pommel and hilt  kinda funny lookin

anyway lemme know what ya think. . .
Faustt D`Arcaanin

P.S. just realized you can use Null Human as the model and it works perfectly without that stinking black hand.. .