Spells to fix for Rose, so they target both wielded weapons.
Posted: Sat Dec 05, 2015 11:47 pm
Here come the infernal list of spells you need to walk over Rose. Enjoy
Druids - Healing sting - 2d12 electrical damage.
---
//::///////////////////////////////////////////////
//:: Healing Sting
//:: X2_S0_HealStng
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
// complete redesign now imbuing target held weapon with the power of lightning giving it 2d12 electrical Damage bonus.
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_ELECTRICAL, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_ELECTRICAL), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
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);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
wizards and sorcerors - flameweapon - 2d12 firedamage
---
//::///////////////////////////////////////////////
//:: Flame Weapon
//:: X2_S0_FlmeWeap
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gives a melee weapon 1d4 fire damage +1 per caster
level to a maximum of +10.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Nov 29, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 08, 2003
//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller
//:: 2003-07-15: Complete Rewrite to make use of Item Property System
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLevel)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(124,nCasterLevel), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
// Tarashon messed with it giving max +20 - makes sense casters give stronger than clerics.
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_FIRE, IP_CONST_DAMAGEBONUS_2d12), 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 oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), 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(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Priest - darkfire - 2d12 cold damage
---
//::///////////////////////////////////////////////
//:: Darkfire
//:: X2_S0_Darkfire
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gives a melee weapon 1d6 fire damage +1 per two caster
levels to a maximum of +10.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Dec 04, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 08, 2003
//:: 2003-07-29: Rewritten, Georg Zoeller
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_COLD, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_COLD), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
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_COLD);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Rangers - Bladethirst - 2d12 acid
---
// complete redesign og bladethirst now giving it 2d12 damage from flames of acidic fires - life force.
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_ACID, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_ACID), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
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);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Paladins - Bless Weapon - 2d12 divine and +3
---
//::///////////////////////////////////////////////
//:: Bless Weapon
//:: X2_S0_BlssWeap
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
If cast on a crossbow bolt, it adds the ability to
slay rakshasa's on hit
If cast on a melee weapon, it will add the
grants a +1 enhancement bonus.
grants a +2d6 damage divine to undead
will add a holy vfx when command becomes available
If cast on a creature it will pick the first
melee weapon without these effects
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Nov 28, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 09, 2003
//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller
//:: 2003-07-15: Complete Rewrite to make use of Item Property System
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
}
void AddBlessEffectToWeapon(object oTarget, float fDuration)
{
// If the spell is cast again, any previous enhancement boni are kept
IPSafeAddItemProperty(oTarget, ItemPropertyEnhancementBonus(3), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE);
// Replace existing temporary anti undead boni
//IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonusVsRace(IP_CONST_RACIALTYPE_UNDEAD, IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_1d4), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING );
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_HOLY), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE );
return;
}
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_SUPER_HEROISM);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
object oTarget = GetSpellTargetObject();
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
// ---------------- TARGETED ON BOLT -------------------
if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
{
// special handling for blessing crossbow bolts that can slay rakshasa's
if (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
{
SignalEvent(GetItemPossessor(oTarget), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(123,1), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING );
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oTarget));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oTarget), RoundsToSeconds(nDuration));
return;
}
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
AddBlessEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Kindly observe this is what happens when I, tarashon, messes around with the spells and scripts in generel. It does not like this when Seeker is working
Happy working Rose, and thx for doing this
/tara
Druids - Healing sting - 2d12 electrical damage.
---
//::///////////////////////////////////////////////
//:: Healing Sting
//:: X2_S0_HealStng
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
// complete redesign now imbuing target held weapon with the power of lightning giving it 2d12 electrical Damage bonus.
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_ELECTRICAL, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_ELECTRICAL), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
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);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
wizards and sorcerors - flameweapon - 2d12 firedamage
---
//::///////////////////////////////////////////////
//:: Flame Weapon
//:: X2_S0_FlmeWeap
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gives a melee weapon 1d4 fire damage +1 per caster
level to a maximum of +10.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Nov 29, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 08, 2003
//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller
//:: 2003-07-15: Complete Rewrite to make use of Item Property System
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLevel)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(124,nCasterLevel), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
// Tarashon messed with it giving max +20 - makes sense casters give stronger than clerics.
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_FIRE, IP_CONST_DAMAGEBONUS_2d12), 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 oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), 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(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Priest - darkfire - 2d12 cold damage
---
//::///////////////////////////////////////////////
//:: Darkfire
//:: X2_S0_Darkfire
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gives a melee weapon 1d6 fire damage +1 per two caster
levels to a maximum of +10.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Dec 04, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 08, 2003
//:: 2003-07-29: Rewritten, Georg Zoeller
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_COLD, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_COLD), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
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_COLD);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Rangers - Bladethirst - 2d12 acid
---
// complete redesign og bladethirst now giving it 2d12 damage from flames of acidic fires - life force.
#include "x2_inc_spellhook"
/* This function has been replaced for optimization reasons
void AddFlamingEffectToWeapon(object oTarget, float fDuration, int nCasterLvl)
{
// If the spell is cast again, any previous itemproperties matching are removed.
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(127,nCasterLvl), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_FIRE), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
return;
}
*/
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_ACID, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_ACID), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
}
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);
eVis = EffectLinkEffects(EffectVisualEffect(VFX_IMP_FLAME_M),eVis);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
//Limit nCasterLvl to 10, so it max out at +10 to the damage.
//Bugfix: Limiting nCasterLvl to *20* - the damage calculation
// divides it by 2.
if(nCasterLvl > 20)
{
nCasterLvl = 20;
}
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
AddFlamingEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration),nCasterLvl);
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Paladins - Bless Weapon - 2d12 divine and +3
---
//::///////////////////////////////////////////////
//:: Bless Weapon
//:: X2_S0_BlssWeap
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
If cast on a crossbow bolt, it adds the ability to
slay rakshasa's on hit
If cast on a melee weapon, it will add the
grants a +1 enhancement bonus.
grants a +2d6 damage divine to undead
will add a holy vfx when command becomes available
If cast on a creature it will pick the first
melee weapon without these effects
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Nov 28, 2002
//:://////////////////////////////////////////////
//:: Updated by Andrew Nobbs May 09, 2003
//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller
//:: 2003-07-15: Complete Rewrite to make use of Item Property System
#include "nw_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
void AddFlamingEffectToWeapon( object oTarget, float fDuration, int nCasterLvl)
{
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
}
void AddBlessEffectToWeapon(object oTarget, float fDuration)
{
// If the spell is cast again, any previous enhancement boni are kept
IPSafeAddItemProperty(oTarget, ItemPropertyEnhancementBonus(3), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE);
// Replace existing temporary anti undead boni
//IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonusVsRace(IP_CONST_RACIALTYPE_UNDEAD, IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_1d4), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING );
IPSafeAddItemProperty(oTarget, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_DIVINE, IP_CONST_DAMAGEBONUS_2d12), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_HOLY), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE );
return;
}
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_SUPER_HEROISM);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
object oTarget = GetSpellTargetObject();
int nDuration = 2 * GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration * 2; //Duration is +100%
}
// ---------------- TARGETED ON BOLT -------------------
if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
{
// special handling for blessing crossbow bolts that can slay rakshasa's
if (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
{
SignalEvent(GetItemPossessor(oTarget), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(123,1), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING );
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oTarget));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oTarget), RoundsToSeconds(nDuration));
return;
}
}
object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon();
if(GetIsObjectValid(oMyWeapon) )
{
SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
if (nDuration>0)
{
AddBlessEffectToWeapon(oMyWeapon, TurnsToSeconds(nDuration));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), TurnsToSeconds(nDuration));
}
return;
}
else
{
FloatingTextStrRefOnCreature(83615, OBJECT_SELF);
return;
}
}
---
Kindly observe this is what happens when I, tarashon, messes around with the spells and scripts in generel. It does not like this when Seeker is working
Happy working Rose, and thx for doing this
/tara