Spells to fix for Rose, so they target both wielded weapons.

For in-game support requests, and bug reports.
User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Tue Feb 02, 2016 5:04 pm

Fixed and also the visual effects should now be added using Assasin- and Blackguard weapon powers. Needs testing still though.

Thanks for the help creating the scripts Rose :)

/tara

User avatar
Li'l Rose
Posts: 142
Joined: Thu Apr 09, 2015 8:19 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by Li'l Rose » Tue Feb 02, 2016 9:48 pm

You are welcome. :D

User avatar
Li'l Rose
Posts: 142
Joined: Thu Apr 09, 2015 8:19 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by Li'l Rose » Tue Feb 02, 2016 10:31 pm

Well, I have tested both the weapon power visual effects, and dispel on rest. The dispel on rest works fine. The weapon visual effect still does not work at all.

User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Tue Feb 02, 2016 11:25 pm

Grr...

I'll look at it ( again ) tomorrow...

/tara

User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Wed Feb 03, 2016 11:38 pm

Have posted the script ( blackguard weapon ) on DM scripter channel to see if Seeker can fix it...

/tara

User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Thu Feb 04, 2016 7:46 pm

According to Seeker there is actually nothing adding visual to the actual weapons but merely to the owner, which wont show then.

I've tried another approach so lest see if it works now...

/tara

User avatar
Li'l Rose
Posts: 142
Joined: Thu Apr 09, 2015 8:19 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by Li'l Rose » Sat Feb 06, 2016 9:22 pm

Try this for keen spell. I made it from the weapon damage spells.

Code: Select all

//::///////////////////////////////////////////////
//:: Keen
//:: X2_S0_keenedge
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
 Gives a melee weapon keen property.
*/
//:://////////////////////////////////////////////
//:: Created By: Rose
//:: Created On: Feb 6, 2016
//:://////////////////////////////////////////////


#include "nw_i0_spells"
#include "x2_i0_spells"

#include "x2_inc_spellhook"


void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
    IPSafeAddItemProperty(oTarget, ItemPropertyKeen(), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
}


void main()
{

 /*
 Spellcast Hook Code
 Added 2003-07-07 by Georg Zoeller
 If you want to make changes to all spells,
 check x2_inc_spellhook.nss to find out more

 */
 if (!X2PreSpellCastCode())
 {
     // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
     return;
 }
 // End of Spell Cast Hook


 //Declare major variables
 effect eVis = EffectVisualEffect(VFX_IMP_PULSE_FIRE);
 effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
 int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
 int nMetaMagic = GetMetaMagicFeat();
 int nCasterLvl = GetCasterLevel(OBJECT_SELF);

 //Limit nCasterLvl to 20, so it max out at +10 to the damage.
 if(nCasterLvl > 20)
 {
     nCasterLvl = 20;
 }

 if (nMetaMagic == METAMAGIC_EXTEND)
 {
     nDuration = nDuration * 2; //Duration is +100%
 }

 object oTarget = GetSpellTargetObject();
 if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
 {
    // Alter the right hand weapon equipped by the creature.
    object oWeapon1 = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget);
    if(GetIsObjectValid(oWeapon1))
    {
        // If the PC has a melee weapon equipped.
        if ( IPGetIsMeleeWeapon(oWeapon1))
        {
            SignalEvent(oWeapon1, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));

            if (nDuration>0)
            {
                // haaaack: store caster level on item for the on hit spell to work properly
                ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oWeapon1));
                ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oWeapon1), TurnsToSeconds(nDuration));
                AddFlamingEffectToWeapon(oWeapon1, TurnsToSeconds(nDuration),nCasterLvl);
            }
        }
        else
        {
            FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
        }
    }
    // Alter the left hand weapon equipped by the creature.
    object oWeapon2 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTarget);
    if(GetIsObjectValid(oWeapon2))
    {
        // If the PC has a melee weapon equipped.
        if ( IPGetIsMeleeWeapon(oWeapon2))
        {
            SignalEvent(oWeapon2, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));

            if (nDuration>0)
            {
                // haaaack: store caster level on item for the on hit spell to work properly
                ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oWeapon2));
                ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oWeapon2), TurnsToSeconds(nDuration));
                AddFlamingEffectToWeapon(oWeapon2, TurnsToSeconds(nDuration),nCasterLvl);
            }
        }
        else
        {
            FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
        }
    }
    // Alter the right claw equipped by the creature.
    object oWeapon3 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oTarget);
    if(GetIsObjectValid(oWeapon3))
    {
        SignalEvent(oWeapon3, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));

        if (nDuration>0)
        {
            // haaaack: store caster level on item for the on hit spell to work properly
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oWeapon3));
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oWeapon3), TurnsToSeconds(nDuration));
            AddFlamingEffectToWeapon(oWeapon3, TurnsToSeconds(nDuration),nCasterLvl);
        }
    }
    // Alter the left claw equipped by the creature.
    object oWeapon4 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oTarget);
    if(GetIsObjectValid(oWeapon4))
    {
        SignalEvent(oWeapon4, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));

        if (nDuration>0)
        {
            // haaaack: store caster level on item for the on hit spell to work properly
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oWeapon4));
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oWeapon4), TurnsToSeconds(nDuration));
            AddFlamingEffectToWeapon(oWeapon4, TurnsToSeconds(nDuration),nCasterLvl);
        }
    }
    // Alter the bite equipped by the creature.
    object oWeapon5 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oTarget);
    if(GetIsObjectValid(oWeapon5))
    {
        SignalEvent(oWeapon5, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));

        if (nDuration>0)
        {
            // haaaack: store caster level on item for the on hit spell to work properly
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oWeapon5));
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oWeapon5), TurnsToSeconds(nDuration));
            AddFlamingEffectToWeapon(oWeapon5, TurnsToSeconds(nDuration),nCasterLvl);
        }
    }
    }
    else
    {
        SendMessageToPC(OBJECT_SELF, "You must target a creature!");
        return;
    }
}

User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Sat Feb 06, 2016 9:24 pm

basically override keen spell script with this ?

/tara

User avatar
Li'l Rose
Posts: 142
Joined: Thu Apr 09, 2015 8:19 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by Li'l Rose » Mon Feb 15, 2016 7:07 pm

Seems that the weapon damage spell visual effects for assassins does work, so perhaps can do the same for blackguards.

User avatar
tarashon
Posts: 857
Joined: Sun Jan 11, 2015 6:27 pm

Re: Spells to fix for Rose, so they target both wielded weapons.

Post by tarashon » Mon Feb 15, 2016 7:11 pm

Hmm i did the same for both spells so really strange its not working for Blackguard. My best bet is it has to do with the excact visual type being "EVIL", as their is no "NEGATIVE", visual effect.

( if i recall it right )

/tara

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests