I want to create a new curse spell. Going to call it: “Zedlir’s Curse” a 5th lv spell
I want it to do the following:
Reduce AC by 5 points, reduce Str by 5 points and reduce Cons by 5 points.
I was going to use the Bestow Curse spell as a template, but the script shows only in brackets:
effect eCurse = EffectCurse(2, 2, 2, 2, 2, 2);
It doesn’t give the specific ability scores (i.e. -5 Str) I thought it would. I thought I would just use the str and cons values and try to add an AC value…but…sigh…it is never that straight forward like I thought it would be.
How can I use the template below to do this?
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Afflicted creature must save or suffer a -2 penalty
to all ability scores. This is a supernatural effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Bob McCabe
//:: Created On: March 6, 2001
//:://////////////////////////////////////////////
//:: Last Updated By: Preston Watamaniuk
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Update Pass By: Preston W, On: July 20, 2001
//:: modified by mr_bumpkin Dec 4, 2003
#include "prc_alterations"
#include "NW_I0_SPELLS"
#include "x2_inc_spellhook"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION);
/*
Spellcast Hook Code
Added 2003-06-23 by GeorgZ
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
object oTarget = GetSpellTargetObject();
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
effect eCurse = EffectCurse(2, 2, 2, 2, 2, 2);
//Make sure that curse is of type supernatural not magical
eCurse = SupernaturalEffect(eCurse);
if(!GetIsReactionTypeFriendly(oTarget))
{
//Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oTarget, SPELL_BESTOW_CURSE));
//Make SR Check
if (!MyPRCResistSpell(OBJECT_SELF, oTarget))
{
//Make Will Save
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, (GetSpellSaveDC()+ GetChangesToSaveDC(OBJECT_SELF))))
{
//Apply Effect and VFX
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}